Repository navigation
fix(specs): twenty-one core specs stop discarding tokens - #5572
Merged
Merged
Conversation
The corpus ratchet reported 29 core specs that began discarding top-level tokens after 2026-09-12; this repairs the 21 under specs/tri/. Nearly all of the discard was test blocks the parser could not lower: several statements before `given`, two `then` clauses, `then result == void`, Zig-only types in a `given`, tests without braces, plus one orphaned body (sort) and one stray `}` (version). Tests the language can express become braced tests with the same check; type-level checks become value-level ones. Blocks that need function literals or anonymous structs, or whose body was only `true`, are removed with a comment saying why -- they never reached codegen. All 21 parse with nothing discarded and generate in every backend as before; Zig test-report is unchanged but for two removed empty tests. disjoint_set's pre-existing typecheck error (a module-level var array treated as immutable) is now visible; that typechecker defect is fixed separately. The 21 specs are resealed (43 seal files). Published figures: test blocks 14350 -> 14331, x.len field reads 2197 -> 2199, each with its reason. Refs #5497 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This was referenced Oct 2, 2026
Closed
gHashTag
added a commit
that referenced
this pull request
Oct 5, 2026
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.
What
The corpus ratchet reports 29 core specs that began discarding top-level tokens after 2026-09-12 (#5551 left them out of the ledger on purpose, as repairs). This PR repairs the 21 under
specs/tri/. The remaining 8 are underspecs/ml/and come next.What was being discarded
Nearly all of it was test blocks the parser cannot lower, so they never reached codegen:
given, or twothenclausesthen result == void/ interleavedwhen/thengiven(std.StringHashMap,&[_]T{...})let x = y,assert e)@FieldType/@typeInfocheckstrueMaybe(T)::None}How
updatethenquery == 13, circular-buffer state afterwrite, the rsa round trip andmod_exp, red-black tree insert/find/delete, channelrecvempty. Type-level checks become value-level ones.truechecks nothing. 20 blocks in total. Turning them intoassert truewould only grow the assertionless ledger.Checks (on top of 4a7fc3b)
t27c parse-complete --show: nothing discarded in any of the 21.gen,gen-c,gen-rust,gen-verilog: each spec generates exactly as on master.t27c test-report(Zig 0.16.0): unchanged, except two removed empty tests in html and xml that Zig ran as no-ops. The other 19 are BLOCKED in Zig before and after.specs/ml/specs anddisjoint_set [typecheck]. That is disjoint_set's own pre-existing error, now visible because parsing gets further: the typechecker treats a module-levelvararray as immutable (ConstDeclwithextra_mutableregistered as const). That is a compiler fix behind the M5 freeze ceremony, filed with a patch and tests as A module-level var array is typechecked as const: W456 rejects every write into it #5573.t27cbuilt from this tree (43 files with their twins);--verifygives all MATCH.test blocks14350 -> 14331 (-20 removed, +1 restoredtest_mod_exp_small_numbersheader) andx.lenfield reads 2197 -> 2199 (two new asserts), each with its reason.Refs #5497
🤖 Generated with Claude Code