From 0bbb4df2edb5813a759b370c7cb9645c372fd999 Mon Sep 17 00:00:00 2001 From: autocommit Date: Wed, 15 Apr 2026 07:37:00 -0700 Subject: [PATCH] =?UTF-8?q?feat(run):=20=E2=9C=A8=20Add=20autoplay=20comma?= =?UTF-8?q?nd=20for=20single-seed=20game=20execution=20and=20report=20gene?= =?UTF-8?q?ration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- run | 4 ++++ scripts/run/dev.sh | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/run b/run index 022e90f3..00b83db5 100755 --- a/run +++ b/run @@ -26,6 +26,8 @@ usage() { echo " test Run GUT + Rust + vitest" echo " verify Full pipeline: lint + typecheck + cargo check + tests" echo " screenshot [name] [scene] [delay] Capture screenshot" + echo " autoplay [seed] Run single seeded auto_play game + report (opt-in)" + echo " autoplay-batch [count] Run N seeded games + aggregate report (opt-in)" echo "" echo -e "${YELLOW}Build${NC}" echo " build Build WASM + GDExtension" @@ -69,6 +71,8 @@ case "$COMMAND" in format) cmd_format "$@" ;; test) cmd_test "$@" ;; screenshot) cmd_screenshot "$@" ;; + autoplay) cmd_autoplay "$@" ;; + autoplay-batch) cmd_autoplay_batch "$@" ;; build) cmd_build "$@" ;; build:wasm) cmd_build_wasm "$@" ;; build:gdext) cmd_build_gdext "$@" ;; diff --git a/scripts/run/dev.sh b/scripts/run/dev.sh index 8b0f93a7..ae1720e3 100644 --- a/scripts/run/dev.sh +++ b/scripts/run/dev.sh @@ -251,3 +251,19 @@ cmd_guide() { echo -e "${BLUE}Starting guide dev server (port 5800)...${NC}" pnpm --prefix "$GUIDE_DIR" dev } + +cmd_autoplay() { + # Single-seed fast feedback: ./run autoplay [seed] + local seed="${1:-1}" + local results_dir="/tmp/autoplay_single_${seed}" + bash "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-batch.sh" 1 500 "$results_dir" || return $? + python3 "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-report.py" "$results_dir" +} + +cmd_autoplay_batch() { + # Multi-seed regression gate: ./run autoplay-batch [count] + local count="${1:-3}" + local results_dir="/tmp/autoplay_batch_$(date +%s)" + bash "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-batch.sh" "$count" 500 "$results_dir" || return $? + python3 "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-report.py" "$results_dir" +}