fix: switch quality gate to orchestrator-dispatched workflow_dispatch#169
fix: switch quality gate to orchestrator-dispatched workflow_dispatch#169
Conversation
- Quality gate trigger: pull_request_review → workflow_dispatch with pr_number input - Quality gate safe outputs: add target: "*" for all PR-interacting tools - Quality gate .md: remove bot/role checks (orchestrator handles dispatch timing) - Orchestrator: add Step 4 — dispatch quality gate when CI green + 0 open threads - Orchestrator: add Quality Gate to workflow_run trigger list Fixes #168 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR changes the “Quality Gate” workflow to be orchestrator-dispatched via workflow_dispatch (with a pr_number input) so clean PRs with zero Copilot comments still get evaluated and can auto-merge.
Changes:
- Converted Quality Gate trigger from
pull_request_review: submittedtoworkflow_dispatchwithpr_number. - Updated Quality Gate safe-outputs config/prompting to work without PR-event context (
target: "*", useinputs.pr_number). - Extended Pipeline Orchestrator to dispatch Quality Gate on the “happy path” (CI green + no unresolved threads) and to react to Quality Gate completion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/quality-gate.md |
Updates workflow frontmatter + instructions to accept pr_number and run when dispatched by orchestrator. |
.github/workflows/quality-gate.lock.yml |
Regenerated compiled workflow reflecting workflow_dispatch, updated concurrency/prompt context/safe-outputs targets. |
.github/workflows/pipeline-orchestrator.yml |
Adds Quality Gate to workflow_run triggers and adds Step 4 to dispatch Quality Gate when CI/threads are clear. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Drop global QG_RUNNING check (was checking all runs, not per-PR) Rely on quality gate's per-PR concurrency group for dedup instead - Add aw-quality-gate-evaluated label for HIGH impact / poor quality decisions - Orchestrator skips dispatch when aw-quality-gate-evaluated is present Prevents infinite re-dispatch loop for PRs needing human review Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed review comments in ac22a2e: Comment 1 (QG_RUNNING global check): Fixed — dropped the global check entirely. The quality gate's per-PR concurrency group handles dedup. Comment 2 (activation if guard removed): By design — the orchestrator is the sole dispatcher and already verifies the aw label before calling. Comment 3 (re-dispatch loop after QG completes): Fixed — added Comment 4 (no persisted state for non-approvals): Fixed — same as #3. |
- Changelog: new entry for quality gate dispatch fix (PRs #169, #170, this PR) - Agent table: quality gate trigger updated to workflow_dispatch - Pitfall #21: safe output target values differ by handler type - Pitfall #18: updated with target: ${{ inputs.pr_number }} guidance - History: new entry for 2026-03-19/20 quality gate fix + first autonomous PRs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #168
Problem
The quality gate workflow triggers on
pull_request_review: submittedbut filters out bot reviews in the pre-activation job. Since the autonomous pipeline has no human reviewers, the quality gate never fires — clean PRs sit open indefinitely.Example: PR #167 — CI green, Copilot review clean (0 comments), quality gate never ran, PR stuck open for 30+ minutes.
Changes
Quality Gate (
.lock.yml+.md)pull_request_review: submitted→workflow_dispatchwithpr_numberinputif:label check on activation (orchestrator handles dispatch timing)target: "*"(no PR trigger context with workflow_dispatch)inputs.pr_numberinputs.pr_numberinstead ofgithub.event.pull_request.numberworkflow_dispatchto PR context prompt conditionOrchestrator (
pipeline-orchestrator.yml)aw-quality-gate-approvedlabel already presentworkflow_runtrigger list (orchestrator fires after QG completes)Flow (after this change)