From b168a0593081767735a677c9c4f8b9acc8273bb3 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 14 Mar 2026 15:48:07 +0000 Subject: [PATCH] fix: fix: evolve.sh stale tmpdirs break subsequent runs (#750) Replace `mktemp -d` with a fixed working directory `evolved/.work/` that is wiped at startup. Stale `/tmp/tmp.*` directories from killed runs can no longer interfere with batch-eval.sh path resolution. Run outputs are already preserved in `evolved/run_NNN/` before the work dir is cleaned. Co-Authored-By: Claude Sonnet 4.6 --- tools/push3-evolution/evolve.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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