check: a collision that only lowering creates - #3486
Merged
Conversation
Closes #3485 `fn test_booth_encode_zero` and `test booth_encode_zero` are DIFFERENT NAMESPACES IN t27 and the SAME IDENTIFIER IN C, where a test block becomes `void test_{name}(void)`. The duplicate gate compares raw names, so it was silent while the corpus printed `redefinition of 'test_booth_encode_zero'`. MEASURED PER BACKEND, NOT ASSUMED, and the message names only the backends it is true of: gen-c `void test_X(void)` / `void bench_X(void)` COLLIDES on both gen (zig) `test "X"` is a STRING, not an identifier no collision `fn bench_X()` COLLIDES gen-rust tests are not lowered at all no collision gen-verilog a test is emitted as a comment no collision Repeating the existing "every backend rejects a redeclaration" would have been false for three of the four. POPULATION: functions named `test_*` 66 ... with a test block of the matching name 4 in 2 specs functions named `bench_*` 0 test blocks named `test_*` 532 ... whose stripped name is also a test 0 The 4 split, and neither half is repaired here. The two in igla/race/backend.t27 are NEVER CALLED -- each appears once in the whole tree, as its own declaration -- while the two in math/property_test_template.t27 ARE called from test blocks. One pair is dead code that also collides; the other is a live helper that needs one of two names changed. Both are a spec author's decision. THE `bench` HALF HAS POPULATION ZERO AND IS KEPT ANYWAY, written, tested and shown reachable rather than left out -- the same reasoning already recorded in this function for the type/function finding: a zero nothing could have produced is not evidence. THE RULE KEYS ON `fn`, AND 532 TEST BLOCKS NAMED `test_*` ARE WHY THAT MATTERS. `test "test_thing"` beside `test "thing"` gives `void test_test_thing(void)` and `void test_thing(void)` -- two identifiers, no collision. A mutant letting any declaration kind trigger the rule survived every test until a fixture for that case existed. It gets ITS OWN RATCHET rather than a number shared with the existing one: they are different claims, and a shared count lets one kind be paid for with the other. The Spec Guards `paths:` filter is extended to the new baseline, which otherwise would not have triggered the workflow that reads it. The corpus is unchanged -- 11 642 before and after, all 582 generated headers identical. This is a `check` change. Tests: 4 new Rust cases, 3 new self-check cases (8 of 8 pass), full suite 3537 passed 0 failed. Five mutants, all killed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
September 8, 2026 11:46
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
check: a collision that only lowering creates
Closes #3485
fn test_booth_encode_zeroandtest booth_encode_zeroare DIFFERENTNAMESPACES IN t27 and the SAME IDENTIFIER IN C, where a test block
becomes
void test_{name}(void). The duplicate gate compares raw names,so it was silent while the corpus printed
redefinition of 'test_booth_encode_zero'.MEASURED PER BACKEND, NOT ASSUMED, and the message names only the
backends it is true of:
gen-c
void test_X(void)/void bench_X(void)COLLIDES on bothgen (zig)
test "X"is a STRING, not an identifier no collisionfn bench_X()COLLIDESgen-rust tests are not lowered at all no collision
gen-verilog a test is emitted as a comment no collision
Repeating the existing "every backend rejects a redeclaration" would
have been false for three of the four.
POPULATION:
functions named
test_*66... with a test block of the matching name 4 in 2 specs
functions named
bench_*0test blocks named
test_*532... whose stripped name is also a test 0
The 4 split, and neither half is repaired here. The two in
igla/race/backend.t27 are NEVER CALLED -- each appears once in the whole
tree, as its own declaration -- while the two in
math/property_test_template.t27 ARE called from test blocks. One pair is
dead code that also collides; the other is a live helper that needs one
of two names changed. Both are a spec author's decision.
THE
benchHALF HAS POPULATION ZERO AND IS KEPT ANYWAY, written, testedand shown reachable rather than left out -- the same reasoning already
recorded in this function for the type/function finding: a zero nothing
could have produced is not evidence.
THE RULE KEYS ON
fn, AND 532 TEST BLOCKS NAMEDtest_*ARE WHY THATMATTERS.
test "test_thing"besidetest "thing"givesvoid test_test_thing(void)andvoid test_thing(void)-- twoidentifiers, no collision. A mutant letting any declaration kind trigger
the rule survived every test until a fixture for that case existed.
It gets ITS OWN RATCHET rather than a number shared with the existing
one: they are different claims, and a shared count lets one kind be paid
for with the other. The Spec Guards
paths:filter is extended to thenew baseline, which otherwise would not have triggered the workflow that
reads it.
The corpus is unchanged -- 11 642 before and after, all 582 generated
headers identical. This is a
checkchange.Tests: 4 new Rust cases, 3 new self-check cases (8 of 8 pass), full
suite 3537 passed 0 failed. Five mutants, all killed.
🤖 Generated with Claude Code