Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 17:02
· 107 commits to main since this release
  • The mutation-test-loop agent skill ships with @mizchi/mutator, and mutator init-skill [--dir <dir>] [--force] copies it into the project (default .claude/skills). It refuses to overwrite an edited copy unless --force (#12).
  • The child-process warning lists one line per test file, with the number of its spawning tests and the project files they run, instead of every command (#10).
  • Jest runner: a mutant whose failing tests span several test files is now Killed with its killing test recorded, instead of RuntimeError with none. Jest's --bail exited before writing its JSON report; each finished test file is now recorded as it completes. A test file that fails to load is still a RuntimeError (#13).
  • A mutant run that runs out of time is re-run once with 3x the budget before it is reported as Timeout, so a machine that is busier than during the dry run no longer turns slow kills and survivors into timeouts (or drops them from --kill-matrix). Runs stopped by the hit limit are not re-run. The summary reports how many runs were re-run (#14).
  • A GitHub Action (uses: mizchi/mutator@v0) runs mutator on the pull request's diff and keeps .mutator/ in the Actions cache (#11).
  • A changed test file that the runner's config excludes on purpose (Vitest exclude) is no longer reported as not collected (#10).
  • Playwright runner (experimental): --runner playwright mutates browser code that Playwright Test drives through a Vite dev server, with @mizchi/mutator-playwright (a Vite plugin and a test fixture). Playwright's artifacts go to mutator's temporary directory, not the project (#15).
  • Playwright: mutant runs bound expect timeouts to at least 1 s (was 2 s), and results come from mutator's own reporter: the fixture app runs in 39.5 s instead of 59.4 s with the same verdicts (#16).
  • The CLI flushes stdout before it exits: a report larger than a pipe's buffer (64 KB), such as --reporter agent piped to jq, was cut off.
  • Playwright: a webServer with neither url nor port is reported as such (it was taken for a server already answering); Playwright's artifacts stay out of the project even when its config fails to load.
  • Agent skills for using mutator, shipped under skills/ (skills-npm convention): mutator (setup, config, reports, CI) in @mizchi/mutator next to mutation-test-loop, and mutator-playwright in @mizchi/mutator-playwright. mutator init-skill now copies every skill the CLI ships, with its reference files.
  • Critical regions: a critical mutant left unrun (--time-budget, --mutants-per-line) fails the gate, and on GitHub Actions undetected critical mutants are ::error annotations titled Critical mutant ... (also unreached ones in full runs).
  • A runner that cannot start (a Playwright config it cannot list, a dev server that fails or a port in use) exits 1 with its message instead of a stack trace.
  • Playwright: a test file depends on the local files it imports (helpers, fixtures), so editing one re-collects its coverage.
  • A run whose tests reach no mutant at all warns that the setup (include, instrumentation) is likely wrong (noCoverage in the agent report). It is decided from coverage, so reached mutants left pending by --time-budget do not trigger it.
  • A plugin module that exports nothing usable (a misspelt visit, a missing name) is a config error saying what is missing.
  • A mutant reached while a test file loads (or in its beforeAll) ran only that file's tests, not the tests of other files that reach it while running, so it could be reported Survived although one of those kills it. Both run now; the snapshot version is bumped so such cached verdicts are not reused.
  • A RuntimeError is re-run once and counts only if it fails the same way again: under load, an unhandled error from a flaky test file was credited as a detection of whatever mutant was running (seen as bursts of RuntimeError that the same mutants did not reproduce alone, where they survive).
  • Ctrl-C and SIGTERM kill every process the run started before exiting (130 / 143). A worker stuck in a mutant's loop used to keep spinning at full CPU after mutator was stopped.
  • Playwright tests of this repository no longer depend on the machine's load (the timeout test hangs on purpose; the expect-bound test compares with a passing run).
  • After a run killed with SIGKILL, the next run stops the workers it left spinning (recorded under .mutator/processes/ with their start time; only those still orphaned and started when recorded).
  • Vite+ projects run as Vitest projects: an installed vite-plus selects Vitest when there is no config file (it worked only through the NODE_PATH that pnpm's bin shims set), and tests may import from vite-plus/test.
  • Playwright: a mutant run stopped by the hit limit is a Timeout (hitLimit); it was reported Killed by the test that hit it.
  • Jest: weakMutation: false reaches Jest's transformer; the workers still compiled weak-mutation probes.
  • One classification of mutant runs for every runner. Vitest: a test file whose only load errors come from the hit limit is a Timeout, not a RuntimeError. Jest: a test failing on the hit limit and on something else is Killed, not Timeout. killedBy lists the tests, then the files, without duplicates.
  • Plugin modules loaded by the Jest transformer and the Playwright Vite plugin get the CLI's checks and messages. The plugin fingerprint changes, so cached results of runs with plugins are run again once.
  • ConditionalExpression looks through <T>x assertions: if (<boolean>(a > b)) no longer gets the same true / false mutants twice.
  • ranges keeps an insertion mutant on a range edge, as --since does.
  • --time-budget also stops the remaining parts of a long run split by test file; a run stopped between parts stays Pending. Every started run used to finish all its parts, which overran a 600 s budget by more than 30 minutes.