From 8c7dd5b30f7b2bed900c7b9fe8141c802bb19087 Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Thu, 2 Jul 2026 16:07:01 +0200 Subject: [PATCH] Postcheck: Voice-Smoke mit 3 Versuchen (Session-Kaltstart nach Gateway-Neustart war Fehlalarm) Co-Authored-By: Claude Fable 5 --- deploy/hermes-postcheck.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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