Skip to content

duplicate-bodies is red on master since #6070: bless the four fixture copies into the ledger #6099

Description

@gHashTag

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

  1. Run python3 tools/dupe_scan.py --bless from the repository root. It rewrites tools/duplicate_bodies_baseline.txt and nothing else.
  2. 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.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions