Skip to content

Give the duplication sweep a home, and make it see what it missed - #54

Merged
robertblust merged 2 commits into
mainfrom
duplication-sweep
Sep 2, 2026
Merged

Give the duplication sweep a home, and make it see what it missed#54
robertblust merged 2 commits into
mainfrom
duplication-sweep

Conversation

@robertblust

Copy link
Copy Markdown
Owner

npm run dupes.

This instrument answers a stated success criterion — "re-running the shingle sweep finds nothing above eight lines that the package does not own" — and it has lived in a scratch directory, been rewritten from memory three times, and been wrong by construction twice. Both errors cost real regressions.

  • inventory.mjs only parsed the CHECKS object in verify/check.mjs. So "no check body exists in more than one repository" read as met while 60 lines of suite runner sat outside that object — true of the object, false of the file.
  • outside-checks.mjs looked outside CHECKS but still only inside check.mjs, and it anchored on blust.ch and required a run to appear in all three repos. A block shared by only two was invisible. That is exactly how a requestfailed listener and a document.fonts.ready wait — which companygraph and guestgraph had and blust.ch did not — survived a premise scan that concluded the runner was identical everywhere. Consolidating on that premise then removed a working check from the two sites that had it.

This one reads every file and reports two-of-three as loudly as three-of-three.

What it says today:

  in all three :  63 runs, 1339 lines
  in two only  :  81 runs, 1588 lines   <- invisible to both earlier tools
  total        : 144 runs, 2927 lines

More than half the duplication in this family was unmeasurable by the tools that were reporting on it. The largest clusters, which are the honest scope of the remaining consolidation work:

lines repos where
540 3/3 the four decks' shared markup — tier 2b, never finished
302 3/3 verify/og-recipe.test.mjs
297 2/3 build/instance.mjs
253 2/3 verify/instance.test.mjs
199 3/3 CLAUDE.md — shared conventions prose
141 3/3 og-check.mjs
80 3/3 og-recipe.mjs

Fence bodies and the package's own whole-file copies are excluded — those are duplicated across repositories on purpose, that being the design.

🤖 Generated with Claude Code

robertblust and others added 2 commits September 2, 2026 08:03
This instrument answers a stated success criterion — 're-running the shingle
sweep finds nothing above eight lines that the package does not own' — and it
has lived in scratch, been rewritten from memory three times, and been wrong
by construction twice. Both errors cost real regressions.

inventory.mjs only parsed the CHECKS object in verify/check.mjs, so 'no check
body exists in more than one repository' read as met while 60 lines of suite
runner sat outside that object. outside-checks.mjs looked outside CHECKS but
still only inside check.mjs, and anchored on blust.ch requiring a run to
appear in ALL THREE — so a block shared by only two was invisible. That is
exactly how a requestfailed listener and a fonts.ready wait, which
companygraph and guestgraph had and blust.ch did not, survived a premise scan
concluding the runner was identical everywhere; consolidating on that premise
then removed a working check from two sites.

This one reads every file and reports two-of-three as loudly as three-of-three.
Measured now: 2,927 duplicated lines across 144 runs, of which 1,588 lines are
two-of-three only — more than half of it invisible to both predecessors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robertblust
robertblust merged commit 8bb2e53 into main Sep 2, 2026
@robertblust
robertblust deleted the duplication-sweep branch September 2, 2026 06:16
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