Repository navigation
Gate the prose that states the measured typing-scope edge - #330
Merged
Merged
Conversation
The boundary guard holds two counts against the tree and reds when either moves. It does not read the page, so a move is paid for by rewriting the constant while the sentence stating the same two numbers on docs/architecture/typing-scope.md stays behind, green and wrong. Three numbers on that page had drifted that way before anyone looked. This guard runs the other way: the constant is the standard and the prose is what is checked, which is sound only because the neighbour holds that constant against the tree. It reads the constants by importing the neighbour rather than recomputing the crossings, so the two cannot answer from different methods. One sentence states the current edge; five others on the page state historical pairs and carry dates. The pattern matches the undated form only, and a second occurrence of it reds rather than drifting behind the first. The neighbour's own docstring had drifted the same way: it claimed 107 modules against a constant of 118, and spelled its crosser count as a word, which no reader of digits can check. Restated in digits, remeasured today, and gated by the third assertion here. Mutation: 5 mutants, 3 killed, 2 equivalent. Moving either constant kills three tests; dropping the first number from the page kills two; a wrong second number alone kills one. The one-match and whole-pair comparisons survive as equivalents, measured rather than assumed.
Both paragraphs stated a number as current and carried no date, so nothing on the page or in the tree said when they had last been true. Both were stale. The cache-hazard paragraph said a cold scoped run reports Success on 97 modules and a run over the cache left by a wide one gives 239 errors in 54 files. Measured today: 118, then 216 in 44. The qualitative claim beside them held -- all 44 lie outside the scope, checked by resolving [tool.mypy] files against the error lines rather than by reading the count. The partition paragraph said the clean side holds 98 modules. The drift report computes that set as the package minus what fails, and prints 118 today under the same release the sentence names. Both now carry the measurement date, which is what the page already does for the error count beside the ratio and what the guard there requires. Neither is gated: they state what a checker printed on a day, and a test pinning them would red on the next release and teach the reader to delete it.
The paragraph said the crossing counts are held by 'the test named below' and nothing below named a test. The reference had been broken for as long as it had existed: a reader following it found no name, and no step in the tree noticed, because a sentence pointing at nothing parses the same as one pointing at something. It now names both guards by path and says what each holds, which are different things. One walks the imports and reds when a count moves in the tree. The other reds when this sentence stops quoting what the first one holds -- the drift that rewriting the constant alone used to leave behind. Naming a file on a page is a claim about the tree, so it gets a guard in the same commit: the paths are read off the page and checked for existence, and the page is required to name at least one. Mutation: 3 mutants, 2 killed, 1 equivalent. A path that names no file kills the new test; removing both paths kills it on the non-empty requirement; dropping that requirement while the paths are still there changes nothing and is equivalent only while they are. A first run scored the second of those SURVIVED -- the harness collapsed two edits to one file into a single snapshot and wrote only the later one, so the mutant on disk was half of what it claimed to be. Measured again, singly.
Unreleased entry for the three commits on this branch: the guard that holds the edge paragraph against the constant the neighbouring test keeps, the two counts remeasured and dated, and the two guards now named by path where the page used to point at a test that did not exist.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Four numbers on docs/architecture/typing-scope.md were said to be
ungated. Measuring them split the set: two are held against the tree,
two are deliberately dated instead, and the defect was elsewhere.
The crossing counts (16 and 23) are held by
test_typing_scope_boundary_is_declared.py, which walks the imports and
reds when either moves. It never reads the page. A move was therefore
paid for by rewriting the constant while the sentence quoting the same
two numbers stayed behind, green and wrong -- which is how three numbers
on that page had already drifted. The new guard closes the loop in the
other direction: constant is the standard, prose is what is checked.
Two further counts stated as current carried no date and were stale: a
cold scoped run gives Success on 118 rather than 97, and a scoped run
over a wide run's cache gives 216 errors in 44 files rather than 239 in
54. All 44 lie outside the scope, checked by resolving [tool.mypy] files
against the error lines. The clean side holds 118, not 98. Both now
carry the measurement date, as the error count beside the ratio already
does.
The paragraph also pointed the reader at "the test named below" and
named none. Both guards are now named by path, and a guard checks that
the paths resolve to files.
Mutation: 8 mutants across the branch, 5 killed, 3 equivalent. Two false
verdicts were caught and remeasured -- one mutant that was half-applied
because the harness collapsed two edits to one file into a single
snapshot, and one scored SURVIVED on an errored collection rather than a
failed test.
Gate green on every commit. 3245 tests, mypy 118/175, drift none.
What this changes
How it was measured
Checklist
ruff format --check cyberai/ tests/andruff check cyberai/ tests/passpytest -W ignore::DeprecationWarning -m "not slow and not smoke"passes