chore(test): start the subprocess-stub kill-criterion experiment (#1823) - #2007
Merged
Conversation
Deletes the serialized `subprocess-stub` Vitest project and drops SUBPROCESS_STUB_TESTS from unit-core's exclude, so its two real spawners (client-metro.test.ts, harness.test.ts — corpus-replay.test.ts already left for fuzz-worker in #1994) run un-serialized in the default forks pool per #1823's own kill criterion. Revert if a timeout-shaped failure shows up before 20 consecutive CI runs pass clean. The files stay excluded from the mutation lane (SERIALIZED_TESTS): that exclusion is about mutant-rerun cost, independent of Vitest project structure. Updated the comments/docs/scripts that described the old project by name so none of them assert a project that no longer exists. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015YPgKE1xmjdqh7T1q987DA
Size Report
npm unpacked components
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. Top changed packed files
|
|
Member
Author
|
Clean at |
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.
Summary
#1823 is the live tracker for the
subprocess-stubVitest project and states its own kill criterion: "if the three members run un-serialized in the default pool for 20 consecutive CI runs with no timeout-shaped failure, delete the project." Nobody had started that experiment yet — the project still existed with all its serialization machinery. This PR runs exactly the steps the issue describes: dropsSUBPROCESS_STUB_TESTSfromunit-core'sexcludeand deletes thesubprocess-stubproject block, so its members run in the default forks pool.Membership note: the issue's table lists 3 members, but
scripts/fuzz/corpus-replay.test.tsalready left for its ownfuzz-workerproject in #1994 (merged earlier today, for an unrelated coverage-lane worker-death bug — see #1824). So only 2 files are actually un-serialized by this change:src/__tests__/client-metro.test.ts— real Metro dev server + child spawn per casescripts/fuzz/harness.test.ts— the SUT is the subprocess watchdog, one target hangs on purpose (test: nightly fuzz lane — parser inputs must fail as typed AppErrors, never hang #1414)fuzz-worker(holdingcorpus-replay.test.ts) is untouched — its serialization is for a different, already-decided reason.What's the same, what changed
SUBPROCESS_STUB_TESTSstill feedsSERIALIZED_TESTS, so both files stay excluded from the Stryker mutation scope regardless of this experiment's outcome — thousands of mutant reruns times a real per-case spawn is timeout noise independent of whether Vitest itself serializes the file.test:coverage:cialready only skipsfuzz-worker, notsubprocess-stub.package.json/docs/agents/*.md/ assorted comments: updated the handful of places that named thesubprocess-stubproject directly, so nothing left in the repo asserts a project that no longer exists.scripts/gate/check.tsneeded no change — it derivesvitestProjectsfromvitest.config.tsby regex, so the gate manifest picked up the deletion automatically (verified below).Revert plan
If a timeout-shaped failure shows up in either file before 20 consecutive CI runs pass clean, restore the
subprocess-stubproject block and putSUBPROCESS_STUB_TESTSback inunit-core'sexclude— that's the entirety of the revert, symmetric with this diff.Validation
pnpm exec vitest run --project unit-core src/__tests__/client-metro.test.ts scripts/fuzz/harness.test.ts— both files pass running alongside the rest ofunit-core(previously they only ran alone insubprocess-stub).pnpm exec vitest run --project unit-core --project fuzz-worker— full suite: 1035 files, 2 pre-existing failures unrelated to this change (app-log-session-resource.test.ts,durable-capture-resource-adoption.test.ts) reproduced identically againstorigin/mainbefore this diff — not introduced here.pnpm check:gate-manifest—48 checks wired across 28 lanes(down from the prior run'ssubprocess-stub-inclusive count), confirming the manifest re-derives cleanly with no manual sync needed.pnpm check:gate-manifest:test,pnpm check:agent-guidance,pnpm check:layering,pnpm typecheck,pnpm lint,pnpm format:check— all green.docs/agents/testing.mdstays at 9,587 of its 10,000-byte gate ceiling (agent-guidance-contract.test.ts).Refs #1823.
Generated by Claude Code