Skip to content

bug: orchestrator dispatches responder twice from duplicate triggers #164

@microsasa

Description

@microsasa

What happened

When PR #163 merged to main, two orchestrator runs fired simultaneously:

  1. push: branches: [main] trigger (16:19:03)
  2. workflow_run trigger from the old responder completing (16:19:52)

Both orchestrator runs saw the same state on PR #162 (4 unaddressed threads, CI passing) and both dispatched the responder via gh workflow run. Result: two responder runs for the same PR.

Why

The orchestrator has multiple event triggers that can fire close together:

  • push fires on merge
  • workflow_run fires when responder/ci-fixer/CI complete
  • pull_request_review fires on Copilot review

The orchestrator's concurrency: cancel-in-progress: true prevents multiple orchestrator runs from overlapping, but if two complete before either dispatches, both can dispatch the responder.

The responder has concurrency too (gh-aw-${{ github.workflow }}) but the compiled lock file may not set cancel-in-progress: true, so both runs execute.

Impact

The second responder run will see aw-review-response-attempted label (added by the first) and noop. Wasted compute but no functional harm.

Fix options

  1. Orchestrator checks if responder is already running before dispatching — query gh run list --workflow=review-responder.lock.yml --status=in_progress
  2. Add a dispatch label (e.g., aw-responder-dispatched) that the orchestrator sets before dispatching and checks before dispatching again
  3. Deduplicate triggers — remove push trigger if workflow_run covers the same case

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions