Changelog
All notable changes to this project are documented here. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
1.9.0 - 2026-11-16
Added
- New opt-in operator
rescue_bodymutatesrescueclauses (#418). It replaces the whole body of eachrescueclause withnil, including a one-statement body. It also turnsx rescue yintox rescue nil. A re-raise or aretrybody is mutated too, becausenilswallows the error. An empty body, a body that is alreadynil,(nil)or(), and anensurebody give no mutant. A body whose value is discarded and that holds only literals and variable reads is declined, and counts insummary.declined_by_operator. Seedocs/equivalent-skips.md, "Rescue body". Before this, no operator mutated a one-statementrescuebody. The default operator set does not change. return_nilreaches a method with a def-levelrescue,elseorensure(#418). It replaces the final expression of the body, or of theelseclause when there is one, withnil. It does the same for eachrescueclause. Theensurevalue is not a return value, so it is left alone. Before this,return_nilgave such a method no final-expression mutant. A run withreturn_nilcan now report a different number of mutants and new survivors. With--baseline, refresh the baseline. With both operators, a one-statementrescuebody gives the same edit twice. The run keeps thereturn_nilmutant, lists therescue_bodyid in itscopies, and counts that copy indropped. A final explicitbegin ... endblock gets the same mutants as the def-level form, so RuboCop'sStyle/RedundantBeginautocorrect does not change them (#470).runsays when anignore:entry matches no mutant (#377). The warning names the id and says the list covers only that run's sources and operators. The warning does not change the exit code.--format jsonlists the ids insummary.unmatched_ignores, in file order, each id once.--dry-runprints the same warning, and--dry-run --format jsonlists the same ids.--sincedoes not warn about an entry whose mutant is outside the diff: matching happens before the diff narrows the run. A run of some files warns about entries those files and operators do not match. The warning says so. A source you passed that has no paired test still counts: its entries are not reported as unmatched, andrunagrees withrun --dry-runof the same files.--onlyskips the check. The list is then empty, which does not mean every entry matched. A dropped repeat of an edit counts as matched. An old-format id that still matches is not in this list. The old-id warning still names it.mutineer migrate --dry-runover every source lists entries that match nothing and exits 1. That exit code is the CI check, in 1.x and after 2.0. The key is part of schema1.10.- A report names the dropped copy of an edit (#374).
When two operators, or one operator twice, make the same change on one
line, one copy runs and the other is dropped. The JSON report now lists
each dropped id on the kept mutant as
copies, on survivors, ignored mutants, and the other mutant rows.summary.droppedcounts them. They stay out oftotaland out of the score.mutineer triageprints anignore:entry for the survivor and for each of those ids, so one round writes every entry. An entry still ignores only its own id. The human report, the HTML report, the dry run, and the Action summary show the count. A dropped copy of an ignored mutant is listed on the kept mutant, so that entry no longer looks unused. Both keys are part of schema1.10. - A source that cannot load alone points at
boot:(#376). When a source raisesNameError(includingNoMethodError) while it loads, and the run has noboot:file, stderr adds one line. The names it needs come fromboot:or--boot, which loads before the sources. Listing the entry file as an earlier source also loads it first. In that run,require:files still load after the sources, so a source cannot use them while it loads. With a boot file they load after the boot file, and the parent does not require the sources.--test-commanddoes not loadrequire:files. The hint line is absent for any other load error, and for aNameErrorin the boot file or arequire:file. A dry run does not load the source, so it does not print the line.--daemonand--test-commanddo not require sources in the tool process, so they do not print it either.--helpdescribes--bootas an app entry point or a gem'slib/<name>.rb, and no longer limits it to Rails apps. - A run counts sources that have no paired test (#381).
The report names each skipped source and how many mutants it holds.
JSON adds
summary.unpaired_sources,summary.unpaired_mutants, andunpaired_sources[]. The human report, the HTML report, and the dry run show the same counts. Unpaired mutants are excluded from the score and cannot fail--threshold. They join the unrun-share stderr warning, except under--fail-fast. That warning does not change the exit code. Schema version is1.10. Compare it as two integers, so1.10follows1.9. On Fizzy atd5b7b749d, 106 sources and 312 mutants were unpaired. The paired run total was 759, so the share was 29.1%. On Fizzy atf220e4832, 92 sources and 149 mutants were unpaired. The paired total was 922, so the raw share was 13.9%. After the 10 ignored mutants leave the denominator, the share is 14.0%. Mutineer now parses those sources. A disable-line warning or a git-diff warning can name them. The Action step summary does not show these counts (#481). A dry run with--railsor--bootand no--teststill exits 2 (#410). #349 measured the unrun share (of attempted plus unrun) on Fizzy atf220e4832, with Mutineer at46ee2bb3. A full daemon run with the default operators had 840 attempted mutants, 1 unplaceable, 0 skipped (invalid) and 149 unpaired. Without the unpaired mutants, the share was 1 of 841 (0.12%). With them, it was 150 of 990 (15.2%), so the warning fired. With all 21 operators, the four paired files that can hold an unrun mutant had 24 under redefine and 20 under reload. Against the default run's 840 attempted mutants, that is at most 2.8%. The 10% limit stays. A share above it that comes from unpaired mutants is a true count, not noise. The 2 skipped (invalid) mutants in the all-operator runs came from aliteral_mutationbug that this release fixes (#469). - A concern pairs with the test that mirrors its namespace (#379).
app/models/concerns/storage/totaled.rbcan pair withtest/models/storage/totaled_test.rb. That path matchesStorage::Totaled. Theconcerns/path still wins when it has a test. Existing pairs stay the same. Before this, the concern was skipped and added no score. The skip line wasno test found by convention. A concern that was skipped can now run. That can change a score or a gate.--baselinetreats new survivors as new. Refresh the baseline. Seedocs/ci.md, "Refresh the baseline". A failed namespace load can move a--thresholdrun from exit 0 to exit 1. Those mutants move fromno_coveragetouncapturable. Anilscore with a broken mutant then fails the gate. The share of mutants with no verdict also rises. Withuse-bundler: false, an Action with an emptyversioninstalls the latest gem. Pinversion, or refresh the baseline, before the next run. Withuse-bundler: true, the Gemfile picks the version. A failed namespace test does not mark a concern that has a test at itsconcerns/path. A namespace split name pairs under #408. - A concern pairs with a split test at its namespace path (#408).
app/models/concerns/storage/totaled.rbcan pair withtest/models/storage/totaled_bytes_test.rb. Theconcerns/path still wins when it has a test that pairs, exact or split. A split owned by a longer source does not count. A longer source keeps its file when that source pairs with it. That includes a longer concern with no test of its own, and a model orlib/file of the longer name. A model keeps a split file it already pairs with. The concern may use that same file. The model does not lose it. A shorter concern keeps a namespace split when the longer concern already has a test at theconcerns/path. The longer concern does not add that file. A namespace spec stays the only file. A failed split beside it does not mark the concern. Before this, a namespace split name left the concern skipped, with no score. A concern that was skipped can now run. That can change a score or a gate.--baselinetreats new survivors as new. Refresh the baseline. Seedocs/ci.md, "Refresh the baseline". A failed namespace split moves those mutants fromno_coveragetouncapturable. On the Fizzy tree measured for #379, no unpaired concern had a namespace split name. One of 352app/sources paired with a split file. - Mutineer now reports the methods that got no mutants (#386). A
method whose body is one
ifwith arescuegets no mutant from the default operators, and the run did not say so. The dry run summary now ends withno mutants in N of M methods, and--dry-run --verboseprints oneno mutants:line per method. The human report has aNo mutants:row. The JSON report addssummary.subjects,summary.unmutated_subjectsand a top-levelunmutated_subjects[]list, andschema_versionis now1.10. A program that callsReporter#reportwithout the method counts getsnullfor all three, not0; the CLI always fills them. An empty run says how many methods it found and points to--list-operators. Scores, exit codes, the mutants that run and the default operators do not change. The README namescondition_trueandcondition_falsefor these methods. For a one-statementrescuebody, use the new opt-inrescue_bodyoperator (#418). mutineer config KEYprints a resolved setting (#394). It prints thecache_dirorbaselinethatmutineer runwould use with the same options and.mutineer.yml. It writes nothing. An unknown key exits 2. The GitHub Action now asks the installed CLI for these two settings, so it no longer copies the CLI's rules. With an older installed CLI that does not have the command, the Action uses its own copy of the rules, as before.- The JSON report names why a mutant errored (#388). When the mutant's
child raises, under
reload,redefineor the daemon,no_verdict[].detailsnow holdsClass: first message line, at most 500 characters, for exampleArgumentError: enum declared twice. Before, it said onlychild exited with status 2ordaemon verdict: error, and the cause was on stderr alone. The line is redacted in the child, and everydetailsvalue is redacted again when the report is written. - Errored mutants without a raised exception name their cause (#417). A
Minitest database connection or lock error puts
a test failed with a database error: Class: messageindetails. An RSpec error outside examples uses a fixed line that names that case. A--matrixearly end after a serial database error uses its own fixed line.--test-commandand the human/HTML errored lists stay deferred (#480). - A daemon crash names itself in
details(#388). A mutant whose daemon died or did not reply in time now hasdaemon crashedordaemon stopped answering, notdaemon verdict: error. no_verdict[]entries gainoperatorandtoken(#388), as inno_coverage[]. Both arenullfor an entry with no mutant. Schema1.10..mutineer.ymlaccepts atests:map (#382). Each entry namessourcesandtestspatterns. When the run holds a matching source, those test files join the run's test list beside convention-paired tests. Coverage still picks the tests for each mutant.--testreplaces pairing and the map. A malformed map exits 2; without--test, a pattern that matches no file exits 2 (including--dry-run).--testaccepts a file, a directory, or a quoted glob (#380). A directory selects*_test.rb,*_spec.rb, andtest_*.rbfiles. It skipstest_helper.rb. A blank value exits 2. A directory or glob with no test file exits 2. With--test-command, an empty directory stays as typed. Each expanded directory or glob prints its file count on stderr. The Actiontestinput accepts a directory. A directory needs mutineer 1.9.0 or later.- JSON reports list every killed mutant (#361).
--format jsonadds a top-levelkilled[]of lean mutant objects (subject,file,line,operator,token,id), sorted likeno_coverage[]. Its length equalssummary.killed.schema_versionis1.10. --dry-run --format jsonprints candidates with stable ids (#362). The document carriesmutants[](same lean shape) and a summary withtotal,by_operator,declined, anddeclined_by_operator. Ids match a later real run of the same job plan.--outputwrites the file;--format htmlunder--dry-runstays human and warns that the format is unused.
Changed
- Behavior change. An in-process
--sincerun with no mutant on a changed line skips the coverage map (#396). It no longer boots the app or runs the unmutated suite to say there is nothing to test. A red suite or a boot file that fails no longer fails that run. A missing--bootor--requirefile is still a usage error. Thanks to @dannyward630. collection_methodskipseachandmapwhen the result is discarded (#436). For Enumerable,eachreturns the receiver andmapreturns a new array. No test can tell those two apart when that value is thrown away. A method of either name on another class can still differ. The check does not see the class, so that skip can hide the difference. The swap is declined, and the dry run and JSON report count it indeclined_by_operator. The last expression of a method, block, or lambda is still swapped. So are assignment, an argument, a chained call,return/break/next, and a condition. Awhile,until,for, orensurebody is skipped, including its last line. The value read by string or symbol interpolation, a backtick or%xcommand, or an interpolated regexp still swaps. Interpolation callsto_son that value, the command runs, and the regexp is compiled, even when their result is thrown away. An earlier statement inside the interpolation is still skipped.defined?does not evaluate its operand, so aneachormapinside it is skipped, including alazychain and an interpolation. A hash key still swaps, because insertion callshashandeql?. The last line of eachrescueclause, including a later clause, is kept or discarded as itsbeginis. A receiver chain that callslazystill swaps, becauseEnumerator::Lazy#eachruns the block andLazy#mapdoes not. A lazy enumerator stored in a variable is still skipped.all?,any?,first,last,min,max,select, andrejectare unchanged. The operator is not in the default set, so a default run's mutant count and score do not change. Onlib/of this repository, 86 of 149eachandmapcalls are discarded (57.7%). The other 313collection_methodswaps onlib/stay. The operator's mutant count there drops from 462 to 376. A run that namescollection_methodcan report fewer mutants and a different score. With--baseline, refresh the baseline. The report that opened the issue found this mutant in 4 of 23 ignore entries. Seedocs/equivalent-skips.md.- Behavior change. A continuation-line survivor that ran is scored (#345).
Ruby counts one line of a statement. A mutant on a later line is a
:maybeselection (#254, #289): Mutineer runs the tests of the statement's other lines, and a kill already counted. A survivor wasno_coverageeven when those tests had run the mutated expression, so it left the score. The child now writes a sentinel the first time that expression returns during a test. That survivor moves fromno_coveragetosurvived: it appears insurvivors[]and insummary.survived, and it leavessummary.no_coverage. It enters the score. A survivor the sentinel does not record staysno_coverage, still outside the score, andsummary.no_coveragestill counts it. The same rule covers a trailing operator (&&,+), a method chain, a multi-line argument list, a hash entry, and a heredoc interpolation, underreload,redefine, and--daemon. A call that runs only while the mutant file loads does not count: that write is cleared before the tests. A raise inside the expression does not count, so an operand that fails before a mutated operator runs staysno_coverage. Every one of the 24,918 mutants from every operator on this gem'slib/andtest/fixtures/either does not re-parse, as before, or wraps. The fallback that would leave an unwrappable mutant asno_coveragedid not occur. A score can fall. A--thresholdgate that passed can fail.--baselinetreats the new survivors as new. Refresh the baseline. - A coverage cache hit checks only the tests that cover the sources
(#398). Before, a hit ran every
--testfile alone and then all of them together. Now it runs only the files that cover a line of the run's sources. With the built-in runner, a mutant runs only those files, so the other files cannot change a result.--test-commandbuilds no coverage map, so its clean run still runs every--testfile. A red covering test still stops the run. A file whose last capture failed is captured again on each hit and does not also run alone. The together check after a fresh capture and with--coverage-fromalso uses the covering files only. Mutineer prints one stderr line with the number of files it did not check. When no test covers any source line, every file is still checked. A standalone run no longer treats a line that ran only while the sources loaded as coverage of every test (#426). - Behavior change. On a cache hit, a red test that covers no source line no longer stops the run. A fresh capture still stops on it, because capture runs every test (#96). So the same red test can stop a cold run and pass a warm one.
- A method-body edit recaptures only the tests that cover that source
(#421). The cache stores a run-inputs digest, a skeleton of each
source, and a fingerprint of each test. When a source changes only
inside method bodies, and the edit does not move a line or change a
method that ran at load, the next run recaptures the tests in that
source's map entries, plus any test file that was added or edited.
The paired test keeps lines that ran only at load. Recapturing
another test does not give it those lines, or another source's
load-only lines. The map matches a full capture. A red covering test
still stops the run. A class-body edit, an added or removed line, a
load-time method, a
--requirefile, a change to which test pairs with a source, or a project file the tests load still recaptures every test. A cache saved before this change rebuilds once. #421 stays open for files outside the run's sources, and for the Fizzy timing check. - The error for a test file passed as a source names three fixes (#380).
Quote the glob, pass the directory, or repeat
--test. --dry-runexits 2 for a blank--testor a directory with no test file (#380). Those values used to exit 0 on a dry run.
Fixed
- A clean check that times out is reported as a timeout (#476).
The combined clean check runs the files selected for the clean check in one process.
It had the same deadline as one file's capture, 120 s by default.
A green suite that took longer was killed and reported as "the unmutated suite is not green (combined suite)", with the seed hint.
Now the message says the check timed out after N s, that no test failed, and to set
--capture-timeoutabove the longest deadline that passed. A real failure still says "not green". When one check times out and another file fails, the message names both. The combined check's deadline is now the larger of--capture-timeoutand 1.5 times the summed capture seconds of the files it runs, rounded up. A per-file clean check on a cache hit that times out is reported the same way. literal_mutationno longer writes""over a string that has no quotes of its own (#469). That covers a heredoc line, a part of a%(...)or%Q(...)string, a%w[]or%W[]element, and a text part of a regex, a backtick string or an interpolated symbol (:"a#{x}", a%I[]element). The edit inserted text instead of emptying the string. Some of these mutants broke the parse and were counted as skipped (invalid). The others ran as the wrong edit. Each such string is now declined and counts insummary.declined_by_operator. A text part of a"..."string still mutates, because""closes and reopens the string. A run withliteral_mutationcan report fewer mutants. With--baseline, refresh the baseline. On Fizzy atf220e4832(392 files inapp/andlib/),literal_mutationmade 1290""mutants before this change, and 6 of them did not parse. It now declines 147 of them (11.4%) and makes 1143, none invalid.- A standalone cache hit no longer checks every test just because each
test loads the sources (#426). Standalone capture loads every source
before each test. The class line, the
defline, and any other line that runs only then were credited to every test, so the clean check kept them all. Those lines still count asran_at_load. A test keeps such a line when it is a convention-paired test for that source. Atests:map entry does not count. When the run has no convention-paired test for the source, every test keeps the line, so a reload kill is not dropped. A line the test runs after the sources load stays credited to that test, including thedefline of a method the test calls. Boot and daemon runs already omitted the load lines and do not change. A coverage cache saved before this change rebuilds once. So does a cache whose paired tests no longer match, including when an exact spec that the run did not select appears or disappears and replaces a split test. Score effect. The exact-survivor oracle does not change. A reload kill of a line that runs only at load stays a kill when the convention-paired test is in the run (Catalog.price, and a hook def the file calls while it loads).--strategy redefinestill reportsran_at_loadfor that line. An unpaired test no longer runs that mutant when a convention-paired test is in the run. A kill that only the unpaired test would have caught can becomeran_at_loador a survivor. The checked fixtures do not hit that case. Issue #467 tracks that case and the run with no paired test. - A restored subclass skip keeps the reloaded parent conditions (#440).
A parent callback with
if:orunless:, and a subclassskip_callbackwithif:orunless:, leave a merged copy on the subclass. Reloading the parent appended the new callback and dropped that copy. The reload then put the copy back, so the subclass still ran the parent's old conditions. The copy is now built again from the reloaded callback, and the subclass's own conditions are added the wayskip_callbackadds them. A subclass callback that is not that copy stays as it was. So does a copy left when the parent callback had no conditions (#414): there is no parent condition object to carry, and a subclass callback of the same name must not be rewritten. A parent condition that is only a symbol, or another interned object, is also left on the old copy. An independent subclass callback can name that same symbol, so the symbol is not evidence of askip_callbackmerge. A Proc copied from the parent is evidence, and that Proc is carried. Redefine does not re-run the class body, so it does not take this path. Reload and the daemon do. - A non-ASCII path and a non-UTF-8 source no longer stop the run (#346).
With
LANGandLC_ALLunset, a source file, test file, or project folder whose name is not ASCII made coverage fail, or the path missed its match, so the run stopped or scored those mutantsno_coverage. Those mutants now get a verdict, so a score can change. With--baseline, refresh the baseline. Paths are read as UTF-8 when the bytes are UTF-8, and as binary otherwise, and compared in that encoding. Minitest is given the path inDir.pwd's encoding when those bytes are valid there, and as binary otherwise (underLC_ALL=Cthat encoding is already binary). Its failure backtrace is retagged the same way, so a killed mutant is not reported as an error. RSpec is given the path as UTF-8, which its path regexp requires. This covers the in-process coverage subprocess, the fork capture used by--railsand--daemon, pairing (including a split test name), and--sincepath keys. A source file whose magic comment names an encoding (# encoding: EUC-JP, and the other forms Ruby accepts) is read in that encoding. The comment is taken from the first line, or the second after a shebang, within the first 4096 bytes. The mutant keeps those bytes, so Ruby can load it. The daemon receives the text through JSON, which is Unicode, and writes the file back in the encoding the comment names. The comment forms are the ones Ruby accepts, including an indented comment and a vimfileencodingmodeline.# encoding=NAMEwith no space is not one of them. A file with no such comment is still read as UTF-8. A redefine snippet has no comment of its own, so the write adds one when the snippet is already in another encoding. The daemon still readsdb/schema.rbas UTF-8.rails_worker_db.rbloads on the app's Ruby, which may not ship Prism, and requiring Prism there would turn off worker-database routing. - The clean check and the mutant runs share one RSpec seed, and one order inside a Minitest file (#282).
A random RSpec order used a new seed in every process.
The clean check and a mutant run could disagree, and a hang could score
killedon one run andtimeouton the next. A random order now uses seed1for coverage capture, the clean checks and the mutant runs, unless the suite sets a seed (--seed,--order rand:N,SPEC_OPTS,.rspec, orconfig.seed). A defined order is left as it is. A mutant run now passes each spec file by its real path, as the clean check does. RSpec hashes that path into the random order, so a symlinked project root (such as/varon macOS) no longer gives the two runs different orders. Readingconfig.seedin a spec helper, as the generatedKernel.srand config.seeddoes, does not set one. Aconfig.seed=in a spec helper, a--requirefile, or the boot file does, and the clean check and the mutant runs keep it. The coverage cache includesSPEC_OPTSand the project.rspecand.rspec-localfiles, so a changed seed there is captured again.~/.rspecis not part of that cache key. Minitest already used seed1. Classes inside one file were still shuffled with the whole class list, so adding a file changed their order. Each file is now shuffled from that seed alone, on the clean check and the mutant runs. Files run in the order that run was given. A mutant run's files stay in coverage order (paired, then cheapest). The combined clean check uses the order the tests were given. Those two file lists can differ.--test-commandstill sets no seed (#368). A coverage cache from anotherSPEC_OPTS, or from a version that did not pin the RSpec seed, is captured again. - Direct stderr and stdout hide the
DATABASE_URLpassword in more cases (#341). A boot file, a forked test, and a program that test starts inherit a pipe. Mutineer copies each line and hides theDATABASE_URLpassword before the line reaches the terminal.abortin a boot file is included. A line with no password is unchanged. A fork that setsDATABASE_URLitself is redacted in that process. A password that contains a newline stays together until a newline follows it or the stream ends, so neither half is printed. The daemon does not boot when stderr cannot be redirected. A fork whose own copier cannot start writes nothing further. A fork that execs a program hands it the parent's pipe, so that output is still shown and redacted. If the program would run with aDATABASE_URLthe parent does not know, its output is dropped instead. The same holds forspawnandsystemwhen their environment hash sets aDATABASE_URLthis process does not know. That program's own redirects of stdout and stderr are replaced too, so anOpen3capture of it gets no output. Other ways to start a program with its own password, such as backticks,IO.popen, or a shell command that sets the variable, still pass that password through. Shutdown writes every byte already queued, including a report a slow reader has not taken yet. The daemon does this in its own process, so a password the boot file assigns is hidden even when the tool's environment does not have it.--test-commandoutput is redacted with the tool'sDATABASE_URLand withDATABASE_URLfrom dotenv files in the project (.env,.env.local,.env.development,.env.development.local,.env.test,.env.test.local). A double-quoted value may span lines. A quote that never closes is a plain value on its own line, as in dotenv. A backslash before$is a literal dollar. An invalid byte does not stop the read. A Ruby process the command starts hides a bare password it assigns itself, including one set only in that process (#457). A program that is not Ruby ignores that copier, so when that Ruby execs a program with aDATABASE_URLthe tool did not know, the program's output is dropped. A password inside a URL is still hidden. - Redaction no longer blanks a host, a database name, one character, or a
common word (#341). A password that equals the host or the database name
stays readable outside a URL, as a password that equals the username
already did. A one-character password (
a,1) stays readable outside a URL, so it does not erase that character from every line. The wordspassword,test,secret,postgres, and the rest of the list inRedaction::COMMON_WORDSstay readable as bare words. The password is still hidden inside a URL and as the value of apassword=parameter. Local and CI URLs often use these words. A production password usually does not. - A
file:SQLite name locks the file it opens (#412).file:storage/test.sqlite3?mode=rwctakes the same run lock asstorage/test.sqlite3when both names open that file. A second daemon run stops withanother Mutineer run is using <file>. A memory URI (file::memory:ormode=memory) takes no lock. An emptyfile:URI is a private temporary database and takes no lock. A relativefile:path is resolved from the working directory, which the daemon sets to the app root before the lock. A latermodethat adds write or create access, such asmode=ro&mode=rw, is a URI SQLite rejects, so it takes no lock. Other run-lock gaps are unchanged (#416): in-process--railsruns, the lock taken after boot and--requirefiles, a prepare daemon that fails to boot, and the--jobs 1respawn window. A custom VFS that does not open the URI path is not covered. - An RSpec example's database error scores
error, and a parallel Minitest class follows queue order (#347). The first failed RSpec example now follows the Minitest rule. An Active Record connection or lock error (ConnectionNotEstablished, including pool timeouts,ConnectionFailed,Deadlocked,LockWaitTimeout) scoreserror, on a full run, a stop, and--matrix. A later example's connection error does not change an earlier assertion. On Rails 8,ConnectionNotDefinedis a code error and still scoreskilled. Rails 7.2 raises a plainConnectionNotEstablishedfor an undefined connection, so that mutant scoreserror. Other statement errors, such as bad SQL, still scorekilled. Abeforehook counts as the example's own exception. Anafterhook does not replace it. The stderr line is the same one Minitest writes. With--matrix, that example is not a killer and the row stays incomplete. There is no--daemonfor RSpec. Errors are out of the score, so a lost connection during a run no longer raises it, and a run that used to count the example as a kill can change its score or fail--threshold. Refresh the baseline when that happens. Under Minitestparallelize_me!, the first failure is the earliest test in the queue, not the thread that finishes first. A serial failure still decides, because those classes run first. A mutant that mixed a database error and an assertion in one parallel class no longer flips betweenkilledanderroracross runs. The JSON report names a Minitest in-test database error inno_verdict[].details(#417). It does not name an RSpec example's database error (#480). Active Record 7.2 reports SQLitedatabase is lockedasStatementInvalid, so that mutant still scoreskilled(#347). --strategy redefineno longer false-kills path anchors in a read-only source directory (#339). Redefine loads the mutated method from a hidden file. When that directory is not writable, the file is in the system temp directory.__dir__,__FILE__, andrequire_relativethen pointed there, so every mutant raisedENOENTorLoadErrorand scoredkilled. The snippet now resolves those against the original source file, including calls onselfandKernelandsendwith a literal name, whether the directory is writable or not. A leading~stays a path segment, and the load does not call an instance method namedrequire. A symlinked source keeps the loaded path for__FILE__and the real directory for__dir__andrequire_relative. A test that checks__FILE__against the source path used to fail for every redefined mutant. It now fails only when the mutation changes the result, so a redefine score can go down. Reload, in process and on the daemon, still needs a writable directory: the write fails and the mutant scoreserror, which stays out of the score. The read-only warning is gone.- A killed mutant stays killed when the failure message holds raw bytes (#434).
Rails'
assert_responseappends a short response body as raw bytes. The reporter prints that message on the silenced stdout. After Rails sets bothEncoding.default_externalandEncoding.default_internalto UTF-8, that write raisedEncoding::UndefinedConversionError, and the child scored the mutanterrored. The silenced stdout is binary now, so the bytes are discarded and the failure still counts as a kill. Those mutants move fromerroredinto the score, so a score can rise. This holds for in-process reload and redefine runs and for daemon reload runs. The daemon forces reload; redefine is not available there. RSpec already writes its failure text to a StringIO, which accepts the bytes. - A mutant in
define_methodordefine_singleton_methodon a load line isran_at_load(#435). A class method such asgreetsruns when the including class loads. Rails turns eager load on whenCIis set, so that call happens before the mutant. The call's own mutants wereran_at_load. A mutant of a string inside the block on that same line was a survivor, and the score fell to 0.0. It is nowran_at_loadtoo, underreload,redefine, and the daemon. A kill still counts.CIitself changes nothing: only whether the line ran at load does. Without eager load the class loads after the mutant, and those mutants stay killed. An equivalenteach→mapstill survives in that case. On the reported method, 2 of 5 mutants moved, so that run's score goes from 0.0 to no score. A run that still has other survivors can score higher, because these mutants leave the denominator.--thresholdpasses a nil score when no mutant broke, as here. The new case is adefine_methodordefine_singleton_methodcall whose line ran at load, including the block that call stores. Another block on that line, such aseachwith an empty array, stays scored: the line can count without the block, and a test can run the mutated block. An emptyeachthat shares its line withdefine_methodcan still hide that call (#286). That needs the call to have been made with no elements while the class loaded, then again with elements by a test that does not check the generated method. The reported call isgreets :alice. Re-running the caller's class body, so these mutants can be killed, stays #389. A one-line or endlessdefstill uses its call count, so a block on thedefline is unchanged (#389). - An endless range on a Hash, Proc, or other non-literal receiver is swapped (#344).
The
rangeoperator skipped an endless range (1..,1..nil) used as an index of[],[]=,slice,slice!,byteslice,bytesplice,values_at, or an index write. The only exception was a constant whose name contained a lower-case letter, such asArray[1..]. Every variable, call, and other constant was skipped, includingHASH[1..],ARGV[1..],list[1..],fn[1..], and{(1..) => :a}[1..]. A Hash, a Proc, and a custom[]orslicecan tell1..from1..., so the skip hid a mutant a test can kill. The operator now skips that range only when the receiver is an array or string literal, including parentheses around one. Abegincounts only when every branch that can supply its value is such a literal, so a rescue or an else that returns a Hash is swapped. Backticks are swapped too, because`can be overridden. A variable, a call, or a constant is swapped, and an earlier assignment is not followed. On a real Array or String the new mutant is often equivalent, as inargv[1..]ortext.byteslice(offset..). In this gem'slib/, 14 such ranges were skipped and none was a literal, so arangerun there goes from 45 mutants to 59. A run that namesrangecan gain mutants, survivors, and new mutant ids. Re-checkignore:entries forrange, and save a new baseline. Active Record conditions such aswhere(created_at: time..),where.not,find_by, andexists?were already swapped. They still are: both ranges become the same>=SQL. Suppress one equivalent mutant with anignore:entry.# mutineer:disable-line rangehides everyrangemutant on that line, so use it only when every one of them is equivalent. - Reload pairs a repeated callback when the other entry is a different one (#413).
After a class body ran again, the repeat was paired by kind and by a
filter identity that still put different callbacks in one bucket.
&:nameprocs have no source, so they shared one bucket. Blocks in the reloaded file shared a bucket when Ruby gave them the same label, with no comparison of their code. A validator shared a bucket with another of its class and attributes, with no comparison of option names.if:andunless:were not part of the bucket. The class body's new copy then stayed beside the old one, and a test that counts errors or callback runs killed every mutant of the file.&:namenow matches the symbol. A block matches its code, so a value it captured that differs on each load (a new object, a time, a random value) still pairs when no other entry has that code. A validator matches its option names, not values a mutant method can change. Anif:orunless:is part of the match. A concern entry that is the same symbol, the same code, or the same option names still cannot be told apart, so both copies stay. A callback the class body adds only on its first run (@done ||=) still keeps every identical copy. Issue #479 tracks those cases. Full reload (#389) would build the class once. Reload and the daemon share this path. Redefine does not run the class body again, so it does not add the second copy. Score change: a Rails model whose test counts those callbacks can now show survivors that were false kills, so its score can go down. --sincenarrows the No mutants method count (#420).summary.subjects,summary.unmutated_subjects, andunmutated_subjects[]keep methods whosedefrange intersects a changed line. The human and dry-run lines no longer say the count is un-narrowed.- The HTML report and Action step summary show the No mutants count (#419).
HTML adds
no_mutants/methods(anddeclinedwhen present). The Action summary table gains a No mutants column fromsummary.unmutated_subjects. - A not-green clean run names the failing test and the first error (#360).
The SmokeCheckError line still says
not greenonce and lists the files. It now also prints the reporter's failing test name and first failure message (capped), for Minitest and RSpec, including--rails/--daemonforks and a warm-cache clean check. - The Action accepts an
outputpath that starts with a dash, a tilde, or ends in a newline (#401). Before,output: -dash/pr.jsonstopped the step with adirnameorrubyusage error, so a same-filebaselinewas not checked. Path ops use Ruby (portable on macOS BSD tools) with--, so a leading dash stays a path.report=usesFile.absolute_path, so a literal~name is not treated as a home shortcut. Anoutputfolder or file name that ended in a newline lost it, so the report went to the wrong place or thereportoutput named the wrong path. A folder that differs from the cache directory only by a newline is not created. The same-file error keeps a newline in the path. The Action test runs one table of unusual names (space, newline, leading dash,*, non-ASCII,~) through every path input. A.mutineer.ymlbaseline that ends in a newline works withmutineer config(#394). - A reload of a parent class no longer puts a skipped callback back on
its subclasses (#414). With the subclasses already loaded, Rails
appended the parent's
before_saveagain, including onto a subclass that had skipped it. Saves then failed, and a weak test looked strong. Reload, redefine, and the daemon now leave each subclass chain as it was. A callback replaced on one chain stays on every other chain. - A second SQLite daemon run stops instead of sharing worker files (#404).
Two
--rails --daemonruns in one checkout used the same worker database files, and both could stop with a false "the unmutated suite is not green". A run now holds a lock on<base file>-mutineer.lockbeside the database file, and a second run stops withanother Mutineer run is using <base>, as PostgreSQL and MySQL runs already do. Mutineer never deletes the lock file. Afile:name that opens a disk file takes that same lock (#412).
1.8.2 - 2026-11-10
Fixed
- Redaction no longer hides a password inside other words (#341). A
form of the database password (raw, decoded or escaped) longer than 3
characters, made only of ASCII letters, digits and underscores, is now
hidden only as a whole word, like a short one. With
password
test, the backtrace pathuser_test.rbstays readable. Such a password inside a longer word is no longer hidden. The wordteston its own is still hidden, also right after an escape such as%40or\n, a colour code, or a-pflag. That escape rule now covers short forms too. A longer form with any other character is still hidden wherever it appears. - Redaction keeps the host after a password with an
@(#341). Inpostgres://u:p@ss@h/db and p@ss, onlyp@ssis hidden now. Before, the host and the rest of the line were hidden too. One known limit: in a URL other than DATABASE_URL, a password that holds an@, a host, a/,:,?or#, and a space, shows the part after that@when the URL's own host has nothing after it, or has an@in its path or query. #341 tracks it. - Daemon shutdown no longer waits a second (#341). A process the app
started could keep the daemon's error output open. Each quit or respawn of
--daemonthen waited one second. Mutineer now stops waiting once the daemon has exited and its output is read. - One line that Prism 2 rejects no longer skips every mutant in the file
(#392). Prism 2.0 and later report an operator write to a bare constant
inside a method (
T += 1,T ||= 1,T &&= 1) as a dynamic constant assignment. Ruby'sparse.ydoes the same, but Ruby 3.4 and 4.0 load such a file with their own Prism 1. Mutineer kept a mutant only when the mutated file parsed with no errors, so on Prism 2 every mutant of that file was counted asskipped (invalid). When Prism reports an error, Mutineer now asks the running Ruby to compile the mutant, and skips it only when Ruby cannot. This holds in the dry run, in process, with--test-command, on--daemon, and for the redefine strategy's method snippet. A project gets Prism 2 when its bundle loads it, for example through minitest 6.1. On Prism 2, the mutants of such a file that were skipped now get a verdict, so the score, the counts, and the JSON report can change for those projects. Prism 1 runs do not change. --test-commandwarns about a random test order (#338). Mutineer sets no seed for your command, so the clean run and each mutant run can run the tests in different orders. An order-dependent suite can then fail a mutant run for a reason the mutant did not cause, and that mutant scores a falsekilled. When the clean run prints a random seed (MinitestRun options: --seed N, RSpecRandomized with seed N) and Mutineer finds no fixed seed, it now prints one warning with the fix for that runner: putSEED=1before themutineercommand for Minitest, or add--order definedto an RSpec command and keep--order randout ofSPEC_OPTS, which RSpec reads after the command. The docs for--test-commandsay the same. Mutineer does not set the seed itself, so scores do not change. It cannot see a seed set in a wrapper script or.rspec, or a Minitesttest_order, so the warning can print when the order is already fixed. #368 tracks these limits.- Reload places a hook-block mutant before the rest of its file runs
(#348). Under
--strategy reload, a placeable mutated method from a concern'sincludedorprependedblock reached the classes that include or prepend the concern only after the whole mutant file loaded. Methods that reload cannot place still scoreunplaceable. A later line in the same file that called the method while the file loaded, such asTOTAL = Host.new.doubled(2), still used the original method. Mutineer now places the mutated method when the load reaches the hook call, before the rest of the file runs, in-process and on--daemon. Such a mutant can now be killed where it used to survive or scoreran_at_load, so the score of an affected file can change. A mutant that raises in such a load-time call now scoreserror. The alias and kept-method checks still scoreerror. The kept-method check runs after the load, so a method handle the file holds only while it loads does not count. - The Action creates the cache folder when
outputpoints into it (#340). On a fresh checkout,output: .mutineer/pr.jsonexited 2, because.mutineer/did not exist yet. The CLI already created that folder (#270), but the Action checks the path itself before it runs the CLI. The Action now creates the cache folder when it is the missing parent ofoutput:.mutineerby default, thecache_dirfrom.mutineer.yml, or a--cache-dirinextra-args(any short form the CLI accepts, such as--cache). Any other missing folder still exits 2. or a--cache-dirinextra-args(or a prefix of it down to--cac, such as--cache). Any other missing folder still exits 2. - Reload runs a Rails class body a second time without errors (#378,
#384). Reload loads the mutant file over the class that is already
defined, so its body runs again. A model that declares an
enum, and a class that callsskip_callback(a controller'sskip_before_actionorallow_unauthenticated_accesscalls it), raised on that second run, and every mutant in the file scorederror. While the mutant file loads, an enum the class had before the load now skips Rails' conflict check, andskip_callbackdoes not raise for a callback the first run already removed: one named by a method the class has, such as a callback from the parent class or an included concern. A skip that names no such method or parent callback still raises. Both checks run as usual while the tests run. This holds on--daemonand with--strategy reload. - Reload no longer runs validators and block callbacks twice (#390).
The second run of a class body added a second copy of each
validates, eachvalidateblock, and each callback written as a block or a lambda, such asbefore_save do ... end. Rails removes a repeated callback only when it names a method. A test that counts errors or side effects then failed for every mutant in the file, so those mutants scoredkilledfalsely. After the mutant file loads, Mutineer now keeps one copy of each: the new one, in the place of the old one, so the order of callbacks does not change. Entries from an included concern stay, because the reload does not run the concern's block again. When Mutineer cannot tell which old entry a new one repeats, it keeps both, as before (#413). This holds on--daemonand with--strategy reload. With eager loading on, a mutant of a parent class file still adds a callback back to each subclass that skipped it (#414). Score change: a Rails model with such a test can now show survivors that were false kills before, so its score can go down. - Concern mutants load when the test app loads lazily (#383). With
eager_loadoff (the Rails test default), the mutant's load was the first use of the concern, so Rails loaded the original file inside it. The originalincludedblock then came back, and the mutant's block raisedMultipleIncludedBlocks. Mutineer now loads the original file first, through the app's autoloader, so the mutant's block replaces it. - The pending-migration check no longer trips
shared_databases(#385).rails/test_helpchecks every database for pending migrations when the tests load, shared ones too. A parallel--daemonrun then reported the shared database as used and scored every mutanterror. Mutant forks of a run withshared_databasesnow turn that check off. The clean check, which runs before any mutant, still makes it. - No Rails deprecation warning from concern mutants (#387). Placing a
mutant inside an
includedblock looked at every module. Rails 8.2 keeps a deprecated constant as a module that warns on every call, so each such mutant printedLoadInterlockAwareMonitor is deprecated. Mutineer now skips that module.
1.8.1 - 2026-11-02
Fixed
- No "already initialized constant" warnings under reload (#364). Each
mutant loads its whole file again, so every constant in the file was
assigned twice. Ruby then printed two warning lines per constant, per
mutant, on stderr. Mutineer now turns warnings off while it loads the
mutant file, in-process and on
--daemon, and turns them back on before the tests run. Warnings that the tests raise still print. Other warnings raised while the mutant file loads, such as an unused variable under-w, no longer print either. Scores and the JSON report do not change. - The "not green" message says it once (#360). When the clean run of a
file's tests failed, the message said "the unmutated suite is not green"
twice. It now says it once, then names the test files after
Failed:. A failure that only the check of all test files together finds is listed asFailed: combined suite. Under Minitest, the seed hint follows them. The message itself still does not name the failing tests or the first error; #360 tracks that. On the default in-process path, the failing test's own report still prints on stderr before the message. - An unexpected error no longer prints an unredacted message (#341). An error that no other handler expected went to Ruby's default printer, which did not hide a database password in its message. The CLI now prints that error with the password hidden, with its backtrace, and exits 1, as before. No known path raised such an error with the password.
- An ambiguous or malformed option is a usage error (exit 2). An option
that matches more than one flag, such as
--ver(--verboseor--version), or a value given to a flag that takes none, such as--verbose=1, crashed with a backtrace and exit 1. It now prints one line and exits 2, like every other bad option. This holds forinitandtriagetoo.
1.8.0 - 2026-10-29
Highlights
Read these before you upgrade. Details are in the sections below.
- Scores can change after the upgrade. Under
--strategy reload, most methods in a concern'sincludedorprependedblock are now scored (#297). Runs that listcall_to_receiverget more mutants (#274). Runs that listrangeget new mutants for endless ranges (#299). A mutant that two operators make now counts once (#275). These can change counts, scores and survivors. If you gate on--baseline, write a new full baseline. - Delete
ignore:entries forrangemutants (#299). A newrangemutant can take an old id, so an old entry can hide a real survivor. - Fewer false kills. Under
--test-command, a non-zero exit other than 1 scoreserror, and so does an exit 1 with no failing test in the summary line (#292). An Active Record connection or lock error inside a Minitest test scoreserrortoo (#296). Before, these scoredkilled. - Exit codes match STABILITY.md (#288). A boot, source or
require:file that raises while it loads exits 1. A missing boot orrequire:file exits 2. --thresholdcompares the exact score (#280). A run with 1999 of 2000 mutants killed shows 100.0% but no longer passes--threshold 100.- New report data. The JSON report adds
summary.declinedandsummary.declined_by_operator(schema1.9), and stderr warns when many mutants could not run (#291). - Parallel
--daemonwith unused test databases (#316). List them undershared_databasesto run more than one worker. Needs Rails 7.1 or later. - The gem ships the agent skill (#315).
- Releases wait for a maintainer. Nothing publishes on a schedule or on a tag push.
Added
shared_databasesconfig key (#316). An app with a second test database ran one worker under--daemon. List the databases your tests never use (shared_databases: [cable]), and the workers share them and run in parallel. After each mutant, a parallel worker checks those databases. The mutant scoreserrorwhen a pool for one is still connected after the tests, or ran SQL during them. A replica in the sameconnects_tocounts as its database. Listing the primary database stops the run with exit 2. A name that matches no test database warns and is not checked. The check needs Rails 7.1 or later. Three safety changes come with it for--rails --daemon: a test database withdatabase_tasks: falsenow counts toward the one-worker limit, and the run keeps one worker when the app's databases cannot be listed or the first daemon does not boot (before, each case could start several workers). See More than one database for the transactional-tests caveat.- Counts of mutants that were not scored (#291). Operators now count the
candidates they decline: a heredoc they cannot mutate safely, or an
equivalent skip such as an endless range or a skipped chain-link name. The
dry run prints the count. The human report prints it when the run has
mutants; when every candidate was declined, the empty-run warning names the
count instead (that warning is off under
--allow-empty). The JSON report addssummary.declinedandsummary.declined_by_operator(schema1.9). A new stderr warning fires when unplaceable and skipped-invalid mutants are more than one and more than 10% of the mutants a run tried to score. The warning does not change the exit code. Measured on commit caa9e1a (this change merged with main) with every operator: the dry run onlib/declines 195 candidates beside 17,374 mutations (call_to_receiver 122, chain_link 45, range 12, statement_removal 10, return_nil 6); the dry run on the Rails fixture app declines 0 beside 69 mutations. A--strategy redefine --railsrun on the fixture app models (order, price_list, billing/fee) has 0 unplaceable and 0 skipped-invalid of 12 attempted, so no warning. The fixture has no concerns, so it cannot tune the 10% limit. - Included and prepended block methods under reload. After you upgrade,
follow the full baseline refresh recipe
with
--no-since --format json --output .mutineer/refreshed-baseline.jsonand your existing source and test options. Review the report and replace the stored baseline. This applies only to runs that use--strategy reload: under redefine these methods stayunplaceable. GitHub Action users on reload, the Action's default (a Rails app without a daemon uses redefine), must replace the file passed to thebaselineinput too. A check against an older report lists the new survivors as regressions. Under--strategy reload, in-process and on the daemon, a method in a concern'sincludedorprependedblock is now mutated and scored (#297). Mutineer loads the mutated method into each class that already has it. A prepended wrapper that callssuperreaches that mutated method too. A concern included into an object's singleton class is supported. A class that includes the concern later gets it from the reloaded block. The rest of the block does not run again, so validators and callbacks are not added twice. These mutants used to beunplaceable, so a reload score can go down and a--thresholdgate can start to fail. Some methods stayunplaceable: a method in a class, module orStruct.newblock inside the block, a method inside another method or block, a method with an explicit receiver other thanself(such asdef base.taginincluded do |base|), a hook-block method whose source line conflicts with anotherdefor an explicit Ruby method creator (the full rule is indocs/json-schema.md), every method in a block that usesaliasoralias_method, a method the block itself calls, and every method in a block whoseincluded docall is not a plain line of the module body (for example insideif,unless, orx = included do). The full list is indocs/json-schema.md. If a class aliases a method that Mutineer does run (one not in that list) outside the block, the mutant scoreserror, because the alias keeps the original method. This also applies when a wrapper replaces the original name and calls the saved alias. A retainedMethodorUnboundMethodfor the original also makes the mutant scoreerror: a wrapper can call that handle without testing the mutated method.--strategy redefinestill reports all of these methodsunplaceable. - The gem ships the agent skill.
skills/mutineer/SKILL.mdis now packaged in the gem, and the gemspec opts in as a Rails Hyperdrive companion (hyperdrive_targets: "*",hyperdrive_artifacts: "skill"). In a Rails app that bundles mutineer,bin/rails hyperdrive:initinstalls the skill to.claude/skills/mutineer/SKILL.md. A test in the default suite fails if the gemspec stops shipping the skill or drops the opt-in (#315).
Fixed
-
--daemonstops on MySQL older than 8.0 (#298). The support matrix said MySQL 5.7 is not supported, but--daemonran on it. Mutineer now reads the server version before it copies any worker database. MySQL older than 8.0 stops the run withcould not provision <base>: MySQL <version> is not supported. Pass--no-daemon(or setdaemon: false) to stay serial. MariaDB, MySQL 9 or later, and a server version Mutineer cannot read print one warning and run. -
An in-test database error scores
error, notkilled(#296). When the first failing test of a Minitest mutant run failed with an Active Record connection or lock error (ConnectionNotEstablished, including pool timeouts,ConnectionFailed,Deadlocked,LockWaitTimeout), the mutant now scoreserroron--daemonand in-process. This includes an error insetup. Errors are out of the score, so a lost database connection during a run no longer raises the score. A stderr line names the error. A mutant that really causes a deadlock, or that breaks connection-handling code, now also scoreserror. Moreerrorverdicts can fail a--thresholdrun through the existing no-verdict gate. Other database errors, such as a bad SQL statement, still scorekilled. So doesConnectionNotDefined, which Rails 8 raises for an unknown role or shard. Rails 7.2 raises a plainConnectionNotEstablishedthere, so such a mutant scoreserroron 7.2. With--matrix, a database-failed test is never a killer and leaves its row incomplete, even if an earlier assertion already killed the mutant. -
An old temp file of the other mode no longer stops the boot (#287). Before the app boots, each mode sweeps the source directories. In 1.7.0 an in-process run removed only old
mutineer_mutant*.rbfiles and the daemon removed only oldmutineer_daemon*.rbfiles, so a file the other mode left made Zeitwerk raise. Now both boot sweeps remove an orphan of either mode, and the daemon tells Zeitwerk to skip both names. You no longer delete such a file by hand. A file of your own whose name only starts withmutineer_mutantormutineer_daemon, such asmutineer_mutant_helper.rb, is no longer removed: a sweep now matches only the temp file shape. An unlocked old file is removed even when its creator's pid has been reused; a held file lock still protects it. Do not run Mutineer older than 1.7.0 at the same time in the same checkout: it still writes temp files without the dot, and a newer run's mutants error when Zeitwerk finds one. -
A second in-process run no longer deletes a live mutant file (#295). Each in-process run sweeps the source directories before its boot and after its run. That sweep treated every
.mutineer_mutant*.rbfile as an orphan, so it could delete another run's file between the write and the load, and that mutant scorederrored. Now the file is locked while it loads, as the daemon's file is, and a sweep keeps a file whose creating process still runs. -
The
rangeoperator swaps endless ranges outside slices. Before, it skipped every endless range (1..,1..nil) as equivalent. But(1..)and(1...)differ on==,hash,exclude_end?andto_s, so a test can kill that mutant. Now the operator skips an endless range only when it is a direct index argument of[],[]=,slice,slice!,byteslice,bytesplice,values_ator an index write, and the receiver is not a class (Array[1..]is swapped). A Hash, Proc, or custom[]/slicecan still tell1..from1..., so those skips can hide a killable mutant. See Equivalent skips. A run that namesrangecan get new mutants, new survivors and new mutant ids. A new mutant can take the id of an olderrangemutant in the same method, so an oldignore:id can name a different mutant. If you userange:- Delete the
ignore:entries forrangemutants. - Save a new report with the same operators you gate with:
mutineer run <paths> --operators <list> --no-since --format json --output <file>. Use it as your new baseline. - Print new entries with
mutineer triage <file> --reason TEXT (--id ID ... | --all)and paste them underignore:. The command does not edit files.
Some new mutants are equivalent, for example a range used only with
include?, or a range in an Active Record query such aswhere(created_at: time..). Suppress them with# mutineer:disable-lineor anignore:entry. (#299) - Delete the
-
A test file given as a source after
--testnow exits 2 in more layouts (#293). The check missed Minitesttest_*.rbfiles undertest/orspec/, and*_test.rbor*_spec.rbfiles in the same directory as a--testfile, such as the project root. Mutineer then mutated that file as a source and never ran it as a test. With--format json, the stray file's Minitest output also made the report invalid JSON. A support file with atest_name under the top-leveltest/orspec/(other thantest_helper.rb) now also exits 2 when given as a source with--test. -
A mutant on a later line of a call inside a one-line block can be killed (#289). A call can span several lines, such as
users.map { |u| format("%s",with arguments on the next lines. Mutineer used to pick no tests for a mutant on a later line, so it was alwaysno_coverage. Now, when the lines of the statement give no tests, Mutineer retries. It runs the tests that ran the first or last line of the statement, never thedefline. A kill counts. A survivor staysno_coverage(orran_at_load), because those tests may not have run it. A score can rise with no test change. Such a mutant can now also end aserrorortimeout. That counts toward the--thresholdcompleteness check. -
Mutineer reads its files and pipes as UTF-8 when
LANGandLC_ALLare unset (#303). Before, a non-ASCII character in a source file, a baseline, a coverage cache, a triage report,.mutineer.yml(formigrate),db/schema.rb, a--sincediff, test-command output, or a daemon message stopped the run with "invalid byte sequence in US-ASCII" (exit 2) or a backtrace (exit 1). An invalid byte in test-command output now shows as\xNN. Non-ASCII file and folder names are not covered yet (#346). -
Upgrade note for
--test-commandwith a custom failure exit code (#292). An RSpec setup with--failure-exit-code 3now scores every kill aserror. Use the default exit code, or a wrapper that maps a failure to exit 1. Anerrorverdict leaves the score, so the score can drop, and moreerrorverdicts can fail a--thresholdrun through the existing no-verdict check. A mutant that only trips a SimpleCovminimum_coveragegate now scoressurvivedwhen the output has SimpleCov's gate message and a passing Minitest or RSpec summary line. Without a summary line that Mutineer recognizes, the gate's exit scoreserror, which leaves the score. Either way the old false kill is gone, so the score can drop. A--baselinemade before this change can report new survivors and errors: make a new baseline after the upgrade. -
A
--test-commandexit other than 1 no longer counts as a kill (#292). Only exit 1 scoreskilled, the same rule as the in-process backend. One exception: a SimpleCov gate exit whose summary reports a failing test also scoreskilled. Any other non-zero exit scoreserror, such as a wrapper's 137 after an out-of-memory kill. -
A load crash under
--test-commandscoreserror(#292). When the clean run prints a Minitest or RSpec summary line, an exit 1 also needs a failing test in that line. Code under test that callsexit 1orabortwhile the default Minitest reporter runs its tests still scoreskilled, as in process. Under RSpec or minitest-reporters, that case now scoreserror. When a SimpleCovminimum_coveragegate replaces the exit code, the summary line decides: a failing test is a kill, and a passing run issurvived, as in process. When the clean run prints no summary line, Mutineer warns once and keeps the exit-code rule. -
--output .mutineer/run.jsonon a fresh checkout. The documented report path no longer exits 2 when.mutineer/does not exist yet. The output check now creates the cache directory (cache_dir) when it is the missing parent. Any other missing directory still exits 2. This is a CLI fix: the GitHub Action'soutputinput still needs an existing directory (#270, #340). -
--outputcan no longer replace its own baseline. When--outputand--baselineorbaseline:in.mutineer.ymlname the same file (also through a symlink or hard link), a realmutineer runexits 2 before the run, with the GitHub Action's error adapted for the CLI. A dry run still works because it writes no report. Before, a failing run wrote its report over the baseline, and the next run passed against it (#281). -
--thresholdcompares the exact score, not the rounded one (#280). The score is rounded to one decimal for display, and the gate used to compare that rounded value. A run with 1999 of 2000 mutants killed showed 100.0% and passed--threshold 100with a survivor. The exit code, the Action, and the PASSED or FAILED line now use the exact counts. When the rounded score points the other way, the PASSED or FAILED line gives the counts and says that the score is rounded. -
The Minitest clean check now runs the tests in the order the mutant runs use (#282). Since 1.1.0, each mutant run used seed
1, but coverage capture, the clean checks and the--daemonmutant runs used a random seed. An order-dependent suite could pass the clean check and then fail in every mutant run, so each mutant scored a falsekilled. Every Minitest run that Mutineer starts itself (not--test-command, see #338) now uses seed1, orSEEDwhen the environment sets it. Such a suite now stops the run with "the unmutated suite is not green". The message names the configured seed or default and notes that test helpers can change it. Capture, clean checks and mutant runs all readSEEDafter loading the tests and helpers. Check the listed test files with the same seed and helpers to investigate the order-dependent test. A coverage cache from anotherSEEDin Mutineer's environment or an older version is captured again. A--coverage-fromcapture from anotherSEEDor an older version is rejected with exit 2: capture it again with this version. The internal constantMinitestIntegration::STOP_AT_FIRST_FAILURE_SEEDis nowPINNED_SEED. One gap stays: when a mutant runs several covering test files, their test classes can still run in a different order than in the combined clean check. RSpec does not change. -
--daemonSQLite workers load the schema file the app names (#317). The daemon always loadeddb/schema.rbover an out-of-date worker copy, even whenconfig/database.ymlsetsschema_dump:to another file. An app that keeps its SQLite schema indb/schema_sqlite.rbbeside a MySQLdb/schema.rberrored every mutant. The booted daemon now asks Rails for the file:SCHEMAwhen it is set, elseschema_dump:, elsedb/schema.rb. Withstructure.sql, a missing file, orschema_dump: false(unlessSCHEMAis set) it loads no schema, even when adb/schema.rbexists: the worker keeps its copy of the test database. A Postgres worker is a copy of the test database, so it was not affected. MySQL already asked Rails for the file. It now also reads the database's ownschema_format:(Rails 8.1) and a string format such as"sql", the same as SQLite. -
No
DATABASE_URLpassword in load errors and mutineer's own messages (#288). A load error in the tool process (an in-process--bootor--railsrun, a source file, or arequire:file) no longer prints the raw password or a backtrace. The run prints amutineer: cannot load <path>: ...message (aSyntaxErrorkeeps its code excerpt) and exits 1. By default, a load error adds a hint to re-run with--verbose; verbose output gives a redacted backtrace and cause chain. CLI error messages, the fork child's error line, the worker crash text in the report, the daemon's stderr lines (except bare passwords known only to the app after boot), the failing test report and any load error from the clean-suite and coverage checks, and the--verbosetest command output are redacted too. Output that app code or a test writes straight to stderr in a fork or subprocess is not filtered (#341 tracks this and the other known gaps). Apassword=query parameter in DATABASE_URL is now hidden too. Daemon stderr is now copied line by line as UTF-8, so an invalid byte shows as U+FFFD. Output without a newline waits for a newline or EOF, so credentials split across writes can be redacted together. A password that equals the username no longer blanks the same text elsewhere (for examplerole "postgres"). Each password form of 3 characters or fewer is hidden only when no ASCII letter, digit or underscore touches either edge. The limit applies separately to raw, decoded and escaped forms:%61%62is still replaced inside longer text, while its decodedabis matched only as a whole token. A longer form is hidden wherever it appears, and the password inside a URL is always hidden. -
--strategy redefineand path-relative methods. Redefine now loads the mutated method from a hidden file beside the source, as reload does. It used the system temp directory before, so__dir__andrequire_relativein the method pointed there, and every mutant of such a method was falsely killed (#279). Redefine is also the default under--railswithout--daemon. When a source directory is not writable, redefine still uses the system temp directory there, as before, and the run warns that path-relative methods there can be falsely killed (tracked in #339). -
--test-commandnow setsDISABLE_BOOTSNAP_COMPILE_CACHE=1for the test command. Mutineer writes each mutant over the source file, and Bootsnap keys its compile cache on path, size and whole-second mtime. Two same-size mutants written in the same second could load the first one's cached code, so a mutant could be scored on code that was not the mutant. Each mutant boot now compiles the app again, which is slower. The variable works throughrequire "bootsnap/setup"on Bootsnap 1.7.0 or later; an app that callsBootsnap.setupitself must passcompile_cache_iseq: ENV["DISABLE_BOOTSNAP_COMPILE_CACHE"].nil?, so only mutant runs lose the cache. The--daemonpath is unchanged (#285). -
A mutant that two operators make is scored once (#275).
literal_mutationandstring_literalboth turn"hi"into"", andchain_linkandcall_to_receiverboth turnnode.name.nameintonode.name. Each copy had its own id, so one surviving edit counted twice. Now one copy runs: the copy of the operator that comes first inmutineer --list-operators, whatever the--operatorsorder. Only the same text counts: a single-quoted'hi'still gives two mutants (""and''). Both edits must also start on the same line: in a chain with one call per line, the two copies start on different lines, so both are kept, and--sincefilters each copy by its own start line.- Every kept mutant keeps its id. The dropped copy's id no longer appears in reports. Runs that use only one of these operators keep the same mutants and ids.
- If you combine these operators, the mutant count and the score can move
with no code change, so a
--thresholdor--baselinegate can change its result. Regenerate a--baselinefile after upgrading, from a full--format jsonrun with no--since,--onlyor--fail-fast(pass--no-sinceand--no-fail-fastwhen.mutineer.ymlsets them). A scoped report is refused as a baseline, and a partial one misses mutants. In a full (unscoped) comparison, a dropped copy that survived is listed as fixed. - An ignore entry for one copy's id still ignores only that copy, as for
the #159 copies. So if you ignore the copy a report shows, the other copy
then runs and is reported, and it needs its own entry. Keep both entries:
a run with one operator alone still uses its entry, and
mutineer migratekeeps both as current ids. This also fixes the #159 copies: anignore:list that names both copies of a repeated edit no longer makesmutineer migrateexit 1. - An old-format ignore entry that matches only a dropped copy gets the
old-id-format warning and counts in
summary.legacy_id_matches.ignore, somutineer migrateupdates it. For the #159 copies this is new: such an entry was not counted before, so with one operator the count can go up, and the warning can name an id that no report shows. - Within a method, mutants now run and list in the
--list-operatorsorder. This applies to any run whose--operatorsoroperators:list is in another order, so--dry-runlists and--fail-fastcan differ.
-
A nested method's mutant under
--strategy redefine. Redefine now also loads the mutated method into each method that encloses it. Before, a call to the outer method defined the original inner method again, so the mutant could falsely survive (#290). For a method nested in other methods, redefine now gives the same verdict as reload when a test calls an enclosing method by its own name. Mutant ids do not change, so baselines andignore:entries stay valid. Scores under redefine can rise, and anignore:entry added only to hide such a survivor can now be removed. A method defined inside a non-builder block (for example insidedefine_method), inside amodule_functionmethod, insideclass << selfin a method, or called through an alias of the outer method can still falsely survive under redefine. An enclosing method that a memoizer or decorator wraps after itsdefloses that wrapper when redefine loads it, so its verdict can differ from reload. Use--strategy reloadfor those cases.
Changed
- A release waits for a maintainer. The Monday release-PR schedule is
gone, and pushing a
vX.Y.Ztag leaves the gem unpublished. A human collaborator with maintain or admin prepares a release PR by hand, tags by hand, then runs the Release workflow on that tag withconfirm=publish. A required reviewer approves therubygemsGitHub environment before the gem is pushed. A new Release run refuses to start the publish when that environment is missing, has no required reviewers, or lets admins bypass them. Re-running only the publish job of an earlier run does not repeat that check. The publish job builds the commit that was dispatched, and it stops beforegem pushif the tag moved while the job waited for approval. The job no longer moves the floating major tag (v1). When the release is the newest stable tag in its line, the job prints the command and a maintainer runs it, so a ruleset can keep that tag for maintainers. For a patch on an older line, it prints no command. - Load failures now use the runtime-error exit code (#288). An
ArgumentErrororSystemCallErrorraised while a boot file, a source file or a.mutineer.ymlrequire:file loads now exits 1 (runtime error), instead of 2 (usage error). A missing boot orrequire:file now exits 2 (usage error) with a one-line message. Before, it crashed with a rawLoadErrorand a backtrace, and exited 1. With--daemonit is checked before the daemon starts, so it exits 2 there too. Both moves bring the code in line with the exit-code table in STABILITY.md, which already lists a bad path as 2 and a runtime error as 1. call_to_receivernow mutates last-call conversions such asto_sandto_i.m[1].to_inow gives the mutantm[1]. Before, the operator skipped the same names aschain_link. Now it skips onlynew,dup,clone,freeze,itselfandto_set.chain_linkdoes not change. Only runs that listcall_to_receiverin--operators(oroperators:) change: they get more mutants (113 more on Mutineer's ownlib/). If you gate such a run with--thresholdor--baseline, expect new survivors: write a new full-scope baseline withmutineer run ... --no-since --no-fail-fast --format json, with no--only. Ato_smutant on a value that is already a String is equivalent: suppress it with# mutineer:disable-line call_to_receiveror anignore:entry. (#274)- Explain mutation testing before setup, with a runnable beginner guide and a first run on one file. Simplify wording across the website and clarify Rails setup, CI baselines, and reasons for ignoring a mutant.
1.7.0 - 2026-10-23
Added
- Call-to-receiver operator (Tier-2, opt-in via
--operators):call_to_receiverreplaces the last call of a chain with its receiver, with the arguments and block of that call (user.full_name->user). The mutant survives when no test checks what that last call does. It does not overlap withchain_link:chain_linkdrops a call in the middle of a chain, andcall_to_receiverdrops only the last call. The two give the same source only when the last call repeats the call before it (node.name.name). It skips the same names aschain_link, and it skips operator calls and setters. - Reasons on ignored mutants. Text after
--on# mutineer:disable-line, and a.mutineer.ymlignore:mapping (idplusreason), is stored on the ignored mutant. The JSON report (schema_version1.8) and the HTML report show it. A mapping with noid, or with an unknown key, warns. Mutineer 1.7 is the first version that reads a mapping. An older version matches no mutant to a mapping and does not warn, so the mutant it names is not ignored. Upgrade every gate that reads the file before you add a mapping.mutineer migraterewrites the old id inside a mapping and keeps its reason. mutineer triage. It printsignore:mapping entries for survivors in a JSON report.--reasonis required. Pass--allor--id. It does not edit files.- Equivalent-skip page. The docs list every built-in chain-link skip and the endless-range skip, and why each one is equivalent.
- Postgres worker databases for
--rails --daemon. Each worker gets<base>-mutineer-<N>, copied from the test database before mutants run. A second run cannot drop a database another live run holds. An app with more than one database config runs one worker and says so once. The worker databases stay after the run. - MySQL 8 worker databases for Minitest on
--rails --daemon. Each worker gets<base>-mutineer-<N>onmysql2ortrilogy, with the base shortened to fit MySQL's 64-byte name limit. Mutineer creates the database, loadsschema.rborstructure.sql, and copies rows once at the start. Triggers from the schema do not fire on the copied rows. Mutineer creates them again after the copy. A second run cannot drop a database another live run holds. That work uses the TLS and timeout settings from the database config. MariaDB is not tested. MySQL 5.7 is not supported. The worker databases stay after the run. mutineer migrate. It rewrites old-format ids in.mutineer.ymlignore:to the current ids. It keeps comments and every other line. One old id that matches several mutants becomes every new id. An id that matches nothing stays, and the command exits 1. A block scalar underignore:is not supported: the command exits 2 and does not change the file.--dry-runprints each change and writes nothing. It does not rewrite a baseline. Generate a new baseline with--format json. An old-id warning namesmutineer migrateand says that this becomes an error in Mutineer 2.0. The baseline warning says to generate a new baseline with--format json.mutineer init. It writes a commented.mutineer.ymlwith the default operators.sincestays commented, so the first run is a full scan.init --railsalso setsrails: trueand prints the first run command. An existing file is kept unless you pass--force.- Rails rollout guide. The page walks from one model, to a report-only CI
job, to a
--sinceand--baselinepull request gate, to--thresholdon chosen folders. It has a GitHub Actions recipe and a GitLab CI recipe. - A mutation-testing primer in the README. "What is mutation testing?" walks through one small example, from a surviving mutant to the test that kills it, and says what each report row means and what to do with a survivor. The usage block lists all four commands.
- A production-ready section and a stability contract. The README opens
with a support matrix for Ruby, database, framework, and parallelism.
STABILITY.mdlists what a release keeps and what 2.0 will change.SECURITY.md,CONTRIBUTING.md, and GitHub issue forms are new. The docs home page takes the same section from the README at site build. --allow-emptyandallow_empty:. A run with no mutants now warns that Mutineer 2.0 will fail it, unless--allow-emptymarks it as expected. A--sincerun whose changes hold no mutants does not warn: it says the changes hold nothing to test. A--sincerun with no mutants even before scoping still warns. The exit code does not change in 1.x.--no-daemon. It beats a.mutineer.ymldaemon: truefor one run, like--no-fail-fast. A Minitest--railsrun without adaemonvalue now prints a notice that 2.0 uses--daemonby default for--rails;--no-daemon(ordaemon: false) keeps the run serial and stops the notice.- "Did you mean" hints. Unknown names in
--operators, in.mutineer.ymloperators:and keys, and in# mutineer:disable-linemarkers get the closest valid name. The.mutineer.ymlwarnings also say that 2.0 makes them errors. --coverage-from FILElets parallel shards share one coverage capture. A--rails/--bootrun reads thecoverage.jsonof an earlier run with the same tests over these sources or more. It skips the capture. Each test that covers one of its sources still runs alone, as on a cache hit, because a mutant runs only those tests. A test that covers none of them does not, so a shard runs far fewer tests alone than a full suite. All tests then run once together, and the run saves its own cache. Boot-mode caches now also record each source's fingerprint, the ownership list and a digest of the other inputs. A capture that does not fit is an error (exit 2), never a silent recapture. So is one where loading its other sources ran these sources' code, which happens under lazy loading with--strategy redefine. Without boot mode, and with--daemon,--test-commandor--dry-run, the flag warns that it has no effect.
Changed
- Rails test workers stay off during a mutant run. Mutineer sets
PARALLEL_WORKERSto1for in-process,--daemon, and--test-commandruns. A value you already set is replaced, and Mutineer prints one line. The coverage cache stores thePARALLEL_WORKERSvalue, so a cache from an older version rebuilds once.--test-commandalso setsDISABLE_SPRING=1. The README explainsparallelize, Bootsnap, and Redis after a fork. --test-commandexit codes 126 and 127 are scorederror, notkilled. A wrapper that could not start the suite ran no test. Under--threshold, such a run can now score lower or fail the no-verdict limit, where before it passed on false kills.- A run with errored mutants and no
--thresholdsays so. Errors are not in the score, so they do not fail the run; the message says what--thresholdwould enforce. --sincealso narrows suppressed mutants. A scoped report lists onlyignoredmutants on changed lines, as--dry-run --sincealready did.- The empty-run message moved from the human report to one stderr warning
for every format. "No mutations generated" is gone. An empty
--sincerun prints "nothing to test in the changes since REF" instead.
Fixed
- Daemon errors no longer show the database password. Rails parses
DATABASE_URLitself, and a malformed URL makes it raise an error that quotes the whole URL. The daemon sent that error to the terminal when the app failed to boot, and the same could happen when it set up worker databases or the coverage map, and in a--verbosecoverage warning. Mutineer now replaces the password in any URL, and theDATABASE_URLpassword anywhere else (escaped or cut short included), with[REDACTED]before it reports the error. --strategy reloadruns concern files with anincludedorprependedblock (#256). Every mutant in such a file waserrored: ActiveSupport raisedMultipleIncludedBlocks(orMultiplePrependBlocks) because the mutant loads from a temp file with another path. Before each reload mutant loads, in-process and on the daemon, the forked child now forgets the blocks that the source file stored, so methods in the concern body and inclass_methodsare killed or survive as usual. A block the mutant's load does not store again (a concern under anunless defined?guard) is put back. A method inside anincludedorprependedblock isunplaceableunder reload too: the block does not run again in a class that already includes or prepends the concern, so the mutant would falsely survive. That includes a method of a class defined inside the block. Use--test-commandto run those mutants.- No heredoc opener without its body. A mutation that kept a heredoc
opener but replaced the lines of its body gave source that does not parse,
such as
operand_removalonfoo(<<~EOS) ||with the body andbaron the next lines. The mutant showed only asskipped (invalid). Now the operator does not emit it. - An RSpec run that fails only on an error outside examples scores the
mutant
errored, notkilled. A spec file that raised while loading, or a failingbefore(:suite)hook, made RSpec exit 1, and every mutant was scoredkilled. On a Rails app,rails_helpercalledSimpleCov.startafter--railshad suspended Coverage (#228), so each spec file raised as it loaded, and 18 of 18 mutants were scoredkilled; 3 of them survive. Now the runner returns 2 when RSpec recorded an error outside examples and no example failed, so the mutant iserrored: out of the score and inno_verdict, so that run now fails--thresholdinstead of passing at 100%. A failed example still kills. Minitest and--daemonalready score a test file that raises at load aserrored.--test-commandsees only the exit status and still scores itkilled. - A Rails daemon boots again while a mutant file is still open. The file stays when another process holds it. The next boot skips that file name instead of stopping.
- A daemon crash no longer leaves a mutant file in your source folder
(#250). When a daemon dies during a mutant, its child dies a moment
later. The new daemon cleaned up before that, so the child's file stayed.
The next Rails boot then failed on the file name. Each daemon run now
cleans up again when it ends or stops early. It waits up to 1.5 seconds
for the child to go. A file whose owner still runs after that stays
until the next daemon run removes it. On Linux, a file whose owner is a
zombie (in a container whose pid 1 does not reap it) is now removed.
With
--jobs N, an error in one worker stops the others after their current mutant, and a Ctrl-C quits every worker daemon before the run ends. - SimpleCov in a test helper no longer breaks every mutant under
--railsor--boot(#248). After the coverage map is built, mutineer pauses Ruby's coverage (#228). SimpleCov saw the paused coverage as off and tried to start it. Ruby refuses that while coverage is paused, so the test helper raised in every mutant. Now a start in a mutant first stops the paused coverage. A mutant whose tests start nothing keeps it paused and pays nothing. This applies to--daemontoo. - Methods in an ActiveSupport::Concern
class_methodsblock are mutated under--strategy redefine(#252). ActiveSupport puts these methods in the concern'sClassMethodsmodule, and each includer gets them as class methods. Mutineer named them as instance methods of the concern itself. Redefine (the--railsdefault) then loaded each mutant onto the concern. The tests called the includer's method, so every mutant falsely survived. A concern with an instance method of the same name failed the other way: the mutant replaced that instance method, so tests calling it ran the wrong method and failed (an ArgumentError, when the arities differ), and the mutant counted as killed whatever it changed. Both false survivors and false kills are gone. An earlier redefine score is unreliable for any file with aclass_methodsblock: too low from false survivors, or too high from false kills. Re-run those files. These methods are now namedConcern::ClassMethods#name, and redefine loads the mutant onto that module. This applies to a module that ranextend ActiveSupport::Concernearlier in the same file. The mutant ids of these methods change, because an id contains the qualified name (owner and method). An instance method with the same name, later in the same file, can get a new id too. Anignore:entry or a--baselinesurvivor for one of these methods no longer matches. Replace it with the new id from a new run. - Methods in other
class_methods,includedandprependedblocks areunplaceableunder--strategy redefine(#252). ActiveSupport runs anincludedorprependedblock in each includer, so no constant names the class that owns its methods. Aclass_methodsblock that Mutineer cannot tie to a concern has the same problem: one in a def, in Rails'concerning, in an unassignedModule.new, or in a module that does not runextend ActiveSupport::Concernearlier in the file. Redefine loaded each mutant onto the enclosing module, and the mutant could falsely survive. Now redefine reports these mutants asunplaceableand does not run them. Like everyunplaceablemutant, they leave the score and do not count toward--threshold, so a gate that failed on these false survivors can now pass. Their names and mutant ids do not change.--strategy reloadruns them, except a method in anincludedorprependedblock (see #256 above). Another library's method with one of these names isunplaceableunder redefine too, even when that library runs the block in the module itself and redefine used to run it correctly. Mutineer cannot tell that library from ActiveSupport, so it does not guess. For that other library's mutants, use--strategy reload. - A file in a namespace directory scores under
--rails --strategy reloadand--rails --daemon(#253). Mutineer writes each mutant to a temp file next to the source and loads it. With lazy loading, loading it can be the first time Zeitwerk scans that directory, such asapp/models/billing/. Zeitwerk then raisedZeitwerk::NameErroron the temp file's name, and the mutants of the file errored. Parallel daemon workers hit the same error on each other's files. Now the temp files are hidden:.mutineer_mutant*.rband.mutineer_daemon*.rb. Zeitwerk skips hidden files, in every loader. The cleanup sweeps still remove a file an older version left without the dot. Each mode sweeps its own files before the app boots: an in-process run now removes an oldmutineer_mutant*.rbfirst, and the daemon removes an oldmutineer_daemon*.rb. An old file of the other mode still stops the boot, so delete it by hand. Eager loading, the default on CI, scans every directory at boot, so it never hit the error. - A mutant on a later line of a multi-line
&&or||can be killed (#254). Ruby counts only the first line of a statement. For code that runs only sometimes on a later line, such as the right side ofverified &&on its own line, Mutineer picked no tests, so the mutant was alwaysno_coverage, however good the tests were. Now it runs the tests that ran the statement. A kill counts. A survivor staysno_coverage, because the run cannot tell whether those tests reached it, so no survivor is added and a score can rise with no test change. Such a mutant can now also end aserroredortimeout; like any mutant with no verdict, that counts toward the--thresholdcompleteness check, so a failure is reported, not hidden. This also applies to a laterwhencondition, the value ofx rescue y,&.arguments and an||=value on a later line, and to--daemon. A branch of a ternary orif, and the body ofx if c, keep the verdict they had before.
1.6.0 - 2026-10-08
Added
- An
unplaceablemutant status. Under--strategy redefine, a mutant in a method whose class or module has no constant name is not run. It is left out of the score and, unlikeuncapturable, out ofno_verdict, so it does not fail--threshold. The human report gives it anUnplaceable:row, the HTML report a count, and the JSON reportsummary.unplaceableand anunplaceable[]list;schema_versionis1.7. - The agent skill installs with
gh skillandnpx skills(#125). It moved fromdocs/skill.mdtoskills/mutineer/SKILL.md, the layout of the Agent Skills specification, sogh skill install davidteren/mutineer mutineerfinds it andnpx skills add davidteren/mutineer --skill mutineerinstalls oneSKILL.mdinstead of the wholedocs/site. The site build copies that file toskill.md, so its URL still works. The skill's description now says when to use it, and the README shows how to install it. - A
ran_at_loadmutant status (#187). A mutant on a method-body line that ran while the app booted or its class loaded gets this status when it survives, or when only the load ran the line. A kill stays a kill. It is left out of the score and out ofno_verdict, so it does not fail--threshold. The human report gives it aRan at load:row that points to--test-commandto verify these mutants, the HTML report a count, and the JSON reportsummary.ran_at_loadand aran_at_load[]list, within schema1.7.
Changed
- Mutants no longer run under Coverage with
--bootor--rails(#228). Coverage starts before the app boots so the coverage map can be built, and it used to keep running in every mutant fork after that, though nothing read it. It is now suspended once the map is built, from a fresh capture or from the cache. Coverage that a host process started before the run is left running. On a small app whose test calls tiny methods in a loop, the CPU time of a whole in-process--bootrun fell from 0.76s to 0.57s (median of five). On the Rails fixture app the run is mostly boot, and the change is within noise (1.61s before, 1.60s after).--daemonruns its mutants in worker daemons that never start Coverage, so its time does not change (3.48s before, 3.44s after); the map-building daemon now suspends Coverage after the map too. - A mutant runs its paired test files first, then the cheapest (#203). The
covering test files used to run in the order the coverage map stored them,
so a mutant that one fast file kills could still score
timeoutwhen slow files ran first. Now the files that pairing finds for the source run first, then the rest from fastest to slowest by the time each file took during coverage capture, less the fastest file's time (the startup cost each capture pays). The order is fixed for a given cache. Costs compare in doubling buckets, so files of close cost keep their path order when a rebuilt cache measures them again; a file near a bucket edge can still move, so keep.mutineer/between CI runs for the most stable--baseline. The order applies to Minitest (after the seeded class shuffle, withparallelize_me!classes still last) and to RSpec.--daemonruns every covering test with no stop, so the order does not change its verdicts. The coverage cache now saves these timings, so a cache from an earlier version rebuilds once. A complete run gives the same verdicts and--matrixrows, but the new order can change which mutants time out, so a--baselinegate can see a one-time change on upgrade. - Job selection moved from
Mutineer::Runnerto a newMutineer::JobPlanmodule (#75). The in-process runner, the--daemonbackend and--dry-runshare it, so each file now requires what it uses and norequire_relativecycle exists inlib/mutineer. The moved methods arecollect_jobs,filter_since,coverage_selection,ran_at_load?,load_verdict,abort_if_unclean!,test_load_roots,source_dirs,sweep_orphans,suppress_map,suppressed?andresult_keys. These were internal methods, soRunnerkeeps no copies. Runs, reports and caches do not change.
Fixed
-
An endless method that only the tests call is no longer
no_coverageunder--rails,--bootor--daemon(#209). Ruby counts no line when an endless method such asdef half(x) = x / 2runs, only itsdefline when it is defined. The boot defines it before any test runs, so the forked coverage capture never saw that line run. Coverage now also counts methods (Coverage.start(lines: true, methods: true)), and a test that calls such a method covers itsdefline. Coverage caches from earlier versions rebuild once. -
module_function :namein a reopened module insideclass << selfpromotes the method from the earlier opening (#216). Ruby treats both openings as one module, but Mutineer matched them only within one body, so it named the method#<Class:App>::M#cinstead of#<Class:App>::M.c. The two openings now match by the module's full name. A module whose name Mutineer cannot be sure of still matches only within its own body: a path such asself::XorFoo::Xwritten directly insideclass << self, a name under an anonymous class, or a module in aclass << selfinside a method or aclass_evalblock. Amodule self::Xin a block, or aself::X = ...in aclass_evalblock, matches only openings in the same block. Aself::Xlike these now also stays apart from a module of the same name outsideclass << self, where amodule_functionin that module used to promote its methods. -
A
module self::Xorclass self::Xin a block isunplaceableunder--strategy redefine(#229). In a block,selfis not always the enclosing class: inOther.class_eval doit isOther, and inFoo = Class.new doit is the new class. Mutineer gave these modules a known owner on the enclosing namespace, so redefine loaded the mutant onto a module the tests never use, and the mutant could falsely survive or scoreerror. Such a module, everything nested in it, and aself::X = ...in a block that does not build a class now have their owner unknown: redefine reports their mutants asunplaceable, and--strategy reloadstill runs them. In aData.define,Struct.new,Class.neworModule.newblock, the module is now named under the builder's constant (Outer::Foo::X#c, wasOuter::X#c), so the subject names and mutant ids of those methods change.self::Xdirectly in a class or module body is unchanged. -
--daemonworker databases start as a copy of the test database (#222). Each worker slot's SQLite database used to start fromdb/schema.rbalone. Rows the daemon wrote while it booted, in initializers or--requirefiles, were only in the base test database, so a test that read them passed in-process but failed under--daemon. On its first use, a worker database is now a copy of the base test database (schema and rows, made with the SQLite online backup API). The worker still loadsdb/schema.rbwhen the copy's schema differs from it (another schema version, or another or noschema_sha1checksum inar_internal_metadata), for example when the test database is empty, out of date, or set up with a plainload "db/schema.rb". That load drops the copied rows of the tables it defines. -
Standalone coverage capture loads the
--requirefiles (#217). A run without--bootrequires the sources and then each--require(orrequire:) file before it forks the mutants, but the coverage capture loaded only the sources. A source method that a--requirefile called while it loaded was then not seen as run at load, so its mutant was a falsesurvivedinstead ofran_at_load. The capture and the clean-suite check now load the--requirefiles after the sources. With or without--boot, the coverage cache rebuilds when one of them changes, is added, is removed, or moves in the load order. -
--daemonloads the--requirefiles (#220). The daemon booted the app but never loaded the--require(orrequire:) files, so a test that needs one failed under--daemonand passed in-process. A source method that such a file called while it loaded was also not seen as run at load, so its mutant could be a falsesurvivedinstead ofran_at_load. The daemon now loads the files after the app boots, as an in-process run does, and the daemon's coverage cache rebuilds when one of them changes. -
The release workflow publishes only stable tags (#161). Its trigger,
v*.*.*, also matches a prerelease tag such asv1.3.1-rc1, and the only guard checked that the tag matchedMutineer::VERSION. A prerelease tag could then publish the gem and move the floating major tag (v1) that Action users pin. The workflow now stops with a clear error before any publish step unless the tag is a stablevMAJOR.MINOR.PATCH. -
Coverage capture keeps to
capture_timeoutfrom start to finish. Under--bootand--daemon, a hung test file ignored the timeout and blocked the run; it is now skipped as "timed out", like a standalone capture. A process that a test started and left running could keep the result pipe open and make a boot-mode capture wait for it to exit. Each capture now runs in its own process group, and a timeout stops the whole group, not only the test process. A capture whose test finished just before the deadline could also lose its valid result and report "invalid coverage output"; it now gets a short grace period to read the result. (#101, #129) -
--daemonno longer waits forever on a daemon that stops answering (#101). A mutant whose verdict has not arrived 30 seconds after its own timeout is scorederror, and the daemon is killed and respawned, as after a crash. A boot that has not finished after 600 seconds ends the run with a message that says so (it is not retried by a second daemon), and shutdown no longer waits on a stuck daemon. -
A method in a
Data.define,Struct.new,Class.neworModule.newblock belongs to the class or module the block builds. Inclass App; Argo = Data.define(:url) do def self.load = ...; end; endthe subject is nowApp::Argo.load, notApp.load; at the top level it was.load, with no owner. Under--strategy redefine(the--railsdefault) the mutated method was loaded into the wrong class, so the real method never changed and every such mutant falsely survived. The class or module is named after the constant it is assigned to with=,||=or&&=, through parentheses orbegin, resolved as Ruby resolves the assignment:Xin the current namespace,::Xand any path at the top level fromObject,self::Xunder the current class. When it cannot be named statically (no constant, a relative path such asUser::Permissioninside a namespace, or a constant assigned inclass << self), redefine reports its mutants with a new status,unplaceable, rather than load them onto the wrong class; reload still runs them.module_function :namein aModule.newblock promotes that module's method. Mutant ids for these subjects change: regenerateignore:entries and baselines that name them. -
The automated release PR gets its required CI checks without a token secret (#85).
release-pr.ymlpushes the release branch with the defaultGITHUB_TOKEN, which starts no other workflow, so the four required checks never ran and the PR stayed blocked until a person closed and reopened it. The job now dispatchesci.ymlon the release branch (CI gained aworkflow_dispatchtrigger), and those runs report the required checks on the PR's head commit. With aRELEASE_PR_TOKENsecret set, the push triggers CI as before and no dispatch is made. -
Code that runs while the app boots or a class loads no longer gives a false
survivedorno_coverage(#187). A class body such asALL = [price(3)].freezerunspricebefore any mutant is applied. Under--strategy redefine(the--railsdefault) the load never runs again, so a test that checksALLsaw the original value and the mutant falsely survived. Under--railsor--bootno test was credited with lines that ran during boot, so those mutants were falselyno_coverage. Mutineer now reads the lines that ran at load (from the boot, or from requiring the sources in standalone capture) and reports these mutants asran_at_load, under both strategies and with--daemon: reload runs the file's class body again but not an initializer or another file's code, so a survivor there is not trusted either. Under--bootwith redefine, a lazily loaded class (Zeitwerk,autoload) is loaded before the boot lines are read, so its class body counts as load too. A baseline survivor that is nowran_at_loadis listed as fixed, not as a regression. Standalone coverage caches from earlier versions rebuild once. A one-line or endlessdefkeeps its body on thedefline, which Ruby counts when the method is defined, so Mutineer reads the method's call count at load for it instead (#209). -
A boot file that prints to stdout no longer breaks the daemon handshake (#102). Output from
puts,STDOUT,$stdout, a direct fd 1 write, or a subprocess reached the JSON channel before the ready message, so the daemon failed with "daemon exited before the handshake". The daemon now keeps a private copy of its original stdout for the protocol and points the app's stdout at stderr, where that output stays visible. -
A class or module opened inside
class << selfbelongs to the singleton class (#208). Inclass App; class << self; class Q; def q1 ...the subject wasApp::Q.q1, a class method of a constant Ruby never defines:QisApp.singleton_class::Q, andq1is an instance method. It is now#<Class:App>::Q#q1with no known owner, as is a class or module opened in a builder block there, and anything nested in either. Inside a builder block,class << selfopens the built class's singleton class, so a class or constant there is named under it, for example#<Class:App::P>::W. Under--strategy redefineloading the mutant raisedNameErrorand scorederror; redefine now reports these mutants asunplaceable, and reload still runs them. A compactclass Foo::Xand a top-levelclass ::Xor::X = Class.new dothere are named as written (::XasX, now with instance methods) and are owner-unknown too: redefine reopens them without the singleton class, so constants their bodies look up through it would not resolve.module_function :namein a body whose owner is unknown now promotes that body's own methods, wherever it is: aFoo::X = Module.newblock'scisFoo::X.c, notFoo::X#c, and a def in an anonymousClass.newblock is no longer promoted by amodule_functionof the module around it. Mutant ids for these subjects change: regenerateignore:entries and baselines that name them.
1.5.0 - 2026-10-06
Added
-
--timeout SECONDSand--capture-timeout SECONDS, alsotimeout:andcapture_timeout:in.mutineer.yml. They set the in-process per-mutant time limit (default 10s) and the coverage-capture time limit (default 120s), which were fixed. On a large Rails suite the clean run of the unmutated tests took longer than 120s, so every run that offered the whole suite stopped as not green, and a mutant on a line many tests cover took longer than 10s and was scoredtimeout.--daemonkeeps its own per-mutant limit but uses--capture-timeoutfor its coverage capture;--test-commanduses neither. Either backend warns about a limit it was given and does not use. -
--cache-dir DIR, alsocache_dir:in.mutineer.yml, sets where the coverage cache is written (default.mutineer, as before). Two runs from the same project root shared.mutineer/coverage.jsonand could overwrite each other's map; each can now have its own directory.--daemonuses it too. A blank value (an unset CI variable) exits 2 rather than writing the cache into the project root. -
The README states how timeouts affect the score (#62): a timed-out mutant is left out of the score, and counts as a mutant with no verdict under
--threshold. -
--matrixreports which tests kill each mutant (matrix: truein.mutineer.yml). Each mutant runs every test in its covering files instead of stopping at the first failure, and the child sends each test's outcome to the parent as it is recorded. The report names blind tests, which ran in a complete row and killed no mutant, and redundant tests, whose every kill another test also makes. Redundancy is judged one test at a time, so delete redundant tests one at a time. The human report lists up to 20 of each, the HTML report all of them, and the JSON report moves to schema1.5with amatrixblock that appears only with the flag. A test is its file and its id (the example id under RSpec), so examples that share a description stay apart and an example whose generated description changes with the mutant stays one test. Verdicts, the score and the exit code do not change: each mutant gets the verdict a run without the flag gives. After a serial test fails, an exit, a crash or the timeout in a later test, class or group leaves itkilled; an end in the code that run still reaches (the failing test's class wrapper or group hooks, the suite's own cleanup) and a failure in aparallelize_me!class keep the exit status. A row is complete only when the child's stream arrived in order and every test reported (under Minitest the recorder saw every test, under RSpec every planned example), so a caughtInterruptleaves it incomplete. The human report names up to 20 incomplete rows and the HTML and JSON reports all of them; the human and HTML reports warn not to delete a blind test until its rows are complete. Minitest and RSpec 3.3+ are supported, on the in-process backend only;--daemon,--test-command,--fail-fastand--dry-runexit 2 with it.--no-matrixand--no-fail-fastbeat the matching.mutineer.ymlkey, so a file that sets one can still run with a flag that conflicts with it. -
no_coverage[]anduncapturable[]name each mutant. Every entry in the JSON report now hasoperator,tokenandid, asignored[]has, so mutants on one line can be told apart and anidcan go inignore:. The entries are sorted by(file, line, operator, id).schema_versionis1.6. -
The site and README explain "clean-room" and compare Mutineer with Mutant, and the landing page hero has a one-minute explainer video. It plays at 55% volume while in view (not with reduced motion; muted until the first click or key where the browser requires it), pauses when it scrolls away or the tab is hidden, and has an Enlarge button.
Changed
- The human report has a
Timeout:row, and the score line lists timeouts apart from errored mutants. Before, theErrored:row and the score line added the two together, while the JSON report kept them apart. The HTML summary now shows atimeoutcount apart fromerroredtoo. - A test file given as a source after
--testexits 2.--testtakes one file, so inmutineer run app/x.rb --test spec/a_spec.rb spec/b_spec.rbthe second spec became a source to mutate, and the run tested with one spec file without a word. Now a source named*_test.rbor*_spec.rbinside atest/orspec/directory, given with--test, is a usage error that says to repeat--test. The usage line now reads--test <test> [--test <test>...].
Fixed
-
The RSpec runner keeps what gems configured before the run. It called
RSpec.reset, which drops the whole configuration. Underrails: true, a--bootfile orrequire:, the app's gems load first, so a setting such as rspec-retry'sverbose_retrywas gone, and a support file that set it raisedNoMethodError. The run stopped with "the unmutated suite is not green". The runner now callsRSpec.clear_examples, which keeps the configuration. Hooks that gems added now apply too: an example with rspec-retry'sretry: 3runs up to 3 times per mutant, as underrspec. -
--sinceno longer scores a file that Git ignores (#168). A file outside the index is scored in full, so a new file is not missed. That check also caught files that Git ignores on purpose (.gitignore,.git/info/excludeor the global excludes file), such as generated code inside a directory run. Those files now get no mutants under--since, and a warning names each one. Other untracked files are still scored in full, and so is a file when Git cannot tell, such as one beyond a symlink or inside a submodule. -
The human report escapes control characters from the source (#163). A surviving line that held a terminal control byte (for example ESC) was printed as that byte, so it could change what the terminal showed. The token, the replacement, the diff lines, method names, file paths and the kill matrix's test names now print each control character except tab as its Ruby escape (
\e), and a byte that is not valid UTF-8 (a Latin-1 source) as\xNN. The JSON and HTML reports already escaped text and do not change. -
One edit on a line is scored once (#159). Some opt-in operators emitted two mutants that give the same source:
literal_mutationon0(the "change to 1" and "add 1" rules),negation_removalon!!x(either!removed), andchain_linkoroperand_removalon a repeated part such asa.b.b.corx || x. Each copy had its own id, so one surviving edit counted twice. Now only the first copy on a line runs. Copies that start on different lines (a multi-line chain) both stay, so--sincenever loses the edit. Ids are assigned before the copy is dropped, so every kept mutant keeps its id, and the dropped copy's id simply stops appearing. Default runs do not change. If you use these operators with--baseline, regenerate the baseline after upgrading: the score can move with no code change, and in a full (unscoped) comparison a dropped copy that survived is listed as fixed. An ignore entry for one copy's id still ignores only that copy; the other copy still runs. -
# mutineer:disable-lineinside a string no longer silences a line (#158). The marker was found with a text search, so a string such as"# mutineer:disable-line"ignored every mutant on its line and left them out of the score. Only a real#comment counts now. A heredoc or regex that holds the text is ignored too. -
./lib/x.rband an absolute path pair with a test (#104). Auto-pairing found the test forlib/calc.rbbut not for./lib/calc.rbor the absolute path to the same file. It reported "no test found by convention" and exited 2. A file argument inside the project is now made relative to the project root first, so equivalent spellings (./,.., absolute) pair with the same test and run once. A symlink keeps its own name, so it stays a separate source from its target. Reports show that root-relative path. A path outside the project stays as typed. -
A mutant on another line of a multi-line statement runs its tests instead of being reported as
no_coverage. Ruby counts one line of a statement only. When the mutant's own line has no count, the runner now uses the tests that ran the statement that holds the mutation. A heredoc body belongs to its statement. This fallback skips a first or last line that also holds other code, such as thedefline, and the body ofx while candx until c. It also gives no tests to a mutant in code of the statement that runs only sometimes: awhenorincondition, arescueclass list, a parameter default, the rescue side ofx rescue y, the value of||=or&&=, the operand ofdefined?, the right side ofa ||ora &&, a branch ofx if c,x unless c, a ternary orelse, the pattern ofv in porv => p, an argument or block ofx&.m(...), and the value ofx&.m += v. Those mutants stayno_coverage, as before. -
A survivor diff for a multi-line mutant applies with
git apply(#106). The JSONdiffheader always read@@ -N +N @@, even when the mutant removed two lines and added one, sogit applyrejected the patch as corrupt. The header now carries each side's line count (@@ -3,2 +3 @@). A one-line diff keeps its old header. A mutant that empties a line now shows that empty line as a+line. A side whose last line has no final newline gets\ No newline at end of file. Lines of a CRLF file now keep their\r, so the patch applies to that file. -
Split test files pair with their source (#87). A source such as
app/foo/bar.rbnow also usestest/foo/bar_upsert_test.rbandtest/foo/bar_guards_test.rb, together withtest/foo/bar_test.rbwhen that file exists. The same names undertest/lib/pair with alib/source. Before, only the exactbar_test.rbname was tried, so a suite split acrossbar_*_test.rbfiles was skipped and a gate could pass with no mutants run. A spec the old rules already find is unchanged. The split name is left foruser_session.rbwhen that file exists, souser.rbdoes not runuser_session_test.rb. The same rule holds outsideapp/andlib/:src/user.rbdoes not taketest/src/user_session_test.rbwhensrc/user_session.rbexists. A longer source claims a split file only when that source itself searches the directory the file is in. A failed capture oftest/foo/bar_upsert_test.rbcan markapp/foo/bar.rbuncapturable only when no successful capture covered that source andbar_upsert.rbdoes not exist. A test outside that directory does not, and neither does a source that only shares the test basename.user_session__test.rbstays withuser.rbwhenuser_session.rbexists, because that name is not the exact test or a split test foruser_session. A failed exact spec in the mirroredspec/orspec/lib/directory marks anapp/orlib/source the same way. A failed spec in another directory does not. A project rooted at/still finds split tests inside that root. A stored failure keeps the pairing from the moment it was checked. Adding or deleting a longer source rebuilds the coverage map, so that failure is not moved onto the shorter source. -
A blank
operatorskey no longer runs zero mutants and exits 0 (#167).operators:with no value became an empty list. The run made no mutants and the gate passed. A blank operator list is now an error, and so is a list of only unknown operator names. An emptyrequireorignorelist is still valid.--operatorson the command line still replaces the file list, including a blank or unknown file list. -
The daemon no longer runs the tool's Ruby settings inside the app (#100). Open3 keeps a variable when the spawn hash omits it, so a parent
RUBYOPTran inside the app. The child now gets the environment Bundler saved before it activated, passed withunsetenv_others. The app keeps its gem home, excluded groups, Bundler config, and chruby path. AnRBENV_VERSIONorASDF_RUBY_VERSIONalready in the environment stays. That pin is often the Ruby that started the tool..ruby-versionapplies only when no pin is set. The tool'sRUBYOPTandRUBYLIBdo not reach the child, including a value Bundler had saved. A gem home,BUNDLE_PATH, orBUNDLE_WITHOUTreaches the child only when Bundler saved the app's value. The same rule coversGEM_PATHandBUNDLER_VERSION. An rbenv version bin underRBENV_ROOT, or under~/.rbenvwhen that variable is unset, leavesPATHonly when that root has a shim directory. An asdf version bin leaves only when an asdf shim directory exists, includingASDF_DATA_DIR/shims. Without that shim, the bin stays andbundlecan still be found. The app Gemfile, an explicit Ruby pin, and Rails env are applied after that. -
The Action refuses to run when
outputandbaselineare the same file (#160). That setup used to work, and a failing run copied its report onto the baseline. The next run then treated the failed report as the baseline, so the gate could pass. The Action now stops before the run and exits 2. The baseline may come from thebaselineinput, from--baselineinextra-args, or from.mutineer.yml. A numeric path such as123is read the same way as the CLI. Write the report to a separate path. Copy that file onto the baseline in a later step, and only when this step exits 0. You can also refresh the baseline with the CLI, and keep the file only when the run exits 0. The next release moves thev1tag, so workflows on@v1get this refusal then. -
A mutation no longer leaves a heredoc body behind as Ruby (#134). Replacing a node deletes the heredoc opener and not the body. The body then parses as code, raises, and counts as a kill. A mutation that drops the opener is skipped. A replacement that still contains the opener stays.
-
A bare
public,privateorprotectedendsmodule_functionmode, so laterdefs in the module body are named as instance methods, not singleton methods (#144). -
Turning on reduced motion mid-visit finishes the landing page count-ups, so no number keeps changing after the visitor asks for less motion (#176).
-
rake site:buildcan no longer delete a directory such aslib/or.git(#162). The task removed the destination it was given, and only refused the checkout, its parents anddocs/. It now always builds into_site/at the checkout root, andrake "site:build[DEST]"andSITE_BUILD_DESTare gone. -
Documentation matches the 1.4 behavior. Config examples use supported keys, agent loops check the exit code and a real score, and report totals explain partial
--fail-fastruns. The README lists every config key and its validation rules. API README links work outside GitHub, repeated changelog headings have unique anchors, and the website checks validate built links and anchors. Mutant-id wording and the gem's Minitest/RSpec description are also corrected. -
A mutant in a nested method counts once (#157). A
definside another method is a subject of its own, but most operators also mutated its code on the outer method. The same edit then counted twice in the score, with two ids. Every operator now skips a nesteddefwhen it mutates the outer method. Adefinsideclass << obj, whereobjis notself, is not a subject, so the outer method still mutates its code.array_literal,chain_link,condition_true,condition_false,operand_removal,operator_assignmentandreturn_nilskipped that code before. Their new mutants there can show as new survivors against a baseline.A mutant id includes an ordinal among the mutants with the same operator and token in a subject. When the duplicates leave the outer method, the ordinals of its own mutants change. An old duplicate id can then name a different mutant on the outer method, and an
ignore:entry or a baseline entry with that id applies to that mutant with no warning. If your code has nested methods, regenerate theignore:entries and the baseline for the outer methods.Under
--strategy redefine(the--railsdefault), a mutant in a nested method can survive or error even when a test would catch it.redefineloads only the inner method, and a call to the outer method defines the original inner method again. Before, the copy of the edit on the outer method was killed. Now each edit has one verdict, from the inner method.
1.4.0 - 2026-09-30
Added
- Condition-forcing operators (Tier-2, opt-in via
--operators):condition_trueandcondition_falsereplace anif/elsif/unless, ternary, modifier orcase/inguard condition with(true)or(false), so its branch always runs or never runs. A surviving mutant means no selected test detected the forced condition. A literal condition, also in parentheses, makes no mutant: forcing it changes nothing or repeats theboolean_literalflip. A condition that holds a heredoc makes no mutant. A condition that assigns a variable keeps its code, and only its value is forced ((m = x; true)), so later code still sees the variable. The never-runs side of an else-less conditional can be the same program as thenilthatstatement_removalorreturn_nilputs in its place; it is still made, so these mutants and their ids do not depend on which other operators run. - Operator-assignment operator (Tier-2, opt-in via
--operators):operator_assignmentswaps the operator of a compound assignment:+=<->-=,*=<->/=, and%=and**=->*=. It covers local, instance, class and global variables, constants, calls (a.b += 1) and index calls (a[i] += 1). Thearithmeticoperator never sees these forms, because Prism does not parse them as calls. The operator does not change||=,&&=, or the bitwise and shift forms (|=,<<=).
Fixed
- A typed
--rails,--verboseor--debugbeatsrails: falseandverbose: falsein.mutineer.yml(#103). The flag was dropped, so the run went on without Rails boot or verbose output. The config layers now keep only the keys the user wrote, and "did the user write this" comes from those keys, not from a hand-kept list. framework: rspecin.mutineer.ymlsurvives test pairing (#103). Pairing re-detected the framework from the test file names, so an RSpec suite intest/calc_test.rbran under Minitest.- A bad number is an error, not a rounded value (#105).
--jobs 1.9and--baseline-epsilon abcno longer become1and0.0. One option schema parses each value once, where it enters, for both the command line and.mutineer.yml. --sincekeeps a source file that git does not track yet (#156). Before, such a file counted as unchanged. The run scored no mutants, and a positive--thresholdstill exited 0. The file is now new in full, so all its mutants run.
Changed
- These now exit 2 with a message that names the option:
jobs: 1.9orjobs: truein.mutineer.yml(before:1, or a crash); a bad, negative or non-finite--baseline-epsilon(before:0.0); a boolean key in.mutineer.ymlthat is nottrueorfalse, such as the string"yes"(before:false). --jobstakes plain digits only.0x2,+2," 2"and1_0exit 2. Before,Integer()read them as 2, 2, 2 and 10.--thresholdand--baseline-epsilontake a plain decimal, such as2or2.5, from a string.0x10,+2,1_0and1e2exit 2. Before,Float()read them as 16.0, 2.0, 10.0 and 100.0.- A string option that gets
true,falseor no value exits 2, such asonly: falseorbaseline:in.mutineer.yml. A blanksincealso exits 2, in the file and on the command line, so an unset shell variable does not turn scoping off.since: falsestill means no scoping. - Config file errors start with the file and key, for example
.mutineer.yml: threshold must be a number between 0 and 100, where they started with--threshold. - The docs site is built in CI — a Pages workflow runs
rake site:buildand deploys the result, so the YARD HTML under/api/,llms-full.txt,json-schema.htmlandsitemap.xmlare no longer committed. CI checks that the site builds, in place ofrake yard:pages:check. The site keeps its URLs (#153).
1.3.0 - 2026-09-29
Changed
-
Mutant ids now include the project-relative file path (#126). Before, two
mutants with the same method name, operator and token in different files got
the same id. That happened with a top-level
defor block in two files, and with a class reopened in another file. Oneignore:entry then suppressed both mutants, and--baselinecould hide a new survivor behind an old one.- Every survivor id changes once in this release. This affects any external tool that tracks survivors by id.
- Moving or renaming a file now changes its ids.
- Ids follow the project root: the directory mutineer runs from, or the
Action's
working-directory. A run from a different root gives different ids. mutineer finds.mutineer.ymlby walking up, so a run from a subdirectory prints one[mutineer]warning that the loaded ignore ids will not match. - A source outside the project root uses its absolute path, so its ids differ between machines.
- Two methods with the same qualified name in one file (for example two
top-level
def indexin two DSL blocks) now get different ids. The second and later ones hash their position among those methods; the first keeps its id.
- The JSON report marks its id format (schema
1.4, additive).summary.id_formatis2for ids that include the file path.summary.legacy_id_matchescounts old-formatignore:entries (ignore) and survivors matched only through an old-format baseline id (baseline). The GitHub Action shows one warning annotation when either count is not zero.
Deprecated
- Old-format ids in
ignore:and in baselines. Matching on them is removed in 2.0. Replace each oldignore:entry with the new ids from the warning (only the intended ones when it over-matched several mutants). Regenerate a baseline (--format json) only after every gate that reads it runs this version or later (the Action'sversion:pin, your CIGemfile.lock). An older version treats every new-format survivor as new.
Fixed
module_function :nameandmodule_function def namepromote only their own module's methods — a class or module in the same file with a method of the same name kept an instance method in Ruby, but mutineer named it as a class method.--strategy redefinethen mutated a method the tests never call, so a killable mutant falsely survived, and--only Class#nameselected nothing (#98). The affected methods now get their correct names, so their mutant ids change: regenerate any ignore entries or baseline survivors that pointed at them.- A root-anchored reopening names the top-level constant — a
module ::Rootorclass ::Solowritten inside another module now givesRootandSolo, notOuter::RootandOuter::Solo. This applies to every method in such a body, with or withoutmodule_function, so their mutant ids change too.--strategy redefinerebuilds such a body's scope as written (module Outerthenclass ::Solo), so a constant fromOuterstill resolves in the mutated method, as it does underreload. Before, the method raised NameError in the test, which counted as a false kill (#145). - Old-format ids keep working, with a warning (#126). An old-format
ignore:entry still suppresses the mutants it matched before. The run prints one[mutineer]warning per entry with each new id, its file and its method. When the entry matched several mutants (in different files, or same-named methods in one file), the warning says it over-matched and to keep only the ids for the mutant you meant to ignore. A--baselinefile withoutsummary.id_formatmatches on new ids, or on old ids from the same file, so no survivor reads as new or fixed only because its id changed. A stored file outside the project root (a baseline written on another machine) matches on the old id alone. The run prints one[mutineer]warning to regenerate the baseline.
1.2.0 - 2026-09-28
Added
- Operand-removal operator (Tier-2, opt-in via
--operators):operand_removalreplacesa && bwith(a)and with(b), and does the same for||,andandor. The mutant survives when no test needs the operand that the mutant removes. The operator never keeps a jump operand (return,break,next,redo,retry) alone, because a jump does not parse in a value context. It never removes an operand that holds a heredoc, because the heredoc body stays behind as code. It skips nested method definitions, because mutineer mutates each one as its own method. - Array-literal operator (Tier-2, opt-in via
--operators):array_literalreplaces a non-empty array literal, such as[a, b]or%i[a b], with[]. The mutant survives when no test checks the contents of the array. The operator skips an implicit array (x = 1, 2), an array that holds a heredoc, and nested method definitions. - Sources also pair with Minitest's
test/**/test_*.rbfiles — after the_test.rbforms, so existing projects pair as before.lib/helper.rbdoes not pair with thetest/test_helper.rbsupport file. A failed capture of atest_<name>.rbfile now marks<name>.rbuncapturable, as<name>_test.rbdoes (#120). Withoutframework:set, a source withspec/<name>_spec.rbandtest/test_<name>.rbbut no<name>_test.rbnow pairs with the Minitest file, as the "Minitest first" order says.
Fixed
reloadloads the mutant by an absolute path — a relative source path gave the mutant relative backtrace paths, so code that checks its own frames by absolute path failed for every mutant, a false kill (#123).require "test_helper"works withoutRUBYOPT— a standalone run putslib, then each test file'stest_helper.rbdirectory, on the load path, as boot mode andrake testdo. A run where no test records coverage because captures failed now exits 1 instead of reporting N/A (#119).- A disable-line marker warns about an operator it does not know — a
reason written without
--became part of the operator name, so the marker suppressed nothing and said nothing (#124). A marker followed only by spaces or commas, such asdisable-line -- why, now disables the whole line. - Coverage capture and the clean check run each source once — they read
sources with
load, so a test's ownrequireran them again: aStructsuperclass raisedsuperclass mismatch, and load-time code ran twice (#122). A mutant of such a class still errors under--strategy reload, which loads the mutated file again;--strategy redefineruns it. Code that guards itself to run once (unless defined?(X)) can now show as covered, so its mutants run where they wereno_coveragebefore. - A red unmutated suite now shows why it failed — in a standalone run, the
Minitest summary or RSpec output of the failing test, with its failure
message, goes to stderr before the "not green" error. A passing run prints
nothing extra. Boot mode (
--rails,--boot) is unchanged (#121).
1.1.0 - 2026-09-28
Added
- Safe-navigation operator (Tier-2, opt-in via
--operators):safe_navigationreplaces&.with.. The mutant survives when no test passesnilto the call. - Range operator (Tier-2, opt-in via
--operators):rangereplaces..with...and...with... The..->...mutant survives when no test checks the last element of the range. Endless ranges (1..) are skipped, because(1..)and(1...)give the same result for slicing,include?,===and pattern matching. - Negation-removal operator (Tier-2, opt-in via
--operators):negation_removalremoves the!from!xand thenotfromnot x. The mutant survives when no test depends on the negated value. The explicit formx.!is skipped, becausex.does not parse.
Changed
- Stderr of tests and specs is visible in the in-process and
--daemonruns. Mutineer silences stdout once per child process and no longer hides stderr, so its own child diagnostics always reach you.--test-commandruns still capture stderr with stdout and show it under--verbose. - A mutant's test run stops at the first failing test — one failure
already kills the mutant, so the forked child does not run the tests that
remain. Killed mutants cost less time, and survived mutants cost the same.
Under Minitest, when the outer reporter of the run records a failure or an
error (a skip does not count), each remaining test and each remaining test
class returns before it starts. A skipped class does not start its
class-level hooks. The run does not unwind: a class that is running
finishes normally, so its
after_allhooks and a class-leveltransaction { super; raise ActiveRecord::Rollback }still run. RSpec runs with--fail-fast. This applies to the in-process backend only: coverage capture and the clean checks still run every test, and the--daemonand--test-commandbackends do not change. The CLI--fail-fastflag keeps its meaning. On rack'slib/rack/utils.rb(--jobs 1), a full run takes about 35–41 s instead of about 86–89 s. With the same coverage map, the verdicts are the same. - The mutant run uses a fixed Minitest seed — with the stop, the test
order can decide the verdict, so the child runs Minitest with seed
1unless the environment setsSEED. The same code then gives the same verdict on each run. Coverage capture and the clean checks keep the random seed, so the clean check runs the tests in a random order while each mutant run uses the fixed order. RSpec keeps its configured order: a suite configured withconfig.order = :randomcan still get a different verdict on each run for the case below. In an order-dependent Minitest suite, the fixed seed makes a falsekilledhappen on every run or on no run, not on some runs. - A mutant whose failing test runs before a hanging test is now
killed, nottimeout— the run stops at the failure, before the hang. The tests did detect the mutation, sokilledis the correct verdict. If the hanging test runs first in the fixed order, the verdict staystimeout. Compared with a baseline from an earlier version, the score usually goes up. In an order-dependent suite it can also go down: a mutant that a random order killed on some runs can survive on every run in the fixed order. A change to the tests can change the fixed order, so a later run can move such a mutant fromkilledtotimeout, and a--baselinegate then reports a score drop. - Some runs still run most tests — Minitest
parallelize_me!, and Railsparallelizeabove its threshold (by default more than 50 tests in the child, or at any test count whenPARALLEL_WORKERSis 2 or more in the environment), queue their tests before the first result comes back, so the queued tests still run. The verdict is the same as before. Below the Rails threshold, the tests run one after the other in the child, and the stop works.
Fixed
- Tests that reopen
$stdout(Minitest'scapture_subprocess_io, RSpec'sto_stdout_from_any_process) no longer make a green suite "not green" or count as false kills. - Test or source files that print while they load no longer make coverage
capture fail with
invalid coverage output. The capture subprocess now sends its result over a separate pipe, not over stdout. - Chain-link operator (Tier-2, opt-in via
--operators):chain_linkdrops one call from a chain, with its arguments and block (user.account.name->user.name). The mutant survives when no test tells the chain apart from the same chain without that step. Conversions and copies (to_s,to_a,dup,freeze, ...) andneware never dropped.
1.0.2 - 2026-09-21
Added
- AI-readable docs wiring: HTML pages with Markdown twins now advertise
rel="alternate" type="text/markdown",index.mdis the landing/CLI essentials twin,skill.mdis listed under Optional inllms.txt, andsitemap.xmlis generated from the same catalog asllms.txt(#91). - Single-source CLI contract: exit codes and
--thresholdlive indocs/fragments/contract.yml;rake docs:generatewritesllms-full.txt,json-schema.html, and the marked copies so they cannot drift (#82). - YARD API on Pages: the current gem's YARD HTML is published at
/api/, linked from the docs site, andrake yard:pages:checkkeeps it from lagging the shipped sources.documentation_uristays the Pages root (#92).
1.0.1 - 2026-09-18
Added
- RubyGems
documentation_uri: the published gem now points at the docs site (https://davidteren.github.io/mutineer/) so gem-page discovery reaches the Pages docs (#90).
Fixed
- A red unmutated suite can no longer pass a mutation gate — coverage capture now keeps the original Minitest/RSpec result, and a failing clean run aborts with the existing smoke-check error (exit 1) instead of scoring those assertion failures as killed mutants. A warm coverage cache re-checks the current suite and cannot bypass this (#96).
- Concurrent external runs no longer restore each other's source files — swap and orphan recovery share one exclusive OS lock per source, acquired before reading or healing. A live owner's mutant and backup stay intact; a dead owner's backup still restores the original bytes (#99).
- Coverage cache now invalidates when a required test helper changes — a successful map records fingerprints of project-local loaded Ruby files, old cache entries without that data rebuild, and a helper-only edit no longer hides a new survivor behind a stale 100% score (#97).
- Release version calculation ignores floating major tags —
release-pr.ymlselects the newest completevMAJOR.MINOR.PATCHancestor and validates the next version before writing files, so a laterv1tag can no longer producev1..1(#95).
1.0.0 - 2026-09-08
The GitHub Action's PR default changes in this release, which is why it is a
new major: workflows pinned to davidteren/mutineer@v0 keep the old full-scan
behavior; upgrading to @v1 opts into diff-scoped PR runs (details under
Changed).
Added
- The Action reports where CI readers look: with the default JSON format it
writes a score/pass-fail table (plus the baseline delta, when
baselineis set) to the job step summary, and emits onefile=…,line=…annotation per surviving mutant (up to 50; the summary lists the first 20, the full set stays in the JSON report) so results land on the PR diff instead of only in a collapsed log group —errorlevel when the gate failed,warningwhen it passed. Whenoutputis unset the JSON report is routed to a temp file and still printed to the log, and thereportoutput now exposes the report path in both cases so a later step can consume the JSON without scraping the log (#86). - Progress during the run: every backend prints
[mutineer] N/M mutants (P%)to stderr at each 10% step, so a long run is never silent between config resolution and the report. Stdout stays byte-exact for--format jsonand--output.WorkerPool#rungains an optionalon_result:callback for this (called in the parent per reaped result) (#86).
Changed
- PR runs scope themselves in the GitHub Action: on
pull_requestevents thesinceinput now defaults to the PR base, so the action grades just the diff out of the box. Migration note (the reason for the major bump): a PR gate that previously full-scanned now scores only the PR's changed lines, sothresholdapplies to fewer mutants. Stay on@v0to keep the old default, or passsince: noneon@v1for full scans. Workflows that already pass a non-emptysinceare unchanged (an explicit empty string is indistinguishable from unset and picks up the new default). A PR with no changed source lines (docs- or test-only) scores zero mutants and passes the scoped gate vacuously; keep a full-scan baseline refresh on main as the backstop. Withuse-bundler: truethe caller's Gemfile picks the gem, and the new default needs mutineer >= 1.0.0 (the action enforces the floor with a clear error). The action scopes to the PR's exact base commit from the event payload (immune to the base branch advancing mid-job), falling back to a fresh fetch of the base branch tip; when neither can be resolved it warns and runs without an action-provided--since(a.mutineer.ymlsince:key, if any, still applies). The default deliberately does NOT fire onpull_request_target: checkout there defaults to the base branch, so auto-scoping would diff the base against itself and green the gate on an empty run (#86). --baselineon a diff-scoped run gates on new survivors only: a--sincerun's score covers only the changed-line mutants, a different denominator from a full-run baseline, so comparing the two scores manufactured false regressions (a 3/4-mutant PR at 75% "dropped" from a 92% whole-repo baseline with zero new survivors). With--since, the score-drop half of the baseline gate is skipped; new-survivor detection by stable id (and the reported before/after scores) are unchanged. The JSON report records the scope in a new additivesummary.scopedkey (schema_version1.3), and thebaselineblock recordsscore_comparableso a consumer knows when not to render the two scores as a comparison (fixed_survivorsis likewise empty under a scoped side: an out-of-scope survivor was never re-tested, so absence does not mean fixed). The reverse direction is a hard guard: a scoped report is refused as a baseline (exit 2 with a regenerate hint), because survivors outside its diff would all read as new regressions. A new--no-sinceflag disables diff scoping explicitly: a typed no beats a.mutineer.ymlsince:key, and the action'ssince: nonepasses it through (#86).
0.11.4 - 2026-07-29
Fixed
--thresholdnow gates on the run being complete, not just its score — a score iskilled / (killed + survived), so mutants that error, time out or come back uncapturable are excluded from the denominator: a broken harness raised the score instead of lowering it. Ninety errored mutants and ten that ran (nine killed) reported 90% and exited 0, so CI could not tell a complete run from a mostly-broken one. Past 10% of attempted mutants producing no verdict, a positive--thresholdnow exits 1 whatever the score, and the report says which states broke, on every--format. A single bad mutant never trips it, however small the run, so a--sincePR with a handful of mutants keeps its flake tolerance (#78).
Added
no_verdict[]in the JSON report (schema_version1.2) — every attempted mutant that produced no verdict, with itsstatusand, where there is one, thedetailsexplaining the cause.Result#detailswas built and rendered in no format at all, so a daemon crash reached the user as nothing but a larger errored count.summarygainsattemptedandno_verdict, the two figures the completeness gate is computed from (#78).
0.11.3 - 2026-07-29
Fixed
- Nothing to mutate now costs nothing —
--sincematching no changed line (a docs-only PR, which README documents--since origin/<base>for) still did the expensive part before discovering there was no work:--daemonbooted the app once for the coverage map and again for every--jobsworker, and--test-commandran the whole suite for a smoke check that calibrates a timeout no mutant would use. Both backends now return as soon as the job list is empty. The in-process path is unchanged: it boots before collecting jobs, so it cannot know the list is empty yet. One consequence worth stating: a zero-job--daemonrun no longer boots the app, so an app that fails to boot now exits 0 (nothing to do) instead of exit 1 (#76). - A dead daemon ends the run instead of scoring the rest against it — a
daemon that dies while running one mutant was already handled:
DaemonClientrespawns and answerserrorfor that mutant. But a daemon that could not come back was not.restart!closes the pipes before respawning, so if the respawn failed at the OS level (EMFILEorENOMEMunder--jobs N,ENOENTwhenbundledoes not resolve) the client was left permanently dead while raising errors that read as ordinary per-mutant failures. Every remaining mutant scorederroragainst nothing, and Mutineer printed a mutation score built on the fraction of mutants that ran before the daemon died.DaemonClientnow raisesDaemonBootErrorwhenever it is gone for good — a refused spawn, a failed boot handshake on respawn, closed pipes, orMAX_RESTARTScrashes — and the CLI reports it as a message and exit 1 rather than a backtrace. Under--jobs Nthe remaining queue is dropped so sibling workers stop too. Errored mutants still cannot fail the--thresholdgate once any mutant is scored (#78).
Changed
- Daemon orchestration split out of
Runner— the persistent-daemon backend (job fan-out, worker DBs, coverage-map build, boot config, verdict mapping) now lives inMutineer::DaemonBackend.Runnerkeeps job collection, coverage selection and the single in-process mutant run, and drops from 662 to 439 lines. The external backend's orchestration stays onRunnerfor now, so the two backends are not yet symmetrical. No CLI or behaviour change (#58). Internal-only removals:Runner.execute_daemon,Runner.daemon_coverage_mapandRunner::DAEMON_TIMEOUTno longer exist. They were never documented — the supported programmatic contract is the JSON report, the stable mutant ids and the exit codes — so only code callingRunnerinternals directly is affected. - Comment diet on orchestration files — present-tense YARD contracts; drop ticket/phase/KTD history tags from runner, CLI, daemon pair, coverage map, reporter, result, and related modules. Safety and score invariants kept (#57).
0.11.2 - 2026-07-24
Fixed
--test-commandunder version managers — scrub Mutineer's rbenv/asdf version bins and bundler/gem env from the child so the suite can resolve the app's Ruby via shims /.ruby-version. Smoke check prints a targeted hint onBundler::RubyVersionMismatchinstead of only blaming DB/migrations. Docs cover a wrapper recipe for stubborn setups (#32).
0.11.1 - 2026-07-23
Fixed
--daemonscore disclosure — stop claiming “no coverage narrowing / lower bound” on every run (narrowing already ships). Warn only when the coverage map is unavailable and the run falls back to the full--testset (#48).--thresholdCI fidelity — exit 1 when a positive threshold is set but the run produced only errors/timeouts/uncapturable (nil score with a broken harness) instead of silently green; pure no_coverage / all-ignored still skips the gate (#49). Non-numeric--threshold/ YAMLthresholdis a usage error (exit 2), not a silent gate-off (#51).--daemoncontracts — reject--framework rspec(exit 2); force--strategy reloadwith a clear warning when redefine was requested (daemon whole-file only) (#50). In-process--railsalways serial unless--daemon(only daemon has per-worker DB isolation) (#55).- Isolation timeout — kill the child process group and honor a clean exit
that races the deadline (not always timeout) (#52). External backend —
signal death is
error, notkilled(#53). --fail-fastis serial on the in-process path (matches daemon) so the survivor set is deterministic under any--jobs(#54).- Dry-run uses
collect_jobsso candidates match a real run (#59). - Daemon schema load once per worker (not every mutant fork) (#56).
- Nested
statement_removalvisits inner statement lists (#62). - Dead seams: remove unused
RailsWorkerDb.provision, simplify parallel daemon fail-fast branch, drop unusedvalidate_daemon!arg (#60). - Archive historical implementation spec under
docs/archive/(#61).
0.11.0 - 2026-07-02
Added
--daemonbackend — fast, parallel-safe Rails mutation testing (#26/#27 Phase 2). Boots the app once in a persistent daemon and forks per mutant (restoring shared-boot speed), and gives each parallel worker its own database so--jobs Nis safe under Rails for the first time — parallel verdicts are proven identical to serial (no fixture cross-talk). Coverage narrowing is restored on this path (each mutant runs only its covering tests; a mutant on an uncovered line isno_coverage), so the daemon score is comparable to the in-process--railsscore. Opt in with--rails --daemon(alsodaemon: truein.mutineer.yml);--daemoncan't be combined with--test-command. SQLite today (hermetic, CI-proven); Postgres per-worker provisioning is in progress (#34/#35). The gem core stays Prism + stdlib, zero runtime dependencies — worker-DB routing uses the app's own ActiveRecord.
0.10.0 - 2026-07-02
Added
--test-commandexternal backend (#27) — mutation-test apps pinned to Ruby < 3.4. Mutineer stays on ≥ 3.4 but runs your suite as a subprocess in the app's own runtime via--test-command "bundle exec rails test %{files}"(%{files}expands to the--testpaths; env is inherited). The mutant is applied on disk with crash-safe backup/restore (self-heals a hard-killed run on next startup); a smoke check aborts before scoring if the unmutated suite isn't green. This path is reload-only, serial (--jobsforced to 1), and does no coverage narrowing — so its score is an upper bound, not comparable to an in-process--railsscore (Mutineer prints this caveat). Also settable astest_command:in.mutineer.yml. Safe parallelism for this path is tracked in #26.
0.9.1 - 2026-07-01
Fixed
- Per-method uncapturable granularity (#25) — the
:uncapturabletaint was whole-file, so a method reachable only by a failed capture in an otherwise- covered file was mislabeledno_coverage. It's now attributed per method (by the method's body coverage), so only the affected method is tainted. Fully- failed files are unchanged.
0.9.0 - 2026-06-30
Added
--fail-fast(#21) — stop at the first surviving mutant; in-flight workers drain, the rest are skipped. Fast red signal for PR gates.--format html(#23) — a single self-contained HTML report (inline CSS, no external assets) with the score, per-source table, and a card per survivor (subject, file:line, operator, stable id, diff).- String, regex, and collection-method operators (#24, Tier-2, opt-in via
--operators):string_literal,regex,collection_method(map↔each,all?↔any?,first↔last,min↔max,select↔reject).
Changed
--dry-runnow honors suppression (#22) — inline# mutineer:disable-lineand.mutineer.ymlignore:entries are omitted from the preview and counted as "ignored (suppressed)", matching a real run.
0.8.0 - 2026-06-30
Fixed
- Singleton methods are now mutated (#20) —
class << selfandmodule_functionmethods were discovered but applied to the instance scope, so the mutant never ran on the singleton the caller dispatches to; every such mutant falsely survived and the file read a false 0%.module_functionmethods are now discovered as singletons, and the redefine strategy re-opensclass << selfso the mutation lands on the called method. (Scores for singleton-heavy files will rise to their true values.) - Write-heavy Rails tests are capturable again (#19) — capture/worker pipes
are
binmode: a binary Marshal payload over a text-mode pipe could raise an encoding error the child then swallowed → empty pipe → false:uncapturable. That was the root cause of the residual write-heavy failures too. A child that dies without writing now also reports how it died (exit status / signal), and--verbosealways surfaces a real reason. Verified on a real Rails app: all 6 previously-uncapturable interactors (incl. caxlsx + Google-client) now capture with real scores, 0 uncapturable.
0.7.1 - 2026-06-30
Added
- GitHub Action (
action.yml, composite) wrapping the CLI for CI — gate a PR on new survivors / score drop withsources,since,baseline,threshold, etc. Inputs are passed viaenv(no${{ }}interpolation into the run script) for command-injection safety. - Docs site (GitHub Pages) with Open Graph / Twitter Card share image; YARD doc comments across the library.
0.7.0 - 2026-06-30
Rails hardening + CI batch (issues #8–#13), all verified Rails-free.
Added
- Equivalent-mutant suppression (#10) — inline
# mutineer:disable-line [ops]and a.mutineer.ymlignore:list keyed on a stable, offset-free mutant id; suppressed mutants are excluded from the score (100% reachable). The stable id (and readable token) is emitted per survivor in JSON. - Source→test auto-pairing + multi-source runs (#11) — pass a directory or
several sources with
--testomitted; tests are inferred by convention (app/,lib/→test/…_test.rb/spec/…_spec.rb) and run under one boot, with per-source results (human + JSONper_source). --baseline <file.json>CI gating (#13) — diff against a prior run by stable id; exit 1 on new survivors or a score drop (with--baseline-epsilon), naming what regressed. Combines with--thresholdvia max exit code.--verbose/--debug(#8) — surface the real error when a fork capture fails.:uncapturablestatus (#9) — distinct fromno_coverage; reported separately ("tests failed to run" vs "genuinely uncovered"). Both excluded from the score.
Fixed
- Fork capture no longer drops fixture transactions (#8) —
reconnectskipsclear_all_connections!when a fixture transaction is open, and stops swallowing the child error; write-heavy Rails tests are mutation-testable again.
Changed
- JSON
schema_version→1.1(additive: survivorid/token,ignored,uncapturable,per_source).
0.6.2 - 2026-06-29
Fixed
--railsdefaultsRAILS_ENVtotest(#7) — an unsetRAILS_ENVbooted development, where the suite isn't loaded, so every mutant was falsely reportedno_coverage(score N/A, exit 0). An explicitRAILS_ENVis respected.--railsdefaults to--jobs 1(#12) — parallel mutant forks share one database and deadlock on transactional fixtures; explicit--jobs Nopts back into parallelism.
Added
- Tier-2 operator discoverability (#14) — the human-format run summary now lists the available opt-in tier-2 operators and how to enable them.
0.6.1 - 2026-06-29
Changed
- Removed
evalentirely — the redefine strategy nowloads the wrapped method snippet from a tempfile instead of evaluating a string. Behavior is identical (top-level load rebuilds the sameModule.nesting), but the gem no longer uses dynamic string execution, clearing supply-chain scanner flags. Zero runtime dependencies unchanged.
0.6.0 - 2026-06-28
Added
- RSpec support (#6) —
--framework rspec(or auto-detected when most--testfiles end in_spec.rb) runs RSpec suites instead of Minitest, via a pluggable test-runner abstraction. Both frameworks are loaded lazily, so Mutineer keeps zero runtime gem dependencies and works in an rspec-only project; coverage selection works for both..mutineer.ymlacceptsframework:.
Fixed
- Redefine strategy keeps compact
class A::Bas a single nesting wrapper (#5) — avoids a constant-resolution disagreement with the reload strategy.
0.5.0 - 2026-06-28
Fixed
class << selfmethods are now discovered and mutated (#3) — previously they were treated as instance methods, so the redefine strategy mis-targeted them.class << other_objblocks are skipped (not representable).- Worker pool no longer deadlocks on large results (#4) — pipes are drained
with
IO.selectand children reaped on EOF, so a result bigger than the OS pipe buffer (~64KB) can't wedge the run.
0.4.0 - 2026-06-28
Added
--since <git-ref>(#2) — mutate only the lines changed since a git ref (e.g.--since origin/main), so CI on a pull request mutation-tests just the new/changed code. Composes with coverage selection;--dry-run --sincenarrows the preview too. Unknown ref / not-a-git-repo exits 2.
0.3.0 - 2026-06-28
Added
- Coverage-guided test selection in boot mode (#1) —
--rails/--bootnow captures coverage by forking the booted app and runs only the test files that cover each mutant's line (uncovered lines reportno_coverage), instead of running every--testfile for every mutant. Cached like standalone mode.
0.2.0 - 2026-06-28
Added
- Boot mode for Rails (and any app needing its environment booted) —
--railsbootsconfig/environmentonce in the parent and forks per mutant (children inherit the booted app), defaults the strategy toredefine, and reconnects ActiveRecord in each fork for DB fork-safety.--boot FILEboots a custom entry point. Boot mode requires--testfiles and runs them for every mutant (coverage-guided selection in boot mode is future work)..mutineer.ymlacceptsboot:andrails:. - GitHub Actions CI (test suite + gem build on Ruby 3.4, ubuntu + macos).
Changed
--strategyvalues are nowreload/redefine(canonical);7a/7bremain accepted as deprecated aliases.
0.1.0 - 2026-06-28
Added
- Initial release of Mutineer — a clean-room, Prism-based mutation-testing tool for Ruby with zero runtime dependencies (Ruby ≥ 3.4).
- Mutation operators: arithmetic, comparison, boolean-connector, boolean-literal,
statement-removal (Tier 1, default); return-nil, literal-mutation,
condition-negation (Tier 2, opt-in via
--operators). - Coverage-guided test selection with a digest-keyed, auto-invalidating cache.
- Fork-isolated, parallel execution (
--jobs) with per-mutant timeouts. - Two application strategies:
reload(whole-file, default) andredefine(surgical), verified to agree on namespaced multi-statement methods. (7a/7baccepted as deprecated aliases.) run,--dry-run,--threshold,--only,--operators,--strategy,--format human|json,--output,--list-operators..mutineer.ymlconfiguration (CLI > config > default precedence).- Byte-correct source handling for multibyte (UTF-8) sources.