Soundness and the bench
A selection tool is only useful if it never hides a failure the full suite would catch. The bench
(bench/bench.py) checks that on real projects.
Method
Section titled “Method”For each repository it records a baseline, then injects one small fault at a time into a non-test source file
(operator swaps such as ==/!=, +/-, true/false, &&/||) and compares trimtest run --full with
trimtest run (the selected subset). It also injects structural faults: a deleted file, a renamed file, a broken
config and a changed build directory.
- A miss is a fault the full suite catches and the subset does not.
- Faults the full suite does not catch say nothing about selection and are reported as survived.
- A miss is re-run once; a result that flips is reported as
UNSTABLE, not a miss. - The harness requires the full suite to pass on the unmodified tree before injecting anything.
Run it yourself:
python3 bench/bench.py <chi|semver|click|ufo|logrus|collection|pathe|aho|codec|jinja|compass> [--coverage] [--mutations N] [--seed S]Results
Section titled “Results”No misses observed in the final runs across the 13 open-source repositories and one bundled fixture in the table below (Go, Rust, Python, TypeScript/Vitest, JavaScript/Jest, Java/Maven, Dart/Flutter and Swift/Objective-C). The other runners (Kotlin, Mocha, Deno, Ruby, PHP, .NET, Elixir and more) are benched on one small repository each; see the support matrix, on both the static and the recorded tier.
| Repo | Language / runner | Tier | Mean tests selected |
|---|---|---|---|
| go-chi/chi | Go | static | 100% of library mutations |
| dtolnay/semver | Rust (cargo) | static | about 75% |
| pallets/click | Python / pytest | static → recorded | 87% → 32% |
| unjs/ufo | TS / Vitest | static → recorded | about 92% → 42% |
| sirupsen/logrus | Go | static | 65% |
| dart-lang/core (collection) | Dart | static | 79% |
| unjs/pathe | TS / Vitest | recorded | 65% |
| BurntSushi/aho-corasick | Rust | recorded (cargo-llvm-cov) | 59% |
| apache/commons-codec | Java / Maven | recorded (JaCoCo) | 12% (87 test classes) |
| pallets/jinja | Python / pytest | recorded | 35% |
| kentcdodds/kcd-scripts | JS / Jest | recorded | 33% |
| apple/swift-algorithms | Swift (SwiftPM) | static | 100% (module-level) |
| bundled xcodeshop (3 test bundles) | Swift + Objective-C / xcodebuild test |
static → recorded | 60% → 30% |
| flutter/samples (compass_app) | Dart / Flutter (flutter test) |
static → recorded | 12% → 9% (25 test files) |
The static tier is sound but saves little on tightly coupled code; recording is where the savings come from. The best case is commons-codec, many small independent classes, at 12% of tests selected on average.
Caveats
Section titled “Caveats”- Samples are small (12–15 faults per repository, one repository per tier per language). No misses observed is encouraging, not a proof. Simple operator mutations under-represent faults that only show in rarely run paths.
- Single machine; selection percentages vary by seed.
- The full write-up, including every fix the bench led to, is in
bench/RESULTS.md.