fix(test): prevent an untracked child in the mutation baseline

Merged
TH
6d ago
+16-12

Summary

Fix the test fixture that aborted four kernel-errors shards in Mutation Weekly.

The retry mock spawned a real second child before throwing, so the client never received its handle. That child could write a startup marker after the first child's cleanup. Refuse the retry before spawning, and assert that only one fixture child exists so detection does not depend on process scheduling.

One test file changed. No production behavior, timeout, score threshold, or sweep-completeness policy changed. No separate issue.

Validation

  • Head: 4de8160e9f7a7e606cf984eb8805fdf394041826; base: 49a28248d81a3b8de68e9458de73724ade67c729.
  • Added assertion failed before the fix: two fixture children instead of one. The same focused Vitest command passed after the fix; all 26 startup-race tests passed.
  • pnpm gate mutation --modules kernel-errors --shard 4/5: passed on the patched base, including 5,883 baseline tests and the mutation sweep.
  • pnpm check:affected --run --base origin/main --head HEAD: all six checks passed at head; receipt run-E2z8jj, exactCommit=true, checkoutChanged=false.
  • Hosted PR checks and a fresh weekly sweep remain pending; local macOS evidence does not replace the full Ubuntu sweep.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.