Repository navigation
fix(gateway): preserve final speech during transcription shutdown - #118693
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 10:02 AM ET / 14:02 UTC. ClawSweeper reviewWhat this changesThis PR keeps a Talk transcription relay registered for a bounded five-second provider-finalization window so final speech callbacks emitted by Merge readinessThe branch addresses a current Gateway lifecycle defect and is still necessary; the protected Priority: P1 Review scores
Verification
How this fits togetherTalk transcription relays accept browser audio on an authenticated Gateway WebSocket connection, forward it to a realtime speech-to-text provider, and broadcast provider speech events back to that same connection. Session shutdown currently owns both provider teardown and the terminal Talk event, so callback ordering determines whether the final spoken words are visible. flowchart LR
A[Browser audio] --> B[Gateway relay]
B --> C[Realtime transcription provider]
D[Browser stops session] --> E[Bounded finalization window]
C --> E
E --> F[Same authenticated relay owner]
F --> G[Final and partial Talk events]
G --> H[Control UI dictation]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +34, Tests +310. Total +344 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Merge the bounded owner-retention repair after the protected-label human review and the remaining CI complete, preserving immediate cancellation and disconnect behavior while allowing provider finalization callbacks. Do we have a high-confidence way to reproduce the issue? Yes, by source: on current main a provider callback emitted synchronously or asynchronously from Is this the best way to solve the issue? Yes. Retaining only the already-authenticated owner for the provider's bounded finalization interval fixes the lifecycle owner rather than adding downstream retry or callback exceptions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cad499d7ca06. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) fix(plugins): reject external public-artifact hardlinks (#118689)
* origin/main: (78 commits) fix(parallels): recover Windows poll transport failures (#118479) fix(channels): deny unauthorized Discord and Telegram binding access (#118704) fix(test): bound shared git inventory lookup (#111171) fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) ...
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (openclaw#118702) docs: show canonical agent roster configuration (openclaw#118722) fix(channels): generate catalog from package manifests (openclaw#118097) fix(zalouser): distinguish probe timeout from auth failure (openclaw#111336) improve(ui): cut E2E shard runtime by reusing the bundle (openclaw#118697) fix(cli): publish completion caches atomically (openclaw#118715) fix(whatsapp): honor disabled self-chat without widening group access (openclaw#118711) fix(voice-call): terminate carrier calls after realtime startup failures (openclaw#118699) fix(slack): isolate GovSlack media trust and delivery (openclaw#118695) fix(browser): wrap page-controlled action results (openclaw#118691) fix(security): sanitize JSON-escaped forged content boundaries (openclaw#118698) test(qa): prove real yielded-child completion and channel delivery (openclaw#118707) fix(doctor): honor explicit plugin-only migration authority (openclaw#118700) fix(security): detect child_process calls through aliases and computed members (openclaw#116304) test(gateway): avoid async facade mock race (openclaw#118708) fix(gateway): preserve final speech during transcription shutdown (openclaw#118693) fix(gateway): resume durable outbound delivery retries (openclaw#118694) fix(plugins): reject external public-artifact hardlinks (openclaw#118689)
Summary
Root cause and architectural owner
The Talk Gateway removed its exact session owner before calling the transcription provider's graceful close. Deepgram, ElevenLabs, Mistral, and other providers emit their final transcript only during close; the shared websocket owner intentionally retains its socket for five seconds, but the Gateway had already rejected every callback. Users lost their final spoken words without any visible error.
The Gateway now keeps the same authenticated relay owner for the existing bounded five-second provider finalization window. It accepts all final and partial callbacks for already-received audio, including multiple distinct finals; new browser audio and stale ready/foreign-generation callbacks remain rejected. Empty sessions, cancellation, disconnect, provider errors, and expiry retain their immediate terminal behavior.
Actual consumer/owner proof