fix(just): p12-night counts a mutation run with survivors as finished, not failed
cargo-mutants exits 2 when mutants were missed and 3 when some timed out.
The runner treated every non-zero exit as a failure, and a failed step
starts fresh, so a crate with even one equivalent mutant would have been
mutated from scratch every night and never marked done. Exits 2 and 3 now
record the counts as findings to triage and mark the step done; any other
exit (a usage error, a failing baseline) still fails. A resumed run's
failure note now says its counts are this run's (cargo-mutants rotates
earlier catches into previously_caught.txt). Review of 3b989916 (Muse),
F1 and F2; checked with a stand-in just exiting 2 and 4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fea90f4054
commit
4551566767
2 files changed
+17
-10
No files matched your search
+5
-2
@@ -4267,8 +4267,11 @@ never-reached ones. The step's result says it resumed and how many mutants
|
||||
were already tested. The runner sets `P12_MUTANTS_ITERATE=--iterate` for that
|
||||
rerun; the mutation recipes forward that variable to cargo-mutants, so
|
||||
`P12_MUTANTS_ITERATE=--iterate just mutants` resumes by hand the same way. A
|
||||
run that finished (with or without misses) still starts fresh when selected
|
||||
again.
|
||||
run that finished is done, with or without misses: cargo-mutants exits 2
|
||||
when mutants were missed and 3 when some timed out, and the runner records
|
||||
those as findings to triage, not failures, so the crate isn't redone every
|
||||
night. Only another exit (a usage error, a failing baseline) is a failure,
|
||||
and a failed step starts fresh the next night.
|
||||
|
||||
The knobs: `P12_FUZZ_SECONDS` (per target, default 3600), `P12_STOP`
|
||||
(local time, default 07:00, the next occurrence after the start),
|
||||
|
||||
+12
-8
@@ -409,18 +409,22 @@ run_mutants() {
|
||||
if [ "$resume" -eq 1 ]; then
|
||||
note="resumed with --iterate, skipped $skipped already tested; this run: "
|
||||
fi
|
||||
if [ "$rc" -eq 0 ]; then
|
||||
if [ -n "$note" ]; then
|
||||
record_result "$step" "${note}caught $caught, missed $missed, timeout $timeout, unviable $unviable"
|
||||
else
|
||||
record_result "$step" "caught $caught, missed $missed, timeout $timeout, unviable $unviable"
|
||||
fi
|
||||
# cargo-mutants exits 2 when mutants were missed and 3 when some timed
|
||||
# out: the run finished and its survivors are findings to triage, not a
|
||||
# failure. Marking them failed would rerun the crate from scratch every
|
||||
# night. Any other non-zero (a usage error, a failing baseline) failed.
|
||||
local findings=""
|
||||
case $rc in
|
||||
2|3) findings=" (finished; the missed and timed-out mutants are findings to triage)" ;;
|
||||
esac
|
||||
if [ "$rc" -eq 0 ] || [ -n "$findings" ]; then
|
||||
record_result "$step" "${note}caught $caught, missed $missed, timeout $timeout, unviable $unviable$findings"
|
||||
return 0
|
||||
fi
|
||||
if [ -n "$note" ]; then
|
||||
note="resumed with --iterate, skipped $skipped already tested; "
|
||||
note="resumed with --iterate, skipped $skipped already tested; this run: "
|
||||
fi
|
||||
record_result "$step" "${note}failed: caught $caught, missed $missed, timeout $timeout, unviable $unviable (see the log)"
|
||||
record_result "$step" "${note}failed (cargo-mutants exit $rc): caught $caught, missed $missed, timeout $timeout, unviable $unviable (see the log)"
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user