Skip to content

fix(specs): twenty-one core specs stop discarding tokens - #5572

Merged
dmitrii-f-t27 merged 1 commit into
masterfrom
fix/core-spec-discards
Oct 2, 2026
Merged

dmitrii-f-t27 merged 1 commit into
masterfrom
fix/core-spec-discards

Conversation

@dmitrii-f-t27

@dmitrii-f-t27 dmitrii-f-t27 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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 under specs/ml/ and come next.

What was being discarded

Nearly all of it was test blocks the parser cannot lower, so they never reached codegen:

shape specs
several statements before given, or two then clauses logger, logging
then result == void / interleaved when/then circular_buffer, segment_tree, kd_tree
Zig-only types in a given (std.StringHashMap, &[_]T{...}) config, html, mime, xml, filesystem
function literals passed to map/bind/asks/filter, anonymous structs io, reader, async_stream
tests without braces / pseudo-syntax (let x = y, assert e) compress, red_black_tree, rsa
type-level @FieldType / @typeInfo checks config, disjoint_set
a body of only true base64
comparison with a generic Maybe(T)::None channel
an orphaned old body after a new stub; a stray } sort, version

How

  • Expressible: a braced test with the same check. Examples: logging round trips and thresholds, config defaults, segment-tree update then query == 13, circular-buffer state after write, the rsa round trip and mod_exp, red-black tree insert/find/delete, channel recv empty. Type-level checks become value-level ones.
  • Not expressible: the block is removed with a comment that says why, because t27 has no function literal and a body of true checks nothing. 20 blocks in total. Turning them into assert true would 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.
  • Corpus ratchet: unexpected failures 29 -> 9. The remaining nine are the 8 specs/ml/ specs and disjoint_set [typecheck]. That is disjoint_set's own pre-existing error, now visible because parsing gets further: the typechecker treats a module-level var array as immutable (ConstDecl with extra_mutable registered 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.
  • Assertionless, duplicate bodies, types ratchet, specs-generate: unchanged and passing.
  • Seals: the 21 specs are resealed with the t27c built from this tree (43 files with their twins); --verify gives all MATCH.
  • Published figures: test blocks 14350 -> 14331 (-20 removed, +1 restored test_mod_exp_small_numbers header) and x.len field reads 2197 -> 2199 (two new asserts), each with its reason.

Refs #5497

Dmitrii Fedorov (@dmitrii-f-t27)

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>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 10:48:11 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 46
PRs with All Checks Green 4
READY 3
FAILING 46
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 46 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b7d5cc5c4cf1 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@dmitrii-f-t27
dmitrii-f-t27 merged commit db870cd into master Oct 2, 2026
33 of 38 checks passed
gHashTag added a commit that referenced this pull request Oct 5, 2026
…5575/#5287 overlap)

Refs #5083

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dmitrii-f-t27 added a commit that referenced this pull request Oct 10, 2026
#5578 resealed 26 of these seals in bulk and #5572 resealed the other 4
(html, xml) after its discard repair. The triage in #5577, run on
a26af0a, had already put all 30 in class (c): `t27c test-report`
reports failing tests for each of the 15 specs, and a seal over a
failing spec certifies a broken contract. The tests still fail on
d04bf14, so the seals go back to their a26af0a state. Only #5572 and
#5578 touched these files since then.

Seal Coverage and seal currency now report exactly these 30 seals as
stale. That is the state #5577 tracks: fix the spec or its generated
body first, then `t27c seal <spec> --save`. No baseline entry, as the
gate itself says.

Refs #5577
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