Repository navigation
fix(ci): repair agentic triage lock and gate it against drift - #1489
Conversation
Every Agentic Triage run that reached `activation` has failed since 2026-06-26 with `ERR_CONFIG: E009 CONFIG_HASH_MISMATCH`. Root cause: f2a4cc9 (#1002) added `report-failure-as-issue: false` to the frontmatter of issue-triage.md and hand-patched the corresponding `GH_AW_FAILURE_REPORT_AS_ISSUE` line into the lock, but never ran `gh aw compile`. The `frontmatter_hash` in the lock's `# gh-aw-metadata:` header stayed at the value from the original commit (4f59c43). The `github/gh-aw-actions/setup` action recomputes that hash from the .md at run time and aborts when it disagrees, so the `agent` job never ran. It went unnoticed for a month because that same commit disabled failure reporting; the only signal was red runs in the Actions tab. Verified with gh-aw's own `frontmatter_hash_pure.cjs`: the committed lock computed 6dfe291f... against a stored 96062276..., and now matches on both `frontmatter_hash` and `body_hash`. Fixes, in three parts: * Recompile the lock. The `gh aw` extension was v0.72.1 against a latest of v0.83.4; recompiling with the old one would have reverted Dependabot's action bumps, so upgrade first. Schema v3 -> v4 (adds `body_hash`), setup action now v0.83.4 matching the compiler. v0.83.4 also stops emitting trailing whitespace, so the pre-commit conflict behind 65172c3 is gone. * Add an `agentic-lock` CI job that reinstalls the exact compiler recorded in each lock's metadata, recompiles, and fails on any diff. Pinning by reading `compiler_version` from the lock avoids a version in ci.yml that would drift; `latest` would fail every PR until someone recompiled. Also asserts .md <-> .lock.yml parity in both directions, since `gh aw compile` regenerates locks from sources and never audits an orphan. * Ignore `github/gh-aw-actions` in Dependabot. Its pin and the stamped `compiler_version` are emitted by one `gh aw compile`, and Dependabot cannot recompile. Three of the four Dependabot commits that touched the lock were this action. Other actions are deliberately not ignored: their ci.yml bumps are wanted, and `agentic-lock` catches the lock half. Adds .github/workflows/aw.json with `{"maintenance": false}`. The v0.83.4 compiler otherwise emits an agentics-maintenance.yml daily cron that was never requested; issue-triage.md uses no `expires`, so disabling is a no-op. Delete the file and recompile to opt in. Also commits .github/aw/actions-lock.json, which gh-aw documents as belonging in version control so contributors resolve identical pins. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
WalkthroughThe change adds agentic workflow lock validation, pins GitHub Actions, excludes generated gh-aw updates from Dependabot, and refreshes the generated issue-triage workflow for gh-aw v0.83.4 across activation, agent execution, detection, conclusion, and safe-output processing. ChangesAgentic workflow refresh
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Activation
participant Agent
participant MCPGateway
participant CopilotCLI
participant Detection
participant Conclusion
Activation->>Agent: provide refreshed prompt and runtime context
Agent->>MCPGateway: start safe-output services
Agent->>CopilotCLI: execute agent workflow
CopilotCLI->>MCPGateway: submit safe-output calls
MCPGateway-->>Agent: return tool results
Agent->>Detection: expose execution status and usage data
Detection->>Conclusion: provide detection result and failure outputs
Conclusion->>Conclusion: process safe outputs and publish usage artifacts
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Contracts coverageLine coverage: 89.57% (2422/2704 lines) |
Gas snapshotNo gas changes vs base. |
There was a problem hiding this comment.
Pull request overview
Repairs the broken Agentic Triage workflow by regenerating the gh-aw lock file with a modern compiler/schema and adds a CI gate to prevent future drift between agentic sources, lock files, and pinned action/compiler inputs.
Changes:
- Regenerated
.github/workflows/issue-triage.lock.ymlwithgh-awv0.83.4 (schema v4, updated action/container pins, new metadata hashes). - Added a new
agentic-lockjob to CI that reinstalls the compiler version recorded in lock metadata, recompiles, and fails on any diff. - Added supporting repo config:
aw.jsonto disable unrequested maintenance workflow generation, Dependabot ignores forgithub/gh-aw-actions*, and a checked-in.github/aw/actions-lock.json.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/issue-triage.lock.yml | Recompiled gh-aw-generated workflow lock to fix the runtime hash mismatch and align with newer schema/tooling. |
| .github/workflows/ci.yml | Adds path filtering output + agentic-lock drift-check job and wires it into ci-success gating. |
| .github/workflows/aw.json | Disables gh-aw “maintenance” workflow generation to avoid introducing an unrequested daily cron. |
| .github/dependabot.yml | Ignores github/gh-aw-actions updates that Dependabot can’t safely apply without recompiling locks. |
| .github/aw/actions-lock.json | Adds a version-controlled action lock file used by gh-aw compilation/pinning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # indistinguishable from a hand-edited lock, and the run log has no | ||
| # record of which compiler produced the diff below. | ||
| # `gh aw version` writes to stderr, hence the redirect. | ||
| installed=$(gh aw version 2>&1 | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1) |
There was a problem hiding this comment.
Fixed in 6f1f681, though the mechanism is different from the one described.
SIGPIPE doesn't reproduce here: gh aw version emits a single line, so grep finishes writing and exits 0 before head closes the pipe. 0 failures in 1000 trials.
The real fragility is a no-match. If gh aw version's format ever changes, grep exits 1, pipefail propagates it, and set -e kills the job on that line — so the ::error::pinned X but installed Y annotation directly below, which exists specifically to diagnose this, never prints. Confirmed: the script aborts at exit 1 having printed nothing.
grep -m 1 on its own doesn't address that, since it still exits 1 when there's no match. Applied both halves:
installed=$(gh aw version 2>&1 | grep -m1 -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || true)-m1 removes the second process (and with it the SIGPIPE surface you identified), || true lets an unparseable version fall through to the explicit check and report installed unknown.
Verified across all three paths — correct version passes, wrong version and unparseable output each exit 1 with the annotation.
Coverage reportTotal: 81.22% (was 81.22%, ● 0.00%) — 52851/65073 lines No Rust files changed in this PR. History
|
Copilot review flagged `grep ... | head -1` under `set -euo pipefail` as a SIGPIPE risk. The pipeline is fragile, but not for that reason: with a single line of input grep completes before head exits, and SIGPIPE did not reproduce in 1000 trials. The actual failure is a no-match. If `gh aw version` ever changes format, grep exits 1, pipefail propagates it, and `set -e` kills the job on that line — so the `::error::pinned X but installed Y` annotation immediately below, which exists precisely to explain this, never prints. Verified: the script aborts at exit 1 having printed nothing. `grep -m1` alone does not fix that, since it still exits 1 on no match. Use `-m1` to drop the second process (removing the SIGPIPE surface the review identified) and `|| true` so an unparseable version falls through to the explicit check and reports "installed unknown". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Summary
Agentic Triage has been broken since 2026-06-26 — every run that reached
activationfailed with:Root cause: f2a4cc9 (#1002) changed the frontmatter of
issue-triage.mdand hand-patched the lock instead of runninggh aw compile. Thefrontmatter_hashin the lock's# gh-aw-metadata:header was left at the value from the original commit (4f59c43) — unchanged across every lock commit since. Thegithub/gh-aw-actions/setupaction rehashes the.mdat run time and aborts on mismatch, so theagentjob never ran. (TheArtifact not found for name: agenterror in those runs is a downstream symptom, not the cause.)It went unnoticed for a month because the same commit set
report-failure-as-issue: false, so nothing was filed.Changes
gh awwas v0.72.1 vs a latest of v0.83.4; recompiling with the old one would have reverted Dependabot's action bumps, so the extension was upgraded first. Schema v3 → v4 (addsbody_hash), setup action v0.83.4 now matches the compiler.agentic-lockCI job — reinstalls the compiler recorded in the lock metadata, recompiles, fails on any diff. Wired into theCI successgate.github/gh-aw-actions— its pin and the stampedcompiler_versioncome from onegh aw compile, and Dependabot cannot recompile..github/workflows/aw.json({"maintenance": false}) — see reviewer notes..github/aw/actions-lock.json— gh-aw documents this as belonging in version control.Verification
Reproduced the failure and confirmed the fix using gh-aw's own runtime hash implementation (
actions/setup/js/frontmatter_hash_pure.cjs):.md96062276…6dfe291f…6dfe291f…6dfe291f…body_hashtoo)The
websiterepo runs the same workflow successfully on the same v0.72.1-stamped lock, which ruled out compiler/action version skew as the cause.The new job's script was regression-tested against 11 scenarios in throwaway clones — all green:
.mdkeptcompiler_versionkey missing.gitattributesdeletedactionlintclean,shellcheckclean,pre-commit runclean,gh aw compileidempotent.Reviewer notes
aw.jsonis a decision worth checking. The v0.83.4 compiler emits an extraagentics-maintenance.yml— a daily cron that closes issues, creates labels and cleans caches. It appeared silently during compile. Since it was never requested, it is disabled here;issue-triage.mduses noexpires, so this is a genuine no-op. Deleteaw.jsonand recompile to opt in..github/dependabot.ymlis deliberately outside the job's diff scope. gh-aw's ignore-block reconciler is gated behind--dependabot; plaingh aw compileleaves the file untouched, verified against v0.83.4.Known limitation: the compiler pin is read from the lock the compiler produced, so the job proves internal consistency, not currency. With Dependabot now ignoring
gh-aw-actions, nothing will flag a stale compiler. A scheduled staleness check is a reasonable follow-up.Not included, worth a follow-up: no pre-commit hook or CONTRIBUTING entry mirrors this gate locally, unlike every other gate in the repo — the same discoverability gap that let #1002 merge.
🤖 Generated with Claude Code
Summary by CodeRabbit