Skip to content

compiler: two frozen tests get the anchor their region needed - #3317

Merged
gHashTag merged 2 commits into
masterfrom
w117f-frozen-tests
Sep 6, 2026
Merged

compiler: two frozen tests get the anchor their region needed#3317
gHashTag merged 2 commits into
masterfrom
w117f-frozen-tests

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Fixes both tests in #3245, with the M5 reseal in the same commit.

a_clocked_body_gets_no_return_guard

let clocked = v.split("always @(posedge").nth(1).unwrap_or("");
assert!(!clocked.contains("__t27_ret"), ...);

unwrap_or("") makes the region empty when the key is absent, and an empty
region satisfies an absence assertion by construction. That single assert! is
the entire test body, and fn on_clock appears as a fixture exactly once in
this file — in this test — so a rename of the emitted literal would leave it
passing on nothing.

a_loop_outside_a_function_never_tests___t27_ret

Region bounded by rfind("endfunction"). Its
.expect("the fixture declares a function") cannot fire and does not check
what it says
: __mul_noop is injected unconditionally, so an endfunction is
present whether or not the fixture declares one.

The subject sits inside the region only because gen_verilog_module happens to
emit its functions before its test-assertions section. Nothing asserted that
ordering.

Both now anchor on presence first

mutant result
break the clocked-block needle FAILED — "would pass over an empty region"
break the ordering needle FAILED — "not the one the assertion means"

The freeze

bootstrap/src/compiler.rs is under M5, so bootstrap/stage0/FROZEN_HASH is
resealed in this same commit:

ffccfa1a71cfd3b5...  ->  ab17ee37a00e3286...

Worth noting for anyone doing this next: the freeze refuses the build the
moment the file changes, so each mutant above had to be resealed before it could
run at all. A first attempt at these controls produced silence rather than
failures, because the build never got as far as the tests.

Refs #3245

`a_clocked_body_gets_no_return_guard` bounded its region with

    v.split("always @(posedge").nth(1).unwrap_or("")

which degrades to the EMPTY string when the key is absent -- and an empty region
satisfies the absence assertion below it by construction. That single `assert!`
is the whole test body; `fn on_clock` appears as a fixture exactly once in this
file, in that test, so a rename of the emitted literal would leave it passing on
nothing.

`a_loop_outside_a_function_never_tests___t27_ret` bounded its region with
`rfind("endfunction")`. Its `.expect("the fixture declares a function")` cannot
fire and does not check what it says: `__mul_noop` is injected unconditionally,
so an `endfunction` is present whether or not the fixture declares one. The
subject sits inside the region only because `gen_verilog_module` happens to emit
its functions before its test-assertions section, and nothing asserted that
ordering.

Both now assert the subject is PRESENT before asserting anything is absent.

Controls, each mutant resealed so it could build at all:

  break the clocked-block needle   -> FAILED, "would pass over an empty region"
  break the ordering needle        -> FAILED, "not the one the assertion means"

`bootstrap/src/compiler.rs` is under the M5 freeze, so
`bootstrap/stage0/FROZEN_HASH` is resealed in this same commit:

  ffccfa1a71cfd3b5... -> ab17ee37a00e3286...

The freeze refuses the build the moment the file changes, which is why every
mutant above needed its own reseal before it could be run.

Refs #3245

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) September 5, 2026 18:05
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 18:05:28 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)=ab17ee37a00e != 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 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

