Skip to content

fix(gen-zig): campaign finale -- 68/68 tri-net specs produce valid Zig - #1918

Merged
gHashTag merged 1 commit into
masterfrom
fix/zig-final-three
Aug 8, 2026
Merged

fix(gen-zig): campaign finale -- 68/68 tri-net specs produce valid Zig#1918
gHashTag merged 1 commit into
masterfrom
fix/zig-final-three

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

The final four Zig-backend validity fixes, closing the campaign tracked in #1910 (66/68 invalid at the start, 0/68 now):

  1. Array literals: ExprArrayLiteral carries its element TEXT in extra_size with no children; the Zig emitter now lowers it to .{ e1, e2 } / .{ v } ** n (paren-aware top-level comma split), which coerce to the typed array target.
  2. CSE ordering: _cse* temp declarations hoist to the top of fn bodies -- the CSE pass can leave them after their first use in this backend's statement order (the Rust path already hoists), and Zig resolves locals lexically.
  3. Uninitialized locals emit = undefined (Zig has no uninitialized declarations).
  4. Dead-local post-pass stops counting at a redeclaration of the same name -- a later const name = ... is a new binding, not a use (it previously kept genuinely-dead first bindings undischarged).

Validation: full 68-spec sweep 0 failures under zig ast-check (0.15.2); unit suite 1537/1537 (== master); gen-rust byte-identical; FROZEN_HASH resealed; NOW.md + docs/NOW.md updated. tri-net follow-up commits gen/zig and restores its Zig drift leg.

Closes #1910

🤖 Generated with Claude Code

… shadow-aware dead-local scan

Final four Zig-backend validity fixes: ExprArrayLiteral stores its element
text in extra_size with no children -- emit '.{ e1, e2 }' / '.{ v } ** n'
(paren-aware top-level comma split), coercing to the typed array target;
'_cse*' temp declarations hoist to the top of fn bodies (the CSE pass can
leave them after first use in this backend's order; the Rust path already
hoists); uninitialized locals emit '= undefined'; and the dead-local
post-pass stops counting at a REDECLARATION of the name (a later
'const name = ...' is a new binding, not a use). tri-net zig ast-check
goes 3/68 -> 0/68 invalid -- the campaign that began at 66/68 invalid is
complete. Unit suite 1537/1537; gen-rust byte-identical; FROZEN_HASH
resealed.

Closes #1910

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 07:35
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 07:36:01 UTC

Summary

Status Count
Total Open PRs 14
PRs with Failing Checks 1
PRs with All Checks Green 13
READY 5
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=ed9e8b98b73d != 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).

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@gHashTag
gHashTag merged commit f62fb8b into master Aug 8, 2026
23 checks passed
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.

gen (Zig): unused params + undeclared test bindings fixed; three classes remain before zig output compiles

1 participant