refactor(scripts): remove test scripts that discovery replaced - #2408
Merged
Conversation
#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second slice of #2402 item 5. Retires the
package.jsontest registry that started this whole thread.#2406 made
tests/*.test.{ts,mjs}andscripts/*-smoke.{ts,php}run by convention. That left mosttest:entries inpackage.jsonas dead registry weight — names nothing invokes, wrapping files that now run on their own.What changes
test:scriptspackage.json164 removed.
package.jsonwas 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 anode --testmulti-file invocation.The 54 kept, by reason:
homeboy.jsonVerification
No dangling references. Zero unresolved
npm runtargets acrosspackage.json,homeboy.json, all three workflows,scripts/smoke-manifest.ts, anddocs/:Full aggregate green:
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.tsmoves 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.