Repository navigation
fix(mutation): keep umask-setting tests out of Stryker's thread pool - #4782
Conversation
Setting process.umask throws in a worker thread, so a test that sets it failed Stryker's dry run and stopped every shard of the module before a report. The thread-hostile exclusion now also drops tests that set the umask; tests that only read it stay in scope.
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 29bfcfc. |
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(from main, carried into 0.22 by the rebase) sets the umask, so the dry run failed and every shard of the kernel-errors module stopped before a report. This blocked the Mutants checks on #4781.threadHostileTestFilesinscripts/mutation/test-scope.tsalready drops tests that useprocess.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.main carries the same test, so main needs the same change.
Validation
29bfcfcb71on 0.226534ef3869.pnpm check:affected --run --base origin/0.22 --head 29bfcfcb71passed: 42 passed, 28 skipped, exact commit, unchanged checkout.scripts/mutation/test-scope.test.tsasserts script-destination-ancestry and atomic-publish (set the umask) are excluded and archive-extraction (only reads it) is not.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.