Skip to content

gen-zig: an empty typed array &[_]T{} lowers to .{} (Closes #8390) - #8415

Merged
gHashTag merged 1 commit into
masterfrom
claude/gen-zig-empty-typed-array
Oct 9, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/gen-zig-empty-typed-array

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #8390

&[_]S{} lowered to &.{ _ }, which Zig refuses: '_' used as an identifier without @\"_\" syntax. On 2026-10-10 that one error kept 17 specs from compiling.

Cause

A typed literal keeps its dimension in extra_size and its elements as children. With no children, the ExprArrayLiteral arm and gen_array_literal_braces both read extra_size as element text and printed the dimension as an element.

Fix

A typed literal (non-empty extra_type) with no children is the empty list. Two lines in compiler.rs (+4 -5), and FROZEN_HASH moves with them.

Checked

  • Regression spec specs/compiler/zig_empty_typed_array.t27: BLOCKED on master, 2/2 with the fix, sealed v2.
  • Of the 17 specs:
  • t27c suite --corpus-only --ratchet: RATCHET: CLEAN (71/71, no unexpected passes or failures).

Part of epic #8095 (P7, #8393).

🤖 Generated with Claude Code

A typed literal keeps its dimension in extra_size and its elements as
children. With no children, the ExprArrayLiteral arm and
gen_array_literal_braces read extra_size as element text and printed the
dimension: &[_]S{} became &.{ _ }, which Zig refuses. That one error kept 17
specs from compiling. Two lines change; FROZEN_HASH moves with compiler.rs.
Regression spec: specs/compiler/zig_empty_typed_array.t27 (BLOCKED on master,
2/2 with the fix). Corpus ratchet: CLEAN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 9, 2026 22:54
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-09 22:55:12 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 47
PRs with All Checks Green 3
READY 1
FAILING 47
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 47 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=bd3352ccb90e != 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 43b810a into master Oct 9, 2026
36 of 40 checks passed
gHashTag pushed a commit that referenced this pull request Oct 10, 2026
…aster green after #8415 (Closes #8416, Closes #8417)

#8416: W736 renames a local that shadows a container declaration to
<name>_lv, and applied it inside the local's own initializer, so
const PI = constants::PI; became const PI_lv = PI_lv; (sacred_physics, the
largest missing hub in frontier, and e8_lie_algebra). The rename is lifted
while the initializer is emitted. Regression spec zig_shadow_initializer.t27.

#8417: #8415 left master red. Its regression spec declared Pair, which
verify_multitarget.t27 also declares (now EmptyArrayElem), and its codegen
change drifted 45 specs' seals. tri seals drift --fix resealed 42 and synced
twins; html, xml and terminal now compile and fail their own tests, so they
are sealed with --force and move stale -> tests-fail in seal_baseline.txt
(only those 6 lines). Corpus ratchet CLEAN, types ratchet CLEAN, seal
coverage OK, drift 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 10, 2026
…aster green after #8415 (Closes #8416, Closes #8417) (#8418)

#8416: W736 renames a local that shadows a container declaration to
<name>_lv, and applied it inside the local's own initializer, so
const PI = constants::PI; became const PI_lv = PI_lv; (sacred_physics, the
largest missing hub in frontier, and e8_lie_algebra). The rename is lifted
while the initializer is emitted. Regression spec zig_shadow_initializer.t27.

#8417: #8415 left master red. Its regression spec declared Pair, which
verify_multitarget.t27 also declares (now EmptyArrayElem), and its codegen
change drifted 45 specs' seals. tri seals drift --fix resealed 42 and synced
twins; html, xml and terminal now compile and fail their own tests, so they
are sealed with --force and move stale -> tests-fail in seal_baseline.txt
(only those 6 lines). Corpus ratchet CLEAN, types ratchet CLEAN, seal
coverage OK, drift 0.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 10, 2026
#8535 blessed Pair in while #8415's regression spec duplicated it; #8418
renamed that type, so the conflict is gone and the ratchet asks for the
entry to leave. One line removed.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 10, 2026
… zig on the lab (Refs #8553)

43b810a moved FROZEN_HASH with compiler.rs, so every generated target
changed bytes; every seal not regenerated since then reported [stale] --
56 at this branch (testbenches, Ternary* ISA, TriMath/TriMeasurement/
TriBellmanFord, SpecWriter, bench_main, lsp, functions_fn_monitoring_*,
and twins, including the legacy pipeline_"[]const u8".json). Each was
re-sealed per the checker prescription (t27c seal <spec> --save) with zig
on PATH so the test record is real, then tri seals sync-twins. The j_go
test fix in the previous commit is what made fpga_TrinetNode sealable.

The lab gate on this exact tree: exit 0, zero stale, zero gen-drift.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 10, 2026
…observes the accept edge (#8564)

* fix(fpga): trinet_node j_go test observes the strobe on the accept edge, not a cycle late (Closes #8553)

j_go is registered on the accept edge (the nonblocking idiom at the top of
on_clock), so the one-cycle strobe is high in exactly the cycle after
on_clock(0,0,0,1,1). #8490's test opened its 100-clock observation window
only after that call and counted 0 pulses. Assert the strobe right after
the accept edge, then require 0 pulses in the window that follows; the
sibling j_go_stays_low test already reads it this way.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* seals: reseal the #8415 FROZEN_HASH wave -- 56 seals regenerated with zig on the lab (Refs #8553)

43b810a moved FROZEN_HASH with compiler.rs, so every generated target
changed bytes; every seal not regenerated since then reported [stale] --
56 at this branch (testbenches, Ternary* ISA, TriMath/TriMeasurement/
TriBellmanFord, SpecWriter, bench_main, lsp, functions_fn_monitoring_*,
and twins, including the legacy pipeline_"[]const u8".json). Each was
re-sealed per the checker prescription (t27c seal <spec> --save) with zig
on PATH so the test record is real, then tri seals sync-twins. The j_go
test fix in the previous commit is what made fpga_TrinetNode sealable.

The lab gate on this exact tree: exit 0, zero stale, zero gen-drift.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <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.

gen-zig: empty typed array &[_]T{} lowers to &.{ _ } (blocks 17 specs)

2 participants