dotCMS / dotCMS/ai-workflows

Bug: Duplicate completion headers when consumer workflow has sub-workflows

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Platform Type : Enhancement
Dominant language
No language data
Stars
1
Forks
0
Avg merge
4h 4m
Merged PRs (30d)
1

Description

User Story

As a workflow maintainer using the claude-orchestrator, I want the orchestrator to handle consumer workflows with sub-workflows properly so that I don't get duplicate completion headers in PR comments.

Problem Description

When a consumer workflow (like deutschebank-infrastructure) uses the claude-orchestrator.yml@v1.0.0 and that consumer workflow has its own sub-workflows (audit artifact generation), the orchestrator generates duplicate completion headers.

Example of the duplicate output:

**Claude finished @sfreudenthaler's task** —— [View job](https://github.com/dotCMS/deutschebank-infrastructure/actions/runs/16233902403)

---
**Claude finished @sfreudenthaler's task** —— [View job](https://github.com/dotCMS/deutschebank-infrastructure/actions/runs/16233902403)

---
### Deutsche Bank Infrastructure Security Review...

Timeline & Root Cause

  • Issue started appearing ~2 hours ago during PR development
  • NOT related to changes in ai-workflows repo
  • Root cause: Started when consumer workflow added sub-workflows for audit artifact generation
  • Consumer workflow structure:
    jobs:
      claude-interactive:
        uses: dotCMS/ai-workflows/.github/workflows/claude-orchestrator.yml@v1.0.0
      
      claude-automatic-review:  
        uses: dotCMS/ai-workflows/.github/workflows/claude-orchestrator.yml@v1.0.0
        
      # These audit sub-workflows seem to trigger the duplicate headers
      create-audit-artifact-interactive:
        if: always()
        needs: [claude-interactive]
        uses: ./.github/workflows/create-audit-artifact.yml
        
      create-audit-artifact-automatic:
        if: always() 
        needs: [claude-automatic-review]
        uses: ./.github/workflows/create-audit-artifact.yml
    

Current Impact

  • Duplicate headers create noise in PR comments
  • Makes it harder for developers to find the actual review content
  • Affects user experience for busy developers who just want the review summary

Technical Tasks

Investigation Tasks
  • SPIKE: Determine how the orchestrator detects "completion" of consumer workflows
  • SPIKE: Identify if orchestrator monitors overall workflow completion vs individual job completion
  • SPIKE: Check if consumer sub-workflows trigger additional completion detection logic
Fix Implementation
  • Update orchestrator completion detection to handle consumer workflows with sub-workflows
  • Ensure completion header is generated only once per consumer workflow run
  • Add logic to distinguish between main orchestrator jobs and consumer sub-workflows
  • Test with both simple consumer workflows (no sub-workflows) and complex ones (with sub-workflows)
Testing & Validation
  • Test with deutschebank-infrastructure repo (has sub-workflows)
  • Test with simpler consumer repos (no sub-workflows) to ensure no regression
  • Verify completion headers appear exactly once regardless of consumer workflow complexity

Expected Behavior

  • Single completion header per consumer workflow run, regardless of sub-workflows
  • Consumer sub-workflows should not trigger additional completion detection
  • Maintain existing functionality for simple consumer workflows

Reference Links

Priority

Medium - Affects UX but doesn't break functionality. Would be nice to fix soon since it's creating noise for developers during reviews.


P.S. - My circuits are pretty confident this is a sub-workflow detection issue, not a coffee shortage in the orchestrator! ☕️🤖

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing completion detection in .github/workflows/claude-orchestrator.yml@v1.0.0 and compare it with the consumer workflow's create-audit-artifact.yml and PR #222. Reproduce the behavior with simple and sub-workflow consumers; done means exactly one completion header per workflow run without regressing simple consumers.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.