feat(voice): specialize prompt for Isfahan Industrial Parks, emit source excerpts, and bound generation

- Specialize voice assistant identity and agent system prompt for «شرکت شهرک‌های صنعتی اصفهان» (English instructions with Persian proper names)
- Emit bounded chunk text excerpts (up to 2000 chars) and identify primary_source in realtime sources events
- Bound OpenAI output generation via OPENAI_REALTIME_MAX_OUTPUT_TOKENS and add answer_limited event
- Handle old-turn search cancellation safely on turn supersession
- Add end-to-end search tracing pipeline and diagnostic CLI
- Add database organization title and settings update script
This commit is contained in:
amirhosein mazaheri
2026-10-12 17:35:28 +03:30
parent f14166a89f
commit 117fda7cc9
29 changed files with 1476 additions and 67 deletions
+23
View File
@@ -2170,3 +2170,26 @@ HTTP readiness and localhost:4200 CORS preflight passed. No OpenAI voice calls.
Independent 26-case evaluation, real speech/delivery and candidate interruption
acceptance remain unrun; Phase 3 is still open. Earlier no-call checkpoints above
are historical and precede this separately approved operational workflow.
## OpenAI bounded voice generation repair (2026-10-12)
The [scoped implementation and frontend handoff](guides/openai-output-limit-repair.md)
records OPENAI_REALTIME_MAX_OUTPUT_TOKENS (default 256), acknowledged session
generation limits and pinned profiles/instruction revision. Validated audio-only
max_output_tokens terminal responses remain incomplete/limited, drain exact
existing credits, and preserve interruption, truncation and next-turn gates.
Incomplete tools fail safely; OpenAI tool execution waits for successful terminal
validation. Gemini setup/policy and all existing audio bounds remain unchanged.
New application answer_limited and assistant transcript status limited are
documented with the example consumer. Old incompatible reservations are replayed
without rewriting but fail stream admission. Per-report VOICE_PLAYBACK logging
was removed; bounded failure diagnostics remain.
Final checks: 385 focused passed plus 40 final limit/authority checks; 1932 full
provider-free passed (three existing Windows symlink skips); 32 profile/incident
and eight existing two-provider ASGI isolated PostgreSQL cases passed, zero
database skips. Missing database configuration failed explicitly. Disposable
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.