You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: guard ratchets compare to main's tip at section start, not the run's build base #4861
The guard-tree and guard-cargo sections fetch the origin/maintip when the section starts, and every baseline ratchet in them compares against it. A section can start hours after the merge commit it judges was built, so a branch that never touched a baseline goes red when main shrinks that baseline in the meantime.
Observed (#4813): the run built merge 092b5e990 on base 358e9d4d11, where scripts/pipe_grep_q_baseline.txt records 62. The guard section started later, when main was ece9e563bd; da7059c5c7 had shrunk the count to 60 in between. check_baseline_ratchets reported pipe_grep_q_baseline.txt GREW (62 vs 60). #4813 does not touch the file.
Fix: pin refs/remotes/origin/main to the run's build base before the guard steps: the first parent of the merge commit on pull_request, merge_group.base_sha on merge_group (as the refinement gate already does), and the tip (deepened by one on push) otherwise. Re-adding an entry main deleted is still refused, by the merge_group run, which is built on main as it merges.
evidence for close: #4996 / 5a3b047 (on main), how checked:
scripts/ci/pin_build_base.sh is on main and pins the build base per event: pull_request uses the merge commit's first parent, merge_group uses merge_group.base_sha.
It is wired into ci/sections.yml (--self-test then the run, ~:1193-1194, and again in the second guard section ~:1728).
Its mutation case is C16 in scripts/tests/ratchet_semantics_test.sh.
Activity
merge origin/main 5a8e4b5 into fix/4936-section-a-wait
fix(guards): pin origin/main to the run's build base, so a re-run jud…
noahgift commentedon Oct 12, 2026
evidence for close: #4996 / 5a3b047 (on main), how checked:
scripts/ci/pin_build_base.shis on main and pins the build base per event:pull_requestuses the merge commit's first parent,merge_groupusesmerge_group.base_sha.ci/sections.yml(--self-testthen the run, ~:1193-1194, and again in the second guard section ~:1728).scripts/tests/ratchet_semantics_test.sh.noahgift commentedon Oct 12, 2026
Cop batch close (FLOW-004 drain, ≤43/d): fix verified on main — merged #4996 ; ancestor of origin/main: 5a3b047 . Evidence: #4861 (comment)