skill: a census of what cannot be read is not a census of what is read wrongly - #3226
Merged
Merged
Conversation
…d wrongly `tri unparsed` ranks the constructs that stop the parser and its population is defined by "the compiler refused". Anything the compiler accepted is outside it by construction, however wrong the result, and that second class is invisible for the reason that makes it dangerous: every gate is green on it. Fourteen corpus specs pass parse, pass typecheck, and emit a struct field with no type. Three are in the debt ledger for other reasons; eleven are tracked by nothing. A four-line reproducer carries the whole mechanism: `bad : 0,` puts an integer literal in type position, both stages accept it, Rust emits `pub bad: 0,`, C emits `0 bad;`, and Zig drops the field entirely. Recovery is what hides it. A list-valued declaration the parser does not implement has its items recovered as fields, so the spec comes out looking well-formed. Records the cheapest detector -- a shape check on the generated output rather than a parser change -- and prices the three repairs without taking any of them. Refs #3225 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
September 5, 2026 01:47
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
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.
tri unparsedcensuses the specs the compiler cannot read. There is no census forthe specs it reads wrongly, and this is one: 14 specs pass
parse, passtypecheck, and emit a declaration that cannot mean anything in any target language.Minimal reproducer — four lines, and every stage accepts it
t27c parset27c typecheckgen-rustpub bad: 0,gen-c0 bad;gen-zigAn integer literal is in type position and no stage says a word. Two backends emit
it verbatim into languages that cannot parse it; the third drops the field silently,
which is the more dangerous of the two failures.
Where it comes from
Fourteen corpus specs use a list-valued declaration the parser does not implement:
The intent is an enum with named discriminants. What the parser builds is a struct
whose fields are
kind,variants(empty type), thensuccesswith type0,command_errorwith type1, and so on. The generated Rust is:Measured
pub f: ,parseandtypecheckSo 11 of the 14 are tracked by nothing at all, and all 14 satisfy every gate this
project runs.
The proposal, and its cost — your call
A typecheck rule refusing an empty field type catches all 14 and needs no
judgement: a field must have a type. But it turns 14 currently-passing specs into
typecheck failures, and
docs/reports/suite_expectations.jsonsits at 152 entriesagainst a cap of 152.
max_entriesre-blesses atmin(previous, observed), soabsorbing them needs a deliberate hand edit raising the cap — which the design treats
as exactly that, a hand edit.
The alternatives are worse or bigger:
generatesfrom 581 to 567 — the same number moving down, in a more visible placeReporting rather than shipping. The reproducer above is the durable part.
Skill §566 and a
docs/nowentry. No code — the three repairs are priced in the issue and none is taken.Refs #3225