Also dedups the suppressed listing: two registered claims can be substrings of one line, which reported that line twice (8 -> 7). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
59 lines
2.5 KiB
Bash
Executable File
59 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Does the main menu REMEMBER its cursor across menu -> title -> menu?
|
|
#
|
|
# menu-navigation-semantics.md carries this 🟡: "Initial focus is reproducible
|
|
# but not established as invariant. Both of my boots opened on TUTORIAL, and
|
|
# both used boot_menu.sh." Two runs through one harness are not two samples --
|
|
# the same shape as two captures through one gate (plate-pulse-phase-lock.md).
|
|
#
|
|
# And the sources DISAGREE. boot_menu.sh's own final line says "cursor on NEW
|
|
# GAME"; the page says TUTORIAL 2/2; menu-state-in-memory.md reaches EXTRAS in
|
|
# four downs, which only counts from NEW GAME. Two say NEW GAME, one says
|
|
# TUTORIAL.
|
|
#
|
|
# ONE BOOT settles both, and the round trip is the part no run has done:
|
|
# F1 focus when the menu first appears <- re-measures initial focus
|
|
# F2 focus after 2x DOWN <- CONTROL for the reader
|
|
# F3 focus after B (to title) then A (back) <- persist or reset?
|
|
#
|
|
# F3 == F2 => the menu restores where you were; F3 == F1 => it resets.
|
|
# If F2 is not two items below F1 the reader is not tracking the cursor and
|
|
# NOTHING below it may be read. Run as ONE BLOCKING FOREGROUND call.
|
|
set -u
|
|
export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98
|
|
SD="$(cd "$(dirname "$0")" && pwd)"
|
|
OUT="${OUT:-/sylph-home/re/focuspersist}"; mkdir -p "$OUT"
|
|
NAMES=(NEW_GAME LOAD_GAME TUTORIAL OPTIONS EXTRAS)
|
|
|
|
. "$SD/ensure_single_emulator.sh"
|
|
|
|
echo "── EFFECTIVE CONFIG ──────────────────────────────"
|
|
echo " out dir = $OUT"
|
|
echo " harness = boot_menu.sh (the one under suspicion)"
|
|
echo " sequence = F1 -> 2x DOWN -> F2 -> B -> plate pulse -> A -> F3"
|
|
|
|
BOOT_MENU_LOG="$OUT/boot.stdout" "$SD/boot_menu.sh" fp >"$OUT/boot.log" 2>&1 \
|
|
|| { echo "BOOT FAILED"; tail -5 "$OUT/boot.log"; exit 1; }
|
|
tail -2 "$OUT/boot.log"
|
|
|
|
shot(){ screenshot "$OUT/$1.png" >/dev/null 2>&1; }
|
|
focus(){ python3 "$SD/menu_focus.py" "$OUT/$1.png" | tail -1; }
|
|
|
|
shot f1; echo "F1 $(focus f1)"
|
|
|
|
python3 "$SD/pad.py" dpad down 0.06; sleep 1
|
|
python3 "$SD/pad.py" dpad down 0.06; sleep 2
|
|
shot f2; echo "F2 $(focus f2)"
|
|
|
|
echo "-- B to the title --"
|
|
python3 "$SD/pad.py" tap B 0.25
|
|
python3 "$SD/wait_plate_pulse.py" 120 >"$OUT/pulse.log" 2>&1 \
|
|
&& echo " title settled (plate pulse)" || echo " ⚠️ NO PLATE PULSE in 120 s"
|
|
shot title
|
|
|
|
echo "-- A back to the menu --"
|
|
python3 "$SD/pad.py" tap A 0.25; sleep 12
|
|
shot f3; echo "F3 $(focus f3)"
|
|
|
|
echo "FOCUS PERSISTENCE RUN DONE"
|