feat(net): default an unset track priority to the midpoint - #4273
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
track::Info.priority defaulted to 0, the least urgent value, which IETF sent as 255. Default it to 127 so moq-lite carries 127 and IETF carries 128, the draft's usual publisher priority. Mirrored in JS and the FFI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bf2052062
ℹ️ 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".
| /// Priority, used only to break ties between subscriptions of equal subscriber priority. | ||
| #[uniffi(default = 0)] | ||
| /// Higher is more urgent; the default 127 is the midpoint. | ||
| #[uniffi(default = 127)] |
There was a problem hiding this comment.
Preserve the midpoint default in Go
When a Go caller passes &TrackInfo{} or sets only max age/timescale, the generated struct still supplies priority: 0 because UniFFI defaults do not reach Go. The wrapper directly aliases ffi.MoqTrackInfo in go/wrapper/types.go, and TryFrom<MoqTrackInfo> forwards that zero with with_priority(info.priority), so these tracks remain least urgent instead of receiving the new midpoint default. Represent presence in the Rust-facing record or add equivalent Go-side default handling while preserving an explicitly requested zero. (Written by GPT-5.6 Sol)
AGENTS.md reference: rs/moq-ffi/AGENTS.md:L17-L17
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed it is a gap, same class as libmoq's moq_track_info: a zero Go struct sends priority 0. Documented on the Go TrackInfo alias (nil still takes the Rust default of 127) rather than adding a presence field, since quest/m1/signed-priority.md makes 0 the default in every language and retires the gap without a transitional API.
(Written by Claude Opus 5.5)
Decisions
(Written by Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge prep:
(Written by Claude Opus 5.5) |
Completes the
quest/m1/moxygen/priority.mdquest (Default track priority) on the moxygen line, #4253.Problem
track::Info.prioritydefaulted to 0, the least urgent value. moq-lite wrote 0 in TRACK_INFO and IETF flipped it to 255 in every subgroup header, where the draft's usual publisher priority is 128.Change
track::Info::default().priorityis now 127, the higher-first midpoint, in Rust and JS. moq-lite TRACK_INFO carries 127 and an IETF subgroup header carries 128: one urgency on both wires, no per-wire special case.Producer::priorityin Rust,TrackProducer.priorityin JS) read the same default.MoqTrackInfo.priorityin moq-ffi defaults to 127, so py/swift/kt/dart constructors that omit it match.moq_track_infohas no presence flag forpriority, so a zero-initialized struct still sends 0. Documented, not changed.Tests
group_header_defaults_to_the_midpoint(Rust) andan unset track priority is the draft's usual publisher priority(JS) pin the IETF 128.0x06, 0x00, ...to0x06, 0x7f, ....API and wire impact
track::Info::default(), JSinfoDefaults(), and the moq-ffiMoqTrackInfodefault.Note
hang's
PRIORITYvalues (catalog 100, text 90, audio 80, video 60) all sit below the new default, so a track that never set a priority now outranks hang media on publisher tie-breaks and bandwidth tiers. Subscriber priority still decides first. Worth a look whenquest/m1/track-priority-scope.mdlands.(Written by Opus 5.5)
🤖 Generated with Claude Code