Skip to content

docs(quest): plan signed priority - #4275

Merged
kixelated merged 2 commits into
mainfrom
plan/signed-priority
Sep 27, 2026
Merged

kixelated merged 2 commits into
mainfrom
plan/signed-priority

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Adds the quest/m1/signed-priority.md quest, ranked just above track-priority-scope in m1.

Every API priority (track info, subscription, fetch) becomes an i8 with 0 as the unset midpoint, in Rust, JS, moq-ffi, libmoq, and every wrapper. moq-lite carries p + 128, and IETF carries a saturating 128 - p. hang's built-in priorities move above 0. The type change breaks published APIs, so the quest lands on dev.

These are the maintainer's decisions from the #4273 review. The quest replaces two follow-ups from that PR: re-centring hang's priorities and adding a libmoq priority_present flag.

No code, API, or wire change in this PR.

(Written by Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3d0c8676-2bf2-4c4b-9866-defd25c546e0

📥 Commits

Reviewing files that changed from the base of the PR and between f42f3ad and 4b4b617.

📒 Files selected for processing (2)
  • quest/m1/README.md
  • quest/m1/signed-priority.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T18:46:26.045948Z 1035572 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

MERGE

Positive improvement? Yes. This quest captures the maintainer decisions from #4273 in one implementable plan: every public priority becomes an i8 with 0 as the unset midpoint, hang's built-ins sit above that, and the wire stays a byte with explicit lite/IETF mappings. That retires the "127 is the middle of a u8" cognitive load and the planned priority_present flag in one stroke. Ranking it just above track-priority-scope is right — the type and default story should settle before (or with) the scoping work that still speaks in u8 midpoints.

Worth the complexity? The PR itself is cheap: docs only, no code or wire change. The future cost is real (breaking u8 → i8 across Rust, JS, moq-ffi, libmoq, and wrappers, so it lands on dev), but that break is the point of the design, not accidental churn. The IETF saturating collapse at the extremes is called out with a test pin, which is the honest way to accept a one-byte wire.

Different approach? Keeping the #4273 midpoint-u8 world, or adding an explicit present flag, both leave worse APIs long term. Signed priority with 0-as-unset is the cleaner end state. One thing to watch when this quest is executed: update the language in track-priority-scope.md (it still talks in 255/127) so the two quests stay consistent.

No blockers in the quest text or the README slot. Merge it and treat the plan as the roadmap for the follow-up code change.

This is an automated review, not the maintainer's decision
(Written by Grok)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1035572c15

ℹ️ 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".

Comment on lines +5 to +9
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the archived priority in the signed migration

The claim that every API priority becomes signed omits the exported moq_archive::Info::priority, which remains a u8 and is serialized into version-1 .info JSON. 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

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)

Comment on lines +22 to +24
- 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 0; the
spacing is the implementer's call. Rust and JS keep matching values.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep every hang priority above the unset value

The proposed video 0 value contradicts the stated outcome that all hang media outranks an unset track, because the new unset priority is also 0. An implementation following this example would let default-priority traffic tie with video rather than remain below it, so choose a positive video value or narrow the stated ordering requirement.

AGENTS.md reference: quest/AGENTS.md:L35-L39

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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)

Comment on lines +28 to +31
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add the required conceptual documentation updates

The implementation scope never includes the conceptual docs, although doc/concept/moq-lite.md still documents priorities as 0..255 and doc/concept/standard.md says IETF byte 128 maps to model priority 127. Both become false after this migration, so completing the quest as written would leave the published API semantics stale; include those updates in the plan.

AGENTS.md reference: AGENTS.md:L94-L98

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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)

Keep hang video above the unset 0, and scope moq-archive's .info priority
and the concept docs into the migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Addressed the Codex findings in 4b4b617:

  • hang's example video priority is 10, not 0, so every built-in stays above the unset default.
  • moq-archive's Info::priority joins the migration; its version-1 .info keeps its meaning (store the lite byte or bump the format version).
  • doc/concept/moq-lite.md and doc/concept/standard.md are in scope.

Still quest-only: no code, API, or wire change. quest check passes.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge (squash) September 27, 2026 00:55
@kixelated
kixelated merged commit c2c4efd into main Sep 27, 2026
3 checks passed
@kixelated
kixelated deleted the plan/signed-priority branch September 27, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant