diff --git a/tools/re-capture/title_sweep_probe.sh b/tools/re-capture/title_sweep_probe.sh index 35a3c8d2..85d99db9 100755 --- a/tools/re-capture/title_sweep_probe.sh +++ b/tools/re-capture/title_sweep_probe.sh @@ -24,6 +24,19 @@ win="$(xdotool search --name "Xenia-canary" | tail -1)" [ -n "$win" ] || { echo "FATAL: no Xenia window"; pkill -x xenia_canary; exit 1; } xdotool windowactivate "$win" 2>/dev/null; xdotool key --window "$win" F10; xdotool key F10 echo "armed at ${SECONDS}s" + +# ⚠️ ARMING IS NOT CONFIRMED BY SENDING THE KEY. Twice now a probe has printed +# "armed", pressed on, and written no draw log at all -- once because the window +# lookup failed, once with the window found and the key sent. A probe that cannot +# confirm its own instrument is recording is a probe whose negatives mean nothing. +# So: wait for the log to exist AND grow, and abort loudly if it does not. +for _ in $(seq 1 20); do + sz=$(stat -c %s "$OUT"/xenia_re_ui_draws_*.log 2>/dev/null | head -1 || echo 0) + [ "${sz:-0}" -gt 0 ] && break + sleep 1 +done +[ "${sz:-0}" -gt 0 ] || { echo "FATAL: armed but no draw log after 20s -- not recording"; pkill -x xenia_canary; exit 1; } +echo "logging confirmed at ${SECONDS}s (${sz} bytes)" sleep 12; pad "press=A"; sleep 0.4; pad ""; echo "A (skip video) at ${SECONDS}s" sleep 150 # let the title build in and settle, no further input pkill -x xenia_canary