fix(mutation): keep umask-setting tests out of Stryker's thread pool

Merged
TH
7d ago
+18-6

Summary

Setting process.umask(mask) throws in a worker thread, and Stryker's vitest runner runs tests in a thread pool. packages/host-kit/src/internal/script-destination-ancestry.test.ts sets the umask, so the dry run failed and every shard of the kernel-errors module stopped before a report. This is the main counterpart of #4782 (0.22).

threadHostileTestFiles in scripts/mutation/test-scope.ts already drops tests that use process.chdir (via the CLI capture harness) or start a worker thread. It now also drops tests that set the umask. Tests that only read it (process.umask()) stay in scope. A mutant only an excluded test could kill still shows as a survivor.

Validation

  • Head 23ddf84794 on main. pnpm check:affected --run --base origin/main --head 23ddf84794 passed: 42 passed, 28 skipped, exact commit, unchanged checkout.
  • scripts/mutation/test-scope.test.ts asserts script-destination-ancestry and atomic-publish (set the umask) are excluded and archive-extraction (only reads it) is not.

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