Repository navigation
fix: stop GPT Live caption repeats and honor spoken confirmations - #146370
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 12, 2026, 5:25 PM ET / 21:25 UTC (Revision 4). ClawSweeper reviewWhat this changesRepairs GPT Live captions and spoken action confirmations, adds regression coverage and documentation, and corrects TLS cleanup registration and catalog-test synchronization. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main lacks the caption and native-confirmation repairs. No blocking defect was found, and the documented private runtime boundary resolves the previous SDK concern. Priority: P2 Review scores
Verification
How this fits togetherTalk connects realtime speech providers to OpenClaw’s conversation display and backing agent. The Gateway saves speech, binds confirmation to a pending action, and checks that approval before tool execution. flowchart TD
A[Realtime speech provider] --> B[Caption fragments and final snapshots]
B --> C[Conversation display]
A --> D[Gateway transcript writer]
D --> E[Current spoken confirmation]
E --> F[Backing agent and final tool gate]
F --> G[Execute once or report blocked]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +607, Tests +1456, Docs +8, Other 0. Total +2071 across 44 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep caption assembly faithful to the provider protocol and let the Gateway authorize one exact action from saved, current speech without changing public SDK or storage contracts. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the caption failure path and missing native confirmation handoff on current main; the PR supplies focused regressions and recorded live results. This review did not execute a reproduction. Is this the best way to solve the issue? Yes, the patch extends the existing transcript and confirmation owners, preserves final-argument checks, and keeps the steering callback within the documented private runtime boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9b59fe4ef7da. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Replace Codex final caption snapshots and bind native voice approval to saved, host-observed speech for the exact pending action. Preserve refusal, expiry, retry, and single-use checks across browser and relay paths, and report blocked actions truthfully. Live GPT Live and GPT-5.6-Sol testing produced blocked, accepted, and blocked identical session-spawn calls, with one real child after spoken confirmation.
2ce00b2 to
80e5306
Compare
|
Merged via squash.
|
…enclaw#146370) * fix: stop GPT Live caption repeats and honor spoken confirmations Replace Codex final caption snapshots and bind native voice approval to saved, host-observed speech for the exact pending action. Preserve refusal, expiry, retry, and single-use checks across browser and relay paths, and report blocked actions truthfully. Live GPT Live and GPT-5.6-Sol testing produced blocked, accepted, and blocked identical session-spawn calls, with one real child after spoken confirmation. * test: expect voice confirmation context in transcript callbacks * test: wait for independent catalog discovery to settle * fix(gateway): register TLS renewal with its sidecar owner
Related: #145382
What Problem This Solves
Fixes an issue where users speaking with GPT Live in the Control UI or desktop app could see duplicated captions and could not complete an action after spoken confirmation. A blocked action could also be described as completed.
Why This Change Was Made
Codex transcript fragments append literally; complete final snapshots replace the active caption. This preserves repeated words, corrected final text, and interleaved speakers without guessing from whitespace.
Native delegation now resolves confirmation through the Gateway. Browser and relay calls share readiness handling for delegation that arrives before speech transcripts or their writes. Speech retains its original challenge and utterance context through persistence and retries, so stale speech cannot approve a replacement action. A saved refusal cancels its own pending action even when a later affirmation is queued.
The backing agent receives retry context for the actual blocked invocation after confirmation binds. Speakable results come from observed vetoes, so generated success text cannot conceal a blocked action. Function-tool calls retain their explicit confirmation-reference contract; exact final arguments, current ownership, expiry, supersession, and one-use checks remain enforced.
Existing run-control and fingerprint policy code moves into focused modules. Relay error presentation stays with its error owner; the obsolete export and redundant helper-only tests are removed.
User Impact
GPT Live captions finish with one copy of the provider's transcript. After a confirmation prompt, a clear yes can execute the pending action; no cancels that confirmation. Ambiguous, stale, or expired confirmations produce a retry request. Each distinct action still needs its own confirmation.
Storage compatibility
This change does not alter SQLite schemas, voice-session record fields, transcript message serialization, event IDs, or the public RPC payload. Confirmation readiness lives in a closure; utterance contexts and append receipts live in process-local maps and a weak map. The relay passes the context only to the internal transcript owner.
appendVoiceTranscriptstill builds the same persisted message from role, text, timestamp, and provider; it consumes the existing append result separately to update in-memory confirmation authority. Existing records need no migration, and pending voice confirmations remain transient across restart. The live Gateway proof exercised the real transcript writer and confirmed that an identical replay cannot grant another action.Evidence
gpt-live-1-codexspeech, realopenai/gpt-5.6-solbacking inference, one authenticated Gateway connection, and actualsessions_spawn. Three calls with identical arguments produced blocked → accepted after saved spoken “Yes” → blocked on unconfirmed replay. Exactly one child completed with the expected nonce and zero tool calls. The 70-second scenario had no errors; its Gateway, state, and staged credentials were cleaned up. Only microphone input was synthetic.RealtimeTalkSession, WebRTC, conversation state, and rendering: 87 fragments, 12 exact final captions, and 12 once-only transcript requests; no provider/browser errors. Consult answers and Gateway bookkeeping were fixtures in this caption-focused proof.The before/after images use synthetic events through the production transcript renderer. No private conversation or desktop capture is included. Corrected final snapshots have deterministic regression coverage; the live caption run did not produce a correction.
CI follow-up
Existing transcript callback tests now expect their internal confirmation context. A separate catalog test now waits for provider acquisition and independent CLI-agent discovery before asserting final status; its original failure, usable-model, and thinking-control assertions and deadlines are unchanged. Native Chromium reproduced the CLI timing race and verified the wait. Local real-Gateway testing stopped before UI while provider acquisition remained pending; Linux CI subsequently passed all 56 real-Gateway tests across 28 files, including this test (job).
An unchanged WebSocket request-lifetime test timed out once in CI. Its original four cases passed on Node 24 and Node 26 locally, and its Linux shard passed on the next head. The cause is unconfirmed; no production change, timeout increase, or weakened assertion was made for it.
Refreshing onto main also exposed an integration error between #146267 and #146275: TLS renewal still passed an array to the now-variadic sidecar registration owner. The one-line correction registers the actual stoppable handle. The failing compiler contract, all eight TLS/sidecar tests, changed checks, and independent review validate the correction.
Runtime boundary
The host steering callback stays internal.
realtime-voiceis already listed inscripts/lib/plugin-sdk-private-local-only-subpaths.json. The canonical export builder inscripts/lib/plugin-sdk-entries.mtsexcludes it from the typed public SDK and gives it only a JavaScript runtime export for official plugins;package.jsonexcludes its declarations. This is the documented private-runtime boundary indocs/plugins/sdk-overview/imports.md, not a new supported third-party SDK contract.Only the Gateway consult owner supplies
getSteeringContext. It reads retry context prepared by the existing validated tool-authority callback; control classification still uses the original spoken text, and the exact run is checked before guarded queue admission. Existing callers omit the optional callback and preserve their behavior. No SDK entrypoint, export inventory, public declaration, or compatibility window changes.