From e90789d41bfcc6b7dfde304fccc3b4d96833830b Mon Sep 17 00:00:00 2001 From: autocommit Date: Tue, 14 Apr 2026 17:22:17 -0700 Subject: [PATCH] =?UTF-8?q?chore(tools):=20=F0=9F=94=A7=20Update=20autopla?= =?UTF-8?q?y-batch.sh=20for=20enhanced=20task=20automation=20with=20improv?= =?UTF-8?q?ed=20command=20sequencing=20and=20error=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- tools/autoplay-batch.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/autoplay-batch.sh b/tools/autoplay-batch.sh index c63d2ab1..91f5b7c4 100755 --- a/tools/autoplay-batch.sh +++ b/tools/autoplay-batch.sh @@ -147,11 +147,15 @@ for seed in $(seq 1 "$COUNT"); do _run_local "$seed" "$seed_dir" fi - result_file="$seed_dir/result_${seed}.json" - if [ -f "$result_file" ]; then + # Look for timestamped result file (result__seed.json) or legacy (result_.json) + result_file="$(ls -1 "$seed_dir"/result_*_seed${seed}.json 2>/dev/null | tail -n1)" + if [ -z "$result_file" ] && [ -f "$seed_dir/result_${seed}.json" ]; then + result_file="$seed_dir/result_${seed}.json" + fi + if [ -n "$result_file" ] && [ -f "$result_file" ]; then echo "[seed $seed] OK — result written to $result_file" else - echo "[seed $seed] MISSING result_${seed}.json (Task 1 may not be complete, or game crashed)" >&2 + echo "[seed $seed] MISSING result file (no result_*_seed${seed}.json found)" >&2 FAILED_SEEDS+=("$seed") fi done