All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

Added

  • A project logo: centred at the top of the README, and as the HexDocs sidebar logo and favicon.
  • HexDocs guides for upgrading and for the boot set, seams and warm-safe declarations (moved from the README).

Changed

  • The README opens with badges, a dashboard screenshot that follows your light or dark theme, why Juggernaut (with the measured figures and where they come from) and a three-command quick start.

0.4.0 - 2026-11-28

Added

  • lasting_servers in .juggernaut.exs: project server modules whose state tests change but no later test reads, such as a debug event ring or a fake backend keyed by each test's own fresh ids. A change in their state no longer recycles a probe worker or sends a survivor to a fresh one. Never list a memo or cache: a value it kept can spare a mutant, which a test pins on the memo fixture.
  • HexDocs guides: a configuration reference covering every .juggernaut.exs key with its default and an example, and a reference of the --format agent documents, exit codes and event stream. The module pages are grouped (mix tasks, API, configuration, output formats, dashboard, operators, internals), module docs link to the guides or cite the design notes by section, the README's links work on HexDocs and it shows the dependency to add by hand, and the changelog's links are absolute.

0.3.0 - 2026-11-27

Added

  • A boot-lane job records the stage clocks of each fresh boot it made (boots in its result: the mutant's boot, then its own control's), and mix juggernaut.profile has a section "Boot-lane jobs by part": each boot stage, the control boots, and the test runs and waits, with p50, p90, p99, max and total (JSON boot_parts). It shows where the boot lane's time goes, which was most of a large Phoenix app's run with no way to tell why.

Changed

  • A boot-lane job of more than one run (a strike, then the rest of the suite) boots with only its first run's test files loaded, and loads the others before its next run; a struck kill's own control loads the same files. Compiling the whole test suite on a worker's two schedulers was most of each boot, twice per struck kill. A job that runs past its first run still loads every test file first, so a survivor has faced the whole suite with the mutant on, as before. A test file that fails to load then counts as a boot kill, as at boot; a boot whose first files fail to load (a test file that needs a module another one defines) boots again with every file.

Fixed

  • mix juggernaut.install --agents works in a project without Igniter: it writes the AGENTS.md section and the agent skill, as it does with Igniter, so a project that added Juggernaut by hand can refresh them after an upgrade. Before, it only said that Igniter was needed. The rest of the installer still needs Igniter.

0.2.2 - 2026-11-27

Changed

  • The --stream plan event no longer has reused, and the progress line plan: ... no longer ends in "N reused". A reuse event (reused, recorded_ms) and the line cache: N results reused (... recorded) follow once the cache has been looked up; neither is sent with the cache off.

Fixed

  • The result cache is keyed on Juggernaut's code (Juggernaut.code_id/0, a hash of its compiled modules) instead of its version, so a fix released without a version change, or a path dependency on a checkout that moved, never reuses results the old code made.
  • The progress said "0 reused" on every run, even when the cache answered every mutant: the count was written at the plan, before the cache is looked up.
  • No tuple mutant of a tuple that binds a variable in a match?/2 pattern: match?({:ok, info} when ok?(info), x) with {} left info unbound in the guard, so the mutant did not compile.
  • A worker forgets the files a job required (Code.require_file/2) when it puts the VM back, as it already deleted their modules: the next job that required the same file loaded nothing, and its tests failed with every mutant off.
  • "Tests fail with every mutant off", "flaky baseline" and "tests fail during the probe" errors now end with the first failure (first failure, <test>: <message>), so the cause is in the error instead of needing a rerun by hand.
  • A drift report no longer lists the process running the check among the "new processes", where it read as a leak.

0.2.1 - 2026-11-27

Added

  • The README has an Upgrading section, and the agent skill has "After upgrading Juggernaut". Both cover a path dependency on a read-only checkout: there, the first compile after an upgrade can fail with could not touch ...: read-only file system, and mix deps.compile juggernaut --force once per environment fixes it.

Changed

  • A worker boots without checking the compile and the dependencies again (app.config --no-compile --no-deps-check): the compile phase has built the sandbox before any worker boots, so the check found nothing to do, yet it was about half of every boot, recycle and boot-lane job (2 s of 4.4 s on a small fixture). 0.2.0 shipped without it because it made another project's coverage probe fail; the cause was the compile fixed below.

Fixed

  • The sandbox compile loads the project config, as mix does before any task. Before, code that reads the config while it compiles got the defaults: Phoenix's ~p compiled unsorted query strings where config/test.exs sets sort_verified_routes_query_params: true. A worker's boot then recompiled those modules with the config, which hid the bug and cost every boot its time. A sandbox built by an older Juggernaut is rebuilt once, on the first run after the upgrade.

0.2.0 - 2026-11-26

