feat(backend): deliver Phase 3 document and voice integration
Add authenticated upload, review, retry and knowledge-selection HTTP flows with bounded JSON processing and frozen OCR policy. Preserve Gemini/OpenAI provider selection and fenced lifecycle semantics; retain FAQ preambles and uncertain vision candidates, and expose opt-in uncalibrated voice transport diagnostics. Include frontend integration examples, aligned contracts and deterministic regressions. Validation: 1767 provider-free tests passed; all 404 PostgreSQL scenarios have passing evidence across the documented runs.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Bounded, session-local voice state machine. HTTP identity/persistence is Phase 2."""
|
||||
from app.modules.voice.authority import authority_failure_code
|
||||
import asyncio
|
||||
import base64
|
||||
from collections import deque
|
||||
@@ -235,7 +236,8 @@ class VoiceRuntime:
|
||||
try:
|
||||
valid = await asyncio.wait_for(self.authority_check(
|
||||
turn.execution if turn else self.session_execution), self.settings.authority_timeout_seconds)
|
||||
except Exception:
|
||||
except Exception as exc:
|
||||
self.fail(authority_failure_code(exc))
|
||||
valid = False
|
||||
return valid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user