Skip to content

fix(gen-zig): invariant marker as comment; pin untyped literal-init mutables to u32 - #1931

Merged
gHashTag merged 1 commit into
masterfrom
fix/zig-emission-invariant-comptime
Aug 8, 2026
Merged

fix(gen-zig): invariant marker as comment; pin untyped literal-init mutables to u32#1931
gHashTag merged 1 commit into
masterfrom
fix/zig-emission-invariant-comptime

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Closes #1930

Two Zig emission classes from the #1928 ledger, measured on the tri-net corpus (21 specs blocked):

  1. Empty invariant blocks emitted @compileLog(...)zig test treats any compile log statement as a hard error, so affected specs failed before one test ran. Marker is now a plain comment.
  2. Untyped mutable locals initialized with bare integer literals emitted var x = 0xFF; (comptime_int, rejected for var). Declarations now pin the default width: u32, or u64 when the literal exceeds u32.

Verification on the tri-net corpus: both error classes gone (8 + 13 specs); 7 specs newly pass zig test end-to-end, 14 advance to their runtime layer (tracked tri-net-side). Unit suite: only pre-existing red is bitnet_layer (iverilog elaboration, fails on pristine master; Verilog path untouched here). FROZEN_HASH resealed; NOW.md entries added.

🤖 Generated with Claude Code

…utables to u32

Closes #1930

Two emission classes measured on the tri-net corpus (21 specs blocked):

- Empty invariant blocks emitted @compilelog(...), which zig test treats
  as a hard error ("found compile log statement") -- every spec with an
  empty invariant block failed before a single test ran. The marker is
  now a plain comment.
- Untyped mutable locals initialized with a bare integer literal emitted
  `var x = 0xFF;` (comptime_int, rejected for var). The declaration now
  pins the default integer width: u32, or u64 when the literal does not
  fit u32.

tri-net corpus verification: both error classes gone (8 + 13 specs);
7 specs newly pass zig test end-to-end, 14 advance to their runtime
layer. FROZEN_HASH resealed. bitnet_layer iverilog test is pre-existing
red on master (unrelated, Verilog path untouched).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 11:16
@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 11:16:52 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)=34b8bad47530 != 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 91cf4f1 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.

Zig backend: empty invariant blocks emit @compileLog (fatal under zig test); untyped literal-init mutables emit comptime_int var

1 participant