Added

  • Spare workers (spares: true, the default): a worker VM parked with the project loaded, which has started no app, loaded no test file and touched no database, so it holds no database connection and the connection budget is unchanged. A pool worker that has recycled once keeps one beside its own, and its next recycle boots from it once the old VM has stopped; each boot-lane slot keeps one, so every boot-lane job finds its VM started and its project loaded while the job before it runs. Nothing the spare did depends on the mutant or the database, so a boot from it is the same boot a fresh VM gives. spares: false starts every VM inline, as before.
  • Test lanes: test_lanes: [integration: [tags: [...], paths: [...]]] in .juggernaut.exs names the integration tests (by default, those tagged :integration or under test/integration/); every other test is a unit test. Each mutant now runs its unit tests first and its integration tests only when every unit test passed, so a mutant that only an integration test kills is told apart: it counts as killed for the gate, and the run counts it separately (counts.integration_only, and test_lane on its result). The boot lane runs its suite in the same two stages. A project without integration tests runs as before.
  • Timeouts per test lane: test_lanes: [integration: [timeout: [multiplier: M, min_ms: N]]] gives integration tests their own per-test timeout and job deadline, calibrated from their own recorded durations; a key left out takes the top-level timeout's value. Unit tests keep the top-level timeout, now calibrated from the unit tests alone.
  • Every output names the mutants killed only by integration tests: a Lanes row in the human summary, integration_only (count and list) in --format agent, test_lane on each NDJSON mutant event, a table in --format markdown, a ::notice at each one's line in --format github, test_lane in the mutation-testing-elements export, and a lane row in mix juggernaut.explain.
  • mix juggernaut.compare counts each side's kills made only by integration tests and lists the mutants killed on both sides by a different test lane (a unit test in A, only an integration test in B: a unit test that no longer catches it), in every format.
  • The mix juggernaut.report dashboard shows the kills made only by integration tests: on the Killed tile, in a card of their own on the overview (each opens the inspector), and as a Test lane line in the inspector.
  • mix juggernaut.install (with or without --from-mutare) writes a test_lanes entry: the :integration tag plus the conventional integration tags the project's test files already set (:external, :e2e, :db, ...), and says which it found.
  • Warm-safe declarations: a person can declare, in the committed .juggernaut.warm_safe.json, that a function's boot-set mutants may be judged on a warm worker. The inner and gate lanes then settle those mutants with the tests that run the function after boot instead of a fresh boot each; the release lane ignores every declaration and boots them all fresh. A declaration rests on evidence: each run now records, for every boot-set mutant tried on a warm worker, whether it was killed or survived there and the hash of its function, so it pairs with the mutant's fresh-boot result, and a declaration needs at least one pair at the function's current code and no pair that disagrees. It lapses when the function changes, needs a person's acknowledgement on core code, and is refused to an agent (JUGGERNAUT_ACTOR starting with agent). Warm-settled results are never cached, so revoking a declaration takes effect on the next run.
  • mix juggernaut.advise reads a recorded run and the coverage index and says, without running anything: which mutants are unit, startup (they need a fresh boot) or integration (whole files or the suite run for them), per module; which test files behave unlike their lane (a test declared a unit test whose code runs in processes no test owns, or an integration test every hit of which its own tests own), with the lane read from test_lanes (tags and paths) and the tags from the test sources and the case templates they use; the seams that would let specific tests judge the code (a boot-only function, a value kept at boot and compared with a fresh call, a cast or timer no test owns, setup_all); and, for each boot-set function, its warm/fresh evidence with one piece of advice (declared, unsafe, declare, verify, boot_only). --verify runs a seeded sample of boot-set mutants both warm and on a fresh boot and keeps the pairs. --warm-safe, --ack, --revoke and --declarations manage the declarations: declaring needs evidence that allows it and a person, never an agent. Human and agent (--format agent) output; the agent document lists the commands an agent may run (next) apart from those only a person may (for_a_person).
  • mix juggernaut.install --agents also installs an agent skill, .claude/skills/juggernaut/SKILL.md: when to use the inner, gate and release lanes, how to read the agent output and kill a survivor, when code needs a fresh boot or the integration tests (two-stage test_lanes: their tags, paths and timeout) and why, how to use mix juggernaut.advise, and that an agent never declares warm-safe code or acknowledges a claim. A second run changes nothing; an outdated or edited skill is written again.

