From 0f046463fdd77792178c3f0dff9b6fa5d8c69846 Mon Sep 17 00:00:00 2001 From: Natalie Date: Sun, 28 Jun 2026 11:16:17 -0400 Subject: [PATCH] fix(dx): portable realpath in autoplay-batch.sh (python; works on macOS dispatch host + linux workers) realpath -m (GNU) blew up on BSD realpath during dist:sim from plum. Now python os.path.realpath (cross platform, same -m semantics for non-existing RESULTS_DIR). Unblocks fleet sim verifs for p3-26 headless completeness. --- tools/autoplay-batch.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/autoplay-batch.sh b/tools/autoplay-batch.sh index bc713cee..0b5d37a9 100755 --- a/tools/autoplay-batch.sh +++ b/tools/autoplay-batch.sh @@ -106,10 +106,9 @@ fi # Flatpak's sandboxed Godot resolves AUTO_PLAY_DIR against an unspecified CWD, # not the caller's shell CWD — a relative path silently produces 0-byte # meta.json / turn_stats.jsonl even when the game itself completes (game.log -# is fine because it's redirected host-side). realpath -m tolerates the path -# not existing yet; it will be mkdir'd just below. Also ensures the /tmp -# reject check that follows catches all forms (./tmp, ../tmp, etc). -RESULTS_DIR="$(realpath -m "$RESULTS_DIR")" +# is fine because it's redirected host-side). Use python realpath (portable +# across macOS BSD + linux GNU; tolerates non-existing path like realpath -m). +RESULTS_DIR="$(python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "$RESULTS_DIR")" # Flatpak sandbox can't write to /tmp. Reject /tmp paths outright instead of # silently redirecting — persistent output belongs under the repo.