Repository navigation
Wrap the test helper of every configured test path - #2
Merged
foxbenjaminfox merged 1 commit intoOct 17, 2026
Merged
Conversation
A single app that sets test_paths: in its mix.exs never loads the test/test_helper.exs Mutare wrapped, so the probe recorded nothing and every mutant ran the whole suite. The new test_paths: option names those directories; each one's helper gets the bootstrap. It defaults to ["test"]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miguelcoba
marked this pull request as ready for review
October 14, 2026 15:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1.
Problem
For a single (non-umbrella) app,
Mutare.Sandboxwraps onlytest/test_helper.exs. A project that setstest_paths:in itsmix.exs, for example["test/unit", "test/integration"], loads those directories' helpers instead, so the coverage probe never runs: it ends withcoverage dump unreadable (:enoent), and every covered mutant runs the whole suite. Kills stay correct; only test selection is lost, which on a large suite makes a run far slower.Solution
test_paths:in.mutare.exs, mirroringtest_paths:in the target'smix.exs. It defaults to["test"], so nothing changes unless it's set. Mutare reads none of the target's Mix config, so the option mirrors the setting rather than evaluatingmix.exs.Sandbox.helper_rels/3wraps<path>/test_helper.exsfor every entry. The umbrella clause is unchanged.after_suitewrites the same dump..mutare.exsreference inmix help mutare, a troubleshooting entry forcoverage dump unreadable (:enoent), and the CHANGELOG.Verification
test/test_helper.exsis created.coverage_runner_test: a project with twotest_paths:entries getsselection == :testswith the option. Without it (checked once, not committed), the same project givesselection == :suite.masteron the same machine (CompilerOptionsIntegrationTest×3,NamespaceRunnerTest,UmbrellaTest,SwapRedundancyTest). Format and Credo are clean; Dialyzer reports the sameharvest.exwarning and Dialyxir crash asmaster.test_paths:entries, using this branch as a git dependency, every covered mutant gets per-test selection instead of a whole-suite run.