Description
The gap (found 2026-10-28)
Path-filtered workflows run when a change can affect them (#6278), but their result never gates a merge. #6881, #6894, #6895 and #6899 all merged with DOOM-rosetta and/or call-graph-accuracy-audit red, and main stayed red for both until #6908.
How they got through:
- Churn gives a
mergeverdict and addsshepherd:mergebefore full CI has run on that head (it relies on the worker'spr_gates --fast). - The shepherd turns on auto-merge, and GitHub merges once the ruleset's required checks pass.
- Ruleset 24824983 requires only
det,full-suite,ground-truth,mypy-auditandruff-audit. - In
shepherd_gh.decide(), a real failure of any other check only addsshepherd:needs-fixand a digest comment. It never joinsblocked, so auto-merge stays on. calls_out_to: expand function-like macro bodies at the use site (Part of #6770) #6881, Perl calls: after { ; ? ., print handles, new Foo, qualified commands (Part of #6433) #6894 and call_resolver: ctor-init tie keeps the nearest-included class (Part of #6266, slice 2) #6895 merged wearing bothshepherd:mergeandshepherd:needs-fix. - There's also a timing race. Include resolution: generated forwarder headers and the importer's own module tree (Part of #6266) #6899's DOOM-rosetta run (40715491522) started at 15:23:39Z and took 31.5 min; GitHub merged at 15:54:37Z, about half a minute before it finished. A shepherd that blocks on red can't catch a check that hasn't finished.
#4825 step 1 planned the fix: one always-reporting ci-gate, required by the ruleset, with path-filtered workflows feeding into it. What shipped was the five core checks only.
Fix
A. A ci-gate commit status, posted by the shepherd (not a polling job).
A polling job would hold a runner for up to 30+ min per PR. The shepherd already reads every check run and status on the head, on every push (shepherd-event) and after CI (shepherd-reconcile). So it posts the status ci-gate on the PR head:
pending: a draft PR (its heavy checks are skipped, ci: draft PRs skip the heavy PR workflows (free-tier runner pool saturated by churn WIP pushes) #5104), any check still running or being retried after an infra failure, a failure caused by main (waiting-on-main), or a required check (REQUIRED_CHECKS) that hasn't reported yet. Required checks always report (ci: core checks always report (required-ready); det sweep proves only the ports a translator change moves, shards up to 20 (#4825 1a, #4814 v1) #4826), so this also covers check runs that haven't been created yet right after a push.failure: any real failure, from any workflow.success: otherwise.- The shepherd's own runs and the
ci-gatestatus itself are left out of the verdict. shepherd-reconcilealso triggers on DOOM-rosetta and Call Graph Accuracy Audit completions. Other workflows are picked up by the 20-min cron.ci-gateis posted for every open PR, not just labelled ones, so a merge by hand is gated too.
C. A real failure turns auto-merge off. A needs-fix finding joins blocked, so the shepherd disables auto-merge until the head is green again.
Rollout (owner steps)
- Merge the shepherd change.
ci-gatestarts reporting but is not yet required. - Make sure the squid-shepherd App has Commit statuses: write. Without it the post fails and the PAT fallback is used.
- After ci-gate has reported on every open PR for a while, add
ci-gateto ruleset 24824983 (status from the squid-shepherd app integration).
Open question for the owner
equivalence-e2e is documented as not required "so its wall time never holds a merge" (docs/ci.md). With ci-gate, every workflow that runs gates the merge, E2E included. Should E2E be advisory instead? It would be one entry in the ADVISORY tuple.
Activity
test_shepherd_gh: reconcile exit-code tests fake open_prs, not open_l…
CI shepherd: ci-gate status on every open PR, and a red check turns a…
ci_digest: a cancelled shard makes equivalence-e2e / crucible a rerun…
squid-protocol commentedon Oct 29, 2026
Done 2026-10-28/29. A: the shepherd posts
ci-gateon every open PR (#6920), required in ruleset 24824983 from the squid-shepherd App (id 5458993, given Commit statuses: write). C: a red gating check turns auto-merge off (#6920). Follow-up: a cancelled shard no longer reads as a real failure for equivalence-e2e / crucible (#6959). Still open: whether equivalence-e2e and "(advisory)" jobs should beADVISORY(owner call); audit roll-ups over a singleplanjob take a cancelled plan as real (not seen yet).