-
-
Notifications
You must be signed in to change notification settings - Fork 250
docs(quest): plan signed priority #4275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # [L] Signed priority | ||
|
|
||
| ## Goal | ||
|
|
||
| Every priority in the API is an `i8`, higher first, with 0 as the unset | ||
| midpoint: `track::Info`, `Subscription`, and `group::Fetch` in Rust, their | ||
| JS counterparts, moq-ffi, libmoq, and every wrapper. Nobody has to know that | ||
| 127 is the middle of a `u8`, the default the moxygen line ships. The wire | ||
| stays a byte. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided with the maintainer: | ||
|
|
||
| - moq-lite carries `p + 128` (flip the top bit). The mapping is one-to-one | ||
| and keeps order, so a given byte means what it means today; only the API | ||
| number changes. The default becomes byte 128. | ||
| - IETF carries `128 - p`, saturating. An unset priority goes out as the | ||
| draft's usual 128, and an absent IETF priority decodes to 0. The cost is | ||
| that i8 -128 and -127 share byte 255, and IETF bytes 0 and 1 both decode to | ||
| 127. Pin both ends in tests. | ||
| - hang's built-in priorities move above 0, so hang media outranks a track that | ||
| never set one. Something like catalog 40, text 30, audio 20, video 10; the | ||
| spacing is the implementer's call. Rust and JS keep matching values. | ||
|
Comment on lines
+22
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The proposed AGENTS.md reference: quest/AGENTS.md:L35-L39 Useful? React with 馃憤聽/ 馃憥.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, the example video priority is now 10 in 4b4b617. (Written by Claude Opus 5.5) |
||
| - A zeroed libmoq `moq_track_info` then means the default, which retires the | ||
| need for a `priority_present` flag. | ||
|
|
||
| Changing published `u8` fields to `i8` is an API break in every language, so | ||
| this lands on `dev`. Look for anything that does arithmetic on priority | ||
| (the lite send queue, JS send-order packing, the bandwidth allocator, the | ||
| relay's max-of-subscribers) and keep its ordering, not just its type. | ||
|
Comment on lines
+28
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The implementation scope never includes the conceptual docs, although AGENTS.md reference: AGENTS.md:L94-L98 Useful? React with 馃憤聽/ 馃憥.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, both concept docs are in scope as of 4b4b617. (Written by Claude Opus 5.5) |
||
|
|
||
| moq-archive's `Info::priority` follows. Its version-1 `.info` stores the | ||
| `u8`, so existing recordings must keep their meaning: store the moq-lite byte | ||
| (`p + 128`) or bump the format version, never reinterpret silently. | ||
| `doc/concept/moq-lite.md` (the 0..255 knob) and `doc/concept/standard.md` | ||
| (IETF 128 maps to 127) move to the new range and mapping. | ||
|
|
||
| Report the wire impact in the PR: none in format, but the default byte on | ||
| moq-lite moves again. | ||
|
|
||
| ## Related | ||
|
|
||
| - [Scope track priority](/quest/m1/track-priority-scope.md) - which streams a priority competes with, not its type | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The claim that every API priority becomes signed omits the exported
moq_archive::Info::priority, which remains au8and is serialized into version-1.infoJSON. This would either leave a public priority API inconsistent or, if changed without planning, make existing values above 127 unreadable or alter their meaning. Add the archive API and a backward-compatible storage mapping or version migration to this quest.AGENTS.md reference: quest/AGENTS.md:L74-L77
Useful? React with 馃憤聽/ 馃憥.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, added in 4b4b617: the archive priority joins the migration, keeping existing .info files meaningful.
(Written by Claude Opus 5.5)