fix(realtime): clean up interrupted WebRTC call allocations - #534
Conversation
Codex Review SummaryThis 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. |
Castiron custom code✅ No new custom-code files detected. 47 mixed files remain; 0 existing customizations changed. Compared 47 existing customizations unchanged
7 more in the full report. A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 33013423030 --repo openai/openai-ruby \
--name castiron-custom-code-33013423030-1 --dir /tmp/castiron-custom-code-33013423030-1
git apply --stat /tmp/castiron-custom-code-33013423030-1/custom-code.patch
cat /tmp/castiron-custom-code-33013423030-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin fd220ef63d5f5d21c1975ec686a529df5d3d3ef3 91489fb21de754901d7203aca323080a5026809a
python3 scripts/castiron/custom_code_report.py report \
--base fd220ef63d5f5d21c1975ec686a529df5d3d3ef3 \
--head 91489fb21de754901d7203aca323080a5026809a --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-91489fb21de7
cat /tmp/castiron-custom-code-91489fb21de7/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38326d74cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Found one additional substantive cancellation/cleanup issue. The existing unresolved findings about malformed hostless Location values and allocation ownership before response logging also remain valid.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Re-reviewed the complete WebRTC allocation lifecycle and verified all previous material findings are resolved. Allocation ownership is captured immediately when trusted response headers arrive, before cancellable logging; malformed, hostless, and cross-origin Location values cannot trigger authenticated cleanup; and cancellation-shielded hangup now has a single bounded wall-clock deadline (maximum five seconds), no retries, and preserved original errors. Also verified tenant/project routing, connection release, hostile redirects, IPv6 origin equivalence, legacy Async compatibility, and sensitive-data redaction. Looks good to merge.
Automated Release PR --- ## [0.83.0](openai/openai-ruby@v0.82.0...v0.83.0) (2026-08-27) ### Features * **api:** add compute_units to Responses and Chat Completions usage ([openai#543](openai#543)) ([b128f89](openai@b128f89)) * expose opt-in raw response bodies on response metadata ([openai#544](openai#544)) ([1529e96](openai@1529e96)) ### Bug Fixes * **realtime:** clean up interrupted WebRTC call allocations ([openai#534](openai#534)) ([2057039](openai@2057039)) ### Chores * **deps:** bump the codeql group with 2 updates ([openai#541](openai#541)) ([b15451c](openai@b15451c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
Summary
realtime.calls.createendpoint and itsOpenAI::HTTPClient::Responsecontract unchanged while giving the existing handwritten Realtime client extension ownership of a newly allocated WebRTC call until response buffering and completion succeed.Locationagainst the original request origin/path and call the generatedrealtime.calls.hangupendpoint before preserving the original failure.Locationvalues as unrecoverable; allocation without any received response headers remains a separate platform-level recovery limitation.Verification
test_sideband_proxy_keeps_call_ids_and_both_credentials_out_of_traceshangs in this local environment even when isolated, so it was excluded locally and remains covered by hosted CI.bundle exec rake lint: 2,783 RuboCop files clean, Sorbet clean, and 1,246 RBS files validated.Requesting
@openai/sdks-teamreview because this change affects Realtime request lifecycle and transport-adjacent ownership.