Repository navigation
fix(ci): unbreak the two base-side gates red on every open PR - #14398
Conversation
test_slim_skills_do_not_regrow_duplicate_guidance_or_wire_model_ids caps prepare-pr/SKILL.md at 68000 bytes. The file stands at 68015, so the two Backend Tests shards that own that test are red on main and on every open PR branched from it. Tighten four sentences in the writing-register, picture and issue-link sections. No guidance is dropped: each fact in the removed wording is either kept in the replacement or already stated by the section it sits in, so the file lands at 67854 bytes.
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Description's "What changed" quotes a superseded [DESIGN-REVIEWED] 52707bf |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Description's What this change shipsInventory (3 items) — 3 justifiedIntent: FIX — turn green two base-side gates red on every open PR: the prepare-pr byte-ceiling test (68015 > 68000 on
Cause-level check: the fix removes the stamp-inside-stamp comparison itself, not the fixture date. Sibling count: grepped [FIRST-PRINCIPLES-REVIEWED] 52707bf |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 52707bf |
Removing one stamp before searching for the other loosened the chip in the direction that never collided: the chip's own stamp is the shorter string, so stripping it also deletes it from inside a wrongly rendered longer one, and a chip dating the document instead of the record then passes both assertions. Compare the interpolated copy instead. "from 23d ago." and "from 3d ago." are substrings of each other in neither direction, so the surrounding sentence is what separates a right render from a wrong one, and no stamp is ever removed from the text under assertion.
0503ea7 to
52707bf
Compare
Problem / Motivation
Goal: unbreak the two base-side gates that are red on every open PR against
main, so an author's own result is readable again.Two failures, both in code no PR touched.
Backend Tests (3.12, 3)andBackend Tests (Windows) (3).test_review_repair_routing_skill.py::test_slim_skills_do_not_regrow_duplicate_guidance_or_wire_model_ids[prepare-pr-68000]capsprepare-pr/SKILL.mdat 68000 bytes. Onmainthe file is 68015:Red on
mainitself, run 36299483574 at headf5871763.Frontend Tests (1).CrewWebviewContainment.test.tsx > dates the retained document by the version on screen, not by the record that replaced it:The test reads both relative-time stamps as rendered strings and asserts the republish stamp is absent with a bare substring search. The fixture is dated
2026-09-04T05:16:00; on2026-09-27that renders as23d ago, whose tail is the republish's own3d ago. So the search fires on a render that is correct. It reproduced on a clean re-run, so it is deterministic, not a flake. Amainpush runs only related test files and never reaches this one, which is whymainlooks green on that job while every PR running the full suite fails.Why it matters
Three shards are red on every PR branched from
main. Each author has to establish that three failures in files they never touched are not theirs before trusting their own result, and the second one carries a false accusation: it reports the product defect the pin exists to catch, on code that renders correctly.The byte overflow arrived in #14181, which took the file from 67986 to 68015. The stamp collision is a date bomb: it fires whenever the fixture's age renders with a trailing digit that repeats the republish offset, so it would come back on its own.
Not a goal
Not raising the 68000 ceiling. The budget is the point of that test, and moving it is a maintainer decision, not something a repair PR takes. Not reverting #14181: the goal-freeze guidance it added is wanted. Not touching the sibling ceilings (
kirocrew-worktree-dev16000,babysit22000), both of which pass. Not changingfmtRelative, the component, or any product behaviour: the second fix is confined to two assertions in one test.What changed (motivation -> approach -> change)
The byte ceiling. The file exceeds its budget by 15 bytes, and the test's own name states the direction of the repair: the budget exists so the skill does not regrow guidance it already carries, so the fix is to tighten wording rather than move the limit. Four sentences are tightened, in the writing-register, picture and issue-link sections. No fact is dropped. Each removed clause is either carried by the replacement or already stated by the section it sits in:
move each section's point firstis the bullet directly above it (Punch line first, in every section),remove historical narrationis the whole ofSnapshot, not changelog, and the issue-link parsing note keeps both edge cases it named.mainThe stamp collision. Root cause is comparing two rendered strings where one can contain the other, so no choice of fixture date or offset is safe for long. The change removes the stamp that belongs in each element before searching for the one that must not appear:
and the same on the bar chip, in the other direction.
Backwards compatibility
Compatible. A builtin skill's prose is read by an agent, not parsed by a schema, and no heading, anchor, link target or asserted phrase changes: the three anchors that test resolves (
#review-repair-routing,### Phase 3,## Dispositions) and every phrase its other assertions look for are untouched. The test change touches no production file.Tests
No new test. Both existing assertions are the tests, and this PR is what turns them green. The pin the second fix edits keeps its strength in both directions, which is the thing at risk when an assertion is loosened:
23d ago3d agoThe four passing sibling assertions on
prepare-pr/SKILL.md(routing ladder, discovered model selection, delegation contract, fallback rules) are the guard that the trim removed no load-bearing text.Manual verification
test/test_review_repair_routing_skill.pypasses on this branch:The stamp collision is reproduced and the fix's two-direction behaviour is the table above, computed from the real
Intl.RelativeTimeFormatoutput (23d ago/3d ago) rather than assumed. The frontend suite itself is verified on remote CI, not locally: this branch's worktree has no installednode_modulesand the internal npm registry token is expired, so a localvitestrun would prove nothing.Negative control for both fixes is
mainitself: run 36299483574 for the byte ceiling, and job 108568143046 for the stamp collision on a clean re-run.COMMENT_HISTORY_BASE_REF=origin/main python scripts/check_comment_history.pypasses.Related Issues
no linked issue: two red gates found on
mainwhile babysitting another PR, repaired directly rather than filed first.Pattern harvest
Pattern: comparing two rendered, localized strings with a bare substring search, where one rendering can be a suffix of the other, so the assertion fires on correct output as soon as the clock moves.
Rule candidate: review-prompt. An assertion on rendered relative-time or formatted-number output must not use substring containment against a second such value; isolate the value first, or compare the element's whole text.
The byte overflow half is not generalizable as a rule: the defect is single-digit headroom in one budget, not a code shape, and no static check can tell a legitimate addition from regrown duplication. Whether 68000 is still the right budget for this skill is a maintainer decision this PR deliberately leaves open.