Skip to content

fix(gen-zig): var-inference, bare-underscore destructure, branch-safe var silencer - #1917

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

fix(gen-zig): var-inference, bare-underscore destructure, branch-safe var silencer#1917
gHashTag merged 1 commit into
masterfrom
fix/zig-longtail

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Three more Zig-backend validity fixes, measured against tri-net's 68 legacy specs: (1) locals reassigned anywhere in the body are declared var via collect_mutable_names -- the Rust backend's discipline; Zig errors BOTH on a mutated const and on a never-mutated var, so the choice must be inferred; (2) a discarded destructure element emits bare _, never const _; (3) every inferred var gets the canonical _ = &name; silencer, because a name may be declared in several branches and mutated in only one.

With tri-net's parallel five-spec legalization (tri-net#321), zig ast-check validity reaches 65/68 (from 2/68 at the start of this campaign). The remaining three are the deferred long-tails in #1910: the array-literal/repeat parse path (auto_config, traffic_animator) and CSE temp declarations emitted after first use (topology_visualizer). Unit suite 1537/1537 (== master); gen-rust byte-identical; FROZEN_HASH resealed; NOW.md + docs/NOW.md updated.

Refs #1910

🤖 Generated with Claude Code

…e, branch-safe var silencer

Three more Zig-backend validity fixes: locals reassigned anywhere in the
body are declared 'var' via collect_mutable_names (the Rust backend's
discipline -- Zig errors on a mutated const AND on a never-mutated var, so
the choice must be inferred); a discarded destructure element emits bare
'_' (never 'const _'); and every inferred var gets the canonical
'_ = &name;' silencer, because the same name may be declared in several
branches and mutated in only one. With tri-net's parallel five-spec
legalization, zig ast-check validity goes 9/68 -> 3/68 invalid; the
remaining three are the deferred long-tails in the issue. Unit suite
1537/1537; gen-rust byte-identical; FROZEN_HASH resealed.

Refs #1910

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 07:12
@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.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 07:12:38 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)=2993e460fa57 != 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).

@gHashTag
gHashTag merged commit b192740 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.

1 participant