Repository navigation
Speed up cargo-mutants runs - #17
Merged
Merged
Conversation
A sweep builds the fixtures at the primary pin, tokio 1.52.4, which selects the v1_49 family, so nothing a sweep runs reaches tokio_v1_52_0.rs. Every mutant in it reads as missed, and a missed mutant costs a full suite run. Exclude it with the other non-primary families, whose judge is the version matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutant's test run stops at its first failure, but nextest starts tests in binary-name order, so the verdict waits behind every suite that sorts before the one that catches it. hansei-runtime's unit tests take milliseconds yet finish around 1,500th of ~2,000: a mutant one of them catches takes 7.8 s to report on an idle 32-core host, and most of a full run under a sweep's load. Add a nextest profile for cargo-mutants that orders the suite: the minute-long seeded-fault tests first, so they do not add their whole length to a missed mutant's run; then the in-process unit tests and hansei's; then acceptance. The same mutant reports in 1.1 s. The config's test arguments are joined with any given after `--` on the command line, and nextest refuses a flag given twice; say so beside them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutant builds with the dev profile, which carries full debug info for every workspace crate. Only exegesis's and hansei's suites read any, from their own binaries, and CI's profile keeps it for exactly those two. Build with it: a mutant in hansei-runtime rebuilds in 2.95 s instead of 3.35 s, and the optimized exegesis and hansei-bundle re-extract faster for a mutant in either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_package judges every mutant with all eight crates' suites, but only the mutated crate's suite and those of the crates depending on it can see a mutant: nothing else links it or runs a binary built from it. Say so beside the list, which `--test-package` on the command line replaces; a hansei-runtime sweep judged that way runs 999 tests per mutant instead of 1,957. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutation run goes on the Linux host under a systemd-run scope, with the host's own C library. The Linux goldens are the test image's rendering, and the cores show the C library's frames, so 22 offline command goldens differ there and the unmutated baseline fails before any mutant runs. Run cargo mutants through in-image.sh instead. The image already carries cargo-mutants, and the script sets the caps the scope did: 16 GiB of address space per process and 48 GiB for the container. The container sees only the checkout, so the diff an --in-diff run reads moves there, as the ignored mutants.diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutation sweep over the tokio, toolchain and reqwest review work leaves six survivors. Two are behavior no test reads. Releases::range_for names a version in a minor no span reads, between spans of other minors, against the span below it; no test places such a version, so naming the topmost span instead goes unnoticed. An EndOfAny walk root carries the note of the parent that bound; no test reads it, so dropping it, or attaching an empty note where there is none, goes unnoticed. Test both. The other four change nothing observable: Releases::select and range_for compare against a floor or a ceiling only for a version no span holds, which can never equal one, and absent_here already returns an empty Vec. Exclude them, with the reasons beside them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Misc changes to make running
cargo-mutantsa bit faster