feat(just): p12-night resumes a cut-off mutation step with --iterate

A mutation step stopped at P12_STOP (or by `just p12-stop`) is marked
partial and used to restart from scratch the next night: run_mutants
rm -rf'd the crate's output directory and the recipes did not pass
cargo-mutants' --iterate. A crate whose run takes longer than one night
could never finish.

cargo-mutants 27.1.0 writes caught.txt, unviable.txt, timeout.txt and
missed.txt incrementally, and --iterate reads caught.txt, unviable.txt
and previously_caught.txt before rotating the output directory. A killed
run therefore resumes: mutants already caught or found unviable are
skipped, while missed, timed-out and never-reached mutants are retested.
Verified on a scratch crate: a run killed after 19 of 42 mutants; the
--iterate rerun found 23 to test, excluded the 19, retested the mutant
killed mid-test and the unreached ones; a third run excluded 38 and
retested only the 4 missed.

A partial mutation step now keeps its output directory and the runner
sets P12_MUTANTS_ITERATE=--iterate; every mutation recipe forwards that
variable to cargo-mutants. Fresh and failed steps still rm -rf and start
over, and the empty-name guard stays before the rm. The step result
records that it resumed and how many mutants were already tested.

Also resolve cargo-mutants' output layout while here: -o NAME puts the
files in NAME/mutants.out, so the state copy, the counts and the resume
skip count now use that inner directory instead of counting zero. The
core recipe's default output is already the repo's mutants.out.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
swaitsandDeepSeek V4.1 Flash committed 2026-11-07 12:18:52 -07:00
1 parent 7aa1297840
commit 3b9899167c
3 files changed
+126 -32

No files matched your search

