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:
11linear11
2026-10-09 17:43:52 -04:00
parent 9be47191d6
commit a73a496c54
67 changed files with 5988 additions and 234 deletions
+3 -1
View File
@@ -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