Skip to content

fix(opt,gen-zig): typed aliases stay materialized; @"primitive" idents; unused tuple elements - #1937

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

fix(opt,gen-zig): typed aliases stay materialized; @"primitive" idents; unused tuple elements#1937
gHashTag merged 1 commit into
masterfrom
fix/zig-primitive-shadow

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Closes #1936

Batch five from the tri-net exec campaign:

  1. copy_propagate dropped typed-alias wideninglet lo: u16 = byte_param; propagated the bare u8 identifier into every use, silently narrowing arithmetic (u8 s_lo + (s_hi << 8): shift RHS overflows u3, add wraps). Typed aliases are the widening idiom and stay materialized now. Affects all backends (semantics-correcting).
  2. Zig primitive-name shadows (sha-round f16/f32/f64) → @"name" at every value-identifier site; dead-local pass recognizes the form.
  3. Unused tuple-destructure elements in tests bind as _.

tri-net corpus: tri_sha256 + hello pass end-to-end. Only unit red is pre-existing bitnet_layer (iverilog). FROZEN_HASH resealed; NOW.md entries added.

🤖 Generated with Claude Code

…s; unused tuple elements

Closes #1936

- copy_propagate ignored the declared type of an alias local:
  `let lo: u16 = byte_param;` propagated the bare u8 identifier into
  every use, silently narrowing the arithmetic (u8 shift/add where the
  spec wrote u16 math -- a shift by 8 then overflows u3). The type
  annotation IS the t27 widening idiom, so typed aliases are no longer
  propagated. Affects all backends.
- Value identifiers shadowing Zig primitive names (sha-round locals
  f16/f32/f64) now emit @"name" at every emission site; the dead-local
  text pass recognizes the @"name" form.
- Tuple-destructure elements never read in their test block bind as
  `_` instead of a named const ("unused local constant").

tri-net corpus: tri_sha256 and hello pass zig test end-to-end;
video_bridge / multipath_routing continue tri-net-side. FROZEN_HASH
resealed; only unit red is the pre-existing bitnet_layer iverilog test.

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

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 12:38:44 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)=686003784746 != 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 fcae925 into master Aug 8, 2026
22 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.

copy_propagate drops typed-alias widening (u8 math where spec wrote u16); zig primitive-name shadows; unused tuple elements in tests

1 participant