From d967b80e20f078acc730d4cf45f16c559575595b Mon Sep 17 00:00:00 2001 From: Natalie Date: Sun, 3 May 2026 04:23:51 -0400 Subject: [PATCH] =?UTF-8?q?feat(@projects):=20=E2=9C=A8=20mark=20batch=20f?= =?UTF-8?q?reshness=20objective=20as=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../p1-45-batch-binary-freshness.md | 22 ++++++++++++------- .../instructions/canonical-commands.md | 2 +- tools/ci-autoplay-smoke.sh | 6 +++++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.project/objectives/p1-45-batch-binary-freshness.md b/.project/objectives/p1-45-batch-binary-freshness.md index 50004eef..82803b29 100644 --- a/.project/objectives/p1-45-batch-binary-freshness.md +++ b/.project/objectives/p1-45-batch-binary-freshness.md @@ -2,11 +2,15 @@ id: p1-45 title: "Batch binary freshness: rebuild GDExt before every autoplay batch" priority: p1 -status: missing +status: done scope: game1 tags: [tooling, batch, gdext, ci] owner: simulator-infra -updated_at: 2026-04-30 +updated_at: 2026-05-03 +evidence: + - tools/autoplay-batch.sh (p1-45 pre-build block, lines 143-158 — local mode rebuilds GDExt before seeds launch, CARGO_TARGET_DIR timestamped) + - tools/ci-autoplay-smoke.sh (pre-build block added to local path before flatpak run) + - .claude/instructions/canonical-commands.md (10-seed parallel batch entry updated with p1-45 note) --- ## Summary @@ -31,13 +35,15 @@ cross-team Rust landing. ## Acceptance -- ✓ `tools/autoplay-batch.sh` (or a wrapper) rebuilds `libmagic_civ_physics.x86_64.so` from - source before launching seeds, OR emits a blocking error if the `.so` is older than any `.rs` - file in `src/simulator/`. +- ✓ `tools/autoplay-batch.sh` rebuilds `libmagic_civ_physics.x86_64.so` from source before + launching seeds (local mode only; remote mode delegates to run_ap3.sh on the remote host). + Implementation: Option A from the sketch — pre-build block added at line 143 of autoplay-batch.sh. + Evidence: `tools/autoplay-batch.sh` lines 143–158 (2026-05-03). - ✓ The build step uses `CARGO_TARGET_DIR=/tmp/mc-build-$(date +%s)/target` to avoid collisions - with concurrent builds on apricot. -- ✓ Wrapper documented in `canonical-commands.md` under "10-seed parallel batch". -- ✓ CI smoke test (`tools/ci-autoplay-smoke.sh`) also pre-builds. + with concurrent builds on apricot. Evidence: `MC_BUILD_STAMP="$(date +%s)"` + export in the preamble block. +- ✓ Documented in `canonical-commands.md` under "10-seed parallel batch". Evidence: line 15 updated (2026-05-03). +- ✓ CI smoke test (`tools/ci-autoplay-smoke.sh`) also pre-builds. Evidence: pre-build block added + to local path (before flatpak run), uses `/tmp/mc-build-${MC_SMOKE_BUILD_STAMP}/target` (2026-05-03). ## Implementation sketch diff --git a/tooling/claude/dot-claude/instructions/canonical-commands.md b/tooling/claude/dot-claude/instructions/canonical-commands.md index a4df07e7..5cb72b8f 100644 --- a/tooling/claude/dot-claude/instructions/canonical-commands.md +++ b/tooling/claude/dot-claude/instructions/canonical-commands.md @@ -12,7 +12,7 @@ For env var setup (`AUTOPLAY_HOST`, `PROJECT_ROOT_REMOTE`, etc.) see `two-host-w | GDExtension build | `ssh "$AUTOPLAY_HOST" "cd $PROJECT_ROOT_REMOTE/src/simulator && bash build-gdext.sh"` | | WASM build (web guide) | `ssh "$AUTOPLAY_HOST" "cd $PROJECT_ROOT_REMOTE/src/simulator && bash build-wasm.sh"` | | Single seeded sim run | `ssh "$AUTOPLAY_HOST" "AUTO_PLAY=true AUTO_PLAY_SEED=1 AUTO_PLAY_TURN_LIMIT=300 AUTO_PLAY_DIR=\$HOME/tmp/run1 bash $REMOTE_RUNNER"` | -| 10-seed parallel batch | `PARALLEL=10 bash tools/autoplay-batch.sh 10 300 .local/iter/` (reads `$AUTOPLAY_HOST`) | +| 10-seed parallel batch | `PARALLEL=10 bash tools/autoplay-batch.sh 10 300 .local/iter/` (reads `$AUTOPLAY_HOST`; **p1-45**: auto-rebuilds GDExt before launch when running locally — `CARGO_TARGET_DIR` isolated per run) | | GUT unit tests | `ssh "$AUTOPLAY_HOST" "cd $PROJECT_ROOT_REMOTE/src/game && flatpak run --filesystem=home org.godotengine.Godot --path . --headless -s addons/gut/gut_cmdln.gd -gdir=engine/tests/unit"` | | JSON schema validation | `python3 tools/validate-game-data.py` (pure Python, runs on EDIT host) | | Lint | `gdlint src/game/engine/src/` (runs on EDIT host, no toolchain needed) | diff --git a/tools/ci-autoplay-smoke.sh b/tools/ci-autoplay-smoke.sh index eea67086..1725735d 100755 --- a/tools/ci-autoplay-smoke.sh +++ b/tools/ci-autoplay-smoke.sh @@ -98,6 +98,12 @@ else echo "[ci-autoplay-smoke] SKIP: no flatpak locally and AUTOPLAY_HOST unset" exit 0 fi + # p1-45: Rebuild GDExtension before smoke so the .so is never stale. + echo "[ci-autoplay-smoke] p1-45: rebuilding GDExtension before smoke run" + MC_SMOKE_BUILD_STAMP="$(date +%s)" + (cd "$PROJECT_DIR/src/simulator" && \ + CARGO_TARGET_DIR="/tmp/mc-build-${MC_SMOKE_BUILD_STAMP}/target" bash build-gdext.sh) + echo "[ci-autoplay-smoke] GDExtension rebuild complete" cd "$PROJECT_DIR/src/game" timeout "$BUDGET" flatpak run --user \ --filesystem=home \