fix(voice-call): preserve live Twilio streams in stale reaper#90620
fix(voice-call): preserve live Twilio streams in stale reaper#90620sahibzada-allahyar wants to merge 1 commit into
Conversation
|
Codex review: passed. Reviewed June 5, 2026, 10:12 PM ET / 02:12 UTC. Summary PR surface: Source +16, Tests +15. Total +31 across 2 files. Reproducibility: yes. Source review and the contributor's terminal before/after probe show current main reaps a stale-threshold Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow stale-reaper guard so live conversation states are preserved while existing cleanup for genuinely stuck non-live calls remains covered. Do we have a high-confidence way to reproduce the issue? Yes. Source review and the contributor's terminal before/after probe show current main reaps a stale-threshold Is this the best way to solve the issue? Yes. Guarding the owner-owned stale reaper against live conversation states is narrower than disabling cleanup or changing user-facing config defaults, and it preserves existing stale-call cleanup behavior. 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 +16, Tests +15. Total +31 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: I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow CI fix. Automerge progress:
|
|
ClawSweeper 🐠 reef update Thanks for the work here. ClawSweeper could not write to the source branch, so it opened a replacement PR rather than letting the fix drift. attribution still points back here. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against 060f3de. |
Fixes #79121.
What changed
speaking/listening) even whenansweredAtis absent.speakingcall has noansweredAtand should not be reaped.Real behavior proof
Behavior addressed: The stale-call reaper no longer ends a live Twilio-style voice call that is in
speakingstate with noansweredAt. This matches inbound Twilio media-stream conversations where speech/transcription activity can advance the call state even when no separatecall.answeredevent populatedansweredAt.Real environment tested: macOS local OpenClaw checkout. Base proof used clean
origin/mainat1a3ce7c2in/private/tmp/openclaw-79121-base. Fix proof used branchfastino-79121-twilio-stale-reaperate1cd850ain/Users/allahyar/Documents/fastino-tasks/openclaw-tui-79121. Package manager was pnpm v11.2.2.Exact steps or command run after the patch: Ran a runtime probe that imports the real
startStaleCallReaper, intercepts the interval callback, setsDate.now()to2026-02-16T00:00:00Z, and gives the manager one active call:{ callId: "twilio-live-speaking", startedAt: now - 120000, state: "speaking" }with noansweredAt. I ran the same probe on cleanorigin/mainand this branch. I also ran focused stale-reaper tests, the full voice-call extension suite, formatting, lint, and whitespace checks.Evidence after fix: Before the fix, clean
origin/mainreaped the livespeakingcall:After the fix, the same runtime probe on this branch leaves the live
speakingcall alone:Additional verification:
Observed result after fix: Before the fix, a 120-second
speakingcall with noansweredAtwas logged and ended as stale. After the fix, the same call is recognized as live conversation activity and is not ended. Existing stale cleanup behavior for non-live stale calls remains covered by the full voice-call extension suite.What was not tested: I did not place a live Twilio phone call. The exercised behavior is the local production stale-reaper code path that caused #79121, using a runtime manager probe and the voice-call extension tests.
Platforms tested