Skip to content

formal: kill surface-segments-size-cap-not-enforced (month precedence test) - #50

Merged
zachyking merged 2 commits into
mainfrom
formal/segments-size-cap-detector
Oct 26, 2026
Merged

zachyking merged 2 commits into
mainfrom
formal/segments-size-cap-detector

Conversation

@zachyking

@zachyking zachyking commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Why

The nightly "formal: kit register, all mutants" run 40289921888 (2026-10-26) reported SURVIVED surface-segments-size-cap-not-enforced (claim month-segments-server). The mutant multiplies the records-only size check in buildBundleView by 1000.

Cause

After averin#47 an over-cap bundle is refused by two other checks: the whole-history BundleSizeParts pre-check (before load) and the serialized-size check at the end of buildBundleView. Both return the same errBundleTooBig / errMonthTooBig, so the records-only check became unobservable by outcome. The existing precedence test (TestOverTheCapIsRefusedBeforeTheBundleIsBuilt) covers only the whole-history path, which the new pre-check now answers before the mutated line is reached. The code is not dead: for a month it is the only check that refuses before the bundle is assembled and marshaled.

Fix (detector only)

New test TestOverTheCapMonthIsRefusedBeforeTheBundleIsMarshaled (selected by the existing TestOverTheCap detector pattern): with an invalid coverage manifest the bundle fails at marshal, so an over-cap month must surface errMonthTooBig first; with the cap lifted the same month does fail at marshal (premise). Claim and mutant are unchanged; no relock needed (no covered symbol changed).

Evidence

  • check_mutants.py --only surface-segments-size-cap-not-enforced: 1 killed, 0 survived (baseline ok).
  • check_claims.py --claims formal/kit-claims.json: 745 checks, 0 failures.
  • go test ./internal/api -run 'TestMonth|TestOverTheCap' passes (Rust staticlib rebuilt first).
  • First seen in nightly 39565807072 (2026-10-21, the first after averin#47 merged), and present in every nightly from 10-21 to 10-26 (39744009767, 39920962931, 40074705087, 40174142977, 40289921888). Run 40176686795 failed on supply chain only (its kit nightly job was skipped). (Corrected by the lead after review.)

🤖 Generated with Claude Code

zachyking and others added 2 commits October 26, 2026 11:29
…edence test

After #47 the whole-history pre-check and the serialized-size check both refuse an over-cap bundle, so the records-only size check in buildBundleView was masked for every observable outcome. Add a test that an over-cap month is refused before the bundle is marshaled (error precedence).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zachyking
zachyking merged commit 0b5aa64 into main Oct 26, 2026
70 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant