Repository navigation
chore(scripts): cap the chain ratchet at the merge-base count so decreases need no baseline edit - #5102
chore(scripts): cap the chain ratchet at the merge-base count so decreases need no baseline edit#5102SamuelSchlesinger wants to merge 2 commits into
Conversation
…ses need no baseline edit In pull-request mode, a changed module's limit is its baseline entry, capped at its count at the merge base unless the change raises the entry. Removing chains no longer needs a baseline edit, so pull requests stop colliding on neighbouring lines of projection_chains_baseline.json in the merge queue; a periodic lower-only --update-baseline --all prunes stale entries. A change also can no longer add chains back under a stale entry.
Review fix: re-adding chains under a stale entry up to its merge-base value cannot be recorded by --update-baseline (the entry would not rise above its merge-base value, so the limit stays the merge-base count). Refuse with the fix (remove the chains or raise the entry by hand above its merge-base value), and say the same in the PR-mode over report.
|
Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 3f3cb65: APPROVED. I reviewed this locally before it was opened (#1137 freeze). At 3a13e4e I requested one fix: The limit is min(entry, merge-base count) unless the PR raises the entry above its merge-base value or the module is new. That limit is never above the old one, so the check cannot get weaker. Non-blocking: two string lines in Manuals: no This is agent review, not human approval. |
Most merge-queue ejections in the #4817 census come from neighbouring edits to
scripts/projection_chains_baseline.json: #5051, #5036, #5039, #5040, #5042, #5043, #5088 and #5021. Of the 21 open PRs that edited the file, 19 only lowered or deleted entries. The ratchet never required those edits: it fails only when a count is above its entry. A lower count just printed "lower it with--update-baseline".Simply no longer lowering entries would weaken the ratchet. The leftover slack would let the next PR that touches a module add chains back up to the stale entry (for example,
GMW/Sequentialsat at 20 while its count was 13). This PR closes that gap, so lowering entries is no longer needed.Change (PR mode only). A changed module's limit is its baseline entry, capped at the module's count at the merge base. The cap doesn't apply when the PR raises the entry above its value at the merge base, or when the module is new.
--update-baseline --allthat prunes stale entries.QuotientFilter/Cluster(entry 393, count 390) now fails at "limit 390"; the old check passed it.--update-baseline --allow-increase). A re-add under a stale entry that recording wouldn't make pass is refused, with or without--allow-increase. The message says to remove the chains or raise the entry by hand above its merge-base value, so the raise shows in review.--all,--reportand the merge-group/main runs are unchanged. CI's base is the merge commit's first parent, so the cap is the current main count.Strength. The limit never exceeds the entry, so the check is never weaker than before. It is stricter where an entry has slack.
Tests. 5 new ratchet tests (19 total): removed chains need no edit; chains can't return under a stale entry; a raised entry is the limit while a lowered one stays capped; a re-add under a stale entry needs a hand raise (both update variants refuse and write nothing); a moved module needs
--allow-increase.Docs. The checker docstring, CONTRIBUTING (projection chains paragraph) and the CI step comment are updated. Manuals: no edit. The Operator's Manual (workflows/contributing.md L45) only says that a changed ratchet baseline runs its ratchet, which still holds. The Agent Operator's Manual doesn't describe this ratchet.
After this lands, census PRs stop editing the baseline for decreases. A separate lower-only pruning PR follows once the in-flight census PRs drain.
Validation. Full tooling suite (884 tests); hygiene
--check-simp; manual checker errors[];check_projection_chains.py --base origin/main; the two live probes above.Review: agent review by revb-1 at 3f3cb65 (local, before opening, per the CI-throughput rule). The design was approved by the coordinator agent.
AI disclosure: written by an AI agent (tooling, cslib-frontier readability swarm). Review is by another agent, not a human.