Repository navigation
fix(talk): bound browser voice session lifecycle - #117216
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 4:54 AM ET / 08:54 UTC. ClawSweeper reviewWhat this changesThe PR bounds browser Realtime Talk session ownership, makes transport replacement transactional, cancels late media acquisition, and fences late relay, transcript, and connection events. Merge readinessThe exact PR head is available locally and the proposed browser Talk lifecycle repair is backed by focused tests and a reported live OpenAI/WebRTC run; no concrete patch defect surfaced in source review. This is a member-authored, protected Priority: P1 Review scores
Verification
How this fits togetherControl UI Realtime Talk asks the gateway to create a provider session, starts a browser relay/WebRTC/WebSocket transport, and sends finalized transcripts back through gateway RPC. The session object owns the active transport and its transcript queue, while each transport owns browser media and provider connection cleanup. flowchart LR
UI[Control UI Talk start] --> Session[Realtime Talk session]
Session --> Gateway[Gateway session creation]
Gateway --> Candidate[Provisional browser transport]
Candidate --> Media[Microphone and camera]
Candidate --> Provider[Relay or realtime provider]
Candidate --> Commit[Activate after successful start]
Commit --> Active[Active voice session]
Active --> Cleanup[Bounded transcript drain and cleanup]
Decision needed
Why: The cap is an intentional user-visible availability trade-off that prevents unbounded detached lifecycle work; source and tests establish its mechanics, but maintainers must own the product choice. Before merge
Agent review detailsSecurityNone. PR surfaceSource +581, Tests +1486. Total +2067 across 17 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one canonical browser session lifecycle: commit replacement transports only after startup, retain the prior usable call on candidate failure, and surface a clear bounded admission error until durable cleanup releases the retiring owner. Do we have a high-confidence way to reproduce the issue? Yes, from source and focused regression tests: repeated replacement, cancelled startup, overflow, and late-event paths are directly modeled at the browser Talk owner boundary, though this read-only review did not execute the suite. Is this the best way to solve the issue? Yes, with maintainer confirmation of the admission policy: ownership is recorded at the browser lifecycle boundary rather than inferred downstream, and the candidate transport remains provisional until it is safe to replace the active call. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 75830f027af8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
0546c98 to
b786f4a
Compare
2defe13 to
c4eda63
Compare
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* origin/main: (41 commits) test(ci): update memory helper routing expectation (#117295) fix(canvas): emit successful control results in JSON mode (#117297) fix(imessage): settle native inbound reply delivery (#117282) fix(agents): reject invalid UTF-8 LSP responses (#117271) fix(line): centralize card and template message alt text (#117280) fix(release): validate candidates before Docker publication (#117252) fix(media): validate provider-owned generated media downloads (#117281) fix(feishu): restore custom HTTPS API domains (#117278) fix(models): reuse prepared plugin metadata (#117131) fix(agents): stop fallback after delivered-but-failed attempts (#114628) fix(memory): reuse targeted session corpus snapshot (#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (#116931) fix(linux-canvas): report socket watcher fallback (#109502) fix(codex): preserve authoritative turn completion (#117185) fix(canvas): preserve widgets across derived-name collisions (#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206) fix(msteams): prevent duplicate final replies (#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (#117221) fix(plugins): preserve workspace plugins across CLI and control UI (#117265) ...
|
Exact refreshed head: The branch now preserves the ten signed lifecycle commits under a signed merge from current I accept the prior ClawSweeper artifact's recommended two-owner admission policy: one active and one durable-draining client-owned session may coexist; additional starts fail visibly until cleanup releases ownership. This bounded failure is preferable to unbounded detached session retention. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* origin/pr-117216: fix(talk): satisfy lifecycle test contracts fix(talk): make transport startup transactional fix(talk): cancel pending media acquisition fix(talk): retire pending transport on overflow fix(talk): reserve replacement ownership first fix(talk): separate pending and active transports fix(talk): make transport replacement transactional fix(talk): release owner after startup failure fix(talk): fence late browser voice events fix(talk): bound browser transcript ownership
Related: #116201
What Problem This Solves
Fixes an issue where browser Realtime Talk sessions could retain transcript-persistence work across repeated stop/restart cycles, and where a replacement transport could displace a healthy active call before the replacement had actually finished starting.
Why This Change Was Made
Browser Talk now uses bounded, lifecycle-owned transcript persistence and transactional transport replacement. Pending transports remain provisional until startup and activation succeed; terminal and late events are fenced; relay buffering is bounded; browser media acquisition is cancellable; and close/cancel/failure cleanup is idempotent and callback-safe.
This remains a browser lifecycle change. It adds no provider, configuration, or environment-variable surface. Google Live setup deadlines remain the narrow follow-up in #109020.
User Impact
Repeated Talk replacement, cancellation, overflow, or startup failure no longer grows detached browser work or silently retires a healthy call. Failed candidates release their media and ownership, while the current session remains usable.
Evidence
Exact head:
05b46b48a0f69011f4952d4d1abe861c2fc7870eoxfmt,oxlint, andgit diff --checkpassed.tbx_01kyy62cf1cabtqmc82np9f5ky:pnpm tsgo:core:test && pnpm tsgo:uipassed with exit 0. Run: https://github.com/openclaw/openclaw/actions/runs/30691282814gpt-realtime-2.1proof using operator-provided auth:Please reply with the single word: glacier.;glacier;e1101d15b87d859f103d182aabf491f7ad59e6b9as the second parent; the prospective merge againstea3b5df1723763d10b934dd6bcf574e89bc5e83fis conflict-free (merge treea8e77dfc8180979af08e3dd13a1004bf7b60b0de).AI-assisted implementation; maintainer-reviewed and live-validated.