Merged
Conversation
Agent workflows (review-responder, quality-gate) were firing on ALL pull_request_review events regardless of PR author or labels. The aw label check was only in the agent prompt (soft guard) — the agent still activated and burned tokens before noop'ing. Added if: contains(github.event.pull_request.labels.*.name, 'aw') to both workflow frontmatters. This compiles to a job-level if: on the activation job, so the workflow skips entirely without burning any compute or inference tokens. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR prevents agent workflows from activating on human-authored PR reviews by gating the gh-aw workflows on the presence of the aw label, so GitHub Actions skips the run before any agent compute is spent.
Changes:
- Add a frontmatter
if:condition to gatereview-responderonawlabel presence. - Add a frontmatter
if:condition to gatequality-gateonawlabel presence. - Recompile both workflows so the
.lock.ymlfiles include the correspondingjobs.activation.ifguard.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/review-responder.md | Adds an if: frontmatter guard to only run on PRs labeled aw. |
| .github/workflows/review-responder.lock.yml | Compiled output now gates the activation job with the aw label check. |
| .github/workflows/quality-gate.md | Adds an if: frontmatter guard to only run on PRs labeled aw. |
| .github/workflows/quality-gate.lock.yml | Compiled output now gates the activation job with the aw label check. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
microsasa
pushed a commit
that referenced
this pull request
Mar 16, 2026
- Architecture diagram: orchestrator owns full lifecycle (issue → PR → merge) - PR Rescue section → Pipeline Orchestrator + Review Responder Thread ID sections - Fixed pitfall #6: head branch, not default (verified empirically on PR #119) - New pitfalls #13-17: MCP thread IDs, safe-output can't force-push, bash fragility in Actions, PAT owner identity, if: frontmatter gating - Full history: 3 rewrites of pr-rescue (bash → gh-aw agent → orchestrator), 13 bugs found across 4 AI review rounds, lessons learned - Changelog: orchestrator, responder fix, label gate fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agent workflows (review-responder, quality-gate) fire on every
pull_request_reviewevent — including human-authored PRs without theawlabel. Theawlabel check was only in the agent prompt instructions (soft guard), so the agent still activated, burned compute + inference tokens, then noop'd.Discovered on PR #118 — both agents ran on a manually-created PR.
Fix
Added
if: contains(github.event.pull_request.labels.*.name, 'aw')to both workflow frontmatters. This compiles to a job-levelif:on the activation job via gh-aw, so the workflow skips entirely at the GitHub Actions level — zero tokens burned.Files changed
.github/workflows/review-responder.md— addedif:condition.github/workflows/quality-gate.md— addedif:condition.lock.ymlfiles — recompiledNote
Since
pull_request_reviewuses workflow files from the base branch (main), this gate won't be active until after merge. The agents will still fire on this PR itself (but will noop on the label check in their prompt).Refs #119