Skip to content

feat(t27c): dupes can compare bodies, not only names - #4295

Merged
gHashTag merged 1 commit into
masterfrom
feat/t27c-dupes-bodies
Sep 20, 2026
Merged

gHashTag merged 1 commit into
masterfrom
feat/t27c-dupes-bodies

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #4294

t27c dupes saw names; the duplication that costs is in the bodies. --bodies compares parsed children (686 functions in 189 groups; largest is magadd, 30 copies of 935 characters), --name <fn> tells a bee where a function already lives.

Complements #4290 (the text-based gate): the compiler sees through formatting but only the 887 specs that parse; the text walk covers all 948.

🤖 Generated with Claude Code

`t27c dupes` compared declaration names: 9246 lines over master, most of them
legitimate (gf4..gf64 each carry a validate_format by design), and blind to the
duplication that costs - the same body written again under any name.

--bodies compares the parsed children of each fn, with `line` left out and every
other field kept: 686 functions in 189 groups, the largest 30 copies of one
935-character magadd. --name <fn> answers the question a bee has to ask before
it writes: where does this already live.

Two mistakes were made and fixed on the way, both recorded in the code: hashing
the Debug form of the node included `line`, so identical bodies at different
lines hashed differently and the count came out 276 against a text walk's 555;
and a HashMap's iteration order made two runs list groups differently, which a
reader cannot diff.

Closes #4294

Gates: cargo build --release -p t27c; `dupes --bodies` twice byte-identical;
a group member pair read by hand is identical after normalisation (935 chars);
`dupes --name magadd` prints 30 places; `dupes` with no flag unchanged.

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

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-20 07:04:56 UTC

Summary

Status Count
Total Open PRs 20
PRs with Failing Checks 17
PRs with All Checks Green 3
READY 2
FAILING 17
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 17 + 0 + 0 = 19, and there are 20 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=403499176a5d != 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 b69c5a1 into master Sep 20, 2026
28 of 34 checks passed
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.

t27c dupes compares names, and the duplication that costs is in the bodies

1 participant