+15 -6
View File
@@ -4254,12 +4254,21 @@ just p12-stop # stop a live runner the way the deadline does
State is in `${XDG_CACHE_HOME:-$HOME/.cache}/wanderbooks/p12/`: State is in `${XDG_CACHE_HOME:-$HOME/.cache}/wanderbooks/p12/`:
`summary.md` (rewritten after every step: status, start, end, duration, `summary.md` (rewritten after every step: status, start, end, duration,
result), `logs/<step>.log` (and `logs/fuzz-<target>.log`), `done/<step>` result), `logs/<step>.log` (and `logs/fuzz-<target>.log`), `done/<step>`
markers, and `mutants/<step>/` with each run's `mutants.out` (the core) or markers, and `mutants/<step>/` with that run's cargo-mutants output files
`mutants-<step>` output. A step with a done marker is skipped, so a night (`caught.txt`, `missed.txt`, `timeout.txt`, `unviable.txt`, ...). A step with
resumes where the last one stopped; a partial or failed step has no marker a done marker is skipped, so a night
and reruns next night. Mutation runs start over after a cut-off: the resumes where the last one stopped; a failed step has no marker and reruns
recipes as written do not pass cargo-mutants' `--iterate`, so a half-run from scratch next night. A mutation step cut off by the deadline or by
crate is redone rather than mixed with the old output. `just p12-stop` is marked partial and keeps its output directory: the next
night reruns it with cargo-mutants' `--iterate`, which reads the `caught.txt`,
`unviable.txt` and `previously_caught.txt` that the cut-off run wrote as it
went and skips those mutants, while retesting the missed, timed-out and
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.
The knobs: `P12_FUZZ_SECONDS` (per target, default 3600), `P12_STOP` The knobs: `P12_FUZZ_SECONDS` (per target, default 3600), `P12_STOP`
(local time, default 07:00, the next occurrence after the start), (local time, default 07:00, the next occurrence after the start),
+14 -9
View File
@@ -174,31 +174,36 @@ miri:
# longer ones instead of false timeouts. # longer ones instead of false timeouts.
mutants_tmp := env_var_or_default("XDG_CACHE_HOME", env_var("HOME") + "/.cache") + "/wanderbooks/mutants" mutants_tmp := env_var_or_default("XDG_CACHE_HOME", env_var("HOME") + "/.cache") + "/wanderbooks/mutants"
# Forwarded to every mutation run: "--iterate" resumes the output directory a
# cut-off run left behind (skip caught and unviable mutants, retest the rest,
# see docs/testing.md "Running P12 step 2"). Empty for a fresh run.
mutants_iterate := env_var_or_default("P12_MUTANTS_ITERATE", "")
# Mutation testing of the core: do the tests catch planted bugs? # Mutation testing of the core: do the tests catch planted bugs?
mutants shard="0/1": sweep-test-tmp mutants shard="0/1": sweep-test-tmp
# Core and store tests (the store's replay tests reach Ledger::replay_*); # Core and store tests (the store's replay tests reach Ledger::replay_*);
# the whole workspace would rebuild the viewer for every mutant. # the whole workspace would rebuild the viewer for every mutant.
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-core --exclude crates/ledger-core/src/proofs.rs --test-package ledger-core --test-package ledger-store -j 4 --timeout-multiplier 3 --minimum-test-timeout 120 --shard {{shard}} PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-core --exclude crates/ledger-core/src/proofs.rs --test-package ledger-core --test-package ledger-store -j 4 --timeout-multiplier 3 --minimum-test-timeout 120 --shard {{shard}} {{mutants_iterate}}
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the store. Fewer random cases per mutant (each needs # Mutation testing of the store. Fewer random cases per mutant (each needs
# a run that catches it, not the deep sweep). # a run that catches it, not the deep sweep).
mutants-store shard="0/1": sweep-test-tmp mutants-store shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
STORE_CASES=64 PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-store --test-package ledger-store -j 3 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} -o mutants-store STORE_CASES=64 PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-store --test-package ledger-store -j 3 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} {{mutants_iterate}} -o mutants-store
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the importers and report renderers. # Mutation testing of the importers and report renderers.
mutants-import shard="0/1": sweep-test-tmp mutants-import shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-import --test-package ledger-import -j 4 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} -o mutants-import PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-import --test-package ledger-import -j 4 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} {{mutants_iterate}} -o mutants-import
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the settings parser and the receipt policy. # Mutation testing of the settings parser and the receipt policy.
mutants-config shard="0/1": sweep-test-tmp mutants-config shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-config --test-package ledger-config -j 4 --timeout-multiplier 3 --minimum-test-timeout 120 --shard {{shard}} -o mutants-config PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-config --test-package ledger-config -j 4 --timeout-multiplier 3 --minimum-test-timeout 120 --shard {{shard}} {{mutants_iterate}} -o mutants-config
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the MCP server: every mutant runs its unit tests and # Mutation testing of the MCP server: every mutant runs its unit tests and
@@ -206,7 +211,7 @@ mutants-config shard="0/1": sweep-test-tmp
# built without the viewer; fewer random cases each, as for the store. # built without the viewer; fewer random cases each, as for the store.
mutants-mcp shard="0/1": sweep-test-tmp mutants-mcp shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
MCP_CASES=16 PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-mcp --test-package ledger-mcp --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 600 --shard {{shard}} -o mutants-mcp MCP_CASES=16 PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-mcp --test-package ledger-mcp --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 600 --shard {{shard}} {{mutants_iterate}} -o mutants-mcp
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the host (the books home, the lease, the update channel, the bridge): every mutant runs its own tests and the # Mutation testing of the host (the books home, the lease, the update channel, the bridge): every mutant runs its own tests and the
@@ -214,7 +219,7 @@ mutants-mcp shard="0/1": sweep-test-tmp
# the viewer, as for the MCP server. A local run, never CI (D-59). # the viewer, as for the MCP server. A local run, never CI (D-59).
mutants-host shard="0/1": sweep-test-tmp mutants-host shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-host --test-package ledger-host --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} -o mutants-host PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-host --test-package ledger-host --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} {{mutants_iterate}} -o mutants-host
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the CPA package and the 1099 worksheet: every mutant runs its own tests and the # Mutation testing of the CPA package and the 1099 worksheet: every mutant runs its own tests and the
@@ -222,7 +227,7 @@ mutants-host shard="0/1": sweep-test-tmp
# the viewer, as for the MCP server. A local run, never CI (D-59). # the viewer, as for the MCP server. A local run, never CI (D-59).
mutants-package shard="0/1": sweep-test-tmp mutants-package shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-package --test-package ledger-package --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} -o mutants-package PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-package --test-package ledger-package --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 300 --shard {{shard}} {{mutants_iterate}} -o mutants-package
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the TIN vault: every mutant runs its own tests and the # Mutation testing of the TIN vault: every mutant runs its own tests and the
@@ -230,7 +235,7 @@ mutants-package shard="0/1": sweep-test-tmp
# the viewer, as for the MCP server. A local run, never CI (D-59). # the viewer, as for the MCP server. A local run, never CI (D-59).
mutants-vault shard="0/1": sweep-test-tmp mutants-vault shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-vault --test-package ledger-vault --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 120 --shard {{shard}} -o mutants-vault PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-vault --test-package ledger-vault --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 120 --shard {{shard}} {{mutants_iterate}} -o mutants-vault
@just sweep-test-tmp @just sweep-test-tmp
# Mutation testing of the one executable (its argument handling, the server and bridge modes): every mutant runs its own tests and the # Mutation testing of the one executable (its argument handling, the server and bridge modes): every mutant runs its own tests and the
@@ -238,7 +243,7 @@ mutants-vault shard="0/1": sweep-test-tmp
# the viewer, as for the MCP server. A local run, never CI (D-59). # the viewer, as for the MCP server. A local run, never CI (D-59).
mutants-cli shard="0/1": sweep-test-tmp mutants-cli shard="0/1": sweep-test-tmp
mkdir -p {{mutants_tmp}} mkdir -p {{mutants_tmp}}
PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-cli --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 600 --shard {{shard}} -o mutants-cli PROPTEST_MAX_SHRINK_ITERS=0 TMPDIR={{mutants_tmp}} cargo mutants -p ledger-cli --test-package ledger-cli --no-default-features -j 4 --timeout-multiplier 3 --minimum-test-timeout 600 --shard {{shard}} {{mutants_iterate}} -o mutants-cli
@just sweep-test-tmp @just sweep-test-tmp
# P12 step 2: start the resumable overnight run, detached (D-66, docs/testing.md) # P12 step 2: start the resumable overnight run, detached (D-66, docs/testing.md)
+97 -17
View File
@@ -35,8 +35,8 @@ queue=(
mutants-cli mutants-cli
) )
# The mutation recipes and the output directory each writes (the core # The mutation recipes and the directory each passes to cargo-mutants --output
# recipe uses cargo-mutants' default; the rest pass -o <recipe name>). # (the core recipe uses cargo-mutants' default; the rest pass -o <recipe name>).
mutation_out() { mutation_out() {
case "$1" in case "$1" in
mutants) echo mutants.out ;; mutants) echo mutants.out ;;
@@ -44,6 +44,45 @@ mutation_out() {
esac esac
} }
is_mutation_step() {
case "$1" in
mutants|mutants-store|mutants-import|mutants-config|mutants-mcp|mutants-host|mutants-package|mutants-vault|mutants-cli)
return 0
;;
*) return 1 ;;
esac
}
# cargo-mutants writes its files into a `mutants.out` directory *inside* the
# --output directory. The core recipe leaves the default (the repo root, so
# $repo/mutants.out is the output dir itself); the others pass -o <recipe>,
# so their files land in $repo/<recipe>/mutants.out.
mutants_output_dir() { # step
local parent
parent=$repo/$(mutation_out "$1")
if [ -d "$parent/mutants.out" ]; then
printf '%s\n' "$parent/mutants.out"
else
printf '%s\n' "$parent"
fi
}
# Mutants cargo-mutants would skip with --iterate: everything caught or
# unviable in earlier runs (its caught.txt, unviable.txt and
# previously_caught.txt are written incrementally, so a killed run's already
# tested mutants count too). Missed, timed-out and never-reached mutants are
# not listed and are therefore retested.
already_tested_count() { # output dir
local dir=$1 f
{
for f in caught.txt unviable.txt previously_caught.txt; do
if [ -f "$dir/$f" ]; then
cat "$dir/$f"
fi
done
} | sed '/^[[:space:]]*$/d' | sort -u | wc -l | tr -d ' '
}
iso() { date '+%Y-%m-%d %H:%M:%S'; } iso() { date '+%Y-%m-%d %H:%M:%S'; }
ensure_dirs() { ensure_dirs() {
@@ -200,7 +239,12 @@ dry_result() {
record_result fuzz "dry run: every target ran for a fake moment" record_result fuzz "dry run: every target ran for a fake moment"
;; ;;
mutants|mutants-store|mutants-import|mutants-config|mutants-mcp|mutants-host|mutants-package|mutants-vault|mutants-cli) mutants|mutants-store|mutants-import|mutants-config|mutants-mcp|mutants-host|mutants-package|mutants-vault|mutants-cli)
record_result "$step" "dry run: caught 0, missed 0, timeout 0, unviable 0" local cmd="just $step" note="fresh"
if [ "${P12_STEP_PREV_STATUS:-}" = partial ]; then
cmd="P12_MUTANTS_ITERATE=--iterate $cmd"
note="resumed, $(already_tested_count "$(mutants_output_dir "$step")") already tested"
fi
record_result "$step" "dry run: would run: $cmd ($note; caught 0, missed 0, timeout 0, unviable 0)"
;; ;;
props-max) props-max)
echo "- dry run: the property commands were not run" | record_details props-max echo "- dry run: the property commands were not run" | record_details props-max
@@ -335,14 +379,25 @@ run_mutants() {
[ -n "$out" ] || { echo "P12: no output directory for $step" >&2; return 1; } [ -n "$out" ] || { echo "P12: no output directory for $step" >&2; return 1; }
dir=$repo/$out dir=$repo/$out
dest=$state/mutants/$step dest=$state/mutants/$step
# No resume: the recipes do not pass cargo-mutants' --iterate, so a # A step marked partial was cut off by the deadline or p12-stop. Keep its
# cut-off crate starts over rather than mixing a half-finished run. # output directory and rerun with --iterate, which reads the list files
rm -rf "$dir" # cargo-mutants wrote as it went and skips the mutants already caught or
just --justfile "$repo/justfile" "$step" || rc=$? # unviable. A fresh or failed step starts over, as before.
local resume=0 skipped=0
if [ "${P12_STEP_PREV_STATUS:-}" = partial ]; then
resume=1
skipped=$(already_tested_count "$(mutants_output_dir "$step")")
P12_MUTANTS_ITERATE=--iterate just --justfile "$repo/justfile" "$step" || rc=$?
else
rm -rf "$dir"
just --justfile "$repo/justfile" "$step" || rc=$?
fi
rm -rf "$dest" rm -rf "$dest"
mkdir -p "$dest" mkdir -p "$dest"
if [ -d "$dir" ]; then local outdir
cp -a "$dir/." "$dest/" outdir=$(mutants_output_dir "$step")
if [ -d "$outdir" ]; then
cp -a "$outdir/." "$dest/"
fi fi
local caught missed timeout unviable local caught missed timeout unviable
count_file() { if [ -f "$1" ]; then wc -l < "$1" | tr -d ' '; else echo 0; fi; } count_file() { if [ -f "$1" ]; then wc -l < "$1" | tr -d ' '; else echo 0; fi; }
@@ -350,11 +405,22 @@ run_mutants() {
missed=$(count_file "$dest/missed.txt") missed=$(count_file "$dest/missed.txt")
timeout=$(count_file "$dest/timeout.txt") timeout=$(count_file "$dest/timeout.txt")
unviable=$(count_file "$dest/unviable.txt") unviable=$(count_file "$dest/unviable.txt")
local note=""
if [ "$resume" -eq 1 ]; then
note="resumed with --iterate, skipped $skipped already tested; this run: "
fi
if [ "$rc" -eq 0 ]; then if [ "$rc" -eq 0 ]; then
record_result "$step" "caught $caught, missed $missed, timeout $timeout, unviable $unviable" 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
return 0 return 0
fi fi
record_result "$step" "failed: caught $caught, missed $missed, timeout $timeout, unviable $unviable (see the log)" if [ -n "$note" ]; then
note="resumed with --iterate, skipped $skipped already tested; "
fi
record_result "$step" "${note}failed: caught $caught, missed $missed, timeout $timeout, unviable $unviable (see the log)"
return 1 return 1
} }
@@ -409,8 +475,12 @@ cleanup() {
kill -TERM -- "-$step_pid" 2>/dev/null || true kill -TERM -- "-$step_pid" 2>/dev/null || true
sleep 2 sleep 2
kill -KILL -- "-$step_pid" 2>/dev/null || true kill -KILL -- "-$step_pid" 2>/dev/null || true
local how="stopped by p12-stop"
if is_mutation_step "$current_step"; then
how="stopped by p12-stop; resumes with --iterate"
fi
write_status "$current_step" partial "$step_start_iso" "$now" \ write_status "$current_step" partial "$step_start_iso" "$now" \
"$((now_epoch - step_start_epoch))" "stopped by p12-stop" "$((now_epoch - step_start_epoch))" "$how"
fi fi
echo "stopped" > "$state/run.state" echo "stopped" > "$state/run.state"
write_summary write_summary
@@ -421,7 +491,10 @@ cleanup() {
run_step() { run_step() {
local step=$1 local step=$1
local log=$logs/$step.log local log=$logs/$step.log prev_status
# Remember how the step stood before this run overwrites it: the child
# needs to know a partial step must resume its mutation output directory.
prev_status=$(read_field "$steps_dir/$step.status" status || true)
current_step=$step current_step=$step
step_start_iso=$(iso) step_start_iso=$(iso)
step_start_epoch=$(date +%s) step_start_epoch=$(date +%s)
@@ -430,7 +503,7 @@ run_step() {
write_status "$step" running "$step_start_iso" "" "" "running" write_status "$step" running "$step_start_iso" "" "" "running"
write_summary write_summary
setsid "$self" --run-step "$step" >>"$log" 2>&1 </dev/null & P12_STEP_PREV_STATUS="$prev_status" setsid "$self" --run-step "$step" >>"$log" 2>&1 </dev/null &
step_pid=$! step_pid=$!
printf '%s\n' "$step_pid" > "$step_pidfile" printf '%s\n' "$step_pid" > "$step_pidfile"
@@ -464,8 +537,12 @@ run_step() {
: > "$done_dir/$step" : > "$done_dir/$step"
write_status "$step" "done" "$step_start_iso" "$end" "$secs" "$result" write_status "$step" "done" "$step_start_iso" "$end" "$secs" "$result"
elif [ -f "$state/deadline.reached" ]; then elif [ -f "$state/deadline.reached" ]; then
local how="reruns next night"
if is_mutation_step "$step"; then
how="resumes next night with --iterate"
fi
write_status "$step" partial "$step_start_iso" "$end" "$secs" \ write_status "$step" partial "$step_start_iso" "$end" "$secs" \
"stopped at the deadline (${P12_STOP:-07:00}); reruns next night" "stopped at the deadline (${P12_STOP:-07:00}); $how"
else else
write_status "$step" failed "$step_start_iso" "$end" "$secs" "$result" write_status "$step" failed "$step_start_iso" "$end" "$secs" "$result"
fi fi
@@ -486,8 +563,11 @@ run_runner() {
if [ ! -f "$done_dir/$old_step" ] && if [ ! -f "$done_dir/$old_step" ] &&
[ "$(read_field "$steps_dir/$old_step.status" status)" = running ]; then [ "$(read_field "$steps_dir/$old_step.status" status)" = running ]; then
old_start=$(read_field "$steps_dir/$old_step.status" start) old_start=$(read_field "$steps_dir/$old_step.status" start)
write_status "$old_step" partial "${old_start:--}" "$(iso)" 0 \ local how="a previous runner stopped without finishing; reruns now"
"a previous runner stopped without finishing; reruns now" if is_mutation_step "$old_step"; then
how="a previous runner stopped without finishing; resumes now with --iterate"
fi
write_status "$old_step" partial "${old_start:--}" "$(iso)" 0 "$how"
fi fi
done done
printf '%s\n' "$$" > "$pidfile" printf '%s\n' "$$" > "$pidfile"