From 0b4dcc6e8f257e307f22e981eaefa3863d0fc370 Mon Sep 17 00:00:00 2001 From: Sylpheed RE agent Date: Wed, 19 Aug 2026 03:24:40 +0000 Subject: [PATCH] tools/docs: the second-capital-ship blocker is stale; retry boots, not presses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BACKLOG said the per-class ship generalisation needs "the capture-ship-placement build of Canary". Checked: the ship capture is in the CURRENT build — RequestShipCaptureFrame and CaptureShipDrawForRE are in command_processor.cc on auto/re-ui-draw-order, and F10 wrote a 2.9 MB ship capture from this session's binary. No separate build is needed. What actually blocks it is navigation: a mission is behind the main menu, and (A) at the title is accepted on about half of boots with nothing observable predicting which. tutorial_launch.sh drives boot -> title -> menu -> TUTORIAL and retries the WHOLE BOOT on refusal, because re-pressing the same title never works — measured, not assumed. First run of it: (A) refused, so it rebooted. That is the expected shape rather than a failure of the harness. --- docs/re/BACKLOG.md | 16 +++++++- tools/re-capture/tutorial_launch.sh | 61 +++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100755 tools/re-capture/tutorial_launch.sh diff --git a/docs/re/BACKLOG.md b/docs/re/BACKLOG.md index 2a6384e..b39f84a 100644 --- a/docs/re/BACKLOG.md +++ b/docs/re/BACKLOG.md @@ -590,5 +590,17 @@ declaring `e106_bdy_01` twice makes it fail, with the real multiset on the left. **Not closed by this**, and worth keeping separate: the multiset is `e106`'s alone. The generalisation this entry originally asked for — a per-ship table so a regression in one class cannot hide behind `e106` passing — still needs a -runtime capture of a *second* capital ship, which needs the -`capture-ship-placement` build of Canary. +runtime capture of a *second* capital ship. + +**That entry's stated blocker is stale** (checked 2026-08-19): the ship capture +is in the current build — `RequestShipCaptureFrame` / `CaptureShipDrawForRE` are +in `command_processor.cc` on `auto/re-ui-draw-order`, and F10 wrote a 2.9 MB +`xenia_ship_capture_01.log` from this session's binary. No separate +`capture-ship-placement` build is needed. + +What blocks it now is **navigation**: a mission is behind the main menu, and Ⓐ at +the title is accepted on roughly half of boots with nothing observable predicting +which ([`canary-scripted-input-traps.md`](canary-scripted-input-traps.md)). +`tools/re-capture/tutorial_launch.sh` therefore retries whole boots rather than +re-pressing — re-pressing the same title never works — and drives menu → TUTORIAL +from there. diff --git a/tools/re-capture/tutorial_launch.sh b/tools/re-capture/tutorial_launch.sh new file mode 100755 index 0000000..a934fc2 --- /dev/null +++ b/tools/re-capture/tutorial_launch.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# Boot -> title -> main menu -> TUTORIAL, and report where it lands. +# +# The point is a runtime capture of a SECOND capital ship (the per-class +# generalisation in BACKLOG). The ship capture itself is in the current build — +# F10 arms it — so what is being tested here is only whether a mission is +# reachable, given that (A) at the title takes about half the time. +set -u +export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98 +SD="$(cd "$(dirname "$0")" && pwd)" +OUT="${1:-/sylph-home/re/tutorial}" +mkdir -p "$OUT" +shot(){ screenshot "$1" >/dev/null 2>&1; } +screen(){ shot /tmp/tl.png; python3 "$SD/screen_id.py" /tmp/tl.png | awk '{print $1}'; } +alive(){ ps -o pid=,stat= -C xenia_canary 2>/dev/null | awk '$2 !~ /^Z/ {print $1}'; } + +# (A) at the title is accepted on roughly half of boots and nothing observable +# predicts which (docs/re/canary-scripted-input-traps.md), so retry the whole +# boot rather than the press: pressing again on the same title never works. +for attempt in $(seq 1 "${ATTEMPTS:-4}"); do +echo "=== attempt $attempt" +pkill -9 -x xenia_canary 2>/dev/null; sleep 3 +( cd "$OUT" && nohup run-canary --mem_watch=false \ + --logged_profile_slot_0_xuid=B13EBABEBABEBABE \ + >"$OUT/canary.stdout" 2>&1 & ) +sleep 8 +until xdotool search --name "Xenia-canary" >/dev/null 2>&1; do + [ -n "$(alive)" ] || { echo "EMULATOR GONE"; exit 4; }; sleep 1 +done + +deadline=$(( SECONDS + 400 )) +s="" +while [ $SECONDS -lt $deadline ]; do + s="$(screen)"; [ "$s" = "title" ] && break; sleep 2 +done +[ "$s" = "title" ] || { echo "NO TITLE this attempt"; continue; } +echo "title at ${SECONDS}s -> A" +python3 "$SD/pad.py" tap A 0.3 +for _ in 1 2 3 4 5 6 7 8; do sleep 3; s="$(screen)"; [ "$s" = "menu" ] && break; done +shot "$OUT/menu.png" +if [ "$s" != "menu" ]; then + echo "NO MENU (screen=$s) — (A) not accepted; rebooting" + continue +fi + +echo "menu reached; two d-pad steps down to TUTORIAL, then A" +python3 "$SD/pad.py" dpad down 0.08; sleep 1.2 +python3 "$SD/pad.py" dpad down 0.08; sleep 1.2 +shot "$OUT/menu-on-tutorial.png" +python3 "$SD/pad.py" tap A 0.3 + +for i in $(seq 1 24); do + sleep 8; s="$(screen)" + shot "$OUT/after-$(printf '%02d' "$i").png" + echo " t+$((i*8))s $s" + [ "$s" = "flight" ] && { echo "IN FLIGHT"; break; } +done +echo "TUTORIAL LAUNCH ATTEMPT DONE (emulator left running)" +exit 0 +done +echo "GAVE UP after ${ATTEMPTS:-4} boots"