-
Notifications
You must be signed in to change notification settings - Fork 0
Description
What happened
When PR #163 merged to main, two orchestrator runs fired simultaneously:
push: branches: [main]trigger (16:19:03)workflow_runtrigger 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:
pushfires on mergeworkflow_runfires when responder/ci-fixer/CI completepull_request_reviewfires 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
- Orchestrator checks if responder is already running before dispatching — query
gh run list --workflow=review-responder.lock.yml --status=in_progress - Add a dispatch label (e.g.,
aw-responder-dispatched) that the orchestrator sets before dispatching and checks before dispatching again - Deduplicate triggers — remove
pushtrigger ifworkflow_runcovers the same case
Related
- perf: rewrite pipeline orchestrator as regular GitHub Action (yml) #135 — Pipeline orchestrator