feat(core): add StrykerJS mutation testing via the command test runner - #107
Merged
Conversation
Adds stryker.config.ts, a turbo _mutation task, and .gitignore entries for its temp/report directories. Uses testRunner: "command" (re-running pnpm exec vitest run per mutant as a subprocess) rather than @stryker-mutator/vitest-runner: that plugin's 10.0.0 release crashes on init against vitest 5.0.0 with a circular-structure-to-JSON error while serialising vitest's resolved config, a confirmed upstream incompatibility with no fix or compatible version pairing available yet. The command runner loses per-test coverage analysis (every mutant re-runs the whole suite) but produces a real result instead of a silent, meaningless zero score. test/conformance.test.ts is excluded from the mutation test command specifically: it reads its vectors from a sibling package via a relative path that escapes Stryker's per-package sandbox root, so it fails with ENOENT for every mutant regardless of the mutation. _conformance-check already runs it separately, unmutated. stryker.config.ts is added to tsconfig.node.json's include list so ESLint's typed linting can parse it.
Mearman
marked this pull request as ready for review
September 13, 2026 06:09
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
stryker.config.ts imports PartialStrykerOptions from @stryker-mutator/api/core, but the package was only ever hoisted transitively through @stryker-mutator/core's own dependency on it. That resolved locally but failed CI's typecheck with TS2307 (module not found), since a transitive resolution isn't a guarantee any package manager owes a direct import.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #67
Adds a stryker.config.ts for ts/packages/core using testRunner: "command" instead of @stryker-mutator/vitest-runner. That plugin's 10.0.0 crashes on init against vitest 5.0.0 (this package's installed version) with a circular-structure-to-JSON error while serialising vitest's own resolved config, thrown from VitestTestRunner.init. No fix or compatible version pairing is available upstream yet (matches stryker-mutator/stryker-js's own vitest-runner issue tracker, and Chris0Jeky/Taskdeck#3038 independently hits the identical "0.00 tests per mutant" symptom against the same vitest major).
The command runner re-runs
pnpm exec vitest runas a subprocess per mutant. It loses per-test coverage analysis (every mutant re-runs the whole suite rather than only its covering tests) but produces a real, working result rather than an immediate crash.test/conformance.test.ts is excluded from the mutation command specifically: it reads its vectors from a sibling package via a relative path that escapes Stryker's per-package sandbox root, so it fails with ENOENT for every mutant regardless of the mutation, not a real coverage signal.
_conformance-checkalready runs it separately, unmutated.First baseline, run locally: 67.23% mutation score (526 killed, 30 timeout, 271 survived, 0 no-coverage, 678 non-viable/compile-error mutants). No
thresholds.breakset yet — this PR's job is the baseline itself; fixing what it finds and setting a real break threshold is #68's own separate work.stryker.config.ts is added to tsconfig.node.json's include list so ESLint's typed linting can parse it, matching how generate.ts/tsdown.config.ts/etc are already included there.