diff --git a/deploy/hermes-postcheck.sh b/deploy/hermes-postcheck.sh index a112aaf..43454ee 100644 --- a/deploy/hermes-postcheck.sh +++ b/deploy/hermes-postcheck.sh @@ -68,12 +68,20 @@ else echo "SKIP · Tool-Smoke (kein API_SERVER_KEY in $HERMES/.env gefunden)" fi -# --- Voice-Smoke: Lucys Sprech-Pfad antwortet zügig (first byte des SSE-Streams). --- -if curl -sf -m 30 -N -X POST "$MC_URL/api/voice/chat" -H "Content-Type: application/json" \ - -d '{"text":"Sag nur ok.","session_id":"postcheck-voice-smoke"}' 2>/dev/null | head -c 50 | grep -q "data:"; then - echo "PASS · Voice-Smoke (Lucys /api/voice/chat streamt)" +# --- Voice-Smoke: Lucys Sprech-Pfad streamt. Mit Retry: direkt nach dem Gateway-Neustart --- +# --- zahlt der erste Turn den Session-Kaltstart (Prefill) — ein Versuch wäre ein Fehlalarm. --- +voice_ok=0 +for try in 1 2 3; do + if curl -sf -m 45 -N -X POST "$MC_URL/api/voice/chat" -H "Content-Type: application/json" \ + -d '{"text":"Sag nur ok.","session_id":"postcheck-voice-smoke"}' 2>/dev/null | head -c 50 | grep -q "data:"; then + voice_ok=1; break + fi + sleep 8 +done +if [ "$voice_ok" -eq 1 ]; then + echo "PASS · Voice-Smoke (Lucys /api/voice/chat streamt, Versuch $try)" else - echo "FAIL · Voice-Smoke: /api/voice/chat streamt nicht"; fail=1 + echo "FAIL · Voice-Smoke: /api/voice/chat streamt nicht (3 Versuche)"; fail=1 fi if [ "$fail" -eq 0 ]; then