Rust edition
mutastic next
Show the missed mutant most worth a test first, and why. The missed mutants as a queue, one line's at a time, in the order a run ranks them: its card, why it's first, and the command that says when it's done. --top shows the first few, spread over the code. With a baseline, new misses come before the baseline's. While the code under test is the same, it runs only the mutants the last next left uncaught, so any a new test catches drop out; once that code changes, it runs every mutant again. A mutant proposed for ignoring isn't queued: it waits on a person. For an agent, one task, and to run next again after it.
Usage
mutastic next [dir] [options]Inside a package, cargo mutastic next runs the same command, with the same options.
Output
This is mutastic's own output, written from the CLI and checked against it on every build.
Next: 1 of 3 lines with missed mutants in ranking
✗ MISSED no test checks is_small() at n == 10 · md0d6db64 ┌─ src/lib.rs:15 │ 14 │ pub fn is_small(n: u32) -> bool { 15 │ n < 10 │ ^ < changed to <= 16 │ } │ = mutant - n < 10 + n <= 10 = also ✗ no test checks is_small() returning false here · m2e329a72 + true = also ✗ no test needs n < 10 to be false in is_small() · m729a5380 + true = note: every test calls is_small() away from the boundary inputs seen: 4, 5, 6 (none is 10) covered by tests::five_doubled_is_more_than_one_and_small, tests::four_doubled_is_more_than_one_and_small, tests::six_doubled_is_more_than_one_and_small (all 3 covering tests still pass) = help: test is_small() with n = 10 and assert the result
// in mod tests #[test] fn is_small_at_the_n_edge() { assert!(!is_small(10)); // today false · with md0d6db64 true } check today's value is the one you intend: the test pins what the code does now
done when mutastic verify md0d6db64,m2e329a72,m729a5380 fixtures/ranking passes reproduce mutastic run --only=md0d6db64,m2e329a72,m729a5380 fixtures/ranking or ignore mutastic ignore <id> --reason="<why>" fixtures/ranking for each of md0d6db64, m2e329a72, m729a5380 Ranked first because a condition or a removal: it changes what the code decides or does 3 tests run it, and none checks it
Then: mutastic next fixtures/ranking, for the next oneExit status
0 when nothing missed is left, or only mutants proposed for ignoring; 1 while something is queued. Any command exits 2 when mutastic couldn't run: see exit codes.
Options
--since[=REF]
Mutate only the lines changed since the merge-base of HEAD and REF, uncommitted and new files included; the default branch without one.
| Command line | --since[=REF] |
|---|
--workers=N
How many mutants run side by side; half the cores, from 1 to 4, unless set.
| Command line | --workers=N |
|---|
--no-suggestions
Don't look for a test that catches each missed mutant, which runs the missed mutant's function outside the tests.
| Command line | --no-suggestions |
|---|
--operators=OPERATORS
Which operators run: a set (defaults, stronger or extended), or operator ids split by commas, in place of mutastic.yaml's operators; defaults unless set.
| Command line | --operators=OPERATORS |
|---|
--unsafe=MODE
Which unsafe code is mutated: skip leaves unsafe code and the functions holding an unsafe block alone, enclosing mutates those functions too, all unsafe code as well; skip unless set.
One of skipenclosingall
| Command line | --unsafe=MODE |
|---|
--format=FORMAT
How the result is shown; full on a terminal, concise elsewhere, agent for coding agents; explain takes full and jsonl.
One of fullbriefconcisegroupedagentjsonl
| Command line | --format=FORMAT |
|---|---|
| Environment | MUTASTIC_FORMAT, MUTASTIC_AGENT |
--vocabulary=WORDS
plain says caught and missed; classic says killed and survived.
One of plainclassic
| Command line | --vocabulary=WORDS |
|---|---|
| Environment | MUTASTIC_VOCABULARY |
--color=WHEN
Colour: auto uses it on a terminal that wants it.
One of autoalwaysnever
| Command line | --color=WHEN |
|---|---|
| Environment | NO_COLOR, FORCE_COLOR |
--hyperlinks=WHEN
File locations as links a terminal can open: auto uses them on a terminal.
One of autoalwaysnever
| Command line | --hyperlinks=WHEN |
|---|
--progress=STYLE
Progress on stderr: a bar on a terminal, counter lines in logs, none for agents.
One of autobarcounternone
| Command line | --progress=STYLE |
|---|
--top=N
How many of the queue next shows, at most one a function and two a file; 1 unless set, at most 25.
| Command line | --top=N |
|---|
--edition=EDITION
Which edition runs; unless set, the build file in dir, or the nearest above it: Cargo.toml for rust, pom.xml, build.gradle or settings.gradle for java.
One of rustjava
| Command line | --edition=EDITION |
|---|