diff --git a/tools/autoplay-batch.sh b/tools/autoplay-batch.sh index 74d2dc26..98a4bc36 100755 --- a/tools/autoplay-batch.sh +++ b/tools/autoplay-batch.sh @@ -144,7 +144,12 @@ echo "============================================================" # Remote mode delegates to run_ap3.sh on the remote host, which is expected to # have a fresh build already (or the caller ran build-gdext.sh manually). # Uses a timestamped CARGO_TARGET_DIR to avoid collisions on multi-tenant hosts. -if [ -z "$AUTOPLAY_HOST" ]; then +# +# Container mode (AUTOPLAY_GODOT_BIN set): the mc-ai docker image bakes the .so +# at image-build time and the entrypoint installs it into the bind-mounted +# worktree before this script runs, so the rebuild is both unnecessary and +# unrunnable (the runtime image has no cargo). +if [ -z "$AUTOPLAY_HOST" ] && [ -z "${AUTOPLAY_GODOT_BIN:-}" ]; then echo "--- p1-45: rebuilding GDExtension before batch (CARGO_TARGET_DIR isolation) ---" MC_BUILD_STAMP="$(date +%s)" export CARGO_TARGET_DIR="/tmp/mc-build-${MC_BUILD_STAMP}/target"