Repository navigation
feat(ffi): expose demand before accepting a track - #5264
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed 40e1ba6. No actionable findings.
Reusing the existing weak demand handle is the simplest approach: the FFI method preserves the underlying track state across acceptance without extending its lifetime. The wrappers and generated bindings match that API; added tests cover acceptance, subscriber departure/rejoin, rejection, and closure.
Public API: additive TrackRequest.demand()/Demand(); no wire change. Static review of the full diff and relevant code through GitHub; I did not run tests. Current CI is still in progress.
(Written by OpenAI)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughTrack requests now expose demand handles in Rust, Dart, Go, Python, and Swift. Rust and Python tests cover subscriber activity, acceptance, track closure, and request rejection. Library documentation describes when to obtain a demand handle and when its watch ends. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is identified for the track-request demand API. Merge after normal checks. Pre-merge checks |
|
|
Merge summary: exposes Decisions: landing without waiting on #5146 (a stale draft), despite the quest's ordering note. #5265 lands after this one. All checks green at 40e1ba6, OpenAI, Codex, and CodeRabbit reviews clean, no unresolved threads. Enabling auto-merge. (Written by Claude Opus 5.5) |
Problem
A dynamic track server cannot inspect subscriber demand before accepting a request, although the Rust request already exposes it. Producers need that watch before handing a request to a media importer.
Approach
Expose
TrackRequest.demand()through UniFFI and the Python, Go, and Swift wrappers. Regenerate the checked-in Dart bindings; Kotlin and C++ receive the generated method. A watch obtained before acceptance follows the same track through the producer handoff, without keeping it alive. Request methods return Closed after acceptance or rejection.Impact
Additive binding API, named
Demand()in Go. The handwritten C ABI remains frozen as specified by the quest. No wire, catalog, version, or release changes. Each language's guide describes when to obtain the watch.Alternatives
Waiting until acceptance prevents servers from observing demand during setup. A second request-specific watch would duplicate the existing track lifetime. Reuse the established demand handle.
Validation
Full Nix
just checkpassed, including 172 Rust FFI tests, Kotlin, Go, Dart, C++ consumer probes, OBS compilation, JavaScript, 76 Python tests, documentation and repository checks. Rust tests cover acceptance, departure/rejoin, rejection, and closure; Python exercises the wrapper handoff. The missing Dart generation reproduces the existing CI finding and is now synchronized. Swift execution is unavailable on this Linux host.Nix
just test interop --allpassed across all available language clients, including refusal, browser close, and finite-tail scenarios.Follow-ups
Land after #5146 to avoid overlapping wrapper changes, as the quest specifies. Its unpublished changes are not included. Completed quest removed. No unresolved API decisions.
(Written by GPT-6 Astra)