gHashTag pushed a commit that referenced this pull request Sep 5, 2026
Two sessions of this loop ran concurrently and picked the same three tasks from
the same list of recommendations, opening PRs for all of them (#3314, #3317).
Nothing in the flow says who is working on what.

`tri loop claim <name>` uses the one atomic operation git gives over a shared
remote: creating a ref that does not exist. Exit 0 it is yours, 1 someone has
it and the line names them, 2 the attempt could not be made -- which is not the
same as being refused.

THE OBVIOUS VERSION DOES NOT LOCK, and I measured it before writing this one.
Pushing `origin/master` to the claim tag succeeds for the SECOND claimant too:
git treats re-pushing the same value to an existing tag as a no-op and exits 0,
so both sessions believe they hold it. Two sessions of this loop sit on the same
`origin/master` almost by definition, so that lock would have been worse than
none -- it reports success.

The claim is therefore a commit no other claimant can produce: an empty tree
with a message naming host, pid and HEAD. Measured: ALPHA exit 0, BETA exit 1
with the holder named.

A refused push with NO holder exits 2, not 1. That is a broken push rather than
a lost race, and reporting it as HELD would send the next session away from work
nobody is doing.

Two mutants killed -- borrowing the claim value from an existing ref, and
reporting a broken push as held. The second test could not kill anything until
it was fixed: it sliced from the first `match holder` to end of file and
asserted `contains("exit(2)")`, which four unrelated exit-2 sites satisfy.

CENSUS. Three moved and they are not all mine:

  fetches  files read                 43 -> 44   MINE: cli/tri/src/loopclaim.rs
  quiet    named a path but not quiet 128 -> 127  already moved on master
  shell    run: steps                 235 -> 234  already moved on master

A clean `origin/master` worktree fails `census pin --gate` with the last two
before any change of mine, so the pre-commit hook has been failing for every
author since a workflow edit landed unblessed. This commit carries the bless it
inherited and says so rather than passing it on.

Getting there took four wrong turns worth recording: `census pin` WITHOUT
`--gate` exits 0 whatever moved, and I read that non-verdict as "nothing moved"
twice -- once as the control that supposedly cleared master.

Refs #3331

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Refs #3236

The only conflict was `bootstrap/stage0/FROZEN_HASH`. `compiler.rs` merged
cleanly: master's change and this branch's two presence anchors both survive,
and the diff against master is +27 lines with zero deletions.

FROZEN_HASH is a DERIVED value, so both sides recomputed it against their own
base and neither answer is right for the merge:

  this branch  ab17ee37a00e3286ace8b4c281f71992464b4e350e8e3280783024d2105c1d0c
  master       60f03d78aecac0a0a070bb94d72e4b2578c37ade97d65c6f6793cb00456a3492
  merged       ca169bfed429665e761170e0337ed3423cc6649b6a0e1c444faf3f5227bef80e

Taking either side would leave a seal that does not match the file it seals, and
`bootstrap/build.rs` panics on that -- so the conflict cannot be resolved by
choosing, only by recomputing. This is the same shape as the SKILL.md numbering
collision: a value derived from the base, computed independently on two
branches, where the merge and not either branch is where the defect appears.

Controls:
  - build with the resolved seal        -> exit 0
  - build with a deliberately wrong one -> panics "FROZEN HASH violation",
                                           exit 101
The second is there because the first means nothing without it.

t27c: 2557 passed, 0 failed across all test binaries (2559 listed, 2 ignored).
`compiler::tests_w458::` runs 41, which includes both tests this PR adds.
@github-actions

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-06 02:14:54 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 9
PRs with All Checks Green 7
READY 6
FAILING 9
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=ca169bfed429 != 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 7b335cb into master Sep 6, 2026
31 of 32 checks passed
gHashTag added a commit that referenced this pull request Sep 6, 2026
Two sessions of this loop ran concurrently and picked the same three tasks from
the same list of recommendations, opening PRs for all of them (#3314, #3317).
Nothing in the flow says who is working on what.

`tri loop claim <name>` uses the one atomic operation git gives over a shared
remote: creating a ref that does not exist. Exit 0 it is yours, 1 someone has
it and the line names them, 2 the attempt could not be made -- which is not the
same as being refused.

THE OBVIOUS VERSION DOES NOT LOCK, and I measured it before writing this one.
Pushing `origin/master` to the claim tag succeeds for the SECOND claimant too:
git treats re-pushing the same value to an existing tag as a no-op and exits 0,
so both sessions believe they hold it. Two sessions of this loop sit on the same
`origin/master` almost by definition, so that lock would have been worse than
none -- it reports success.

The claim is therefore a commit no other claimant can produce: an empty tree
with a message naming host, pid and HEAD. Measured: ALPHA exit 0, BETA exit 1
with the holder named.

A refused push with NO holder exits 2, not 1. That is a broken push rather than
a lost race, and reporting it as HELD would send the next session away from work
nobody is doing.

Two mutants killed -- borrowing the claim value from an existing ref, and
reporting a broken push as held. The second test could not kill anything until
it was fixed: it sliced from the first `match holder` to end of file and
asserted `contains("exit(2)")`, which four unrelated exit-2 sites satisfy.

CENSUS. Three moved and they are not all mine:

  fetches  files read                 43 -> 44   MINE: cli/tri/src/loopclaim.rs
  quiet    named a path but not quiet 128 -> 127  already moved on master
  shell    run: steps                 235 -> 234  already moved on master

A clean `origin/master` worktree fails `census pin --gate` with the last two
before any change of mine, so the pre-commit hook has been failing for every
author since a workflow edit landed unblessed. This commit carries the bless it
inherited and says so rather than passing it on.

Getting there took four wrong turns worth recording: `census pin` WITHOUT
`--gate` exits 0 whatever moved, and I read that non-verdict as "nothing moved"
twice -- once as the control that supposedly cleared master.

Refs #3331

Co-authored-by: lab <lab@example.com>
Co-authored-by: Claude Opus 5 <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.

1 participant