Skip to content

moq-net: add Lite05Wip version variant (unadvertised)#1518

Merged
kixelated merged 2 commits into
mainfrom
claude/goofy-volhard-77eca2
May 27, 2026
Merged

moq-net: add Lite05Wip version variant (unadvertised)#1518
kixelated merged 2 commits into
mainfrom
claude/goofy-volhard-77eca2

Conversation

@kixelated
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a work-in-progress Lite05Wip variant to lite::Version (Rust) and DRAFT_05_WIP to the JS lite Version so future feature work can branch on moq-lite-05.
  • Reserves wire code 0xff0dad05 and the ALPN string moq-lite-05-wip in both Rust and JS, plus name/FromStr/from_code/from_alpn/alpn round-trips.
  • Updates the exhaustive SetupVersion::from_version match in rs/moq-net/src/setup.rs to put Lite05Wip in Unsupported (same as Lite03/Lite04: no legacy SETUP message).
  • Adds ALPN_LITE_05_WIP arms in rs/moq-net/src/{server,client}.rs so explicit opt-in works end-to-end if someone bumps the ALPN list.

Why

We want to start landing moq-lite-05 features (gated match version arms in encoders/decoders) without exposing the version on the wire yet. Keeping the variant in the codebase but excluding it from ALPNS and Versions::all() lets that work compile and run in tests without changing default server/client behavior.

Not advertised

Deliberately omitted (per the "don't advertise as ALPN" intent):

  • pub const ALPNS in rs/moq-net/src/version.rs (the QUIC/TLS ALPN list)
  • Versions::all() (the default version set used for SETUP/ALPN negotiation)
  • The WebTransport protocols list in js/net/src/connection/connect.ts

A doc comment on ALPNS calls out the omission so the next reader doesn't "fix" it.

All existing per-version match arms in rs/moq-net/src/lite/ and js/net/src/lite/ already use _/default: fallthroughs that target the newest behavior, so Lite05Wip naturally inherits Lite04-style probe/goaway/hop chain semantics until divergence starts.

Test plan

  • cargo test -p moq-net — 327 passed
  • cargo test -p moq-native — 51 passed (ALPN integration tests still negotiate the existing versions, no new lite-05 path leaks into defaults)
  • just check — green (rustfmt, clippy -D warnings, rustdoc -D warnings, biome, JS tests)

(Written by Claude)

Introduces a work-in-progress placeholder for moq-lite-05 so future
feature work can gate on the version without yet exposing it on the
wire. The ALPN string and wire code are reserved, but lite-05 is
deliberately omitted from the default ALPNS list and Versions::all(),
so servers/clients won't advertise or accept it unless explicitly opted
in via with_versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8422d92c-e5c6-4019-beeb-00fc390c5bd5

📥 Commits

Reviewing files that changed from the base of the PR and between 31e0114 and 9157d06.

📒 Files selected for processing (1)
  • rs/moq-net/src/setup.rs

Walkthrough

This PR adds work-in-progress support for MoQ Lite Draft05 WIP version across JavaScript and Rust implementations. It introduces a new Lite05Wip enum variant and corresponding ALPN identifier "moq-lite-05-wip", implements full version conversion and parsing for the new variant across all code paths, adds ALPN negotiation branches in both client and server to recognize and initialize WIP sessions, and classifies the WIP version as unsupported in setup version mapping. The feature is opt-in and explicitly excluded from default ALPN advertisement.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a Lite05Wip version variant to moq-net while keeping it unadvertised.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the purpose, implementation details, testing, and rationale for adding the unadvertised Lite05Wip variant.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/goofy-volhard-77eca2

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rs/moq-net/src/setup.rs`:
- Around line 79-81: In SetupVersion::from_version, replace the explicit match
arm that lists Lite03, Lite04, Lite05Wip with a forward-default arm so future
Lite variants are treated as unsupported; keep the explicit arms for Lite01 and
Lite02 and change the other arm from Version::Lite(lite::Version::Lite03 |
lite::Version::Lite04 | lite::Version::Lite05Wip) => Self::Unsupported to a
catch-all Version::Lite(_) => Self::Unsupported so unrecognized Lite variants
default to Unsupported.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30cb03e3-d8d8-4c29-86f8-402b49e79f05

📥 Commits

Reviewing files that changed from the base of the PR and between 23b4e4d and 31e0114.

📒 Files selected for processing (6)
  • js/net/src/lite/version.ts
  • rs/moq-net/src/client.rs
  • rs/moq-net/src/lite/version.rs
  • rs/moq-net/src/server.rs
  • rs/moq-net/src/setup.rs
  • rs/moq-net/src/version.rs

Comment thread rs/moq-net/src/setup.rs Outdated
Per the CLAUDE.md convention, list only the older Lite variants
explicitly and default future ones forward with Version::Lite(_) =>
Self::Unsupported. Lite03+ all share the same property (no legacy
SETUP message) and any future variant will too, so the catch-all
expresses the intent without forcing edits on every new draft.

Addresses CodeRabbit feedback on #1518.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kixelated kixelated enabled auto-merge (squash) May 27, 2026 21:10
@kixelated kixelated merged commit 6f91a6f into main May 27, 2026
1 check passed
@kixelated kixelated deleted the claude/goofy-volhard-77eca2 branch May 27, 2026 21:27
@moq-bot moq-bot Bot mentioned this pull request May 27, 2026
kixelated added a commit that referenced this pull request May 27, 2026
Per the review on PR #1513:

- moq-net: replace `Versions::qmux_alpns()` / `qmux_alpn_strings()` (the
  per-instance Vec-returning methods) with module-level consts
  `QMUX_ALPNS: &[(QmuxVersion, &str)]` and
  `QMUX_ALPN_STRINGS: &[&str]`. The permutation table is small and
  baked in; no need to recompute. A unit test pins it against the typed
  list to catch drift.
- moq-net: add `Lite05Wip` arm to `Version::qmux_versions` (pinned to
  qmux-01, opt-in only — excluded from QMUX_ALPNS just like main keeps
  it out of ALPNS / Versions::all). This is the merge-from-main fix
  for the CI break introduced by #1518.
- moq-native (client): drop the unused `versions` field and switch the
  websocket helper to take `&[(QmuxVersion, &str)]` (typed pair list).
  Recover the qmux version after the handshake by index lookup in the
  pair list rather than re-parsing the prefix.
- moq-relay: bundle handle_socket's seven arguments into a `Handler`
  struct with a `run()` method. axum filters on
  `QMUX_ALPN_STRINGS.iter().copied()`; the negotiated subprotocol is
  also resolved by index lookup so the relay no longer has its own
  prefix-parsing helper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kixelated kixelated mentioned this pull request May 27, 2026
2 tasks
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