diff --git a/openfut-blaze-host/gate-evidence.sh b/openfut-blaze-host/gate-evidence.sh index 9247acd..dfefe1b 100755 --- a/openfut-blaze-host/gate-evidence.sh +++ b/openfut-blaze-host/gate-evidence.sh @@ -104,8 +104,18 @@ both "" both "--- TRACE ---" if [[ -n "$TRACE" && -f "$TRACE" ]]; then cp "$TRACE" "$DEST/rust-blaze.trace" - frames="$(grep -c '^conn-' "$TRACE" 2>/dev/null || echo 0)" - both " $TRACE -> $DEST/rust-blaze.trace ($frames traced frames)" + # Count FRAME lines only. `^conn-` also matches the OPEN/CLOSE markers, and + # counting those inflated the figure by one or two — which then looked like a + # capture/trace divergence when compared against the capture's record count. + frames="$(grep -cE '^conn-[0-9]+ (RX|TX) ' "$TRACE" 2>/dev/null || echo 0)" + markers="$(grep -cE '^conn-[0-9]+ (OPEN|CLOSE)' "$TRACE" 2>/dev/null || echo 0)" + both " $TRACE -> $DEST/rust-blaze.trace ($frames traced frames, $markers lifecycle markers)" + # Capture and trace are written continuously; on a LIVE session they are only + # comparable if read at the same instant. + if [[ -n "${OPENFUT_BLAZE_CAPTURE:-}" && -f "${OPENFUT_BLAZE_CAPTURE}" ]]; then + cp "$OPENFUT_BLAZE_CAPTURE" "$DEST/raw.ofcap" 2>/dev/null && chmod 600 "$DEST/raw.ofcap" + both " raw capture -> $DEST/raw.ofcap (0600, NEVER commit)" + fi both " routes seen:" grep -o '^conn-[0-9]* \(RX\|TX\) [^ ]* [A-Za-z]*::[^ ]*' "$TRACE" 2>/dev/null \ | awk '{print $2, $4}' | sort | uniq -c | sort -rn | head -20 \ @@ -142,6 +152,26 @@ else both " python blaze log not readable (container not running?)" fi +# ------------------------------------------------- FUT actions (UTAS side) +# +# "Known FUT action succeeded" is a client-side fact, but it leaves an +# independent trace: FUT actions go over UTAS (Python, never switched), so the +# UTAS log confirms them without relying on anyone's recollection of what they +# clicked. +both "" +both "--- FUT ACTIONS (observed on UTAS, which is always Python) ---" +UTASLOG=/tmp/utas_server.log +if docker exec openfut-fut-backend test -f "$UTASLOG" 2>/dev/null; then + docker exec openfut-fut-backend sh -c "grep -E 'STORE:|SQUAD:|SBC:|TRADE:' $UTASLOG" \ + > "$DEST/utas-actions.log" 2>/dev/null || true + packs="$(grep -c 'opened pack' "$DEST/utas-actions.log" 2>/dev/null || echo 0)" + both " pack opens recorded: $packs" + both " most recent actions:" + tail -5 "$DEST/utas-actions.log" 2>/dev/null | sed 's/^/ /' | tee -a "$DEST/summary.txt" || true +else + both " utas log not readable" +fi + # ----------------------------------------------------------- python health both "" both "--- PYTHON BACKEND (must stay healthy throughout) ---"