Repository navigation
CI shepherd: ci-gate status on every open PR, and a red check turns auto-merge off (#6919) - #6920
Merged
Merged
Conversation
…turns auto-merge off (#6919) Path-filtered workflows ran but never gated a merge: the ruleset requires five core checks, and the shepherd only labelled other failures needs-fix while auto-merge stayed on. #6881, #6894, #6895 and #6899 merged with DOOM-rosetta / call-graph-accuracy red. - decide(): triage runs before the auto-merge decision; a real failure of any gating check (not the shepherd's own jobs, not ADVISORY) blocks and turns auto-merge off. - gate_status(): ci-gate is pending (draft, running or rerun checks, main's failure, an unreported required check), failure (a real failure) or success; posted only on change, and the shepherd's own status is never read back as an input. - reconcile covers every open PR (open_prs), so a hand merge is gated too; it also triggers on DOOM-rosetta and Call Graph Accuracy Audit (GATE_TRIGGERS). - pr_check / graphql_reads fetch the status description, so an unchanged gate is not reposted. The ruleset change (require ci-gate) is the owner's step after a soak. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
…abelled (#6919) reconcile now lists every open PR through open_prs; the two exit-code tests still faked open_labelled, so they reached a real `gh api pulls?state=open`. They passed where gh is logged in and failed in full-suite part 1/2 (no GH_TOKEN in CI). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvfVvURyJ9zRpgVkace
This was referenced Oct 28, 2026
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 the gap in #6919. Path-filtered checks (DOOM-rosetta, call-graph accuracy, ...) ran on the PRs they could affect, but their result never gated a merge. #6881, #6894, #6895 and #6899 merged with them red.
Checklist: A (ci-gate, posted by the shepherd) + C (a red check turns auto-merge off), both from #6919.
Change
C: a real failure turns auto-merge off. In
decide(), triage now runs before the auto-merge decision. A real failure of any check, other than the shepherd's own jobs andADVISORY(empty), joinsblocked, so auto-merge goes off and stays off until the head is green.A: a
ci-gatecommit status, without holding a runner. The shepherd already reads every check on the head, so it postsci-gateon every open PR, labelled or not, in both passes:pending: a draft, a running or rerun check, a failure that is main's, or a required check that hasn't reported yet (this also covers runs not yet created right after a push).failure: a real failure.success: otherwise.It posts only when the state or description changes. Its own status is filtered out before
classify(), so a pending gate never waits on itself. Reconcile now covers all open PRs (open_prs, 9 open today) and also triggers on DOOM-rosetta and Call Graph Accuracy Audit (GATE_TRIGGERS). Other workflows are picked up by the 20-min cron. The status query now also fetchesdescription(pr_check.py,graphql_reads).Owner steps
.github/workflows/, so the shepherd token can't auto-merge it. Merge it by hand.ci-gatehas reported on the open PRs for a while, addci-gateto ruleset 24824983. Until then C is the guard, and it can still lose the race against a slow check (Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266) #6899).Open question (#6919)
equivalence-e2eis documented as never holding a merge. With this change a red E2E blocks. If it should stay advisory, add it toADVISORY.Tests
pr_gates.py --fast: 9/9 pass (CI's ruff 0.17.1).test_shepherd_gh.py+test_pr_check.py+test_ci_digest.py: 212 pass, 9 of them new: the gate states, posting once, self-exclusion, unlabelled PRs, the 140-char description limit, the commit-status argv, and the reconcile triggers check against real workflow names. The fake GitHub now remembers a posted status.Class / Sibling gaps
Class: merge-path checks that only see the required set. Covered: the shepherd's auto-merge and the gate. Gaps:
mergeverdict before full CI on the head. With the gate that's safe, but the verdict still trustspr_gates --fast.docs/ci_experiments_log.mdwants an entry for a CI change. It's not added here (5-file cap); add one after the soak with the measured hold time.Part of #6919
🤖 Generated with Claude Code