Changed

  • A harness error from a failed control now says why the test failed, not only which test: the reason ends with the first line of the failure, at most 300 characters, as in "test fails without the mutant: test/x_test.exs:12 (Assertion with == failed)".
  • The coverage probe recycles a worker as soon as a probe job leaves state that the restore cannot put back (a project server's state, a protected table), when the worker has more test files to probe. The next file then runs once on a fresh worker, where it used to run, find the state and run again on a recycled one.
  • The time a run spends before its first phase (reading the checkout, hashing the files cached results rest on, the checkout lock) is the new prepare phase, and is in the recorded wall; the server's first request spent it in no phase. The cache phase now also holds the check that the tree is still clean (git status), which ran before the phase opened: on a large tree it was seconds in no phase between mutants and cache. mix juggernaut.profile shows what remains of the wall outside the phases ("in no phase", JSON unphased_ms).
  • The AGENTS.md section written by mix juggernaut.install --agents now covers the three lanes, mix juggernaut.advise, and points to the skill.
  • The compile phase keeps one compile VM for the whole build instead of starting elixir for every compile. A build compiles the sandbox again after each poisoned mutant it takes out, and each fresh VM spent seconds starting Mix and loading the dependency paths before compiling one changed file. On the ecto_app fixture (one file with 35 mutants inside Ecto query macros, 21 compiles) the build went from 79.7 s to 5.5 s on a loaded host, with the same mutants switched and byte-identical beams. A compile VM that exits hands its compile, and the rest, to a fresh one.
  • The compile phase classifies and renders the files' metamutants a scheduler each at once; only the switch blocks are numbered in order.

0.1.0 - 2026-11-26

Added

  • Boot-set mutants are tried first on a warm worker: a mutant whose code runs while the app starts, and which tests also run again afterwards, first runs as an ordinary job with those tests. The result is never the mutant's verdict, since on a warm worker the app started with the mutant off, and a test that compares a fresh call with what boot kept can fail there yet pass after a real boot. Every boot-set mutant is decided in the boot lane; a warm kill only makes its tests run first there, so the rest of the suite is skipped when they kill after a real boot too. Each run records its boot set (how many mutants, how many were killed warm and the job time that took, how many ran in the boot lane and how many of those their warm killers killed, at what concurrency and why), shown by mix juggernaut.profile and on the dashboard's Performance page. On genserver_app (docs/benchmarks.md), Limits.window/1's mutants, killed warm, survive in the boot lane, as they do in a real boot.

  • --force-unlock on mix juggernaut and mix juggernaut.server removes the checkout lock first, whoever holds it, and says whose it was: for a run or server whose container was removed before its lock went stale. A refused run's message names it.

  • mix juggernaut.survivors lists a recorded run's survivors (and NoCoverage), core first, grouped by file, module or operator, paged (--page, --per-page), optionally core only, in human or agent format. The agent document's page.next from a run points at it, so an agent can read every survivor without running the mutants again.

  • A per-mutant result cache (_build/juggernaut/cache/results/): a gate run on a clean, committed tree records each kill and survivor, and later runs reuse them instead of running their jobs while nothing they rest on changed. A kill stands while its killing test's file and every function the job ran with the mutant on (measured in the workers with call counting) hash the same; a survivor while the test files that covered it and every function its job ran with the mutant on (its own, its callers and collaborators) do and no other test covers it now, so a caller that starts to use the mutated value runs it again. Function hashes ignore comments and layout but include what the module gives the function (attributes, aliases, use). A change to the config, mix.lock, config/, priv/, the test helper or test support drops the whole cache. The inner lane only reads it; the release lane and --no-cache (or cache: false) neither read nor write it. The summary says Reused N results (recorded run time X s), counting only the recorded durations of the reused results, and the agent document carries reused. The cache is kept as one compact file per mutated source file: what entries share (function hashes, file hashes, test references) is written once per file. A run reads only its mutants' files and rewrites only the files that gained entries, and each source file is parsed once per write, not once per entry. Replayed on a large Phoenix app's cache (1,622 entries): 157 MB became 10 MB in 10 files, and the footprints that took about 262 s to hash (extrapolated from 200 entries) took 1.8 s. A cache written in the old single-file layout is not read; it is removed on the next write.

  • Weakened tests stop reuse and are reported: since a cached result's commit, an added skip or excluded tag, ExUnit configured in a test module, a deleted test module, a changed support file or config, or a test module that lost assertions invalidates every result of that commit, and each finding is listed in the summary (weakening).

  • Runs honour triage claims: a mutant whose claim applies is equivalent (not compiled, run or scored); a claim on core code without a human's acknowledgement changes nothing; a claim whose function changed has lapsed. Every claim on a mutant of the run is listed in the summary with its state (triage_claims).

  • mix juggernaut.triage manages the committed triage file, .juggernaut.triage.json: ID --equivalent --reason TEXT claims that a mutant of the latest run is equivalent, recording the reason, who claimed it (JUGGERNAUT_ACTOR) and the hash of the mutated function, so the claim lapses when that function changes; --revoke ID removes a claim; --ack ID --as NAME is a human's acknowledgement of a claim on core code (a name or JUGGERNAUT_ACTOR starting with agent is refused); --list shows every claim as applies, unacked or lapsed. The file is sorted and laid out the same way every time, so a claim reads well in review; a malformed file is exit 2.

  • mix juggernaut runs mutation testing end to end: it plans and mutates the scope, compiles every mutant once in the sandbox, boots the warm pool, probes coverage (only what changed since the last probe), runs a baseline of exactly the tests the mutants need, then runs each mutant's tests with it switched on, and records the run and a history line under _build/juggernaut/. It prints each phase's clock and each survivor as they happen (a core survivor once its reconfirmation has settled it, so it is never reported twice), then a summary (or, with --format agent, one JSON document with the summary, the paged survivors with their diffs and the tests that ran, and a verify command for each), and exits 0 when the gate passes, 1 when it fails or is incomplete, 2 on a usage or configuration error, 3 on an infrastructure error.

  • Every killed mutant says how it died: assertion, exception (also a throw, an exit or a failing setup_all), timeout (a test past its timeout, or a job past its deadline), crash (a linked process's exit, or the worker dying, as with System.halt/1) or boot (the app does not start with the mutant on).

  • The gate: core files held to thresholds.core (100 by default), every other file (or the run, with per: :run) to thresholds.changed, no_coverage: :fail and timeouts: :survived honoured; a run with mutants left unrun is incomplete, and a harness error is exit 3 whatever else happened. Scores are shown rounded down, so a score never looks better than it is. The inner lane is advisory and stops at the first failure by default.

  • Faster kills: a mutant first runs alone the test that killed it last time (or, when many tests cover it, the cheapest of them), and the rest only when that test does not kill it; jobs go out longest first to the first idle worker; test timeouts and job deadlines are calibrated from the baseline's measured durations (timeout: [multiplier:, min_ms:]).

  • Trustworthy kills: in the gate and release lanes every kill is checked by running the killing test again with the mutant off; a test that fails then gets a fresh worker, whose verdict stands, and a test that fails there too is reported as a harness error (control failed) rather than a kill. A surviving core mutant is run again on a fresh worker with every test of the files that cover it. A harness error is retried twice on a fresh worker.

  • --fail-fast (stop once the gate cannot pass), --max-mutants N and --budget DURATION stop dispatching early and leave the rest pending, with the reason; the boot lane gets what is left of N, and its mutants left unrun name the N given.

  • mix juggernaut.check ID... runs named mutants of the latest run again (usually after adding a test) and exits 0 when each is killed, 1 when one survives: the verdict after a fix, without a full run. --format agent gives the same mutant objects as a run.

  • Juggernaut.run/1 and Juggernaut.check/2: the same runs as functions. The request is validated: a missing, unknown or mistyped key, or a request that is not a map, returns a usage error (exit 2) naming it, instead of raising or being ignored.

  • Coverage that knows which test ran each mutant's code (Juggernaut.Coverage): every test file runs once on the warm pool with recording on, and each hit is owed to the test whose process made it, to a test whose GenServer call it served, or to the test file when it came from setup_all, an on_exit callback or a process they started, all found from which process started which, never from timing. A mutant then runs only those tests, or the whole file; a hit no test owns, such as a singleton's cast or timer, or a helper process a server spawned, runs the whole suite and says why ("a cast to MyApp.Counter"); code that runs while the app starts or the tests load goes to the boot lane; code no test reaches has no coverage and runs nothing. The coverage index (_build/juggernaut/coverage/index.etf) keeps each test file's coverage between runs, so only new or changed test files, files covering changed source, or everything after a change to test helpers, test support, config/ or mix.lock, are probed again. It also remembers which mutants it was probed for, so a run with mutants it has not seen (another operator set, a Juggernaut upgrade) probes again instead of reporting them as having no coverage. Every run uses it.

  • The boot lane (Juggernaut.Runner.BootLane): a mutant in code that runs at boot is tested on a fresh worker with the mutant on before the app starts; an app that then fails to start is a kill of kind boot, a worker that dies or hangs while starting with the mutant on is a kill of kind crash or timeout (not an infrastructure error), otherwise the whole suite runs.

  • A warm pool of test workers (Juggernaut.Pool): each worker is a :peer node booted once in the sandbox with its own environment (by default its own MIX_TEST_PARTITION, so its own test database), its worker_setup steps (such as ecto.create and ecto.migrate, retried before the boot fails with exit 3), the app started and the test files loaded once; then it runs job after job, each re-entering ExUnit with only the selected tests and one mutant switched on. After every job the application and OS environment and the project's persistent_term keys are put back (never Juggernaut's own worker keys, so a run on Juggernaut itself keeps its workers), and a health check (registered names, ETS tables, Logger, supervision tree, leftover Ecto sandbox owners, processes, ports, modules defined in memory) recycles a worker that drifted. A job past its deadline or a worker that dies is reported and the worker replaced. Workers' output never reaches Juggernaut's own output. Before any mutant runs, the pool proves that every worker got its own environment and database, and a sharded baseline runs tests on every worker; a test that fails or flakes with every mutant off, a re-run of failed tests that cannot complete, or a baseline that drifts again on a freshly recycled worker stops the run (exit 3). A worker setup step that keeps failing names how many attempts it made. Waiting for a boot that outlasts its timeout, or for a worker that is not running, is an infrastructure error rather than a crash of the caller. A canary job proves a worker only when it passes and leaves no drift, within its own per-test deadline. A pool size that is not a positive integer, or a malformed env template, is reported as a clear option error.

  • connections in .juggernaut.exs (budget, per_worker): the number of database connections all workers may hold together, validated (a budget below one worker is a configuration error, exit 2). Juggernaut.Pool.options/2 turns the configuration into the pool's options, sized to fit the budget, with each worker's env templates and schedulers. Every run starts its pool from these options.

  • The sandbox is compiled by Mix in a subprocess, with type inference and verification off, and a mutant whose code does not compile is isolated: it first gets its own copy of its function, then, if it still fails, it is reported as a compile error naming the diagnostic, so one bad mutant never blocks a run. When a file's errors cannot be traced to its mutants within five rounds (an Ecto query macro raises one error per compile, so a file with a few mutants that drop a query binding, [i] to [], ran out of rounds), its mutants are compiled in groups until each bad one is found, and the rest stay switched instead of the whole file falling back to its code as written (at most 32 such compiles per file, however often it is searched; mutants not proven by then are compile errors). A group counts as compiling only when the whole compile passed, so a file Mix skipped because another file failed is never taken as proof. A compile that fails outside the mutants is an infrastructure error (exit 3). A project that aliases compile is compiled too: the compile task itself runs, not the alias.

  • A persistent sandbox, _build/juggernaut/sandbox, that mirrors the project (the files git lists for it, plus lib, test, config and priv) and is synced incrementally: only files whose content changed are written, so Mix recompiles only them, and every file keeps its permission bits, so scripts tests run stay executable; a sandbox file a test or a mutant changed is restored, and any sandbox file with no input in the project is deleted, even after the manifest is lost; relative path dependencies in mix.exs are made absolute; dependencies are mirrored next to the sandbox (_build/juggernaut/sandbox_deps) and compiled from there, so the project's deps/ is only read and may be read-only or shared; and nothing is ever written to the working tree. A sandbox placed inside the project outside a skipped directory such as _build is refused, since it would be mirrored into itself.

  • Metamutant schemata (Juggernaut.Schemata): every mutant of a file is compiled once, into one metamutant, and turned on at run time by its switch (Juggernaut.Peer.Switch, one :persistent_term integer: 0 runs the code as written, -1 records which sites run). An expression site becomes a case on the switch where it stands; a pattern, guard, dropped clause or pipe stage gets a private copy of its function, reached from the function's own clauses, so with every switch off the function runs as written under its own name (__ENV__.function, stack frames, FunctionClauseError, Logger metadata), each copy reads module attributes as its clause does, and a module's exports never change. A mutant in a macro body, which runs at compile time, is reported as a compile error with the reason.

  • Mutant generation from source (Juggernaut.Mutator): every function clause of a file is walked once, and all 47 of Mutare 0.5.1's operator families make their mutants under Mutare's family names and variant labels, in runtime, guard and pattern positions as Mutare does (the few differences are listed in docs/research/mutare-operators.md). Each mutant has a stable key that an edit outside its function does not change, a short id (Cart.total/1:integer:4be1c09), its place in the file, and a diff patched over the file's own text. Every patched file parses, including a multi-line string, charlist or sigil ending an operator inside a list or tuple, a number under a unary minus (-0.05 becomes -(-0.95)) and an atom key written with =>. Under a unary minus the succ and pred labels name the change to the written value (-3 to -4 is pred). Code in a module body runs at compile time and is counted, never mutated.

  • Ignore comments: # juggernaut:ignore and # mutare:ignore (both configurable in ignore_prefixes) with Mutare's line, -start/-end region and -file forms and [family, family:label] filters, so existing mutare:ignore comments keep working. A juggernaut:ignore directive needs a reason. Unpaired or nested regions, a region end of another prefix than its start, and unknown labels are errors; a directive that ignores nothing, an unknown family, a malformed filter or a misspelt verb is a warning.

  • raw_calls and skip_calls take effect: the arguments of a raw call (such as the Ecto from, schema and embedded_schema macros) are never mutated, and a skipped call is left alone with what is piped into it.

  • mix juggernaut --dry-run lists the mutants a run would make, without compiling or running anything: counts by file and by operator, ignored mutants, module-body sites that are never mutated, and every ignore or routing warning; --format agent (or json) prints them as one JSON document. It takes every scope: --full, --files (globs allowed, read as Path.wildcard/1 reads them, [ab] and [a-z] classes, a reversed range such as [z-a] listing its three characters, included; exclude, core and paths read globs the same way), the default --changed (files changed since the merge base of base and HEAD, committed or not, plus untracked files) and --since REF (only the function clauses whose lines changed). Both read git the same whatever the user's diff settings (diff.noprefix, diff.mnemonicPrefix, core.quotePath), whatever warnings git prints (such as core.autocrlf's) and whatever characters the file names hold. --lane inner keeps one mutant per line outside core code, skips Logger, IO, :telemetry and arid_calls calls there (core given as files or as modules is left whole), and defaults to the changed clauses since base; an ignore comment on a skipped call still counts as used. A scope that needs git fails with exit 2 when git cannot answer; so does a file that does not parse, an invalid ignore comment, or (with --strict-ignores or strict_ignores) an ignore warning; a raw or skip route that matched no call stays a warning.

  • The juggernaut Mix project: an Elixir 1.20 library with package metadata, HexDocs configuration and Juggernaut.version/0. Runtime dependencies are sourceror, nimble_options, telemetry and jason, with igniter optional for the installer; the behaviour relied on from each is recorded in docs/dependencies/.

  • .juggernaut.exs, an optional configuration file with small defaults, validated on load: a file that does not evaluate (a syntax error, raise, throw or exit), a file that is not a keyword list, a key given twice, unknown keys (reported together), invalid values (with their nested path) and source paths that do not exist are configuration errors (exit 2) naming the file. JUGGERNAUT_BASE overrides base. refuse_env (default: credential-like names) refuses to run when matching variables are set, naming them without their values.

  • A versioned store under _build/juggernaut/: whole runs (runs/<id>/run.json and mutants.ndjson, written atomically so that an interrupted write never shows as a run, and a run missing its mutants, or holding a field of the wrong type, is reported rather than shown), an append-only history/runs.ndjson whose reader skips lines of unknown formats with a reason instead of failing (a record appended after an interrupted append still gets its own line), a layout version that moves an incompatible store aside rather than misreading it (writers refuse a store whose layout was not prepared, so nothing they write is moved aside with it), and a checkout lock (a lock held by a live run is exit 3 naming the holder; a stale one is replaced; of several runs starting at once, exactly one takes it). Each run records who started it from JUGGERNAUT_ACTOR.

  • :telemetry events for runs and phases (spans), each mutant's outcome, worker lifecycle and result-cache lookups, under the [:juggernaut, ...] prefix, with Juggernaut.Telemetry.attach_forwarder/2 to receive them as messages.

  • The mix juggernaut, juggernaut.check, juggernaut.explain, juggernaut.survivors, juggernaut.history, juggernaut.profile, juggernaut.compare, juggernaut.report, juggernaut.triage and juggernaut.server tasks, with documented flags (--help), strict argument checking and shared exit codes: 0 pass, 1 gate failed, 2 usage or configuration error, 3 infrastructure error. Errors are printed to stderr, or as one JSON document on stdout with --format agent|json; JUGGERNAUT_FORMAT sets the default format of every task that offers it.

  • mix juggernaut.install (run by mix igniter.install juggernaut): adds Juggernaut as a dev and test dependency, creates .juggernaut.exs (keeping an existing one and showing the recommended contents instead; Ecto projects get the Ecto compile-time macros as raw_calls), ignores /_build/juggernaut/ unless _build is already ignored, and with --agents writes a marked AGENTS.md section for coding agents. --from-mutare converts .mutare.exs call routes. A second run changes nothing. Without Igniter the task says how to add it and exits 2; Juggernaut itself compiles and runs without it.

  • The agent format (--format agent): one compact JSON document with the run summary first (verdict, counts, kill kinds, scores against the thresholds, failed rules, new ignores, triage claims, weakened tests, the seed, measured phase times, worker recycles and the recorded time of reused results), then a page of survivors, each with its diff, a source excerpt, the tests that ran and passed, the nearest miss, a suggested test file (umbrella apps included) and the command that re-checks it. Every mutant that could not be scored (harness errors, compile errors, pending) is listed with its reason, never paged. Pages say how many survivors are left and give the command for the next page, with the page size, in every paged format; invalid UTF-8 is replaced rather than failing the document.

  • mix juggernaut.check --format json: the mutation-testing-elements report of the checked mutants.

  • The event stream (--stream): one compact JSON object per line as the run goes (run start and finish, phases with their measured duration, the plan, worker start and recycle, each mutant, each survivor with the same detail as the agent format, warnings), each stamped with the run id and the milliseconds since the run started. With --format agent the last line holds the agent document.

  • The human view: a quiet progress line on a terminal (counting killed, survived and not covered mutants as the final summary does), each survivor printed as soon as it is found (its diff, the tests that ran and passed, the nearest miss and the command that re-checks it), and a final summary with the counts, scores against the thresholds, measured phase times, the recorded time of reused results (labelled as recorded, not measured), new ignores, triage claims and the gate verdict with the rules that failed. A page of survivors past the end names the last page. Output to a pipe or file has no control sequences.

  • The markdown format (--format markdown), for pull requests and CI step summaries: counts table, failed rules, the score of each file against its threshold, survivors grouped by file with their diffs, and the measured timings.

  • The GitHub Actions format (--format github): one error or warning annotation per survivor on its file and line (errors for core and for files that failed their threshold), then the run summary as one annotation.

  • The mutation-testing-elements export (--format json, schema version 2), readable by Stryker's report viewer and other tools: every mutant with its status, location, replacement, killing and covering tests, recorded duration and Juggernaut's kill kind, selection and cache source, plus test files and recorded phase times.

  • mix juggernaut.explain ID: one mutant of a recorded run (--run, default the latest) in full: where it is, the diff and the source around it (as the file reads now), its status and kill kind, the killing test with file:line or the tests that ran and passed, why those tests were selected, the nearest miss, its ignore comment or triage claim, where a reused result came from, the control rerun and its duration. The id may be the full id, its hash or a unique hash prefix of 4 or more digits; an ambiguous prefix lists the candidates (exit 2). --format agent gives the agent mutant object with these details added.

  • mix juggernaut.survivors: the survivors of a recorded run grouped by file, module or operator (--group-by), core groups first, each group with its total; --core-only; one page at a time with the number left and the command for the next page, keeping the grouping; a page past the end says so and names the last page (the agent document gives the number of pages and a past_end flag). Formats: human, agent, markdown and GitHub annotations.

  • mix juggernaut.history: the recorded runs, newest first (id, start, actor, lane, scope, commit, mutants, score, verdict, wall time, reused results with their recorded time), then sparkline trends of the score, mutants, wall time and reuse, oldest to newest. --lane, --since DATE and --limit filter; runs a limit hides are counted with the command that shows them; unreadable history lines are listed with the reason, and a readable line with a missing or malformed field is shown with dashes rather than failing the command. --format json for scripts.

  • mix juggernaut.profile [RUN]: where a run's time went: the phase clocks; mutant job durations (p50, p90, p99, max, total) by test selection; fallbacks to a whole test file, the whole suite or the boot lane, with their cause and the functions behind them; the tests that cost the most across mutant jobs; each worker's busy time and share; recycles by reason; reused results with their recorded time (kept out of every measured figure); and survivors only caught by reconfirmation. --format json for scripts.

  • mix juggernaut.compare RUN_A RUN_B: pairs the two runs' mutants by stable key and lists, first, every mutant killed in A that B does not kill on core code (survived, not covered, pending or any other status), then every other status change and the mutants only one side has; counts; the score under Stryker's formula (Juggernaut's) and Mutare's (no coverage left out); and the time each run took per phase and per mutant. mix juggernaut.compare RUN --mutare REPORT.json uses a Mutare (or other mutation-testing-elements) report as the baseline, pairing by file, location, operator family and replacement; a report with Pending mutants is refused unless --allow-pending, Mutare kills it marks with a reason are flagged in doubt, and a malformed report (including a mutant id or replacement of the wrong type) is a usage error naming the file. Timeout kills on both sides are scored as .juggernaut.exs says (timeouts): with :survived, a core mutant A killed that B only times out on is blocking, and the output says how timeouts were scored. Formats: human, JSON and markdown; the markdown for pull requests holds the same lists and tables as the human output, including every unpaired mutant and the largest per-mutant duration changes.

  • mix juggernaut.report: one self-contained HTML dashboard of a recorded run (--run, default the latest; --output, default _build/juggernaut/report/index.html), with its styles, script and data inline and a Content Security Policy that forbids network requests, in light and dark themes (following the system, or a toggle) and usable on a phone. Pages: an overview (the verdict against each gate rule as the run judged it, with the thresholds its failures recorded; a threshold the run did not record is labelled as taken from the configuration now, counts, survivors with the ones new since the run before first, kill kinds, new ignores, triage claims, and trends of score, mutants, wall time and reuse over the last --limit history records, a gap marking a run that did not record the value); a code map of files and functions coloured by their share of survivors, core marked; a mutant inspector (filters, the source with a marker per mutant, and for the selected mutant its diff, status, kill kind, tests, killer and re-check command; #inspector/<hash> links to one); tests that ran but never kill and slow killers (tests excluded or skipped in a job are not counted); and performance (phase clocks for the run and over the history, per-mutant percentiles by test selection, fallbacks, workers, recycles and reuse). Every figure is recorded or counted from the recorded results, and each section says which; reused time is labelled as recorded, never measured.

  • mix juggernaut.server: one warm daemon per checkout. It holds the checkout lock and one pool of workers that later runs reuse (the workers load only the code a run's compile changed), queues requests first in, first out, tells a waiting client its position and drops a waiting request whose client hangs up (those behind it are told their new position), listens on 127.0.0.1 with a token file readable only by the owner from the moment it is written (in an owner-only directory), checks refuse_env on every client's variable names (never sending their values), and stops after --idle-timeout, on --stop or Ctrl-C. --status shows the port, the pool and the queue. A change to .juggernaut.exs, mix.lock, mix.exs, config/ or a test file boots a fresh pool, so an attached run always sees the config a standalone run would. If the server can no longer accept connections it stops and releases the checkout instead of holding it unreachable. mix juggernaut and mix juggernaut.check attach to a running server unless --no-server, with the same output and exit code as a standalone run.

  • An end-to-end acceptance suite (test/acceptance/) on the plain, GenServer and Ecto fixture projects: known kills (boot kills included), survivors, compile errors and ignores by stable id, exit codes, history records, the analysis tasks, the dashboard and a comparison of two runs.

  • mix juggernaut --watch (and mix juggernaut.server --watch): starts or attaches to the server and runs the inner lane after every saved change under paths, test_paths and config/. A bad .juggernaut.exs is reported (exit 2) before any server starts. The server a watch runs on has no idle timeout, so it never stops while the watch waits for the next save; a change that finds no server (one stopped from another shell) is reported, not skipped, and the watch still ends with exit 0.

  • lasting_supervisors in .juggernaut.exs: registered supervisors under which tests may leave state that is meant to last, such as Req's Req.FinchSupervisor pools or the sessions an app keeps. Changes in their subtrees are no longer drift. A survivor found on a worker holding such state still runs again on a fresh worker.

  • Each survivor in the agent document carries selection_reason, why its job ran the tests it ran.

Changed

  • Jobs run the likeliest killers first. A mutant whose code runs outside any single test (a cast, a timer, a setup_all) keeps the tests the coverage probe saw hit it, and its job runs those tests first, alone, then the rest only if they did not kill. In every job the previous killer comes first, then the tests that hit the site, then the rest, and workers start the test modules in that order instead of sorted, so a kill no longer waits for every module whose name sorts before the killer's. A kill's control still replays the modules in the kill's order. The boot lane keeps sorted modules.
  • The boot lane runs its mutants at once on as many fresh workers as the pool had, each in its own test partition and database (boot1, boot2, ...), within the connection budget: every peer counts the same, the server's live workers are subtracted, and with no budget beside a live pool it stays at one at a time. The lane never goes over the budget: when the budget sets the server's pool size, the server starts one worker fewer, so its boot lane has room for one boot worker; a budget that fits a single worker leaves the boot lane no room, and its mutants are pending with a reason that names the budget that would give it one. The chosen concurrency and why are shown as the lane starts (a boot_lane event).
  • The boot lane's control (its suite once with every mutant off) now starts only when the lane first kills a mutant, on the next free slot while the others go on, instead of before every boot lane; kills wait for it. When it fails, the kills are harness errors and the survivors stand. A run whose boot lane kills nothing runs no control.
  • dirty and dirty_hash look only at a run's inputs: paths, the test paths, config, priv, mix.exs, mix.lock, .juggernaut.exs and the triage file. A notes file or a log directory beside the project no longer marks every run +dirty.
  • The coverage index tracks the functions each test file ran (index format 4; the first run after the upgrade probes everything once). An edit re-probes only the test files that ran sites of an edited function, that hit the file when one of its functions without mutants changes, or that hit the file when new mutants appear in a function that had none. Before, a one-line edit in a large Phoenix app re-probed the whole suite (168.65 s), which made the inner lane's first verdict slower than mutare --since.

Fixed

  • Workers load the call-count footprint module before Mix prunes the code paths. In a project that does not depend on Juggernaut itself (another project's mutation canary fixture), the coverage probe stopped on its first job with Juggernaut.Peer.Footprint is not available, and the run exited 3.
  • mix juggernaut.compare counts every core mutant A killed and B did not kill as blocking, whatever B's status. A mutant B left pending, ignored, called equivalent or failed to compile was not blocking before, so a run that tested nothing showed Blocking: 0.
  • Workers run their boot, and so the project's test helper, in a process that lives as long as the worker. It ran in the short-lived process of the call that boots the worker, so what a helper owned (a named ETS table, a linked process) was gone by the first job, while under mix test the helper's process lasts the whole run. In one project the baseline then read the loss of a helper's two tables as drift and stopped with exit 3.
  • A baseline that drifts because the process count grew names the new processes, each with its initial call, current function and ancestors. It gave only the count, which in that project pointed at no test.
  • operand_swap makes no mutant of a <> inside the pattern of a match?/2. Swapping "member:" <> _ there gave a pattern that does not compile (a Phoenix app's Compose.origin/1), which the gate reported as inconclusive.
  • Workers drop the ExUnit.after_suite/1 callbacks the project's test helper and test files register. Every job ran them as if the suite had ended, so one written for the end of a whole run failed the job: in one project a callback reading an ETS table its helper's process owned raised in the probe, and none of the 1,665 mutants ran.
  • A boot-lane kill is now controlled on the slot it came from. Each boot slot has a database of its own that outlives the run, and the lane's one control ran on whichever slot was free, so a row left in another slot's database (by an aborted run, or a test writing outside the sandbox) made every job there "kill" with control: :passed, hiding survivors. Each slot that kills now runs its own control before its kills are accepted; a slot whose control fails reports its kills as infrastructure errors (exit 3). With 8 slots this costs up to 8 whole-suite control runs where there was one.
  • Writing the result cache is now timed: it is a cache phase of its own, before the verdict, so profile, the dashboard and the recorded wall time include it. Before, it ran after the run had been recorded, so its time showed nowhere (on a large Phoenix app, a 150 MB cache took 318 s, and the run reported 68 min 20 s for a command that took 74 min 06 s). A failure to write it now records the run as an infrastructure error, with the phases it got through. A run that ends up writing nothing (its tree changed during the run) has no cache phase.
  • A checkout lock left by a removed container is taken over sooner, and only when its holder is provably gone. The lock now records its holder's heartbeat interval (60 s), and a holder on another host counts as gone once two heartbeats are missed, instead of after 5 minutes; until then the run is still refused. A taken-over lock is reported as a warning naming the run, its host and why (before, it was replaced silently).
  • A kill caused by an earlier test of the same run no longer passes its control. The control reran the killing test alone, so when one test leaked state that made a later one fail, the kill stood (and was cached) and the verdict depended on the worker count. The control now replays the job's runs (strike, then rest) with the same tests and seed, so in the same order, with every mutant off; such a kill is a harness error (exit 3). It replays only the tests the kill's run reached (every test it started, including one still running in another async module when the run stopped), never the tests it never started, so a controlled kill costs no more than the killing run. On a large Phoenix app, replaying the whole selection had made each controlled kill of a test-suite-wide job cost a full suite run (median 55.6 s against 151 ms before). Workers now hand ExUnit the test modules sorted, so the replay runs sync modules in the kill's order however many tests are selected (from 33 tests up they had followed a hash order, and a replay could run them in another order than the kill).
  • Boot-lane kills are controlled in the gate and release lanes. Before the first boot-lane mutant the lane runs its suite once on a fresh boot worker with every mutant off; when that fails, no boot-lane mutant runs and each is a harness error naming the failing test (exit 3). Before, boot-lane kills had no control at all, and the sharded pool baseline never showed the suite passing in one VM.
  • A boot-lane kill by the tests a warm kill ran first (or by the rest of the suite after them) no longer stands on controls that never ran those tests in that order on a fresh boot. A test that passes only after an earlier test's state fails when it runs first on a fresh boot, so it could kill the mutant there and pass both the warm control and the lane's whole-suite one. Such a kill now gets its own control: the same runs, in the same order, with every mutant off on a fresh boot worker; when that fails the kill is a harness error naming the test (exit 3). It costs one more boot per such kill, plus its tests.
  • A cached verdict no longer survives a change to a data file the tests read. The cache rested only on code, tests, config/, priv/ and mix.lock, so a commit that changed only, say, data/limit.txt reused a kill that the honest run reported as a survivor. Every git-tracked file outside paths and the test paths now joins the cache's globals, and the cache is written only when no tracked file is modified. The new cache_inputs key narrows this to a list of globs (default :tracked), for a project whose docs change often and whose tests read only known files.
  • mix juggernaut.install --from-mutare writes .juggernaut.exs when a .mutare.exs exists. It crashed in Igniter's write step (Rewrite.SourceKeyError, key :quoted) and wrote nothing, because .mutare.exs was kept in the igniter as plain text.
  • A task that raises, or a run whose --output document cannot be written, now ends with exit 3 and an internal error: / cannot write PATH message in the requested format (an error document with --format agent), never exit 1 and a stack trace. An agent read such a crash as a failed gate before. The run's --output file is written before its stdout document, so a failure leaves only the error document on stdout.
  • Juggernaut.run/1 refuses a scope it cannot record before any mutant runs: a scope with only its :kind gets ref: nil and files: [], and an unknown key, a :ref that is not a string or a :files that is not a list of strings is a usage error. Before, %{kind: :full} ran every mutant and then crashed while recording the run.
  • The dashboard's inspector and mix juggernaut.explain no longer call a file selection "a whole test file": it runs every test of the file the unattributed hits came from and the tests of other files that ran the code too. Both now use the same words.
  • The dashboard inspector's Diff pane wraps long lines instead of cutting them at the pane's width, so the end of a line, where the change often is, stays in view.
  • mix juggernaut.report writes each test once instead of once per mutant that ran it. A large run's page shrinks accordingly: a large Phoenix app's 2067-mutant run, whose suite selections each listed every test, went from 39.5 MB to 6.6 MB.
  • The dashboard names each test a for loop defines on one line. Such tests share a file:line id, and the inspector's "Tests run" table and "Killed by" line showed one of their names for all of them; the tests page also merged their counts into one row.
  • mix juggernaut.profile keeps the tests a for loop defines on one line apart too. It merged them into one row and counted the killing test's kill for each of them.
  • The mutation-testing-elements export lists every test a for loop defines on one line in testFiles, each with its own name under the shared file:line id. It used to keep one of them and drop the others. coveredBy lists that id once.
  • mix juggernaut.profile and the dashboard measured the boot lane worker's busy time against the mutants phase, so a run with a long boot lane showed shares such as 4077%. The boot worker's share is now of the boot_lane phase.
  • The dashboard's mutant inspector centres the source view on the mutant's line from the row's own position in the box, and again once fonts and the page have loaded, so a late layout change no longer leaves the source scrolled to its top.
  • mix juggernaut.check scores a mutant killed only by a timeout as a survivor under timeouts: :survived, as the gate does, so a survivor's verify command no longer reports it killed while the gate still fails on it. Its output says so too: the human line adds "which counts as a survivor", and each agent mutant carries survivor (true for such a kill), so a killed status no longer stands beside exit 1 unexplained.
  • A run records the timeouts setting it was scored with (summary.timeouts), and mix juggernaut.survivors scores timeout kills with it, so the listing matches the run's own survivors after .juggernaut.exs changes. Runs recorded before this use the current config, as before.
  • The agent document lists every mutant that could not be scored (not_scored: harness errors, compile errors, pending mutants) with its reason, so a run that exits 3 says which mutants failed and why; summary.scope.files counts the files with mutants for every scope (it was 0 except for --files); page.next names the page size.
  • Warm workers no longer let a memo hide a mutant. After each job a worker puts the project's public ETS tables back as they were at boot, and a survivor found on a worker that still holds state from earlier jobs (a protected table's contents, a project server's state) runs again on a fresh worker, whose verdict stands. Mutants of a memoised function were reported as survivors before.
  • The coverage probe no longer loses a test file's hits to a memo that an earlier test file filled in a project server's state. A probe job that starts on a worker holding such state runs again on a fresh worker, and its hits stand. Before, that file was never selected for the memoised function's mutants, not even to reconfirm a core survivor, so a weaker test file probed first left them reported as survivors.
  • A kill whose control fails on its warm worker runs the control first on a fresh worker, then the mutant again on another: a mutant that leaves a wrong value in shared state is now killed, where before it failed its control twice and was reported as a harness error (exit 3). A reconfirmation that ends in a harness error now replaces the core survivor it was checking instead of being dropped.
  • A suite whose tests define modules or compile code at run time (Code.compile_string/2, a fixture compiled into the VM) no longer fails the baseline with exit 3: after each job a worker deletes the modules the job loaded from memory, as it puts back the application and OS environment, instead of reading them as drift.
  • A parenthesised capture body (&(not ok?(&1))) no longer gets mutants that drop its placeholders (&(true)), which never compiled and were reported as compile errors.
  • Weakened-test detection reads the test helper's exclude: lists as code, so the keyword form (exclude: [slow: true]) counts as well as atoms.
  • A probe job or a survivor is no longer re-run on a fresh worker because Ecto's pool queue changed: only ETS tables owned by processes running the project's own code (or the application's start process, which owns the tables Application.start/2 creates) count as state a job may leave behind. Library tables in the app's tree (DBConnection.ConnectionPool.Queue, Registry partitions) are neither restored nor reported. On a large Phoenix app this state recycled a worker after almost every probe job (68 recycles in one 3-file run).
  • A baseline that drifts now names the test modules of the shard that left the state, and the supervisors (registered at boot) the new state was created under, with the setting that accepts them. Before, a large Phoenix app's baseline stopped with exit 3 on every attempt and named no test.
  • A run that stops while a worker is booting again no longer prints the peer's GenServer termination report, with its whole command line and environment, over the run's own error. The worker already records why its peer went.
  • A run that ends in an infrastructure error (exit 3) is recorded. Its history line and run files carry the error (error), verdict error, the phases it got through and the results it had, so profile, history and report can show where its time went. The error names the recorded run, and check, triage and the previous-killer ordering skip it for the newest run that was not stopped that way, so a failed run never hides the last good run's killers. A run that finished with some harness_error mutants (also exit 3) is not skipped: it holds all its results, so the ids it printed resolve. Before, nothing was written.
  • When git cannot list the files of a project root that has its own .git (a worktree whose gitdir is not mounted), the run stops with an infrastructure error that names git and its message. Before, the sandbox silently mirrored only lib, test, config and priv, and the app failed to boot on a missing file far from the cause.
  • mix juggernaut.compare --mutare pairs mutants that Mutare and Juggernaut place differently: the tool's own name in a replacement reads as one, then the same family on the same line is paired in column order, then the one mutant of a family left in a file is paired when it is at most three lines away. Such pairs are counted as near and shown. On a large Phoenix app's trial the unpaired mutants fell from 46 to 24, all real inventory or family differences, so a status difference on the others is no longer unseen.
  • A file selection's reason counts every test it runs: all the tests of that file, and the tests of other files that hit the site too. Before, a 57-test job from about ten files read as "the whole file ran".
  • The dashboard's source view shows at most five markers a line (the open mutant always among them) and a +N for the rest, so a line with many mutants no longer pushes the whole file's code far to the right. The overview's Mutants tile now breaks down the mutants no other tile counts (ignored, equivalent, not compiling, harness errors, not run); it showed only those not run.