Repository navigation
fix(voice-call): keep active call when replacement setup fails - #117960
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 6:50 AM ET / 10:50 UTC. ClawSweeper reviewWhat this changesThe PR keeps an existing realtime voice call active when a replacement bridge fails synchronously during setup, while preserving the failed bridge’s cleanup. Merge readinessKeep this maintainer-authored PR open for normal merge review. Current main can emit Priority: P1 Review scores
Verification
How this fits togetherThe Voice Call plugin accepts provider media events and creates a realtime bridge that owns the active call, transcripts, and provider hangup behavior. A replacement bridge can invoke lifecycle callbacks during construction, so termination must remain owned by the predecessor until the replacement is committed. flowchart LR
A[Provider media event] --> B[Voice-call webhook]
B --> C[Existing realtime bridge]
B --> D[Provisional replacement bridge]
D --> E{Bridge setup succeeds?}
E -->|Yes| F[Commit new call owner]
E -->|No| G[Close provisional connection]
C --> H[Existing call remains active]
F --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +15. Total +21 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the predecessor-ownership guard after exact-head review confirms that initial bridge failures still terminate normally, while failed replacement setup leaves the established call and transcript owner intact. Do we have a high-confidence way to reproduce the issue? Yes: current main’s synchronous Is this the best way to solve the issue? Yes: preserving termination authority at the active bridge owner is the narrowest repair and avoids compensating downstream after a provisional replacement has already emitted lifecycle callbacks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against de0fa7c2084c. 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 (1 earlier review cycle)
|
…law#117960) * commit 'ea6e83afd0af18b71226cf24c84ecf8a8eab042d': fix(voice-call): avoid retaining replaced bridges fix(voice-call): preserve predecessor on provisional close test(voice-call): cover provisional replacement close
Related: #116201
What Problem This Solves
Fixes an issue where an active voice call could be ended when a replacement realtime bridge reported an error synchronously during setup, before that replacement had become the call owner.
Why This Change Was Made
Replacement setup records whether an active predecessor exists before provisional bridge creation. A failed provisional bridge still cleans up its own socket, but cannot emit
call.endedor hang up the provider while the live owner map still contains an active bridge. The long-lived callback captures only this primitive admission fact, not a predecessor bridge object, so repeated replacements cannot retain a bridge/session chain. Existing transactional transcript adoption and rollback remain unchanged.User Impact
An established voice call remains available when a replacement realtime connection fails during creation, instead of being terminated by the failed replacement.
Evidence
onClose("error")ended the predecessor.openclaw/ci-gate: passed.oxfmtandgit diff --check: clean.createBridge(). Live OpenAI failures occur later duringconnect(), so live smoke is orthogonal rather than a reproduction of this admission edge.AI-assisted: yes. I reviewed the implementation and validation evidence.