Skip to content

refactor(scripts): remove test scripts that discovery replaced - #2408

Merged
chubes4 merged 1 commit into
mainfrom
refactor/2402-prune-test-scripts
Aug 29, 2026
Merged

refactor(scripts): remove test scripts that discovery replaced#2408
chubes4 merged 1 commit into
mainfrom
refactor/2402-prune-test-scripts

Conversation

@chubes4

@chubes4 chubes4 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Second slice of #2402 item 5. Retires the package.json test registry that started this whole thread.

#2406 made tests/*.test.{ts,mjs} and scripts/*-smoke.{ts,php} run by convention. That left most test: entries in package.json as dead registry weight — names nothing invokes, wrapping files that now run on their own.

What changes

before after
npm scripts 245 81
test: scripts 218 54
package.json 34.8 KB 19.3 KB

164 removed. package.json was the highest-churn file in the repo — 432 of the last 2,815 commits touched it (15%) — precisely because it was the place tests had to be registered. That role is gone.

Retention was computed, not guessed

A script is kept when it is referenced by any of: the smoke manifest, homeboy.json, a workflow, a doc, the README, another npm script, or repository source — or when it does work discovery cannot express, such as a typecheck or a node --test multi-file invocation.

The 54 kept, by reason:

count reason
26 referenced by a workflow
6 chained by another npm script
5 runs work discovery does not cover
4 homeboy.json
3 typecheck or multi-runner
10 manifest, docs, or source references

Verification

No dangling references. Zero unresolved npm run targets across package.json, homeboy.json, all three workflows, scripts/smoke-manifest.ts, and docs/:

dangling npm-chain references: 0
dangling refs in workflows/homeboy/manifest/docs: 0

Full aggregate green:

npm run check
# [smoke] check: 4 declared, 328 discovered (concurrency 8), 9 serial
# [smoke] check passed: 341 command(s)
# real 9m53.100s

341 commands, same as before the prune — removing the wrappers removed no coverage, which is the entire point.

One extra change

tests/recipe-step-continuation.integration.test.ts moves to the serial phase. It failed once during a verification run under concurrency, then passed 3 of 3 standalone. It boots a runtime and asserts step counts, so contention flips it rather than merely slowing it — same class as the eight already serialized. Catching it here rather than letting it become an intermittent red is worth the line.

Remaining in item 5

Seven excluded tests still need individual fix-versus-delete calls. They fail for unrelated reasons and each needs its own judgement, so they do not belong in a mechanical prune.


AI assistance disclosure: authored by Claude (Sonnet 4.5) running in OpenCode, directed by @chubes4. The model computed the retention set across seven reference surfaces rather than pattern-matching names, verified zero dangling targets after removal, and ran the full aggregate twice — the first run caught the contention flake now serialized. All figures are measured. Reviewed by a human before opening.

#2406 made tests/*.test.{ts,mjs} and scripts/*-smoke.{ts,php} run by
convention, which left most of the test: entries in package.json as dead
registry weight. Remove the 164 that are pure single-file invocations already
covered by discovery and referenced nowhere.

Retention was computed, not guessed. A script is kept when it is named by the
smoke manifest, homeboy.json, a workflow, a doc, the README, another npm
script, or repository source, or when it does work discovery cannot express
such as a typecheck or a multi-runner invocation. 54 qualify.

  scripts       245 -> 81
  test: scripts 218 -> 54
  package.json  34.8KB -> 19.3KB

Verified no dangling references: zero unresolved 'npm run' targets across
package.json, homeboy.json, all workflows, the smoke manifest, and docs.

Also serializes tests/recipe-step-continuation.integration.test.ts. It boots a
runtime and asserts step counts, and failed once under concurrency while
passing 3 of 3 standalone.

Full aggregate green: 341 commands in 9m53s.
@chubes4
chubes4 merged commit 0d55244 into main Aug 29, 2026
5 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.

1 participant