Skip to content

fix(zig): distinguish primitive value bindings from builtin types - #6042

Merged
dmitrii-f-t27 merged 4 commits into
gHashTag:masterfrom
dmitrii-f-t27:codex/zig-primitive-bindings
Oct 4, 2026
Merged

dmitrii-f-t27 merged 4 commits into
gHashTag:masterfrom
dmitrii-f-t27:codex/zig-primitive-bindings

Conversation

@dmitrii-f-t27

@dmitrii-f-t27 dmitrii-f-t27 commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Zig rejected source-defined values named f16 or i0 because W730 left every primitive name bare. Distinguish declared value bindings/references from builtin type expressions: quote locals, tuple bindings, parameters and their mutable rebindings/discards, and first-assignment test/bench bindings. Track values after initialization and restore the outer set when a structured block ends; reset it for each item. Builtin aliases and integer/float casts keep their types. The broader keyword/dotted-name census in #2631 remains open.

A source fixture and six native Zig tests cover independent results over 256 values plus UINT32_MAX, builtin aliases/casts, fresh item/nested block scopes, and two source mutants that compile then abort an executed test command with a real assertion panic. Full local validation: M1 release, M3 2,834 passed/0 failed/2 ignored across 124 targets, and M4 clean expected-failure ratchet (95 observed, cap126; whole corpus remains blocked/failed). All107 tri-net Zig modules execute 1,209 tests, including all19 SHA256 tests. Native generation preserves all102 Rust,75 C and113 Verilog outputs byte-for-byte; tri-net's compiler PIN and budgets are unchanged.

Native seal audit covers all804 existing source paths. Refresh only13 Zig aliases across7 specs without force; all other hashes and coverage1449/1325/124/debt remain unchanged. Reports stay honest:6 BLOCKED and1 PASS. The separate upstream SHA256 spec still has pointer errors; an accepted-baseline source-only value rename reproduces all three. Existing optimizer temporal-alias behavior remains outside this change. No hand-edited generated output or new warning allowances.

Bootstrap test-ratchet now installs actual Zig0.16 before the unchanged native tests. The original019e Linux job failed only because zig was absent (all six controls failed to spawn it). Native history preserves the original install delta264->265/243->244. Merge alignment retains upstream c107 loop-tools changes; final census is268 run steps/247 runner-selected shell steps (master267/246 plus the Zig install). Fetches/quiet match upstream; test/debt baselines are unchanged. Exact474673 Linux executes all six new Zig controls successfully; its three existing corpus column tests refuse missing Icarus. Install the actual Icarus prerequisite as well; final census269 run steps/248 runner-selected shell steps. New exact5dc Linux full acceptance is pending. Existing Icarus lowerability cargo counts include missing-witness skips and are not presented as executed simulations.

Closes #6040
Refs #1936, #2631

@dmitrii-f-t27
dmitrii-f-t27 merged commit 891b15e into gHashTag:master Oct 4, 2026
35 of 37 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: quote declared primitive value bindings without quoting builtin types

1 participant