Skip to content

feat(tri): emit determinism -- name the specs whose output wobbles, not just how many - #3007

Merged
gHashTag merged 4 commits into
masterfrom
w43-gen-determinism
Sep 3, 2026
Merged

gHashTag merged 4 commits into
masterfrom
w43-gen-determinism

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 3, 2026

Copy link
Copy Markdown
Owner

#3006 measured that three of four emitters are not byte-deterministic and named
its own next step: "the cheapest next step is naming the files: run the pair
again and print the differing basenames rather than the count."
This is that
command.

What it found, and why the names matter more than the counts

  specs under specs/     650
  runs per backend       2

  C        gen-c        generated 581   differing across 2 runs: 4
      specs/igla/coder/_tmp_pipeline_import.t27
      specs/igla/coder/pipeline.t27
      specs/physics/sacred_verification.t27
      specs/physics/zamolodchikov_4d_conjecture.t27
  Rust     gen-rust     generated 581   differing across 2 runs: 2
      specs/igla/coder/pipeline.t27
      specs/physics/sacred_verification.t27
  Zig      gen          generated 581   differing across 2 runs: 4
      (the same four as C)
  Verilog  gen-verilog  generated 581   differing across 2 runs: 0

Four specs, largely the same ones. pipeline.t27 and
sacred_verification.t27 wobble in all three non-Verilog backends;
_tmp_pipeline_import.t27 and zamolodchikov_4d_conjecture.t27 in two of them.
That points at something shared — a path all three emitters route through —
rather than at three independent emitter defects, which is what the counts alone
suggested.

And the counts are not stable. The ad-hoc harness that produced #3006 read
1 / 3 / 2 where this reads 4 / 2 / 4. Which files wobble is itself a draw, so a
count taken once is not a measurement of the population; only the union is. That
is the argument for naming.

Three refusals, each naming what it refused

$ tri emit determinism --runs 1
Error: --runs must be at least 2: one run cannot disagree with itself

$ tri emit determinism --backend gen-cobol
Error: unknown backend `gen-cobol` -- expected one of: gen-c, gen-rust, gen, gen-verilog

  (and with no target/release/t27c: "A determinism report taken with no binary
   is a statement about this machine, and it reads exactly like health.")

Honesty

  • 4 unit tests. The one worth naming is
    the_four_emitters_are_all_listed: a backend missing from the table is a
    backend this command silently does not measure — the shape tri mods orphan
    had when it watched two crates of five, and the shape gen-verilog: break lowers to disable fork; and continue to a comment -- 17 no-ops in 8 files, and no fork exists anywhere in the corpus #2988's guard had.
  • A spec that fails to generate records the refusal itself rather than being
    skipped, so a spec that generates on one run and refuses on the next still
    shows up as a difference instead of vanishing from both sides.
  • Named emit and not gen: Gen is already the single-spec emitter.
  • It reports and never gates. Whether a wobbling file is a defect worth
    fixing or an ordering nothing downstream reads is not a walker's question, and
    a gate that reddens on it before anyone has decided gets muted.
  • Not established: the mechanism. The tree's prior art points at hash-map
    iteration order (an earlier finding saw gen-verilog-for-simulation varying in
    the order of two adjacent reg _t27_call_tmp_* declarations); whether these
    four are the same cause is unmeasured, and the command does not guess.

Refs #3006

🤖 Generated with Claude Code

#3006 measured that three of four emitters are not byte-deterministic and said
the cheapest next step is naming the differing files rather than counting them.
This is that command.

Measured over 650 specs, same binary, two runs:

  C        gen-c        differing: 4
      specs/igla/coder/_tmp_pipeline_import.t27
      specs/igla/coder/pipeline.t27
      specs/physics/sacred_verification.t27
      specs/physics/zamolodchikov_4d_conjecture.t27
  Rust     gen-rust     differing: 2   (pipeline, sacred_verification)
  Zig      gen          differing: 4   (the same four as C)
  Verilog  gen-verilog  differing: 0

The names change the finding. Two specs wobble in all three non-Verilog
backends and two more in two of them -- four specs in total, largely the same
ones. That points at something shared rather than at three independent emitter
defects, which is what the counts alone suggested.

The counts are themselves unstable: an earlier ad-hoc harness read 1 / 3 / 2
where this reads 4 / 2 / 4. Which files wobble is a draw, so only the union is
meaningful.

Three refusals, each naming what it refused: `--runs 1` ("one run cannot
disagree with itself"), an unknown backend, and a missing compiler -- the last
because a determinism report of zero taken with no binary reads exactly like
health.

It reports and never gates.

Refs #3006
@github-actions

github-actions Bot commented Sep 3, 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 Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 07:37:57 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 10
PRs with All Checks Green 2
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fd84214651ae != 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 Sep 3, 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 Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 07:54:01 UTC

Summary

Status Count
Total Open PRs 11
PRs with Failing Checks 10
PRs with All Checks Green 1
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=1b52250fc530 != 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 Sep 3, 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 Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 08:27:05 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 10
PRs with All Checks Green 2
READY 1
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=1b52250fc530 != 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 Sep 3, 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 Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 08:35:47 UTC

Summary

Status Count
Total Open PRs 11
PRs with Failing Checks 10
PRs with All Checks Green 1
READY 0
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=1b52250fc530 != 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 68eb38a into master Sep 3, 2026
36 checks passed
@gHashTag
gHashTag deleted the w43-gen-determinism branch September 3, 2026 08:47
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