#513 Gate The Approval Check On The Claude Label - #518
Merged
Conversation
The gate exists to stop mid-pipeline PRs merging early, not to enforce review universally, so PRs outside the pipeline now skip it — which also unblocks Dependabot with no special case. Skipping at the job level still reports the required check as `skipped`; filtering the trigger would leave it pending forever. Trade-off is fail-open: a pipeline PR missing `claude` loses its gate, so impl-agent applies the label at `gh pr create` and the cockpit sweeps for tracked PRs without it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b-at-neu
commented
Aug 19, 2026
b-at-neu
left a comment
Collaborator
Author
There was a problem hiding this comment.
Code Review — Cycle 1 · needs revision
1 open — 1 🟡 Low (see inline)
ENGINEERING.md §7 caps comments at two lines; PIPELINE.md's new "CI merge gate" paragraph already carries the full rationale. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
Author
Revision — Cycle 1fixed R1-L1 · skipped none · 0cf9275 Header is now 2 new lines; the 3-line |
b-at-neu
commented
Aug 19, 2026
b-at-neu
left a comment
Collaborator
Author
There was a problem hiding this comment.
Code Review — Cycle 2 · approved
0 open — R1-L1 resolved cleanly (header comment trimmed to 2 lines), no regressions introduced
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.
Closes #513
Summary
approval-check.ymlrequired theapprovedpipeline label on every PR intodev, which no Dependabot PR and no manual human PR can ever satisfy — PR #296 has been unmergeable since 14 August for exactly this reason. Author-based detection isn't available (pipeline PRs are opened under an operator'sghtoken, so agent and human PRs share authors), so theclaudelabel is the only usable signal.The gate now applies only to PRs carrying
claude, via a job-levelif:. Everything else gets askippedcheck run, which GitHub counts as a satisfied required check, so it merges on its own merits. The trigger is deliberately untouched — a workflow that never runs creates no check run, leaving the required check pending forever, which is the worse failure.This inverts the failure mode from fail-closed to fail-open, accepted deliberately in the ticket: the gate's job is to stop mid-pipeline PRs merging early, not to enforce review universally. Because CI can't tell an unlabelled pipeline PR from a human one, the mitigations are upstream —
impl-agentnow passes--label "claude"at PR-creation time, and the cockpit gained an ungated-PR sweep so a dropped label surfaces instead of silently disabling the gate.Changes
.github/workflows/approval-check.yml—if: contains(github.event.pull_request.labels.*.name, 'claude')onrun-approval-check; rewritten header comment; new missing-approvederror copy.on:(branches: [dev], all fivetypes) and the job ID are unchanged — that ID is the registered required check..claude/agents/impl-agent.md—--label "claude"in the step-6gh pr createblock, plus a line on why it is load-bearing..claude/docs/PIPELINE.md—clauderow in the PR-labels table; a CI merge gate paragraph in Permission rationale; a recovery-runbook row for a pipeline PR showingSkipped..claude/skills/pipeline/SKILL.md— ungated-PR sweep query in the tick block, its report line, agate #Ncommand, and the sweep folded into tick step 4 andstatus.CLAUDE.md—claudelabel added to the PR bullet in Commits, Branches, PRs.Testing plan
This PR is its own primary test fixture: it carries
claude, andpull_requestworkflows run from the merge ref, so the new condition is live here.run-approval-checkruns and fails on the missingapprovedlabel, showing the new error copy ("remove the 'claude' label and this check will skip").claudefrom this PR → the next event'srun-approval-checkreports Skipped, and GitHub's merge box no longer lists it as failing.claude→ the gate runs and fails again (proveslabeledre-evaluation in both directions).run-approval-check, with no "Expected — waiting for status" entry.approvedwithclaudepresent → the job passes with the "merge gate satisfied" line.reviewing) alongsideclaude+approved→ the job still fails, on the blocking label.dev: comment@dependabot rebaseon Bump prettier from 3.8.4 to 3.9.6 #505 (and Bump @prisma/adapter-pg from 7.8.0 to 7.9.1 #506, Bump tailwindcss from 4.3.2 to 4.3.3 #508, Bump prettier-plugin-tailwindcss from 0.8.0 to 0.8.1 #509) so their merge refs pick up the new workflow, then confirmrun-approval-checkreports Skipped and each PR is mergeable. (Bump prettier from 3.8.4 to 3.9.3 #296 from the ticket is already closed; Bump prettier from 3.8.4 to 3.9.6 #505 is its live successor,prettier3.8.4 → 3.9.6.)dev → mainrelease PR is unaffected:branches: [dev]means the workflow never runs there, and no pipeline label is involved.statusreports a pipeline-labeled PR that lacksclaudeon the ungated line; withclaudepresent it is not reported.Automated checks
npm run prettier:check— passnpm run eslint:check— passnpm run tsc:check— passnpm run test:unit— 133 passed (5 files). Thedbproject was skipped: no Postgres /DATABASE_URLin this worktree. This change touches no source, schema, or query code.Notes
--jqwas verified live against the repo and correctly surfaced PR #391 Strengthen ESLint, TypeScript, And CI Configuration #517 (labeledneeds revision, noclaude) — the filter works, so an empty result is meaningful.claudeis an existing repo-wide label shared between issues and PRs; nothing new to create.@dependabot rebaseis the fix, not a further workflow change. All four currently-open Dependabot PRs (Bump prettier from 3.8.4 to 3.9.6 #505, Bump @prisma/adapter-pg from 7.8.0 to 7.9.1 #506, Bump tailwindcss from 4.3.2 to 4.3.3 #508, Bump prettier-plugin-tailwindcss from 0.8.0 to 0.8.1 #509) showrun-approval-checkFAILURE today — that is the bug this closes..claude/, so it was implemented from an operator session rather than dispatched toimpl-agent.