Repository navigation
fix!: ask for the recording again when it fails instead of breaking the call - #183
Merged
nafg merged 2 commits intoDec 3, 2026
Merged
Conversation
Add a twilio-base-test project with a test that drives a call through a failed recording, a retry and a completed recording. It fails on this commit, so it is marked failing until the fix. To let the test drive a call without HTTP, the core of the /call handler is pulled out into CallStateServer.advanceCall, which takes the call info and the request's params and returns the Result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he call When Twilio reported that a recording did not complete, the callback completed the call's promise with a defect, so the next /call request for that call died with a 500. The call state stayed the same, so every later request waited on the same failed recording and died too: the call could never get past it. Now a failed recording completes the promise with a failure: a message for the caller. The caller hears "Recording failed. Please try again." and is asked to record again, and the call carries on from the new recording. Waiting too long for a recording still answers "Please wait..." and keeps waiting for the same one. BREAKING CHANGE: the recording promises in CallState and the recording status callback types are now Promise[String, ...] instead of Promise[Nothing, ...], and CallStateServer.recordingResult and transcribedRecordingResult return IO[String, ...] instead of UIO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
This pull request is merged. |
nafg
deleted the
bb/fix-failed-recording-breaking-the-call-thr_g6z4x4rabr
branch
December 3, 2026 11:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When Twilio's recording-status callback reported that a recording did not complete, the callback completed the call's promise with a defect (
promise.die). The next/callrequest for that call died with a 500. The call state stayed the same, so every later request waited on the same failed recording and died too: the call could never get past it.Fix
Promise[String, ...].interpretStateroutes that failure throughpostHandle, which says the message, pauses and asks for the recording again with a new promise. The caller hears "Recording failed. Please try again." and the call carries on from the new recording.postHandle, so the next request keeps waiting for the same recording.Commits
twilio-base-testproject and a test that drives a call through a failed recording, a retry and a completed recording. To drive a call without HTTP, the core of the/callhandler is pulled out intoCallStateServer.advanceCall. The test is markedTestAspect.failingin this commit, since it fails before the fix.TestAspect.failing.Breaking change
The recording promises in
CallStateand the recording-status callback types are nowPromise[String, ...]instead ofPromise[Nothing, ...], andCallStateServer.recordingResultandtranscribedRecordingResultreturnIO[String, ...]instead ofUIO.🤖 Generated with Claude Code