CodeVetter · Repo Unpack · Behavior traces
stryker-mutator/stryker-js
The inspected flows cover CLI startup and preparation, mutation execution, incremental persistence/reuse, and server discovery/execution. These traces follow concrete function calls and preserve conditions that change the route through execution. Baseline failures stop mutation testing, while ignored or cached mutants bypass runner execution. Cleanup and asynchronous reporter completion are explicit parts of the lifecycle.
- Startup follows bin/stryker.js → StrykerCli.run → run action → Stryker.runMutationTest → logging/injector setup → Stryker.run → PrepareExecutor.execute.
- Preparation follows ConfigReader.readConfig → PluginLoader.load → MetaSchemaBuilder.buildMetaSchema → OptionsValidator.validate → ProjectReader.read → TemporaryDirectory.initialize; an empty project throws ConfigError.
- Instrumentation follows readFilesToMutate → Instrumenter.instrument → writeInstrumentedFiles → preprocess.preprocess → checkerPool.init → Sandbox.init; Sandbox fills files, runs buildCommand, then creates dependency symlinks.
- Baseline execution schedules executeDryRun → testRunner.dryRun → capabilities → validateResultCompleted → path remapping → timing calculation → onDryRunCompleted; failed tests, errors, timeouts, or disallowed empty runs stop progression.
- Primary mutation execution follows makePlan → executeEarlyResult → executeCheck → executeNoCoverage → executeRunInTestRunner → reportAll → wrapUp; dryRunOnly and allowed empty baselines return before this chain.
- Incremental reuse follows ProjectReader.readIncrementalReport → MutantTestPlanner.incrementalDiff/readAllOriginalFiles → IncrementalDiffer.diff → planMutant; eligible old statuses become early results unless force is enabled.
- Persistence follows reportOne accumulation → reportAll → mutationTestReport → metrics calculation → onMutationTestReportReady → optional writeIncrementalReport → threshold evaluation; interruption saves partial results only when incremental is enabled and results exist.
- Server start installs framed JSON-RPC methods; configure records a config path, discover prepares and instruments selected files, and mutationTest calls Stryker.run with a reporter override that emits progress notifications before an empty final result.