diff --git a/STATE.md b/STATE.md index bd7a8b1..8a76241 100644 --- a/STATE.md +++ b/STATE.md @@ -24,3 +24,4 @@ - [2026-03-14] evolve.sh auto-incrementing per-run results directory (#752) - [2026-03-14] EVAL_MODE now defaults to revm (#751) - [2026-03-14] LLM seed — Defensive Floor Hugger optimizer (#672) +- [2026-03-14] evolve.sh stale tmpdirs break subsequent runs (#750) diff --git a/tools/push3-evolution/evolve.sh b/tools/push3-evolution/evolve.sh index 924e3f8..4448c4d 100755 --- a/tools/push3-evolution/evolve.sh +++ b/tools/push3-evolution/evolve.sh @@ -295,11 +295,15 @@ TSX_CMD="$(find_tsx_cmd)" || fail \ # ============================================================================= # Work directory — holds all candidate .push3 files across generations +# +# Fixed path under BASE_DIR so stale /tmp/tmp.* dirs from killed runs can +# never interfere with a new run. Cleaned at startup; run outputs are +# already preserved in BASE_DIR/run_NNN/ before this directory is wiped. # ============================================================================= -WORK_DIR="$(mktemp -d)" -cleanup() { rm -rf "$WORK_DIR"; } -trap cleanup EXIT +WORK_DIR="$BASE_DIR/.work" +rm -rf "$WORK_DIR" +mkdir -p "$WORK_DIR" # ============================================================================= # Log run header