Repository navigation
fix(falsify): the published spec counts are recounted, not remembered (#937) - #953
Merged
Merged
Conversation
…#937) Five hand-written statements about the size of the falsify specs were stale, and nothing recomputed any of them. CONTRIBUTING.md and its French twin said 128 specs naming 186 files, tools/testplan/specs.go had been corrected by hand to 251 and was wrong again one merge later, falsify.yml said "twenty-three times", and mise.toml, the selftest docstring and CONTRIBUTING disagreed on whether the selftest holds three mistakes or four. specFigureProblems (tools/testplan/figures.go) recounts the specs and refuses a published figure that is not the live count, in the four places that state it as a fact about today. It runs in go test ./..., so in prepush. It refuses rather than passes when the sentence it reads matches zero or several times, when the specs directory is unreadable or empty, when a quantity name is unknown, and when no site is declared: three outcomes, and "nothing was judged" is red. Held by TestEveryPublishedSpecFigureMatchesTheLiveCount and one test per question in figures_test.go, and by tools/falsify/specs/published-spec-figures.json, 18 mutations. The check proved itself while being written: adding its own spec moved the counts, and it named the figures just written by hand as wrong. Present-tense counts tied to a timing measured on a given day are dated instead of recounted (falsify.yml, nightly_reporting_test.go, mise.toml, falsify.py): recounting the number alone would leave the timing beside it stale. The selftest count is four everywhere, all four in b39e4af (#187). Not covered, each filed: a present-tense count written after this search is noticed by nothing (#951); the "four" in CONTRIBUTING is not checked against len(HISTORY) (#949); a spec path written ./x is counted twice and never claimed by testplan (#950). Assisted-by: Claude Code (claude-opus-5-5)
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.
Summary
Five hand-written statements about the size of the falsify specs were stale, and nothing recomputed any of them:
CONTRIBUTING.mdand its French twin said 128 specs naming 186 files,tools/testplan/specs.gohad been corrected by hand to 251 and was wrong one merge later,falsify.ymlsaid "twenty-three times", andmise.toml, the selftest docstring andCONTRIBUTINGdisagreed on whether the selftest holds three mistakes or four.This does not correct the numbers: it gives them a control.
specFigureProblems(tools/testplan/figures.go) recounts the specs and refuses a published figure that is not the live count, in the four places that state it as a fact about today. It runs ingo test ./..., so inprepush.It has already caught a real drift. Rebasing this branch onto #952, which added a spec, made the check refuse this very pull request's own figures without anyone provoking it:
Without it, this pull request would have been born with wrong numbers. It also caught its author once while being written: adding its own falsify spec moved the counts and it named the figures just written by hand.
Present-tense counts tied to a timing measured on a given day are dated rather than recounted (
falsify.yml,nightly_reporting_test.go,mise.toml,falsify.py): recounting the number alone would leave the timing beside it stale. The selftest count is four everywhere, all four entries inb39e4af(#187).What makes it red
Three outcomes, never two. Red when a published figure differs from the live count; when the sentence it reads matches zero or several times (a rewritten sentence must not pass silently); when the specs directory is unreadable, empty, or holds a spec with no mutation; when a quantity name is unknown (the
defaultrefuses); and when no site is declared. Each has its own test asserting its own reason, built from a world where the three quantities differ (2 specs, 4 mutations, 3 files), so no case can pass for another's reason.Type of change
Checklist
Always
mise run checkpasses, throughmise run prepush, green in 110.61 s on the rebase ontoecd639ainternal/coreuntouchedmise run testplanwas run. Played:falsify -- published-spec-figures.json(18/18 biting, restoration green, replayed after the rebase),falsify:lint,docs:check,lint-shell, and the six specs it names (a-plan-that-cannot-rot,a-run-ends-where-it-could-start,a-silent-night-is-refused,evidence-leg-mode,the-night-fetches-what-it-extracts,unkillable-dhcp-orphan), all exit 0, 82 mutations biting, none not biting. Not played locally:conformance:leg -- probe, named becausemise.tomlmoved; themise.tomldiff is comments only (checked), and CI plays theprobeleg on this pull request.When a model wrote a substantive part of this
Assisted-by:trailer names the tool and the model versionmise run conformance: not run, no route, response or runtime path changed. CI plays the client legs.When a route is added or changed
N/A.
When behaviour a client can observe changes
N/A: contributor documentation and an internal check only.
When
.github/workflows/is touchedfalsify.ymlchanged in comments only (checked: no non-comment line in the diff). No action, permission, job name or required check changed.actionlintgreen locally.When a machine runtime is involved
N/A.
Reviewed before the commit
falsifieron the uncommitted tree. It found three gaps, all closed in this pull request and re-measured: three present-tense stale counts outside the check's list (now dated); two tests that passed with their guard removed (one asserted only a message prefix shared with another guard, one guard had no test); three mutations that bit but were undeclared (the spec went from 13 to 18).Not covered, each filed
CONTRIBUTINGis not checked againstlen(HISTORY): The "four historical mistakes" count is written by hand in both CONTRIBUTING pages and agrees with len(HISTORY) by nobody's measurement #949./xis counted twice and never claimed bytestplan; latent, no such path today: A falsify spec naming ./x.go instead of x.go is never claimed by testplan, and falsify:lint accepts both #950Related issues
Closes #937.
🤖 Generated with Claude Code