#243: match the pair, and let the corpus decide when the scan is finished - #255
Merged
Merged
Conversation
… scan is finished THE PARSE IS GONE. The scan no longer reads a line, captures what it thinks the value is, and compares. It knows both halves before it starts, so it matches NAME=VALUE directly, with findall rather than one match per line. Every blindness C-57 records came from that parse — the swallowed comment, the missing terminator, the six-character lookbehind, the second assignment on a table row. None is expressible now. The two halves need not correspond: `APPWRITE_X=<value declared for APPWRITE_Y>` is the ordinary copy-paste slip, and it names the coordinate that DECLARES the value rather than the one the line assigns. THE SECRET EXEMPTION IS GONE. An inline name literal, sitting under a comment saying the scope came from the declared partition and not from an inline list. Measured, [secret] carries no values today, so removing it changes nothing now and closes the hole the day one gains a value. THE STOPPING RULE IS A TEST. It enumerates every line in this repository's own tracked markdown that assigns a declared coordinate and fails if the matcher cannot read one. So the form list comes from the corpus: a form no document here uses is not a gap, and a new form is taught in the same change as the document that introduces it. That is what stops a fifth widening, which is what this story was for. ALL FOUR SCOPE MUTATIONS ROUTED FROM #242 ARE CLOSED, by one richer fixture rather than four tests — two copies, two sections, one short, one in markdown. Each element defeats a specific narrowing: stopping at the first finding, reading only `target`, reinstating a length floor, skipping the markdown branch. Measured surviving before, caught after. Plus one small test for a package module that does not parse. AND AN EXCLUSION LIST WAS BUILT AND THEN DELETED, which is the part worth keeping. The plan called for excluding values spelled like this repository's own code. Measured against what the AST branch actually sees — non-docstring string constants — THE COLLISION DOES NOT EXIST: the only registry values appearing that way are the two contract rows, and contract is MIRRORED rather than CONSUMED, so it is never in the scanned set. I had built a narrowing of a security scan for a problem this branch does not have. Deleted; the latent version is recorded in C-97. Register: C-57 gets the mitigation, in one place, and the docstrings point at it rather than restating it — the one-home rule, applied for the first time. tests/*.py 9200 -> 9308. The budget is still the wrong way and I am not going to pretend otherwise; see the story comment. Suite 415 passed / 1 skipped / 40 xfailed, ruff clean. Closes #243. Epic #241. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closed
11 tasks
Closed
7 tasks
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.
Closes #243. Gate 2 of epic #241.
The parse is gone
The scan no longer reads a line, captures what it thinks the value is, and compares. It knows both halves before it starts — the declared names and the declared values — so it matches
NAME=VALUEdirectly, withfindallrather than one match per line.Every blindness C-57 records came from that parse: the swallowed comment, the missing terminator, the six-character lookbehind, the second assignment on a table row. None is expressible now.
The halves need not correspond —
APPWRITE_X=<value declared for APPWRITE_Y>is the ordinary copy-paste slip, and it names the coordinate that declares the value.The stopping rule is a test, not a paragraph
It enumerates every line in this repository's own tracked markdown that assigns a declared coordinate, and fails if the matcher cannot read one. A form no document here uses is not a gap. A new form is taught in the same change as the document introducing it.
That is what stops a fifth widening, which is what this story was for.
The four mutations routed from #242 are closed
By one richer fixture rather than four tests — two copies, two sections, one short, one in markdown. Each element defeats a specific narrowing:
scanned_sectionsnarrowed totargetSyntaxErrorswallowedbreakafter the first findingAlso: the
secretexemption is gone — an inline name literal sitting under a comment saying the scope came from the declared partition and not from an inline list.An exclusion list built, then deleted
The plan called for excluding values spelled like this repo's own code. Measured against what the AST branch actually sees — non-docstring string constants — the collision does not exist: the only registry values appearing that way are the two
contractrows, andcontractis MIRRORED, never in the scanned set.I had built a narrowing of a security scan for a problem this branch doesn't have. Deleted. The latent version is C-97's.
The line budget, honestly
tests/*.py: 9,200 → 9,308. Still the wrong direction. Detail and what I propose in the story comment — I am not restating the criterion to make it pass.🤖 Generated with Claude Code