Skip to content

Fix mutants runner ignoring SIGTERM until the next trial - #2

Merged
FilipKalcic1 merged 1 commit into
mainfrom
fix/mutants-signals
Sep 29, 2026
Merged

FilipKalcic1 merged 1 commit into
mainfrom
fix/mutants-signals

Conversation

@FilipKalcic1

Copy link
Copy Markdown
Owner

CI's first run failed on ubuntu in one test: SIGTERM sent to npm run mutants mid-trial was only handled after the NEXT mutant had run. The runner ran each trial's tests with spawnSync, which blocks the event loop, so the signal handler could not fire until later. Windows skips that test (no catchable signals), which is why it never failed locally.

Trials now run their tests with an async spawn. A SIGINT or SIGTERM is handled at once: the runner kills the trial's tests, restores the mutated file and exits with 128 + the signal number. The SIGTERM test now expects exactly that (no half-finished row, lib/x.ts restored, the stub tests stopped).

CI's first run failed on ubuntu in one test: SIGTERM sent to
`npm run mutants` mid-trial was only handled after the NEXT mutant
had run. The runner ran each trial's tests with spawnSync, which
blocks the event loop, so the signal handler could not fire until
later. Windows skips that test (no catchable signals), which is why
it never failed locally.

Trials now run their tests with an async spawn. A SIGINT or SIGTERM
is handled at once: the runner kills the trial's tests, restores the
mutated file and exits with 128 + the signal number. The SIGTERM test
now expects exactly that (no half-finished row, lib/x.ts restored, the
stub tests stopped).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@FilipKalcic1
FilipKalcic1 merged commit 16a0481 into main Sep 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant