fix(gate): unbreak all three of main's red gates in one PR, because one is not enough - #1894
Merged
Conversation
added 2 commits
August 6, 2026 04:29
…ad of catching them `main` is red on `gate-parity`, so `docs guards` fails on every open PR. This unbreaks it and removes the reason it will happen again. `check-gate-parity.sh` checked two things about AGENTS.md and CONTRIBUTING.md: that every step in GATE_STEPS is NAMED, and that the spelled-out TOTAL matches. The first is the one that earns its keep — #1437 records two real drifts it caught, both under-reporting a newly added guard. The second is a single shared cell that any two concurrent guard-adding PRs must both write, and each writes its own correct answer. That happened twice on 2026-08-06. `module-reachability` (#1750) and `self-driving-test` landed within an hour, each having dutifully updated both documents to "twenty-four". The second merge left GATE_STEPS at 25 with the prose saying 24, and every open PR inherited the failure. Two separate agents then opened competing two-line fixes for it (#1863, #1882). Nothing is lost by dropping it. The count told a reader no fact the checked list does not already carry: if every step is named, the number of them is not independently knowable-wrong. It was a derived value maintained by hand — which is the same defect this guard exists to prevent one level up. Option 1 of the three in #1883, and the only one that leaves nothing to go stale. Deriving the word (option 2) keeps a number nobody reads; a --fix flag (option 3) still leaves `main` red until somebody runs it. Removes `number_word()` and the count comparison. The name checks, the ghost check (a CONTRIBUTING command that is no longer a gate step) and the fence parsing are untouched. Verified both directions: with `module-reachability` deleted from AGENTS.md the guard still fails naming it, and restored it passes — so this narrows the guard to the half that works rather than weakening it. ## Why this PR and not #1863 #1863 is the same two-line count fix, opened first, and I closed my own duplicate (#1882) in its favour. It cannot merge: it is docs-only, `ci.yml` carries `paths-ignore` for `*.md`, and all three required contexts therefore never report — GitHub leaves it BLOCKED forever. `ci.yml`'s own comment says that filter is safe because `merge_group` ignores `paths-ignore`, which is true only with a merge queue enabled, and it is not (#1645). This PR touches `scripts/`, so it gets its checks and can actually land. Filed separately as the general defect, because every docs-only PR in this repository has the same problem. Closes #1883 Refs #1750, #1863, #1645
…ne is not enough main fails `fmt + clippy + test` — a REQUIRED context — on three independent counts, and that job runs every guard in sequence. A PR that fixes one of them still fails the other two, so it cannot go green and cannot land. #1873 fixes two and is red; #1891 (mine) fixes the third and is red. Neither can merge while the other is unmerged. This is the PR that breaks the deadlock: all three, or none. ## 1. file-size `crates/stella-protocol/src/event.rs` grew to 2964 over its 2962 ceiling (+2) and `crates/stella-tui/src/deck_render.rs` to 1531 over 1528 (+3). Both are grandfathered god files, and this is the reviewable-baseline-diff escape hatch the ratchet documents for exactly that. The regenerated baseline also TIGHTENS four ceilings that had fallen — command_deck.rs 4740→4691, fleet_cmd.rs 1507→1504, pipeline.rs 3642→3580, driver.rs 2705→2580 — which is the direction the ratchet exists to capture and which nobody had banked. ## 2. clippy Two errors in `stella-pipeline`, both in `witness_stage.rs`: clone_on_copy `params.clone()` on a `Copy` type -> `*params` field_reassign_with_default `EngineConfig::default()` then three field writes -> a struct literal with `..default()` Both are rewrites to the form clippy asks for, not `#[allow]`s. ## 3. gate-parity The spelled-out step count. This carries #1891's change rather than restating the number, because restating it is what keeps breaking: the step NAMES are checked one at a time and merge cleanly, while the TOTAL is a single shared cell every concurrent guard-adding PR must write. `module-reachability` and `self-driving-test` landed an hour apart today, each having dutifully written "twenty-four" against its own base, and left main red for everyone — twice. Dropping the check loses nothing: if every step is named, the number of them is not independently knowable-wrong. Verified it still guards the half that works — with `module-reachability` deleted from AGENTS.md the guard fails naming it, and restored it passes. ## Verification check-file-size: OK — 1078 files, none over 1500 except 32 grandfathered (none grew) check-gate-parity: OK — all 25 gate steps are named in AGENTS.md and CONTRIBUTING.md check-god-files: OK — 24 god files across 8 crates, named identically everywhere cargo clippy --workspace --all-targets -- -D warnings clean cargo fmt --check clean cargo test -p stella-pipeline 556 passed, 0 failed No witness test: three gates are the check. Each fails on main and passes here. Closes #1883 Refs #1873, #1891, #1750, #1645
Contributor
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Reviewer's GuideThis PR unblocks the main branch by fixing all three failing gates in one shot: updating the file-size baseline for god files, resolving clippy violations in the pipeline witness stage, and simplifying the gate-parity check so it no longer enforces a fragile spelled-out step count while still verifying that all gate steps are named in documentation. Flow diagram for updated gate-parity check behaviorgraph TD
MakeGate[make gate] --> GateParityScript[scripts/check-gate-parity.sh]
GateParityScript --> ReadGateSteps[Read GATE_STEPS from Makefile]
ReadGateSteps --> CountSteps[Compute count of gate steps]
CountSteps --> LoopDocs[For each doc in AGENTS.md and CONTRIBUTING.md]
LoopDocs --> LoopSteps[For each gate step name]
LoopSteps --> CheckName[Check step name is present in doc]
CheckName -->|missing| Fail[Exit 1: gate step name not documented]
CheckName -->|all present| Success[Print: check-gate-parity OK — all gate steps are named]
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This was referenced Aug 6, 2026
Closed
Open
macanderson
pushed a commit
that referenced
this pull request
Aug 6, 2026
macanderson
pushed a commit
that referenced
this pull request
Aug 6, 2026
…advertised it #1894 (via #1891) deleted check-gate-parity.sh's spelled-out step-count check — the one shared cell two concurrent guard-adding PRs collided on twice on 2026-08-06 (#1883) — but left the header's 'What it checks' list naming the deleted check as item 3. Stale comments are bugs: drop the ghost item, renumber, and record the total under 'deliberately does NOT check', pointing at the rationale block #1894 added in the body. Refs #1883 Refs #1437
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.
Why this PR exists rather than three
mainfailsfmt + clippy + test— a required context — on three independent counts, and that one job runs every guard in sequence. So a PR that fixes one of them still fails the other two, cannot go green, and cannot land:fmt + clippy + testFAILUREfmt + clippy + testFAILURENeither of the others can merge while the other is unmerged. That is a deadlock, not a queue — and it is why every open PR in the repository is currently red through no fault of its own.
1.
file-sizecrates/stella-protocol/src/event.rsgrew to 2964 over its 2962 ceiling (+2);crates/stella-tui/src/deck_render.rsto 1531 over 1528 (+3). Both grandfathered god files, and this is the reviewable-baseline-diff escape hatch the ratchet documents for exactly that case.Worth a look in the diff: the regenerated baseline also tightens four ceilings that had fallen and nobody had banked —
That is the direction the ratchet exists to capture.
2.
clippyTwo errors in
stella-pipeline/src/pipeline/witness_stage.rs:clone_on_copy—params.clone()on aCopytype →*paramsfield_reassign_with_default—EngineConfig::default()followed by three field writes → a struct literal with..default()Both rewritten to the form clippy asks for. No
#[allow].3.
gate-parityCarries #1891's change — deleting the spelled-out count check rather than updating the number, because updating it is what keeps breaking.
The step names are checked one at a time, so two PRs adding different guards merge cleanly. The total is a single shared cell every concurrent guard-adding PR must write.
module-reachabilityandself-driving-testlanded an hour apart today, each having dutifully written "twenty-four" against its own base, and leftmainred for everyone. Twice in one day, with two agents then opening competing two-line fixes (#1863, #1882).Dropping it loses nothing: if every step is named, the number of them is not independently knowable-wrong. It was a derived value maintained by hand — the same defect the guard exists to prevent one level up.
Verified it still guards the half that works:
Verification
No witness test: three gates are the check. Each fails on
mainand passes here.Note on #1873
Its two fixes are real and I have kept them in substance (the clippy rewrite, the baseline bump). Merging this supersedes it; close #1873 and #1891 once this lands, or merge #1873 first and I will rebase — either order works, but one PR has to carry all three or
fmt + clippy + teststays red.Closes #1883
Refs #1873, #1891, #1750, #1645
Summary by Sourcery
Fix CI gate failures by aligning gate documentation and checks, updating clippy-violating code, and refreshing file size baselines for oversized files.
Bug Fixes: