From 18fa182bce0b1108d426e3632247be778fc86e0a Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Jun 2026 21:14:42 +0800 Subject: [PATCH] fix(recovery): surface momo source arrival gate in quick check --- scripts/reboot-recovery/post-start-quick-check.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/reboot-recovery/post-start-quick-check.sh b/scripts/reboot-recovery/post-start-quick-check.sh index d54feb7aa..2a783c94d 100755 --- a/scripts/reboot-recovery/post-start-quick-check.sh +++ b/scripts/reboot-recovery/post-start-quick-check.sh @@ -287,6 +287,20 @@ if [[ "$RUN_MOMO" -eq 1 ]]; then ;; esac grep -E 'MOMO_DRIVE_TOKEN_SOURCE_PREFLIGHT|MOMO_HEALTH_VERSION|DB_MONTHLY_SYNC|DB_DAILY_FRESHNESS|DB_LATEST_DAILY_IMPORT_JOB' "$momo_tmp" || true + source_gate_output="$("$ROOT_DIR/scripts/reboot-recovery/momo-source-arrival-gate.py" --preflight-log "$momo_tmp" 2>&1)" + source_gate_rc=$? + printf '%s\n' "$source_gate_output" + if grep -q 'status=blocked_source_absent_fail_closed' <<<"$source_gate_output"; then + evidence_warn "MOMO source-arrival gate confirms source absent fail-closed" + elif grep -q 'status=source_arrived_ready_for_safe_import_preflight' <<<"$source_gate_output"; then + boundary_warn "MOMO source arrived; safe import preflight only, DB/Drive/runtime writes remain unauthorized" + elif grep -q 'status=freshness_already_green_recheck_cold_start' <<<"$source_gate_output"; then + ok "MOMO source-arrival gate reports freshness green; rerun post-reboot summary before updating declaration" + elif [[ "$source_gate_rc" -ne 0 ]]; then + service_warn "MOMO source-arrival gate did not produce a known state rc=$source_gate_rc" + else + evidence_warn "MOMO source-arrival gate produced a non-terminal state" + fi rm -f "$momo_tmp" fi