Skip to content

spec: legalize five wave-era specs for cross-backend validity - #321

Merged
gHashTag merged 1 commit into
mainfrom
spec/zig-legalize
Aug 8, 2026
Merged

spec: legalize five wave-era specs for cross-backend validity#321
gHashTag merged 1 commit into
mainfrom
spec/zig-legalize

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

The Zig validity sweep surfaced five more latent spec bugs, real in every backend: m3_multihop used Rust method-call syntax 0x100_u8.wrapping_sub(x) (the t27 parser silently mangled it -- the function lost its return) plus a suffixed 0x100_u16 literal; bandwidth_allocator's tests referenced PRIORITY_LOW/MEDIUM/HIGH constants that were NEVER DECLARED (its generated code could not compile in any backend and nothing noticed); production_scenarios' accessor node_state was shadowed by four same-named params (accessor renamed to node_state_of); integration_framework and test_validator used error -- a Zig keyword -- as a parameter name.

Rust gens for the five regenerated (drift check green), full local gate green. Together with the t27-side Zig fixes (var-inference, _ destructuring, _ = &x silencer), zig ast-check validity reaches 65/68 -- only the three deferred long-tails (array-literal parse path x2, CSE decl-ordering) remain, tracked upstream.

🤖 Generated with Claude Code

Five more Rust-isms / latent bugs in wave-era specs, surfaced by the Zig
validity sweep and real in every backend: m3_multihop used the Rust method
call 0x100_u8.wrapping_sub(x) (parser silently mangled it -- the function
lost its return) and an 0x100_u16 suffixed literal; bandwidth_allocator's
tests referenced PRIORITY_LOW/MEDIUM/HIGH that were never declared (its
generated code could not compile anywhere); production_scenarios' accessor
fn node_state was shadowed by four params of the same name (renamed the
accessor to node_state_of); integration_framework and test_validator used
'error' -- a Zig keyword -- as a parameter name (renamed to err_word).
Rust gens for the five regenerated; drift check green on all; full local
gate green (77 test targets).

gen/ changes are t27c regenerations (L2 bypassed per the guard's fix path).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag merged commit bc4ca7f into main Aug 8, 2026
4 checks passed
@gHashTag
gHashTag deleted the spec/zig-legalize branch August 8, 2026 07:17
gHashTag added a commit that referenced this pull request Aug 8, 2026
…st-check clean (#322)

The gen-zig validity campaign (t27#1910, closed by #1911/#1915/#1917/#1918
plus tri-net's spec legalizations #310/#321) took the backend from 66/68
invalid to 0/68. gen/zig/ returns with all 68 files (each validated with
zig ast-check 0.15.2), and spec-drift-guard's Zig leg is back: byte-exact
diff against 't27c gen' built from upstream master (no formatter in the
Zig path, so no fmt-vs-drift contradiction). Two backends now under the
required drift gate.

gen/ additions are t27c generations (L2 bypassed per the guard's fix path).

Co-authored-by: SSD DDD <ssdm4@MacBook-Pro.local>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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