-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
The orchestrator checks for a valid approval before dispatching the quality gate, but does NOT check if a quality gate workflow is already running. When multiple orchestrator runs fire in quick succession (via workflow_run triggers), each one sees no valid approval and dispatches the quality gate again.
Observed on PR #210 (2026-03-21)
- 15:34:36 — Orchestrator run (schedule): Copilot hadn't reviewed yet → skipped quality gate ✅
- 15:36:23 — Orchestrator run (workflow_run): Copilot reviewed, no valid approval → dispatched quality gate
- 15:40:21 — Orchestrator run (workflow_run): Copilot reviewed, first quality gate still running (no approval yet) → dispatched quality gate AGAIN
Result: 2 quality gate runs — one in_progress, one pending. Wastes compute and burns Opus inference tokens.
Fix
Add an in-flight check for the quality gate before dispatching, same pattern as the implementer check:
QG_RUNNING=$(gh run list --workflow=quality-gate.lock.yml --json databaseId,status 2>/dev/null \
| jq -r '[.[] | select(.status == "in_progress" or .status == "queued" or .status == "waiting")] | length' 2>/dev/null || echo "1")
if [[ "$QG_RUNNING" -gt 0 ]]; then
echo " ⏳ PR #${PR}: Quality gate already in flight. Skipping dispatch."
echo "::endgroup::"
continue
fiRelated
- bug: orchestrator dispatches responder twice from duplicate triggers #164 — same bug for implementer (fixed in PR fix: prevent duplicate implementer dispatches #190)
- fix: quality gate waits for Copilot review and checks actual approval state #202 — quality gate timing improvements
- bug: orchestrator dispatches quality gate before rebase — race condition #211 — rebase ordering fix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working