fix(voice-call): track Twilio streams after connect#90607
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: passed. Reviewed June 5, 2026, 10:14 PM ET / 02:14 UTC. Summary PR surface: Source -3, Tests +23. Total +20 across 2 files. Reproducibility: yes. from source inspection and supplied before/after output: on current main, one inbound TwiML response adds Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow provider-owned fix after required checks, keeping the queue active only for registered media streams and preserving the linked regression test. Do we have a high-confidence way to reproduce the issue? Yes from source inspection and supplied before/after output: on current main, one inbound TwiML response adds Is this the best way to solve the issue? Yes: moving active-stream state to AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 3a2f54e6a866. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -3, Tests +23. Total +20 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
Summary: - The PR moves Twilio inbound active-stream tracking from TwiML generation to `registerCallStream` and updates provider tests for connected-stream and no-stream cases. - PR surface: Source -3, Tests +23. Total +20 across 2 files. - Reproducibility: yes. from source inspection and supplied before/after output: on current main, one inbound ... nd inbound parse queues even when no media stream registered. I did not run tests in this read-only review. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head 22575a9. - Required merge gates passed before the squash merge. Prepared head SHA: 22575a9 Review: openclaw#90607 (comment) Co-authored-by: Sahibzada Allahyar <[email protected]> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
Summary: - The PR moves Twilio inbound active-stream tracking from TwiML generation to `registerCallStream` and updates provider tests for connected-stream and no-stream cases. - PR surface: Source -3, Tests +23. Total +20 across 2 files. - Reproducibility: yes. from source inspection and supplied before/after output: on current main, one inbound ... nd inbound parse queues even when no media stream registered. I did not run tests in this read-only review. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head 22575a9. - Required merge gates passed before the squash merge. Prepared head SHA: 22575a9 Review: openclaw#90607 (comment) Co-authored-by: Sahibzada Allahyar <[email protected]> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
Fixes #81122.
What changed
registerCallStream.Real behavior proof
Behavior addressed: Twilio inbound queueing no longer treats generated stream TwiML as an active media stream. If the first inbound call receives streaming TwiML but never opens a WebSocket media stream, a later inbound call receives streaming TwiML instead of being sent to
hold-queue.Real environment tested: macOS arm64 local OpenClaw checkout. Base proof used clean
origin/mainat1a3ce7c2with only the new regression-test diff applied in/private/tmp/openclaw-81122-before-9071. Fix proof used branchfastino-81122-twilio-hold-musicat22575a9f. Package manager was pnpm v11.2.2.Exact steps or command run after the patch: Ran the Twilio provider command on the patched branch:
pnpm test extensions/voice-call/src/providers/twilio.test.ts --reporter verbose. Also rangit diff --check,pnpm exec oxfmt --check extensions/voice-call/src/providers/twilio.ts extensions/voice-call/src/providers/twilio.test.ts, andpnpm exec oxlint extensions/voice-call/src/providers/twilio.ts extensions/voice-call/src/providers/twilio.test.ts --report-unused-disable-directives-severity error. For before evidence, I created a cleanorigin/mainworktree and applied only the new regression-test diff, then ran the same Twilio provider command.Evidence after fix: Copied terminal output and TwiML payload from the local OpenClaw provider path. Before fix, the second inbound call produced hold queue TwiML instead of a stream URL:
After fix, the same provider path returned streaming TwiML for the second inbound call; the regression checks for
wss://example.ngrok.app/voice/stream,<Connect>, and nohold-queuepayload:Observed result after fix: Before the fix, the second inbound call was sent to
hold-queueafter the first call generated streaming TwiML but never registered a media stream. After the fix, the second inbound call receives streaming TwiML because no call is considered active untilregisterCallStreamruns for a real media stream.What was not tested: A live Twilio account was not exercised. The exercised behavior is the local Twilio provider TwiML decision path and stream-registration state transition that caused #81122.
Platforms tested