fix(voice): preserve interrupted searches and report used sources

Retain and revalidate interrupted searches, resolve abandoned provider calls, recover invalid source reports privately, and expose only declared sources. Improve Persian delivery and provider event replay capacity. Include regression coverage and contract updates.
This commit is contained in:
amirhosein mazaheri
2026-10-13 14:09:20 +03:30
parent 9cc9f0bc01
commit 18e595ac93
21 changed files with 1346 additions and 60 deletions
+42
View File
@@ -2199,3 +2199,45 @@ schemas/containers/volumes were removed and operational services were untouched.
See the handoff for exact commands, intermediate failures and scoped file list.
No provider calls, actual Angular/browser validation, measured audio-duration
guarantee, deployment or speech-quality acceptance is claimed.
## Live declared sources - 2026-10-13
The API catalog and implementation guide now include the user-authorized
Live declared-source amendment. Runtime `report_used_sources` validates only
current-turn labels from delivered search/reuse evidence; the existing sources
event shows that subset, not every retrieval candidate. Metadata reports do not
create retrieval rows. See `tests/unit/test_voice_reported_sources.py` and
`tests/integration/test_voice_evidence_reuse.py` for validation and revocation
coverage. Optional acknowledgement is only «یه لحظه…» once per turn, under
OpenAI delivery v5. New sessions pin the selected-evidence policy revision;
existing reservations are not rewritten. Real provider adherence remains
separate from deterministic runtime tests.
OpenAI local delivery candidate (2026-10-13): style revision
`iranian-persian-conversational-v6`, with local speed 1.30 replacing 1.15.
48 focused style/configuration checks passed; auditory acceptance is pending.
See the live repair progress checkpoint. Existing profile digest/speed pinning
remains in effect; deployment override is local, not a new configuration default.
Source-report recovery (2026-10-13): selected evidence policy v3 returns invalid
citation reports only to the model, with current valid labels for correction;
no browser error or invalid citation is emitted. 99 focused tests passed.
See live repair progress and API/implementation recovery amendments.
OpenAI abandoned-tool resolution (2026-10-13): evidence policy v4 closes old
unsent tool calls with empty cancellation metadata before new-turn generation.
Late evidence is suppressed; current authority and cleanup gates still apply.
See live repair progress and API/implementation abandoned-tool amendments.
Provider event replay capacity (2026-10-13): LIVE_MAX_EVENTS is bounded at 32768
(default 32768). See event-capacity tests and live repair progress for the
4096-event incident; audio buffer bounds are independent and unchanged.
Retained same-topic search (2026-10-13): user-authorized policy
`same-session-evidence-retained-v5` separates interruption of speech from the
latest search lifetime. Reuse awaits and revalidates the same durable retrieval;
identical later search args coalesce, different queries discard the old topic.
See API/implementation retained-search amendment and
`tests/unit/test_voice_retained_search.py` plus PostgreSQL runtime cases in
`tests/integration/test_voice_evidence_reuse.py`. No persistence migration.