fix(just): p12-night counts a mutation run with survivors as finished, not failed
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s

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:
swaitsandClaude Opus 5.5 committed 2026-11-07 12:26:01 -07:00
1 parent fea90f4054
commit 4551566767
2 files changed
+17 -10

No files matched your search

+12 -8
View File
@@ -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
}