Skip to content

fix(ci): the Zig target of verify_multitarget runs - #5505

Merged
dmitrii-f-t27 merged 2 commits into
masterfrom
fix/verify-multitarget-zig
Oct 2, 2026
Merged

dmitrii-f-t27 merged 2 commits into
masterfrom
fix/verify-multitarget-zig

Conversation

@dmitrii-f-t27

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

Copy link
Copy Markdown
Collaborator

What

The Zig branch of tools/verify_multitarget.py, added by the salvage commit #4736 (closing #3004, "no tool compares all four"), has never run:

defect effect
_gen(t27c, "", ...) runs t27c gen- no such subcommand; the Zig generator is t27c gen
if "pub fn " not in src: return None the generator writes fn smul(...), never pub fn, so every Zig run was dropped
harness [_:u32;N]{...} and std.io.getStdOut() not valid Zig; getStdOut is gone in current releases
the emit-bitexact job installs no zig --require turns "zig not on PATH" into a failure

It never showed, because the job stops earlier, at check_specs_generate.py (#5497).

Change

  • _gen: an empty mode means the default generator, t27c gen.
  • run_zig: checks for fn <name>(, emits [_]u32{...}, prints with std.debug.print, which has the same API in every Zig release (stdout's does not), and _run_bin(..., stream="stderr") reads it.
  • emit-bitexact-gate.yml: an Install zig step, Zig 0.16.0, the same commands and version as queen-doctor.yml and oracle-nightly.yml. The step name now lists Zig.

What it finds (master 5c5c2af, Zig 0.16.0, ReleaseSafe as #4736 chose)

OK gft_smul.smul: C / Rust / Zig == Python model BIT-EXACT over 1744 operand pairs
OK gft_sadd.sadd: C / Rust == Python model BIT-EXACT over 1744 operand pairs
FAIL gft_sadd.sadd: Zig backend failed to build/run   (panic: integer does not fit in destination type)

That failure is real, and it is filed as #5506 with the two causes:

  1. sadd calls magsub(ma, mb) before ordering the operands, so magsub shifts by a negative count. In C that is undefined behaviour, Rust -O does not check it, and both discard the value.
  2. as u32 from i32 wraps in C and Rust but lowers to a checked @intCast in Zig. At the first such pair, (256, 66047), the model itself returns -257 (0xFFFFFEFF).

Both need a decision about the language or the model, not a change to this gate. Until then this step fails for that reason instead of a missing subcommand. The emit-bitexact job is red on master today anyway (15 specs do not generate), so this changes no colour, only what the step says once it is reached.

Census

tri census pin moved one number: run: steps 282 -> 283 (and "the runner does" 261 -> 262), which is the new Install zig step. It is re-blessed in its own commit with that reason, because cli-tri refuses a census that moves without one.

--self-check's positive case expects ALL TARGETS BIT-EXACT and reports the same divergence. The workflow does not run --self-check for this tool.

Refs #5497

🤖 Generated with Claude Code

The Zig branch the salvage commit #4736 added never ran. It called
`t27c gen-` (no such subcommand; the Zig generator is `t27c gen`), required a
`pub fn` the generator never writes, and appended Zig that does not parse
(`[_:u32;N]`, std.io.getStdOut()). The emit-bitexact job installs no zig, so
under --require the step would also have failed as "zig not on PATH". None of
it showed, because the job stops earlier, at the generation step.

_gen maps an empty mode to `t27c gen`; the harness looks for `fn <name>(`,
prints with std.debug.print (the same API across Zig releases, unlike
stdout) and _run_bin can return stderr. The job installs Zig 0.16.0 exactly as
queen-doctor.yml and oracle-nightly.yml do.

On master 5c5c2af with Zig 0.16.0: smul agrees in C, Rust and Zig over 1744
pairs. sadd agrees in C and Rust; Zig traps, because sadd shifts by a
negative count before it orders its operands, and because `as u32` wraps in
C and Rust but is a checked @intcast in Zig. The step now fails for that
reason instead of a missing subcommand.

Refs #5497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 01:48:23 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b7d5cc5c4cf1 != 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 Oct 2, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

tri census pin moved one number: run: steps 282 -> 283, and with it "the
runner does" 261 -> 262. The new step is `Install zig` in
emit-bitexact-gate.yml (previous commit), an ordinary run: step with no
container, so the runner's bash -eo pipefail interprets it. Re-blessed with
`tri census pin --bless`; the other two censuses are unchanged.

Refs #5497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 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 Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 01:51:23 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b7d5cc5c4cf1 != 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).

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