Skip to content

Gate the prose that states the measured typing-scope edge - #330

Merged
evkir merged 4 commits into
mainfrom
feat/d84-jx-prose-quotes-the-measured-edge
Oct 30, 2026
Merged

evkir merged 4 commits into
mainfrom
feat/d84-jx-prose-quotes-the-measured-edge

Conversation

@evkir

@evkir evkir commented Oct 30, 2026

Copy link
Copy Markdown
Owner

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/ and ruff check cyberai/ tests/ pass
  • pytest -W ignore::DeprecationWarning -m "not slow and not smoke" passes
  • New behaviour is covered by a test that fails without the change
  • I have read CLA.md and I hereby sign the CLA

evkir added 4 commits October 30, 2026 09:29
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

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@evkir
evkir merged commit 3927033 into main Oct 30, 2026
10 checks passed
@evkir
evkir deleted the feat/d84-jx-prose-quotes-the-measured-edge branch October 30, 2026 09:05
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