Skip to content

fix(voice): keep Realtime calls alive after cancellation races - #318

Draft
johnmatthewtennant wants to merge 1 commit into
mainfrom
codex/realtime-cancellation-race
Draft

johnmatthewtennant wants to merge 1 commit into
mainfrom
codex/realtime-cancellation-race

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes an OpenAI Realtime call ending with “Cancellation failed: no active response found” when a response finishes before its cancellation reaches the provider. Coordinator cancellations carry tracked event IDs, and the matching no-active-response error is consumed before provider events reach the host's fatal-error reducer. Unrelated errors and other cancellation failures remain visible.

Runtime regressions reproduce the cancellation failure on the base commit and verify that a subsequent speech-start event is processed after the fix. They also preserve failures for uncorrelated errors and unexpected cancellation failures. This coverage uses a local WebSocket test provider; live OpenAI audio and the macOS call UI remain unverified.

Track coordinator cancellation requests and consume correlated no-active-response errors before forwarding provider events to the host. Preserve fatal handling for unrelated and unexpected errors.

Validation: Blox jtennant-berd-cancel-race-20260910 at base 5d5708e; 256 voice library tests and 24 protocol tests passed, plus just fmt-check, check, tauri-check, and clippy. Local changed file is byte-identical to the validated tree (SHA-256 2cf53b9b7e542ccc73e935627d69e26fb18d0c1e2fb0b15afcf48a7e45e0c0a5). Supplemental all-targets Clippy diagnostics also reproduce on unchanged main.
Signed-off-by: John Tennant <jtennant@block.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant