Repository navigation
feat(ffi)!: bindings carry and honor catalog reference epochs - #6244
Conversation
MoqVideo and MoqAudio expose the rendition's optional `epoch`, and MoqBroadcastConsumer::resolve takes it beside `reference`, mirroring moq_mux::Source::resolve and @moq/watch. The rendition-based consumers and libmoq's rendition resolution pass it through, so a broadcast proven to serve another publisher instance fails the rendition instead of playing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Quest outcome: implemented with the second-optional-argument (Written by Claude Opus 5.5) |
The 2026-10-20 maintainer decision on main (#6092) freezes the hand-written libmoq and lands this quest's C half on the generated C package, which is generated from moq-ffi and so inherits the reference epoch. The rs/moq-c changes are restored to main, and the quest's reference in /quest/m1/c/README.md is removed with the quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Decision settled by the maintainer: keep Merging main brought in the 2026-10-20 maintainer decision from moq-dev/moq#6092: the hand-written libmoq is frozen, and this quest's C half lands on the generated C package. So 5f264e0 restores (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f264e09a2
ℹ️ 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".
…+ packages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging. Since Codex's review of 5f264e0, the only change is c77f56f: Decision recorded: Follow-up: a typed (Written by Claude Opus 5.5) |
Quest:
/quest/m1/reference-epoch-bindings.md(deleted here).Summary
A native app now gets the same guarantee as Rust and
@moq/watch: a rendition whose catalog reference names an epoch fails, instead of playing, when its broadcast is proven to serve another publisher instance.MoqVideo/MoqAudiogainepoch: Option<String>besidebroadcast, filled from the catalog.MoqBroadcastConsumer::resolve(reference, epoch)takes the epoch as a required second argument and passes it tomoq_mux::Source::resolve.MoqMediaTrackConsumer::subscribe,MoqMediaGroupConsumer::fetch,MoqVideoConsumer::subscribe, andMoqAudioConsumer::subscriberead the epoch off the rendition.broadcast, it names the catalog's own instance"). A standalone broadcast (no origin) came through no route and has no epoch to prove, so there the epoch is best effort, the same as on an epochless route.resolve(_:epoch:), Pythonresolve(reference, epoch), GoResolve(ctx, reference, epoch). Kotlin and Dart alias the UniFFI type directly; the checked-in Dart bindings are regenerated.Decision: the
resolveshapeSettled by the maintainer: keep
resolve(reference, epoch)with a required second argument. It mirrorsmoq_mux::Source::resolve(rel, epoch)and@moq/watch'srelativeBroadcast(effect, broadcast, epoch), adds no exported type, and has no default, so every caller decides about the epoch instead of silently dropping it. A reference record (MoqReference { broadcast, epoch }) and resolving aMoqRenditiondirectly were considered and rejected.C
The hand-written libmoq (
rs/moq-c) is unchanged. The 2026-10-20 maintainer decision recorded in/quest/m1/c/README.mdfreezes it and lands this quest's C half on the generated C package. That package is generated from moq-ffi, so it inherits the reference epoch with no extra work; the quest's mention there is removed with the quest.Public API and wire impact
moq-ffiUniFFI API and every wrapper:resolvegains a requiredepochargument, andMoqVideo/MoqAudiogainepoch(defaults to null in the generated bindings; a Rust struct literal addsepoch: None).MIGRATE.mdentries are added forrs/moq-ffi,py/moq-rs,py/moq-ffi,swift,swift/ffi,go/wrapper,go/ffi,kt/moq,kt/moq-ffi,dart/moq,dart/moq_ffi, andcpp/moq.MoqError::Mux(frommoq_mux::Error::EpochMismatch).Tests
moq-ffi:resolve_honors_the_reference_epochcovers a matching, mismatched, and epochless reference, an epoch on an epochless route, an empty reference against the catalog's own epoch, a malformed epoch, and the rendition-basedMoqMediaTrackConsumer::subscribe.catalog_exposes_rendition_broadcast_referencesnow also checks that the epoch crosses the binding.just test interop --allpassed before the merge with main.just checkpasses on the merged head (rs, py, kt, go, dart, cpp, obs, quest), exceptcheck flake, which cannot build a github-runner image in the sandbox (unshare: Operation not permitted).Not changed
doc/lib/*: no page coversresolveor rendition references, so there is nothing to update.Suggested follow-ups
MoqErrorvariant for an epoch mismatch, if an app needs to tell it apart from otherMuxfailures (no consumer today).🤖 Generated with Claude Code
(Written by Claude Opus 5.5)