Context
The duplicate-bodies job of the Duplicate Body Ratchet workflow (it runs python3 tools/dupe_scan.py) has been red on master since PR #6070 landed (0886f014c, 2026-10-04T13:09Z) and is still red on 2e852cf82 (run 37206113836). Every pull request opened since then inherits the red, and every review has to tell it apart from a red the pull request caused. That is review time spent on a red nobody's change is responsible for.
The log on master:
duplicate bodies: 598 of 4880 in 173 group(s) across 1193 spec(s)
::error::a body written under local_branch is now copied [2] time(s) and was in no ledger
::error::a body written under nested_tail is now copied [2] time(s) and was in no ledger
::error::a body written under ordinary_if is now copied [2] time(s) and was in no ledger
::error::a body written under wide_tail is now copied [2] time(s) and was in no ledger
The four groups sit in two compiler fixtures, specs/compiler/rust_tail_returns.t27 and specs/compiler/verilog_branch_context.t27, which bootstrap/tests/rust_tail_returns.rs and bootstrap/tests/verilog_branch_context.rs compile and execute. A fixture is self-contained by design: each one tests one backend on its own, so a short body that happens to equal another fixture's body is deliberate, not a copy to share. The scanner's own message names the fix for a deliberate copy: move the ledger (python3 tools/dupe_scan.py --bless). PR #6070 did not.
Reference run, 2026-10-04T14:40Z, on master 2e852cf82 in a scratch copy: --bless then a plain scan. The ledger diff is exactly four added lines, and the scan turns green:
blessed: 162 group(s), 598 body(ies) into tools/duplicate_bodies_baseline.txt
duplicate bodies: 598 of 4880 in 173 group(s) across 1193 spec(s)
ok: no new duplicate body, and none of the known groups grew.
+local_branch 2
+nested_tail 2
+ordinary_if 2
+wide_tail 2
What to write
- Run
python3 tools/dupe_scan.py --bless from the repository root. It rewrites tools/duplicate_bodies_baseline.txt and nothing else.
- Check the diff of that file before committing: it MUST add exactly the four lines above (each in its sorted place) and remove none. If it adds or removes anything else, master has moved since this issue was written: do not commit; say in the pull request which extra lines appeared, because each one is a new copy somebody has to judge.
- Do not edit either fixture spec. They are compiled by Rust tests that a bee cannot run here, and the fix is the ledger.
User Scenarios & Testing
- Given master at
2e852cf82 or later with no other new copy, when python3 tools/dupe_scan.py runs on the pull request's head, then it prints ok: no new duplicate body, and none of the known groups grew. and exits 0.
- Given the pull request's diff, when it is read, then it touches only
tools/duplicate_bodies_baseline.txt and only adds the four lines named above.
Requirements
- FR-001: the change MUST be produced by
python3 tools/dupe_scan.py --bless, not typed by hand (the ledger's sort and format belong to the tool).
- FR-002: the diff MUST touch only
tools/duplicate_bodies_baseline.txt and MUST only add local_branch 2, nested_tail 2, ordinary_if 2, wide_tail 2.
- FR-003: the fixture specs MUST NOT change.
Acceptance criteria
Each line is a check the Queen's runner executes itself (commands chosen from what it admits; it does not run python3 or git). Computed by a reference run on 2e852cf82: all five fail on master today (0, 0, 0, 0, 161) and pass after --bless.
grep -c -x 'local_branch 2' tools/duplicate_bodies_baseline.txt prints 1
grep -c -x 'nested_tail 2' tools/duplicate_bodies_baseline.txt prints 1
grep -c -x 'ordinary_if 2' tools/duplicate_bodies_baseline.txt prints 1
grep -c -x 'wide_tail 2' tools/duplicate_bodies_baseline.txt prints 1
cat tools/duplicate_bodies_baseline.txt | wc -l prints 165
Checked by the pull request's own CI, not by the runner: python3 tools/dupe_scan.py ends with ok: no new duplicate body, and none of the known groups grew. and exits 0 (the duplicate-bodies check is green), and the diff touches only tools/duplicate_bodies_baseline.txt.
Boundary
tools/duplicate_bodies_baseline.txt
Refs #5776 (review-speed plan row B33). Epic: #5906.
Context
The
duplicate-bodiesjob of the Duplicate Body Ratchet workflow (it runspython3 tools/dupe_scan.py) has been red on master since PR #6070 landed (0886f014c, 2026-10-04T13:09Z) and is still red on2e852cf82(run 37206113836). Every pull request opened since then inherits the red, and every review has to tell it apart from a red the pull request caused. That is review time spent on a red nobody's change is responsible for.The log on master:
The four groups sit in two compiler fixtures,
specs/compiler/rust_tail_returns.t27andspecs/compiler/verilog_branch_context.t27, whichbootstrap/tests/rust_tail_returns.rsandbootstrap/tests/verilog_branch_context.rscompile and execute. A fixture is self-contained by design: each one tests one backend on its own, so a short body that happens to equal another fixture's body is deliberate, not a copy to share. The scanner's own message names the fix for a deliberate copy: move the ledger (python3 tools/dupe_scan.py --bless). PR #6070 did not.Reference run, 2026-10-04T14:40Z, on master
2e852cf82in a scratch copy:--blessthen a plain scan. The ledger diff is exactly four added lines, and the scan turns green:What to write
python3 tools/dupe_scan.py --blessfrom the repository root. It rewritestools/duplicate_bodies_baseline.txtand nothing else.User Scenarios & Testing
2e852cf82or later with no other new copy, whenpython3 tools/dupe_scan.pyruns on the pull request's head, then it printsok: no new duplicate body, and none of the known groups grew.and exits 0.tools/duplicate_bodies_baseline.txtand only adds the four lines named above.Requirements
python3 tools/dupe_scan.py --bless, not typed by hand (the ledger's sort and format belong to the tool).tools/duplicate_bodies_baseline.txtand MUST only addlocal_branch 2,nested_tail 2,ordinary_if 2,wide_tail 2.Acceptance criteria
Each line is a check the Queen's runner executes itself (commands chosen from what it admits; it does not run
python3orgit). Computed by a reference run on2e852cf82: all five fail on master today (0,0,0,0,161) and pass after--bless.grep -c -x 'local_branch 2' tools/duplicate_bodies_baseline.txtprints1grep -c -x 'nested_tail 2' tools/duplicate_bodies_baseline.txtprints1grep -c -x 'ordinary_if 2' tools/duplicate_bodies_baseline.txtprints1grep -c -x 'wide_tail 2' tools/duplicate_bodies_baseline.txtprints1cat tools/duplicate_bodies_baseline.txt | wc -lprints165Checked by the pull request's own CI, not by the runner:
python3 tools/dupe_scan.pyends withok: no new duplicate body, and none of the known groups grew.and exits 0 (theduplicate-bodiescheck is green), and the diff touches onlytools/duplicate_bodies_baseline.txt.Boundary
tools/duplicate_bodies_baseline.txtRefs #5776 (review-speed plan row B33). Epic: #5906.