Repository navigation
formal: kill surface-segments-size-cap-not-enforced (month precedence test) - #50
Merged
Merged
Conversation
…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]>
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
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
🤖 Generated with Claude Code