From 91f93a50397fae92f380a4a8f6b4693cb936f4e3 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 23 Oct 2026 02:46:09 -0700 Subject: [PATCH 1/9] chore(quest): claim quest/m1/audit-interop.md Quest-Claim: f0154ca91fd3341a From 7095e5b4e23b22068afbb1886617b904b0532956 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 23 Oct 2026 03:28:42 -0700 Subject: [PATCH 2/9] fix(net): read an omitted publisher priority as 128 Drafts 16 on define an omitted DEFAULT_PUBLISHER_PRIORITY as 128. Since #6142 the IETF subscriber read it as the unset 0, so a relay forwarded every such track at 127: Cloudflare's draft-18 moq-test client fails its data-subgroup-basic case through moq-relay on main with "carried priority 127, expected 128". Rust and JS now read the omission as 128; an absent subscriber priority still reads as 0. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU --- doc/concept/standard.md | 2 +- js/net/src/ietf/priority.ts | 10 ++++++++-- js/net/src/ietf/subscriber.test.ts | 10 +++++----- js/net/src/ietf/subscriber.ts | 6 ++++-- rs/moq-net/src/ietf/priority.rs | 6 +++++- rs/moq-net/src/ietf/subscriber.rs | 12 ++++++------ 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/concept/standard.md b/doc/concept/standard.md index a8df3896d0a..21ab4f2f697 100644 --- a/doc/concept/standard.md +++ b/doc/concept/standard.md @@ -37,7 +37,7 @@ subset drops. What a peer actually observes against this implementation: - **Refused, not fatal.** A legal request this stack does not serve is rejected on its own and the session stays up: the fetch forms above get `NOT_SUPPORTED`. Range Filters get `INVALID_FILTER` on draft 19 and later because the advertised filter limit is zero. On draft 21 and later, namespaces whose first tuple field is exactly `.` or `.session` get `DOES_NOT_EXIST` before application lookup; other dot prefixes still reach the application. Subscription updates accept priority, negotiated subscriber max age, and delivery timeouts; Rust also renews request tokens and judges `NEW_GROUP_REQUEST` as a join (see dynamic groups below). Other supported-but-unimplemented preferences end that subscription; a `TRACK_PROPERTY_FILTER` there closes the session with `PROTOCOL_VIOLATION`, since it belongs only to `SUBSCRIBE_TRACKS`. On draft 18 and later a namespace update may change its prefix; suffixes after the acknowledgement are relative to that new prefix. - **Objects and datagrams.** Only subgroup 0 is accepted: a stream for any other subgroup, whether its header gives the ID or takes it from the first Object ID, is stopped and the session stays up. Rust relays preserve Object IDs, gaps, object properties, FIRST\_OBJECT, and END\_OF\_GROUP status objects between moq-transport peers for subgroup 0, including across a moq-lite-07 hop between two relays that negotiate the [ietf](/draft/moq-ietf) extension. Datagrams retain their IDs, properties, priority, and status. Plain Rust readers and moq-lite peers see consecutive frames and normal datagram payloads; JavaScript supports only normal datagrams at Object ID 0. A malformed datagram closes the session; a relayed one the downstream draft cannot carry is dropped. A relayed Timestamp leaves in the units the downstream response declares, and is dropped where it declares none (drafts 14 through 16), as for a plain frame; an immutable one that would change or vanish is refused. On a timed track the frame holds each object's time, so a mutable Timestamp that only repeats the immutable one is not restated; a status object has no frame, so it keeps its Timestamp among its properties. Only property 0x10 is read as a Timestamp. Property 0x06 stays opaque and keeps its value regardless of timestamp units; it is dropped across the draft-19 boundary, or refused when immutable, because draft 19 assigns it to SUBGROUP\_DELIVERY\_TIMEOUT. From draft 15, a status object carrying properties is refused, and one relayed from draft 14 leaves without them. Draft 14 allows them, but an END\_OF\_TRACK carrying properties ends the subscription as unsupported, since a track end has nowhere to keep them. A `FETCH` carries the END\_OF\_GROUP object on drafts 14 and 15; later drafts have no FETCH status, so their response ends at the last frame. A group cannot resume across route changes by frame ordinal once Object IDs skip ahead of the ordinals on either route; recovery refuses it instead of splicing different objects. - **Dynamic groups.** A track advertises `DYNAMIC_GROUPS` when its publisher sets a refresh ratio, and a track received with `DYNAMIC_GROUPS` gets a ratio of 0. A `NEW_GROUP_REQUEST` (draft 15 and later) counts as one more subscriber joining, which a `SUBSCRIBE` already is: it asks for a new group only when the newest group's bytes after its first frame exceed the ratio times the first frame. Joins coalesce until the asked-for group arrives. A Rust relay sends `NEW_GROUP_REQUEST` upstream, on the `SUBSCRIBE` or in a `REQUEST_UPDATE`, once a join wants a group past the newest it holds; a relay holding nothing yet asks for none. On a track without a ratio, an update carrying one ends the subscription with `UPDATE_FAILED`. On drafts 15 and 16, whose `TRACK_STATUS` answer has no room for it, a relay copy first learned from `TRACK_STATUS` (a fetch-only reader) does not advertise it to later subscribers. A moq-lite-07 hop (`moq-lite-07-wip`, opt-in) carries the same demand natively: the ratio in `TRACK_INFO` and the asked-for group in `SUBSCRIBE_UPDATE`. Earlier moq-lite versions carry neither, so a track received over one never refreshes. -- **Priority.** Higher is served first. This stack's priorities run from -128 to 127 with 0 unset, and go out on the IETF wire, which ranks lower first, as `127 - priority`: an unset priority is IETF 127, and an absent IETF priority is 0. A relay's upstream subscription carries the highest priority its subscribers ask for and updates it as they come and go; its group order stays as the `SUBSCRIBE` asked, since no draft lets an update change it. +- **Priority.** Higher is served first. This stack's priorities run from -128 to 127 with 0 unset, and go out on the IETF wire, which ranks lower first, as `127 - priority`: an unset priority is IETF 127. An absent subscriber priority reads as 0, and an absent publisher priority as the drafts' default of IETF 128, so a relay forwards it unchanged. A relay's upstream subscription carries the highest priority its subscribers ask for and updates it as they come and go; its group order stays as the `SUBSCRIBE` asked, since no draft lets an update change it. - **Size.** An object extension block larger than 64 KiB ends that subgroup stream. The session stays up. This cap is ours, not the draft's. Several project drafts extend the IETF wire without breaking it, since `SETUP` diff --git a/js/net/src/ietf/priority.ts b/js/net/src/ietf/priority.ts index 991475e0ed3..60e86a8f802 100644 --- a/js/net/src/ietf/priority.ts +++ b/js/net/src/ietf/priority.ts @@ -3,14 +3,20 @@ * `ietf::priority`. * * moq-transport ranks lower first, so the wire carries `127 - priority`: the unset priority 0 - * goes out as 127, and an absent priority decodes as 0. + * goes out as 127, and an absent subscriber priority decodes as 0. * * @module */ -/** The wire byte for the unset priority 0, which an absent priority stands for. */ +/** The wire byte for the unset priority 0, which an absent subscriber priority stands for. */ export const ABSENT_WIRE = 127; +/** + * The publisher priority of a track whose publisher omits DEFAULT_PUBLISHER_PRIORITY (draft-16 + * section 11.1.1.1 on). Reading it as {@link ABSENT_WIRE} would forward that track at 127. + */ +export const DEFAULT_PUBLISHER_WIRE = 128; + /** Convert an IETF priority byte into the model's higher-first priority. */ export function fromWire(priority: number): number { return 127 - priority; diff --git a/js/net/src/ietf/subscriber.test.ts b/js/net/src/ietf/subscriber.test.ts index f85eeaf389c..df11eabba47 100644 --- a/js/net/src/ietf/subscriber.test.ts +++ b/js/net/src/ietf/subscriber.test.ts @@ -1226,9 +1226,9 @@ test("a compact END_OF_TRACK at object 5 with properties is subgroup 5, refused } }); -test("older peer without priority property inherits the unset priority", async () => { +test("older peer without priority property inherits the default publisher priority", async () => { const { subscriber, track } = await subscribeTrack(); - expect((await track.info()).priority).toBe(0); + expect((await track.info()).priority).toBe(127 - 128); const group = new GroupMessage({ trackAlias: ALIAS, groupId: 3, @@ -1237,7 +1237,7 @@ test("older peer without priority property inherits the unset priority", async ( flags: { ...groupFlags(true), hasPriority: false }, }); await subscriber.handleGroup(group, new Reader(undefined, encodeObjects([0]), VERSION)); - expect(group.publisherPriority).toBe(127); + expect(group.publisherPriority).toBe(128); track.close(); }); @@ -1351,7 +1351,7 @@ test.each(["acceptance", "timeout"])("returning demand preserves pending setup u if (outcome === "acceptance") { await peer.writer.u53(SubscribeOk.id); await new SubscribeOk({ requestId: request.requestId, trackAlias: ALIAS }).encode(peer.writer, VERSION); - expect(await info).toMatchObject({ priority: 0 }); + expect(await info).toMatchObject({ priority: 127 - 128 }); expect(returned.closed.peek()).toBeUndefined(); } else { jest.advanceTimersByTime(4_000); @@ -1418,7 +1418,7 @@ test("setup abandonment closes before a queued viewer can attach", async () => { const request = await Subscribe.decode(next.reader, VERSION); await next.writer.u53(SubscribeOk.id); await new SubscribeOk({ requestId: request.requestId, trackAlias: ALIAS }).encode(next.writer, VERSION); - expect(await info).toMatchObject({ priority: 0 }); + expect(await info).toMatchObject({ priority: 127 - 128 }); }); test("abandonment cancels once and a late acceptance cannot capture a reused alias", async () => { diff --git a/js/net/src/ietf/subscriber.ts b/js/net/src/ietf/subscriber.ts index faded4b31bd..ae1c2208220 100644 --- a/js/net/src/ietf/subscriber.ts +++ b/js/net/src/ietf/subscriber.ts @@ -56,7 +56,7 @@ import { ObjectIdGap, } from "./object.ts"; import { Parameters } from "./parameters.ts"; -import { ABSENT_WIRE, fromWire, toWire } from "./priority.ts"; +import { DEFAULT_PUBLISHER_WIRE, fromWire, toWire } from "./priority.ts"; import { type Publish, PublishDone, PublishDoneStatus, publishDoneClean } from "./publish.ts"; import { type AdvertParams, @@ -1225,7 +1225,9 @@ export class Subscriber { // No TIMESCALE (always so on drafts 14-16, which can't carry it) means no timeline, // and the track must not claim one when served onward. timescale: ok.properties.timescale, - priority: fromWire(ok.properties.priority ?? ABSENT_WIRE), + // Drafts 14 and 15 carry only per-subgroup priorities, which the model does not keep, + // so they get the later drafts' default too. + priority: fromWire(ok.properties.priority ?? DEFAULT_PUBLISHER_WIRE), maxAge: maxCacheDuration === undefined ? undefined : Milli(Number(maxCacheDuration)), // A moq-transport peer may stamp arrival times, and nothing on the wire says it didn't. ietf: version, diff --git a/rs/moq-net/src/ietf/priority.rs b/rs/moq-net/src/ietf/priority.rs index 7a3cf596178..7bff4a36dd9 100644 --- a/rs/moq-net/src/ietf/priority.rs +++ b/rs/moq-net/src/ietf/priority.rs @@ -4,12 +4,16 @@ //! `priority + 128`: the IETF byte is always `255 -` the lite byte. The unset priority 0 //! goes out as 127, one step off the draft's usual 128, to keep that. -/// The model priority an absent IETF priority stands for: the unset default. +/// The model priority an absent subscriber priority stands for: the unset default. pub(super) const ABSENT: i8 = 0; /// The wire byte of [`ABSENT`], for a message that must carry a priority it was not given. pub(super) const ABSENT_WIRE: u8 = to_wire(ABSENT); +/// The publisher priority of a track whose publisher omits DEFAULT_PUBLISHER_PRIORITY +/// (draft-16 section 11.1.1.1 on). Reading it as [`ABSENT`] would forward that track at 127. +pub(super) const DEFAULT_PUBLISHER_WIRE: u8 = 128; + /// Convert an IETF priority into the model's higher-first priority. pub(super) const fn from_wire(priority: u8) -> i8 { (127 - priority as i16) as i8 diff --git a/rs/moq-net/src/ietf/subscriber.rs b/rs/moq-net/src/ietf/subscriber.rs index e8835fbebc4..36a788a5b3e 100644 --- a/rs/moq-net/src/ietf/subscriber.rs +++ b/rs/moq-net/src/ietf/subscriber.rs @@ -508,11 +508,11 @@ fn accepted_info(properties: &ietf::Properties, version: Version) -> track::Info .with_compress(properties.compress) .with_timescale(properties.timescale) .with_max_age(properties.max_cache_duration) - .with_priority( - properties - .priority - .map_or(super::priority::ABSENT, super::priority::from_wire), - ) + // Drafts 14 and 15 carry only per-subgroup priorities, which the model does not keep, + // so they get the later drafts' default too. + .with_priority(super::priority::from_wire( + properties.priority.unwrap_or(super::priority::DEFAULT_PUBLISHER_WIRE), + )) // A publisher answering NEW_GROUP_REQUEST refreshes on any join with a delta to skip; // this session carries the request back to it. .with_refresh(properties.dynamic_groups.then_some(0)); @@ -8175,7 +8175,7 @@ mod tests { .expect("the subscription is registered"); assert_eq!( track.producer.as_ref().unwrap().publisher_priority(), - priority.map_or(0, super::super::priority::from_wire), + super::super::priority::from_wire(priority.unwrap_or(super::super::priority::DEFAULT_PUBLISHER_WIRE)), "SUBSCRIBE_OK priority must be committed before alias registration" ); // The answer's largest is known before any group arrives. From 1dface510e1ce58a04903258264242c8e6e3a626 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 23 Oct 2026 03:36:52 -0700 Subject: [PATCH 3/9] quest: finish the m1 interop audit and schedule the m2 run The successor records what the m1 run classified: most red cells are fixed on main and wait for the cut, the rest are reported upstream, unsupported, or down. The runner client bump learns the cut's API port and the cold-start reset its data case will hit through moq-relay. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU --- quest/m1/README.md | 1 - quest/m1/audit-interop.md | 123 -------------------- quest/m1/interop-coverage/README.md | 2 +- quest/m1/interop-runner-nightly.md | 4 +- quest/m2/README.md | 1 + quest/m2/audit-interop.md | 150 +++++++++++++++++++++++++ quest/m2/release/runner-client-bump.md | 15 ++- 7 files changed, 168 insertions(+), 128 deletions(-) delete mode 100644 quest/m1/audit-interop.md create mode 100644 quest/m2/audit-interop.md diff --git a/quest/m1/README.md b/quest/m1/README.md index f99627545fe..5d44f5ca71e 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -162,7 +162,6 @@ tracks, so per-group stats stop costing cluster announces. - [Peers advertise their implementation and version](/quest/m1/peer-version.md) - moq-net and `@moq/net` send a `name/version` SETUP parameter both ways, and the auth request and session span carry the client's - [Binding peer version](/quest/m1/binding-peer-version.md) - every binding names itself ahead of the Rust core in that parameter - [Nightly benchmark regressions](/quest/m1/bench-ci.md) - each nightly compares the Rust Criterion benches against the previous nightly's commit on the same hosted runner, publishes it to the git.moq.dev report, and alerts on a regression -- [Interop audit](/quest/m1/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down ## Related diff --git a/quest/m1/audit-interop.md b/quest/m1/audit-interop.md deleted file mode 100644 index 4d93aee879e..00000000000 --- a/quest/m1/audit-interop.md +++ /dev/null @@ -1,123 +0,0 @@ -# [M] Interop audit - -## Goal - -Our moq.dev entries in [englishm/moq-interop-runner](https://github.com/englishm/moq-interop-runner) -match what we ship: the client builds on the latest published moq-tokio and -`@moq/net`, the declared draft versions, and the relay endpoints. Every red -cell with a moq.dev side on and on the -runner's report is classified from its logs and either fixed (ours), -reported upstream (theirs), noted as down, or noted as unsupported (a -feature outside the moq-net API). - -## Plan - -Recurs once per major release (decided 2026-10-21). The PR that finishes -this run also adds the next one with the same file name at the end of the next -milestone's `Required` (m0 to m1, m1 to m2). The successor keeps the Goal -and this paragraph; the rest of its Plan is rewritten with what this run -learned: baselines, results, and what to check first. A successor placed in m2 -also lists the [release cut](/quest/m2/release/cut.md) under `Required`, so it -waits for the release in flight to ship. Only `/quest-delete` ends the -recurrence. Fixes land in the run's PR, one commit each, rather than as follow-ups. -Only a change that needs a maintainer decision (public API, scope) or is -independently landable and too large to review alongside the rest becomes a -follow-up through `/quest-plan`. - -Decided with the maintainer on 2026-10-21: - -- Scope: the relays page (our published Rust, browser, and Bun clients - through every registered public relay), plus every cell of the runner's - report with a moq.dev side: our clients, our docker relay, or - `cdn.moq.dev`, including third-party clients failing against our relay. -- Sync new registry entries. Once the [runner nightly](/quest/m1/interop-runner-nightly.md) - lands, it runs the runner's HEAD, so check that newly registered clients - and docker-only relays show up in its report, and ask upstream for a - published image for any it lists as not run. The relays page reads every - remote relay from the registry; give new relays the per-relay config they - need (`publish_path`, `WEBSOCKET_KEYS` in `test/smoke/relays.sh`). -- Standing approval to open PRs on englishm/moq-interop-runner that touch only - the `moq-dev-*` builds and registry entries, and to file reproducer issues - on other implementations' repos. Every post ends with the AI marker. - -Both reports run published packages, so a fix turns green only after it -ships. Verify a fix from `main` instead: `MOQ_BIN=target/debug/moq just -relays --only ` from `test/smoke`, or `test/interop`, pointed at the -failing relay. The relays page's reason column now leads with the last stage -the subscriber reached (connected, SUBSCRIBE sent, SUBSCRIBE_OK, headless -groups), but still read the cell's log before classifying. - -### Check first - -The m0 run (2026-10-22) fixed on `main`, so confirm each turned green once -released: - -- moxygen: the Rust client offered `moq-00` over WebTransport, so moxygen - picked draft-14 over draft-16. That cell passed live from `main`. The - draft-14 QUIC cell stays red until [IETF lazy discovery](/quest/m1/ietf-lazy-discovery.md) - lands: the CLI asks draft-14 for no namespace, so it discovers nothing - from moxygen. A CLI subtree scope was tried and dropped, since it lost - the sibling broadcasts a catalog references. -- js/net dialed `moqt://` as a WebTransport CONNECT with `:scheme: moqt`, - which moq-relay refuses; the runner's moq-dev-js `remote-quic` cells - failed with an empty message. -- `rendezvous-timeout` answered 0x10 instead of TIMEOUT (fixed in - [moq-dev/moq#5616](https://github.com/moq-dev/moq/pull/5616) before this run). -- `invalid RESET_STREAM: 386759528` (WT_SESSION_GONE) now reads as the - session's close. -- js/net writes each control message in one write; red5 parsed SETUP only - from one stream frame, so recheck red5 WebTransport with js-bun. - -Waiting on others: - -- The runner's moq-dev client images were last built 2026-09-03 (the Rust - one reports moq-native 0.19.15). Asked in - [englishm/moq-interop-runner#170](https://github.com/englishm/moq-interop-runner/pull/170), - which also declares drafts 14-22; until a rebuild, moq-dev client cells - test stale code. [#171](https://github.com/englishm/moq-interop-runner/pull/171) - stops the JS client's http fingerprint fetch against non-moq.dev relays. -- Reported: [moqtail/moqtail#450](https://github.com/moqtail/moqtail/issues/450) - (draft-18 never answers SUBSCRIBE), - [openmoq/moqx#852](https://github.com/openmoq/moqx/issues/852) and - [gmarzot/aiomoqt#123](https://github.com/gmarzot/aiomoqt/issues/123) - (STOP_SENDING on one subgroup ends the subscription, as - [facebookexperimental/moxygen#252](https://github.com/facebookexperimental/moxygen/issues/252)), - [yatagai-mm/Moqtopus#2](https://github.com/yatagai-mm/Moqtopus/issues/2) - (closes on a request before SETUP completes), - [meetecho/imquic#42](https://github.com/meetecho/imquic/issues/42) and - [Eyevinn/moqlivemock#157](https://github.com/Eyevinn/moqlivemock/issues/157) - (interop clients drop the URL path), plus moxygen's filter type 250 - ([facebookexperimental/moxygen#225](https://github.com/facebookexperimental/moxygen/issues/225)), - which also fails moqx's client against our relay. -- The JS publisher refuses every FETCH, so every relay that fills a late - joiner with an upstream FETCH (imquic, MOQtail draft-22, moqt-nr draft-22, - aiomoqt, red5) fails `js-web` publishing. Owned by - [JavaScript FETCH](/quest/m1/js-fetch.md); recheck those cells after it - lands before blaming the relay. MOQtail resets that subscription with - error 0. - -Unsupported or down, not worth rechecking unless something changes: -PUBLISH and SUBSCRIBE_TRACKS cases (`publish-track-*`, `namespace-discovery`, -Cloudflare's PUBLISH cases), Cloudflare draft-14 (no SUBSCRIBE_NAMESPACE, per -its feature matrix), Cloudflare draft-16 (needs a provisioned token; dropped -from the relays page), quiche-moq (connect idle timeout), xquic (its docker -relay binds loopback; its clients are raw QUIC only), and moqtopus and -xquic-draft-18 over WebTransport. - -Not yet reported, for lack of a repo or a reproduction: Nokia (moqt-nr) and -MOQtail draft-22 narrowing a downstream join to Next Object with no FILL, -red5 (its repo is not public), and imquic not replaying namespaces to a later -SUBSCRIBE_NAMESPACE (passed on 2026-10-22). - -Open from the m0 run: the JS subscriber still joins unfiltered before -draft-20, so a relay starting mid-group yields headless groups it stops. Next -Group Start would lose a write-once catalog without a joining FETCH, so this -waits on [JavaScript FETCH](/quest/m1/js-fetch.md). - -## Related - -- [Runner nightly](/quest/m1/interop-runner-nightly.md) - runs every registered client and docker relay with a published image against us -- [Runner teardown](/quest/m3/interop-runner-approval.md) - the runner's moq.dev clients move to the withdrawing `close()` once it ships -- [Moxygen minimal interop](/quest/m1/smoke-moxygen.md) - Moxygen's filter type, waiting upstream -- [JavaScript FETCH](/quest/m1/js-fetch.md) - the JS publisher serves FETCH, which most red `js-web` publisher cells need -- [IETF lazy discovery](/quest/m1/ietf-lazy-discovery.md) - asks for watched prefixes, which the red moxygen draft-14 cell needs diff --git a/quest/m1/interop-coverage/README.md b/quest/m1/interop-coverage/README.md index c8ef6e10e6d..5078d878241 100644 --- a/quest/m1/interop-coverage/README.md +++ b/quest/m1/interop-coverage/README.md @@ -47,5 +47,5 @@ coverage on `main` at `3ab6cbf81d`. ## Related - [Runner client bump](/quest/m2/release/runner-client-bump.md) - after the cut publishes #5083, the runner's Rust client stops stamping every object -- [Interop audit](/quest/m1/audit-interop.md) - classifies the red cells these cases produce +- [Interop audit](/quest/m2/audit-interop.md) - classifies the red cells these cases produce - [moq-transport passthrough](/quest/m1/ietf-extension/README.md) - Moxygen's moq-test conformance through moq-relay diff --git a/quest/m1/interop-runner-nightly.md b/quest/m1/interop-runner-nightly.md index 6cbcebcc8e9..4742426d3db 100644 --- a/quest/m1/interop-runner-nightly.md +++ b/quest/m1/interop-runner-nightly.md @@ -22,7 +22,7 @@ Decided with the maintainer on 2026-10-21. registry's client contract. - Track the runner's HEAD, not a pinned commit. The registry lives in the runner's checkout, so a pin would freeze it and hide every implementation - registered after it until the next [interop audit](/quest/m1/audit-interop.md). + registered after it until the next [interop audit](/quest/m2/audit-interop.md). The Cloudflare and Moxygen smoke lanes already build and run unpinned third-party HEAD the same way. - Split the work the way `interop.yml` does, so upstream code never runs @@ -48,4 +48,4 @@ Public API: none. Wire: none. ## Related -- [Interop audit](/quest/m1/audit-interop.md) - audits this job's moq.dev cells each run +- [Interop audit](/quest/m2/audit-interop.md) - audits this job's moq.dev cells each run diff --git a/quest/m2/README.md b/quest/m2/README.md index ec76e91552b..f07c97654a8 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -232,3 +232,4 @@ ranked just below deterministic TS legs, which it requires. - [Quest tree audit](/quest/m2/audit-quests.md) - repeat the whole-tree audit after the release ships, against the m1 baseline - [CI workflow audit](/quest/m2/audit-ci.md) - repeat the per-workflow and per-job review after the release ships, against the m1 baselines - [Performance audit](/quest/m2/audit-perf.md) - benchmarks that regressed since the m1 run are explained, fixed, or planned, and unbenched hot paths get coverage +- [Interop audit](/quest/m2/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down diff --git a/quest/m2/audit-interop.md b/quest/m2/audit-interop.md new file mode 100644 index 00000000000..f51308152de --- /dev/null +++ b/quest/m2/audit-interop.md @@ -0,0 +1,150 @@ +# [M] Interop audit + +## Goal + +Our moq.dev entries in [englishm/moq-interop-runner](https://github.com/englishm/moq-interop-runner) +match what we ship: the client builds on the latest published moq-tokio and +`@moq/net`, the declared draft versions, and the relay endpoints. Every red +cell with a moq.dev side on and on the +runner's report is classified from its logs and either fixed (ours), +reported upstream (theirs), noted as down, or noted as unsupported (a +feature outside the moq-net API). + +## Plan + +Recurs once per major release (decided 2026-10-21). The PR that finishes +this run also adds the next one with the same file name at the end of the next +milestone's `Required` (m0 to m1, m1 to m2). The successor keeps the Goal +and this paragraph; the rest of its Plan is rewritten with what this run +learned: baselines, results, and what to check first. A successor placed in m2 +also lists the [release cut](/quest/m2/release/cut.md) under `Required`, so it +waits for the release in flight to ship. Only `/quest-delete` ends the +recurrence. Fixes land in the run's PR, one commit each, rather than as follow-ups. +Only a change that needs a maintainer decision (public API, scope) or is +independently landable and too large to review alongside the rest becomes a +follow-up through `/quest-plan`. + +Decided with the maintainer on 2026-10-21: + +- Scope: the relays page (our published Rust, browser, and Bun clients + through every registered public relay), plus every cell of the runner's + report with a moq.dev side: our clients, our docker relay, or + `cdn.moq.dev`, including third-party clients failing against our relay. +- Sync new registry entries. Once the [runner nightly](/quest/m1/interop-runner-nightly.md) + lands, it runs the runner's HEAD, so check that newly registered clients + and docker-only relays show up in its report, and ask upstream for a + published image for any it lists as not run. The relays page reads every + remote relay from the registry; give new relays the per-relay config they + need (`publish_path`, `WEBSOCKET_KEYS` in `test/smoke/relays.sh`). +- Standing approval to open PRs on englishm/moq-interop-runner that touch only + the `moq-dev-*` builds and registry entries, and to file reproducer issues + on other implementations' repos. Every post ends with the AI marker. + +Both reports run published packages, so a fix turns green only after it +ships. Verify from `main` instead. For our clients through a third-party +relay, `MOQ_BIN=target/debug/moq just relays --only --publishers rust +--subscribers rust` from `test/smoke`. For a third-party client through our +relay, run its published runner image (`RELAY_URL`, `TLS_DISABLE_VERIFY=1`, +`TESTCASE`) on the host network against a `moq-relay` built from `main`. +For the runner's own cases from `main`, build its `moq-dev-rs` or +`moq-dev-js` client against this checkout; both need small ports to +`main`'s API. Read the cell's log before classifying. + +### Check first + +The m1 run (2026-10-23) read the runner's 2026-10-23 nightly (77 of 139 +moq.dev cells red; clients on moq-tokio 0.19.28 and `@moq/net` 0.4.4, +docker relay moq-relay 0.17.7) and the relays page (40 of 103 red). Most +red cells were already fixed on `main` and wait for the cut, so confirm +each turned green: + +- The runner's clients bumped to the cut, including the API port the + [runner client bump](/quest/m2/release/runner-client-bump.md) describes. + The JS client's `moqt://` dials (m0 fix) then reach every relay serving + WebTransport on that port; a raw-QUIC-only relay stays unsupported, since + JS has no raw QUIC. +- Draft-17+ PUBLISH_NAMESPACE withdrawal: released Rust and JS end it with + FIN, which some relays ignore, so `subscribe-namespace-lifecycle` waits for + NAMESPACE_DONE (released Rust against quic-zig, xquic-draft-18, and moxygen's + docker relay; released JS against six relays). `main` resets the request + ([moq-dev/moq#5483](https://github.com/moq-dev/moq/pull/5483)); from + `main` the Rust client passes against quic-zig and the JS client against + Cloudflare draft-18. [moq-dev/moq#6518](https://github.com/moq-dev/moq/pull/6518) + backports the JS half to `release`. +- Our relay through third-party clients: `rendezvous-timeout` 0x10 + (aiomoqt, imquic, quic-zig, Cloudflare draft-18), the relay stamping a + Timestamp property on every object + ([moq-dev/moq#5083](https://github.com/moq-dev/moq/pull/5083)), and moq-go + refusing a server without RESET_STREAM_AT (moq-quic) are fixed on `main`, + as are xquic's raw-QUIC connection errors (5 of 6 cases pass). An omitted + DEFAULT_PUBLISHER_PRIORITY now forwards as 128, not 127. +- Through our relay, Cloudflare's draft-18 `data-subgroup-basic` still + fails on two items reported upstream: + [cloudflare/moq-rs#281](https://github.com/cloudflare/moq-rs/issues/281) + (its SUBSCRIBE_OK claims Largest Object (0, 0) before publishing it, then + refuses the joining FETCH) and + [cloudflare/moq-rs#282](https://github.com/cloudflare/moq-rs/issues/282) + (it fails our relay's END_OF_TRACK). + +Still red from `main`, ours: + +- moq-go's webtransport-go speaks WebTransport draft 15: it requires + SETTINGS_WT_ENABLED (0x2c7cf000) and sends `:protocol webtransport-h3`. + `web-transport-proto` 0.6.2 (moq-dev/web-transport) sends neither and + refuses the new token, so every moq-go cell against our relay fails. +- moq-dev-js `data-subgroup-basic` against libquicr never sees the track + end, while moq-dev-rs passes. Not yet traced. +- moxygen draft-14 over raw QUIC waits on + [IETF lazy discovery](/quest/m1/ietf-lazy-discovery.md), and every + `js-web` publisher cell behind a joining FETCH (imquic, MOQtail draft-22, + aiomoqt, red5) on [JavaScript FETCH](/quest/m1/js-fetch.md). + +Theirs, reported or waiting on others: + +- Reported before and still open: + [moqtail/moqtail#450](https://github.com/moqtail/moqtail/issues/450), + [openmoq/moqx#852](https://github.com/openmoq/moqx/issues/852), + [gmarzot/aiomoqt#123](https://github.com/gmarzot/aiomoqt/issues/123), + [yatagai-mm/Moqtopus#2](https://github.com/yatagai-mm/Moqtopus/issues/2), + [facebookexperimental/moxygen#252](https://github.com/facebookexperimental/moxygen/issues/252), + and [facebookexperimental/moxygen#225](https://github.com/facebookexperimental/moxygen/issues/225) + (filter type 250, which also fails moxygen's and moqx's + `announce-subscribe` against our relay). +- [meetecho/imquic#42](https://github.com/meetecho/imquic/issues/42) is + fixed upstream; imquic's cells against `cdn.moq.dev` wait for the runner + to rebuild its image. + [Eyevinn/moqlivemock#157](https://github.com/Eyevinn/moqlivemock/issues/157) + is fixed and green. +- Drafted in this run, posted only if the maintainer approved: Cloudflare's + draft-16 relay forwards END_OF_TRACK as a Normal empty object, so the Rust + subscriber reads an extra object (3, 0); MOQtail draft-18 never forwards + NAMESPACE for a later matching PUBLISH_NAMESPACE; moq-go dials only the + IPv6 address of `cdn.moq.dev` and needs an explicit port in an `https://` + URL; and the runner lists moqxr as not run for lack of a published image. + Search before filing again. +- Not reported, lower value: red5 subscribes the published prefix instead + of the requested tuple namespace (no public repo); moqlivemock's relay + refuses a SUBSCRIBE under an announced prefix; libquicr answers + SUBSCRIBE_OK for an unpublished namespace; xquic ignores our draft-14 + SUBSCRIBE_ERROR, sends `moq-test/interop` as one tuple field, and its + WebTransport never reaches our relay. + +Unsupported or down, not worth rechecking unless something changes: +PUBLISH and SUBSCRIBE_TRACKS cases (`publish-track-*`, `namespace-discovery`, +Cloudflare's PUBLISH cases), Cloudflare draft-14 (no SUBSCRIBE_NAMESPACE), +quiche-moq (connect idle timeout), xquic's docker relay (binds loopback), +and moqtopus and xquic-draft-18 over WebTransport (raw QUIC only). + +## Required + +- [Release cut](/quest/m2/release/cut.md) - waits for the release in flight to ship + +## Related + +- [Runner nightly](/quest/m1/interop-runner-nightly.md) - runs every registered client and docker relay with a published image against us +- [Runner client bump](/quest/m2/release/runner-client-bump.md) - the runner's Rust client moves to the cut and its API +- [Runner teardown](/quest/m3/interop-runner-approval.md) - the runner's moq.dev clients move to the withdrawing `close()` once it ships +- [Moxygen minimal interop](/quest/m1/smoke-moxygen.md) - Moxygen's filter type, waiting upstream +- [JavaScript FETCH](/quest/m1/js-fetch.md) - the JS publisher serves FETCH, which most red `js-web` publisher cells need +- [IETF lazy discovery](/quest/m1/ietf-lazy-discovery.md) - asks for watched prefixes, which the red moxygen draft-14 cell needs +- [Interop coverage](/quest/m1/interop-coverage/README.md) - the runner cases whose red cells this audit classifies diff --git a/quest/m2/release/runner-client-bump.md b/quest/m2/release/runner-client-bump.md index 2b36ac3d882..e5cdc9e7946 100644 --- a/quest/m2/release/runner-client-bump.md +++ b/quest/m2/release/runner-client-bump.md @@ -1,4 +1,4 @@ -# [XS] The runner's Rust client stops stamping every object +# [S] The runner's Rust client stops stamping every object ## Goal @@ -17,3 +17,16 @@ this quest once that PR merges. The released client adds the property, which third-party subscribers count as an unexpected extension in `data-subgroup-basic`. The interop audit's standing approval covers PRs touching the `moq-dev-*` builds. + +The cut also breaks the client's source, found porting it to `main` in the +m1 interop audit: a dynamic claim answers through `Request::prepare` and +`Prepared::publish` under a minted epoch, a track without a timescale +refuses timestamped frames, `Subscription` takes `max_delay` instead of a +max age, announcement events are `Start`, `Update`, `Restart`, and `End`, +and `track::Producer::used` is gone. Through moq-relay, the first +subscription under `data-subgroup-basic`'s dynamic claim then fails +`unroutable`: the accepted cold-start reset that +[announce takeover](/quest/m1/announce-takeover.md) removes, so check +whether that has landed before calling it a client bug. The JS client's +announcement check also moves from `"retracted"` to `"end"` when it takes +the cut. From 5400898ef4e6878b69cd653fe36f2d440c00dd96 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 23 Oct 2026 03:50:32 -0700 Subject: [PATCH 4/9] quest: separate the Rust and JS lifecycle causes in the m2 audit Released Rust times out on the NAMESPACE itself, not on NAMESPACE_DONE, and xquic-draft-18 offers no namespace discovery at all. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EeyiEy5FWz3z44DYZVo7vU --- quest/m2/audit-interop.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/quest/m2/audit-interop.md b/quest/m2/audit-interop.md index f51308152de..353141e7412 100644 --- a/quest/m2/audit-interop.md +++ b/quest/m2/audit-interop.md @@ -62,15 +62,17 @@ each turned green: [runner client bump](/quest/m2/release/runner-client-bump.md) describes. The JS client's `moqt://` dials (m0 fix) then reach every relay serving WebTransport on that port; a raw-QUIC-only relay stays unsupported, since - JS has no raw QUIC. -- Draft-17+ PUBLISH_NAMESPACE withdrawal: released Rust and JS end it with - FIN, which some relays ignore, so `subscribe-namespace-lifecycle` waits for - NAMESPACE_DONE (released Rust against quic-zig, xquic-draft-18, and moxygen's - docker relay; released JS against six relays). `main` resets the request - ([moq-dev/moq#5483](https://github.com/moq-dev/moq/pull/5483)); from - `main` the Rust client passes against quic-zig and the JS client against - Cloudflare draft-18. [moq-dev/moq#6518](https://github.com/moq-dev/moq/pull/6518) - backports the JS half to `release`. + JS has no raw QUIC. The JS client's red5 WebTransport cells still time out + connecting, which m0's one-write control messages target. +- `subscribe-namespace-lifecycle`: released JS withdraws a draft-17+ + PUBLISH_NAMESPACE with FIN, which six relays ignore, so it waits for + NAMESPACE_DONE. `main` resets the request + ([moq-dev/moq#5483](https://github.com/moq-dev/moq/pull/5483)) and passes + against Cloudflare draft-18; + [moq-dev/moq#6518](https://github.com/moq-dev/moq/pull/6518) backports it + to `release`. Released Rust never sees the NAMESPACE itself from quic-zig + or moxygen (docker, and draft-14 over raw QUIC); the client built on + `main` passes against both. - Our relay through third-party clients: `rendezvous-timeout` 0x10 (aiomoqt, imquic, quic-zig, Cloudflare draft-18), the relay stamping a Timestamp property on every object @@ -131,7 +133,8 @@ Theirs, reported or waiting on others: Unsupported or down, not worth rechecking unless something changes: PUBLISH and SUBSCRIBE_TRACKS cases (`publish-track-*`, `namespace-discovery`, -Cloudflare's PUBLISH cases), Cloudflare draft-14 (no SUBSCRIBE_NAMESPACE), +Cloudflare's PUBLISH cases), relays without namespace discovery, which +moq-net needs before a SUBSCRIBE (Cloudflare draft-14, xquic-draft-18), quiche-moq (connect idle timeout), xquic's docker relay (binds loopback), and moqtopus and xquic-draft-18 over WebTransport (raw QUIC only). From bde353fb19e8407a272b223f03b727d818f2db09 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 23 Oct 2026 09:02:15 -0700 Subject: [PATCH 5/9] fix(net): read an omitted subscriber priority as 128 too The drafts define an omitted SUBSCRIBER_PRIORITY as 128, the same default as DEFAULT_PUBLISHER_PRIORITY. #6142 read it as the unset 0, so a relay rewrote a subscriber's omitted priority to 127 upstream. Rust and JS now share one DEFAULT_WIRE (128) for both omissions and for a message that must carry a priority it was not given; it reads as model priority -1, one step below unset, so a relay forwards it unchanged. Co-Authored-By: Claude Opus 5.5 --- doc/concept/standard.md | 2 +- js/net/src/ietf/ietf.test.ts | 9 ++++++++ js/net/src/ietf/object.ts | 4 ++-- js/net/src/ietf/priority.test.ts | 7 +++--- js/net/src/ietf/priority.ts | 12 ++++------ js/net/src/ietf/publisher.ts | 4 ++-- js/net/src/ietf/subscribe.ts | 6 ++--- js/net/src/ietf/subscribe_tracks.test.ts | 13 +++++++++++ js/net/src/ietf/subscriber.ts | 4 ++-- rs/moq-net/MIGRATE.md | 2 +- rs/moq-net/src/ietf/fetch.rs | 15 +++++++++++- rs/moq-net/src/ietf/group.rs | 2 +- rs/moq-net/src/ietf/parameters.rs | 2 +- rs/moq-net/src/ietf/priority.rs | 18 +++++---------- rs/moq-net/src/ietf/publish.rs | 2 +- rs/moq-net/src/ietf/publisher/tracks.rs | 18 ++++++++++++++- rs/moq-net/src/ietf/subscribe.rs | 29 ++++++++++++++++++++++-- rs/moq-net/src/ietf/subscriber.rs | 5 ++-- rs/moq-net/src/ietf/subscriber/tracks.rs | 2 +- 19 files changed, 113 insertions(+), 43 deletions(-) diff --git a/doc/concept/standard.md b/doc/concept/standard.md index 21ab4f2f697..0a49335cc70 100644 --- a/doc/concept/standard.md +++ b/doc/concept/standard.md @@ -37,7 +37,7 @@ subset drops. What a peer actually observes against this implementation: - **Refused, not fatal.** A legal request this stack does not serve is rejected on its own and the session stays up: the fetch forms above get `NOT_SUPPORTED`. Range Filters get `INVALID_FILTER` on draft 19 and later because the advertised filter limit is zero. On draft 21 and later, namespaces whose first tuple field is exactly `.` or `.session` get `DOES_NOT_EXIST` before application lookup; other dot prefixes still reach the application. Subscription updates accept priority, negotiated subscriber max age, and delivery timeouts; Rust also renews request tokens and judges `NEW_GROUP_REQUEST` as a join (see dynamic groups below). Other supported-but-unimplemented preferences end that subscription; a `TRACK_PROPERTY_FILTER` there closes the session with `PROTOCOL_VIOLATION`, since it belongs only to `SUBSCRIBE_TRACKS`. On draft 18 and later a namespace update may change its prefix; suffixes after the acknowledgement are relative to that new prefix. - **Objects and datagrams.** Only subgroup 0 is accepted: a stream for any other subgroup, whether its header gives the ID or takes it from the first Object ID, is stopped and the session stays up. Rust relays preserve Object IDs, gaps, object properties, FIRST\_OBJECT, and END\_OF\_GROUP status objects between moq-transport peers for subgroup 0, including across a moq-lite-07 hop between two relays that negotiate the [ietf](/draft/moq-ietf) extension. Datagrams retain their IDs, properties, priority, and status. Plain Rust readers and moq-lite peers see consecutive frames and normal datagram payloads; JavaScript supports only normal datagrams at Object ID 0. A malformed datagram closes the session; a relayed one the downstream draft cannot carry is dropped. A relayed Timestamp leaves in the units the downstream response declares, and is dropped where it declares none (drafts 14 through 16), as for a plain frame; an immutable one that would change or vanish is refused. On a timed track the frame holds each object's time, so a mutable Timestamp that only repeats the immutable one is not restated; a status object has no frame, so it keeps its Timestamp among its properties. Only property 0x10 is read as a Timestamp. Property 0x06 stays opaque and keeps its value regardless of timestamp units; it is dropped across the draft-19 boundary, or refused when immutable, because draft 19 assigns it to SUBGROUP\_DELIVERY\_TIMEOUT. From draft 15, a status object carrying properties is refused, and one relayed from draft 14 leaves without them. Draft 14 allows them, but an END\_OF\_TRACK carrying properties ends the subscription as unsupported, since a track end has nowhere to keep them. A `FETCH` carries the END\_OF\_GROUP object on drafts 14 and 15; later drafts have no FETCH status, so their response ends at the last frame. A group cannot resume across route changes by frame ordinal once Object IDs skip ahead of the ordinals on either route; recovery refuses it instead of splicing different objects. - **Dynamic groups.** A track advertises `DYNAMIC_GROUPS` when its publisher sets a refresh ratio, and a track received with `DYNAMIC_GROUPS` gets a ratio of 0. A `NEW_GROUP_REQUEST` (draft 15 and later) counts as one more subscriber joining, which a `SUBSCRIBE` already is: it asks for a new group only when the newest group's bytes after its first frame exceed the ratio times the first frame. Joins coalesce until the asked-for group arrives. A Rust relay sends `NEW_GROUP_REQUEST` upstream, on the `SUBSCRIBE` or in a `REQUEST_UPDATE`, once a join wants a group past the newest it holds; a relay holding nothing yet asks for none. On a track without a ratio, an update carrying one ends the subscription with `UPDATE_FAILED`. On drafts 15 and 16, whose `TRACK_STATUS` answer has no room for it, a relay copy first learned from `TRACK_STATUS` (a fetch-only reader) does not advertise it to later subscribers. A moq-lite-07 hop (`moq-lite-07-wip`, opt-in) carries the same demand natively: the ratio in `TRACK_INFO` and the asked-for group in `SUBSCRIBE_UPDATE`. Earlier moq-lite versions carry neither, so a track received over one never refreshes. -- **Priority.** Higher is served first. This stack's priorities run from -128 to 127 with 0 unset, and go out on the IETF wire, which ranks lower first, as `127 - priority`: an unset priority is IETF 127. An absent subscriber priority reads as 0, and an absent publisher priority as the drafts' default of IETF 128, so a relay forwards it unchanged. A relay's upstream subscription carries the highest priority its subscribers ask for and updates it as they come and go; its group order stays as the `SUBSCRIBE` asked, since no draft lets an update change it. +- **Priority.** Higher is served first. This stack's priorities run from -128 to 127 with 0 unset, and go out on the IETF wire, which ranks lower first, as `127 - priority`: an unset priority is IETF 127. An omitted subscriber or publisher priority reads as the drafts' default of IETF 128, one step below unset, so a relay forwards it unchanged. A relay's upstream subscription carries the highest priority its subscribers ask for and updates it as they come and go; its group order stays as the `SUBSCRIBE` asked, since no draft lets an update change it. - **Size.** An object extension block larger than 64 KiB ends that subgroup stream. The session stays up. This cap is ours, not the draft's. Several project drafts extend the IETF wire without breaking it, since `SETUP` diff --git a/js/net/src/ietf/ietf.test.ts b/js/net/src/ietf/ietf.test.ts index e3231756f45..abb7d9239b2 100644 --- a/js/net/src/ietf/ietf.test.ts +++ b/js/net/src/ietf/ietf.test.ts @@ -2045,6 +2045,15 @@ test("Subscribe v20: decodes every legal parameter", async () => { expect(msg.propertiesWanted).toBe(false); }); +// From draft-15 an omitted SUBSCRIBER_PRIORITY means 128, not the unset 127, so a relay +// forwards it unchanged. +test("Subscribe: an omitted SUBSCRIBER_PRIORITY is 128", async () => { + for (const version of [Version.DRAFT_15, Version.DRAFT_16, Version.DRAFT_18, Version.DRAFT_20, Version.DRAFT_22]) { + const msg = await decodeVersioned(framed([...TRACK_HEAD, 0x00]), Subscribe.Subscribe.decode, version); + expect(msg.subscriberPriority).toBe(128); + } +}); + // INCLUDE_PROPERTIES is a uint8: one raw byte with no Length. test("Subscribe v20: INCLUDE_PROPERTIES is a uint8", async () => { const msg = new Subscribe.Subscribe({ diff --git a/js/net/src/ietf/object.ts b/js/net/src/ietf/object.ts index 4315e666ea4..bc9c8525741 100644 --- a/js/net/src/ietf/object.ts +++ b/js/net/src/ietf/object.ts @@ -2,7 +2,7 @@ import { ProtocolViolation, StreamCode, Stream as StreamError } from "../error.t import { asIetf, type Cursor, type Reader, Writer } from "../stream.ts"; import { type Timescale, Timestamp } from "../time.ts"; import { U64 } from "../util/u64.ts"; -import { ABSENT_WIRE } from "./priority.ts"; +import { DEFAULT_WIRE } from "./priority.ts"; import { type IetfVersion, Version } from "./version.ts"; // Implementation limit for object extension blocks, independent of the IETF draft. @@ -227,7 +227,7 @@ export class Group { const trackAlias = await r.u62(); const groupId = await r.u53(); const subGroupId = flags.hasSubgroup ? await r.u53() : 0; - const publisherPriority = hasPriority ? await r.u8() : ABSENT_WIRE; + const publisherPriority = hasPriority ? await r.u8() : DEFAULT_WIRE; return new Group({ trackAlias, groupId, subGroupId, publisherPriority, flags }); } diff --git a/js/net/src/ietf/priority.test.ts b/js/net/src/ietf/priority.test.ts index 04ff32b0787..f35ba559a72 100644 --- a/js/net/src/ietf/priority.test.ts +++ b/js/net/src/ietf/priority.test.ts @@ -1,7 +1,7 @@ import { expect, test } from "bun:test"; import * as Lite from "../lite/priority.ts"; import { infoDefaults } from "../track.ts"; -import { ABSENT_WIRE, fromWire, toWire } from "./priority.ts"; +import { DEFAULT_WIRE, fromWire, toWire } from "./priority.ts"; test("IETF priority is lower first", () => { expect(fromWire(0)).toBe(127); @@ -27,7 +27,8 @@ test("IETF mirrors moq-lite", () => { } }); -test("an unset track priority goes out as the absent byte", () => { +// An omitted priority is the drafts' 128, one step below the unset 127, so it forwards unchanged. +test("an unset track priority goes out as 127 and an omitted one reads as -1", () => { expect(toWire(infoDefaults().priority)).toBe(127); - expect(fromWire(ABSENT_WIRE)).toBe(0); + expect(fromWire(DEFAULT_WIRE)).toBe(-1); }); diff --git a/js/net/src/ietf/priority.ts b/js/net/src/ietf/priority.ts index 60e86a8f802..fabb94750ad 100644 --- a/js/net/src/ietf/priority.ts +++ b/js/net/src/ietf/priority.ts @@ -3,19 +3,17 @@ * `ietf::priority`. * * moq-transport ranks lower first, so the wire carries `127 - priority`: the unset priority 0 - * goes out as 127, and an absent subscriber priority decodes as 0. + * goes out as 127, and an omitted priority decodes as -1, one step below it. * * @module */ -/** The wire byte for the unset priority 0, which an absent subscriber priority stands for. */ -export const ABSENT_WIRE = 127; - /** - * The publisher priority of a track whose publisher omits DEFAULT_PUBLISHER_PRIORITY (draft-16 - * section 11.1.1.1 on). Reading it as {@link ABSENT_WIRE} would forward that track at 127. + * The IETF priority an omitted SUBSCRIBER_PRIORITY or DEFAULT_PUBLISHER_PRIORITY stands for, as + * the drafts define both, and the byte for a message that must carry a priority it was not given. + * It reads as -1, so a relay forwards an omitted priority as 128, not as the unset 127. */ -export const DEFAULT_PUBLISHER_WIRE = 128; +export const DEFAULT_WIRE = 128; /** Convert an IETF priority byte into the model's higher-first priority. */ export function fromWire(priority: number): number { diff --git a/js/net/src/ietf/publisher.ts b/js/net/src/ietf/publisher.ts index 9b2cb8c084c..666f5950177 100644 --- a/js/net/src/ietf/publisher.ts +++ b/js/net/src/ietf/publisher.ts @@ -48,7 +48,7 @@ import * as Message from "./message.ts"; import * as Namespace from "./namespace.ts"; import { FetchFrame, Frame, Group as GroupMessage } from "./object.ts"; import { Parameters } from "./parameters.ts"; -import { fromWire, toWire } from "./priority.ts"; +import { DEFAULT_WIRE, fromWire, toWire } from "./priority.ts"; import * as Properties from "./properties.ts"; import { Publish, PublishDone, PublishDoneStatus } from "./publish.ts"; import { @@ -2572,7 +2572,7 @@ export class Publisher { requestId: id, trackNamespace: namespace, trackName: name, - subscriberPriority: defaults.subscriberPriority ?? 127, + subscriberPriority: defaults.subscriberPriority ?? DEFAULT_WIRE, groupOrder: defaults.groupOrder === GroupOrder.Ascending ? "ascending" : "descending", filter: defaults.subscriptionFilter, propertiesWanted: defaults.includeProperties ?? true, diff --git a/js/net/src/ietf/subscribe.ts b/js/net/src/ietf/subscribe.ts index cc04b87f1a8..7144cee8faa 100644 --- a/js/net/src/ietf/subscribe.ts +++ b/js/net/src/ietf/subscribe.ts @@ -7,7 +7,7 @@ import * as Filter from "./filter.ts"; import * as Message from "./message.ts"; import * as Namespace from "./namespace.ts"; import { type MessageLocation, MSG_PARAM_FORWARD, MSG_PARAM_SUBSCRIBER_PRIORITY, Parameters } from "./parameters.ts"; -import { ABSENT_WIRE } from "./priority.ts"; +import { DEFAULT_WIRE } from "./priority.ts"; import * as Properties from "./properties.ts"; import { type IetfVersion, Version } from "./version.ts"; @@ -221,7 +221,7 @@ export class Subscribe { } // v15+: fields are in parameters const params = await Parameters.decode(r, version, "subscribe"); - const subscriberPriority = params.subscriberPriority ?? ABSENT_WIRE; + const subscriberPriority = params.subscriberPriority ?? DEFAULT_WIRE; const groupOrder = decodeGroupOrder(params.groupOrder ?? GroupOrder.Descending); // FILL_PARAMETERS and INCLUDE_PROPERTIES are draft-20 additions, and the Range @@ -460,7 +460,7 @@ export class SubscribeUpdate { await w.u62(0n); // start_group await w.u62(0n); // start_object await w.u62(0n); // end_group - await w.u8(this.parameters.subscriberPriority ?? ABSENT_WIRE); + await w.u8(this.parameters.subscriberPriority ?? DEFAULT_WIRE); await w.bool(this.parameters.forward ?? true); await this.parameters.encode(w, version, [MSG_PARAM_SUBSCRIBER_PRIORITY, MSG_PARAM_FORWARD]); } else { diff --git a/js/net/src/ietf/subscribe_tracks.test.ts b/js/net/src/ietf/subscribe_tracks.test.ts index a51211dcfc2..55e2f5e5c15 100644 --- a/js/net/src/ietf/subscribe_tracks.test.ts +++ b/js/net/src/ietf/subscribe_tracks.test.ts @@ -271,6 +271,19 @@ test("PUBLISH carries listing defaults and honors INCLUDE_PROPERTIES", async () expect(publish.parameters?.subscriptionFilter).toEqual({ kind: "relative", groups: 2n }); }); +// An omitted SUBSCRIBER_PRIORITY is the drafts' 128, so the PUBLISH restates 128, not the unset 127. +test("PUBLISH restates an omitted listing priority as 128", async () => { + const version = Version.DRAFT_22; + const fx = fixture(version); + const listing = await fx.list("room", false, new Parameters()); + await ok(listing, version); + const broadcast = fx.origin.createBroadcast(Path.from("room/live")); + broadcast.announce(); + broadcast.createTrack("later"); + const { publish } = await fx.offered(); + expect(publish.parameters?.subscriberPriority).toBe(128); +}); + test("an update ends only its listing and frees its prefix", async () => { const version = Version.DRAFT_22; const fx = fixture(version); diff --git a/js/net/src/ietf/subscriber.ts b/js/net/src/ietf/subscriber.ts index ae1c2208220..96b6e6ae12d 100644 --- a/js/net/src/ietf/subscriber.ts +++ b/js/net/src/ietf/subscriber.ts @@ -56,7 +56,7 @@ import { ObjectIdGap, } from "./object.ts"; import { Parameters } from "./parameters.ts"; -import { DEFAULT_PUBLISHER_WIRE, fromWire, toWire } from "./priority.ts"; +import { DEFAULT_WIRE, fromWire, toWire } from "./priority.ts"; import { type Publish, PublishDone, PublishDoneStatus, publishDoneClean } from "./publish.ts"; import { type AdvertParams, @@ -1227,7 +1227,7 @@ export class Subscriber { timescale: ok.properties.timescale, // Drafts 14 and 15 carry only per-subgroup priorities, which the model does not keep, // so they get the later drafts' default too. - priority: fromWire(ok.properties.priority ?? DEFAULT_PUBLISHER_WIRE), + priority: fromWire(ok.properties.priority ?? DEFAULT_WIRE), maxAge: maxCacheDuration === undefined ? undefined : Milli(Number(maxCacheDuration)), // A moq-transport peer may stamp arrival times, and nothing on the wire says it didn't. ietf: version, diff --git a/rs/moq-net/MIGRATE.md b/rs/moq-net/MIGRATE.md index 5b362199db7..08cb8831c6d 100644 --- a/rs/moq-net/MIGRATE.md +++ b/rs/moq-net/MIGRATE.md @@ -104,7 +104,7 @@ The track's default was 127, the midpoint, and the subscription's was 0, the lea To keep a value's moq-lite byte, subtract 128 from it: 255 becomes 127, 128 becomes 0, and 0 becomes -128. The publisher's `Info::priority` now breaks ties between subscriptions at one subscriber priority. -On the wire, moq-lite carries `priority + 128` and moq-transport `127 - priority`, so an unset priority goes out as 128 on moq-lite (was 127) and 127 on moq-transport (was 128), and an absent moq-transport priority reads as 0. +On the wire, moq-lite carries `priority + 128` and moq-transport `127 - priority`, so an unset priority goes out as 128 on moq-lite (was 127) and 127 on moq-transport (was 128), and an omitted moq-transport priority is the drafts' 128, which reads as -1. ### A client session asks only about what its readers watch (#6165) diff --git a/rs/moq-net/src/ietf/fetch.rs b/rs/moq-net/src/ietf/fetch.rs index ddb23871a94..2cb61e3ebad 100644 --- a/rs/moq-net/src/ietf/fetch.rs +++ b/rs/moq-net/src/ietf/fetch.rs @@ -311,7 +311,7 @@ impl Message for Fetch<'_> { Ok(Self { request_id, - subscriber_priority: subscriber_priority.unwrap_or(super::priority::ABSENT_WIRE), + subscriber_priority: subscriber_priority.unwrap_or(super::priority::DEFAULT_WIRE), // No preference: the publisher picks the order. group_order: group_order.unwrap_or(GroupOrder::Any), fetch_type, @@ -1085,6 +1085,19 @@ mod tests { } } } + + /// An omitted SUBSCRIBER_PRIORITY is the drafts' 128, not this stack's unset 127. + #[test] + fn test_fetch_omitted_priority_is_128() { + #[rustfmt::skip] + let body = [ + 0x01, // Request ID + 0x02, 0x03, 0x00, // Relative Joining: subscription 3, offset 0 + 0x00, // no parameters + ]; + let fetch = decode_message::(&body, Version::Draft16).unwrap(); + assert_eq!(fetch.subscriber_priority, 128); + } } /// The Object serialization on a fetch stream (draft-20 section 11.4.4), which a fill's diff --git a/rs/moq-net/src/ietf/group.rs b/rs/moq-net/src/ietf/group.rs index 7ddc17b82ca..5fc762771af 100644 --- a/rs/moq-net/src/ietf/group.rs +++ b/rs/moq-net/src/ietf/group.rs @@ -324,7 +324,7 @@ impl Decode for GroupHeader { let publisher_priority = if flags.has_priority { r.u8()? } else { - super::priority::ABSENT_WIRE + super::priority::DEFAULT_WIRE }; let result = Self { diff --git a/rs/moq-net/src/ietf/parameters.rs b/rs/moq-net/src/ietf/parameters.rs index b0301456d83..3522201c17a 100644 --- a/rs/moq-net/src/ietf/parameters.rs +++ b/rs/moq-net/src/ietf/parameters.rs @@ -560,7 +560,7 @@ macro_rules! encode_params { /// 0x20 => subscriber_priority: Option, /// ); /// // forward: Option and subscriber_priority: Option are now in scope -/// let subscriber_priority = subscriber_priority.unwrap_or(super::priority::ABSENT_WIRE); +/// let subscriber_priority = subscriber_priority.unwrap_or(super::priority::DEFAULT_WIRE); /// ``` macro_rules! decode_params { ($r:expr, $version:expr, $($key:expr => $name:ident: $ty:ty $(where $gate:expr)?),* $(,)?) => { diff --git a/rs/moq-net/src/ietf/priority.rs b/rs/moq-net/src/ietf/priority.rs index 7bff4a36dd9..197a3f35261 100644 --- a/rs/moq-net/src/ietf/priority.rs +++ b/rs/moq-net/src/ietf/priority.rs @@ -4,15 +4,10 @@ //! `priority + 128`: the IETF byte is always `255 -` the lite byte. The unset priority 0 //! goes out as 127, one step off the draft's usual 128, to keep that. -/// The model priority an absent subscriber priority stands for: the unset default. -pub(super) const ABSENT: i8 = 0; - -/// The wire byte of [`ABSENT`], for a message that must carry a priority it was not given. -pub(super) const ABSENT_WIRE: u8 = to_wire(ABSENT); - -/// The publisher priority of a track whose publisher omits DEFAULT_PUBLISHER_PRIORITY -/// (draft-16 section 11.1.1.1 on). Reading it as [`ABSENT`] would forward that track at 127. -pub(super) const DEFAULT_PUBLISHER_WIRE: u8 = 128; +/// The IETF priority an omitted SUBSCRIBER_PRIORITY or DEFAULT_PUBLISHER_PRIORITY stands for, as +/// the drafts define both, and the byte for a message that must carry a priority it was not given. +/// It reads as model priority -1, so a relay forwards an omitted priority as 128, not as unset 127. +pub(super) const DEFAULT_WIRE: u8 = 128; /// Convert an IETF priority into the model's higher-first priority. pub(super) const fn from_wire(priority: u8) -> i8 { @@ -37,13 +32,12 @@ mod tests { assert!((0u8..u8::MAX).all(|priority| from_wire(priority) > from_wire(priority + 1))); } - /// The unset default goes out as 127, and an absent priority decodes to it. + /// The unset default goes out as 127, and an omitted priority ranks one step below it. #[test] fn unset_is_127() { assert_eq!(to_wire(0), 127); assert_eq!(from_wire(127), 0); - assert_eq!(ABSENT, 0); - assert_eq!(ABSENT_WIRE, 127); + assert_eq!(from_wire(DEFAULT_WIRE), -1); } /// One urgency on both wires: the IETF byte mirrors the moq-lite byte. diff --git a/rs/moq-net/src/ietf/publish.rs b/rs/moq-net/src/ietf/publish.rs index 94f8d0d1849..a388cdec298 100644 --- a/rs/moq-net/src/ietf/publish.rs +++ b/rs/moq-net/src/ietf/publish.rs @@ -422,7 +422,7 @@ impl Message for PublishOk { match version { Version::Draft14 => { w.bool(self.forward); - w.u8(self.subscriber_priority.unwrap_or(super::priority::ABSENT_WIRE)); + w.u8(self.subscriber_priority.unwrap_or(super::priority::DEFAULT_WIRE)); self.group_order.unwrap_or(GroupOrder::Descending).encode(w, version)?; // Same as SUBSCRIBE: the Location an absolute filter carries is dropped on // decode, so encoding one would truncate the message. diff --git a/rs/moq-net/src/ietf/publisher/tracks.rs b/rs/moq-net/src/ietf/publisher/tracks.rs index 1401014785a..bbc426b4bc5 100644 --- a/rs/moq-net/src/ietf/publisher/tracks.rs +++ b/rs/moq-net/src/ietf/publisher/tracks.rs @@ -281,7 +281,7 @@ where prefix: prefix.clone(), forward: msg.forward, params: Params { - priority: msg.subscriber_priority.unwrap_or(crate::ietf::priority::ABSENT_WIRE), + priority: msg.subscriber_priority.unwrap_or(crate::ietf::priority::DEFAULT_WIRE), order: msg.group_order, filter: msg.filter.unwrap_or(Filter::Unfiltered), max_age: None, @@ -2181,6 +2181,22 @@ mod tests { } } + /// An omitted SUBSCRIBER_PRIORITY is the drafts' 128, so each PUBLISH restates 128 rather + /// than this stack's unset 127. + #[moq_clock::test] + async fn a_listing_without_a_priority_states_the_default() { + for version in DRAFTS.into_iter().filter(|version| Filter::is_draft20(*version)) { + let mut h = harness(version); + let mut request = h.request(&listing(false)).await; + assert_eq!(next(&mut request).await.0, ietf::RequestOk::ID, "{version}"); + let mut stream = timeout(Stream::accept(&mut h.peer, version)).await.unwrap(); + assert_eq!(stream.reader.varint().await.unwrap(), ietf::Publish::ID); + let body: ietf::Body = stream.reader.decode().await.unwrap(); + let publish: ietf::Publish = body.message(version).unwrap(); + assert_eq!(publish.subscriber_priority, Some(128), "{version}"); + } + } + /// A forwarding PUBLISH ends with PUBLISH_DONE once its track is no longer listed, here /// because its broadcast's route went, even while the track itself goes on. The track /// has not ended, so neither does the PUBLISH cleanly. diff --git a/rs/moq-net/src/ietf/subscribe.rs b/rs/moq-net/src/ietf/subscribe.rs index df8a7775a0e..1a6e1d60725 100644 --- a/rs/moq-net/src/ietf/subscribe.rs +++ b/rs/moq-net/src/ietf/subscribe.rs @@ -147,7 +147,7 @@ impl Message for Subscribe<'_> { // A zero cap still distinguishes a requested wait from an immediate miss. let rendezvous = rendezvous_timeout.is_some_and(|millis| millis > 0); - let subscriber_priority = subscriber_priority.unwrap_or(super::priority::ABSENT_WIRE); + let subscriber_priority = subscriber_priority.unwrap_or(super::priority::DEFAULT_WIRE); let group_order = group_order.unwrap_or(GroupOrder::Descending); // An absent LOCATION_FILTER means the subscription is unfiltered. let filter = filter.unwrap_or(Filter::Unfiltered); @@ -450,7 +450,7 @@ impl Message for SubscribeUpdate { .encode(w, version)?; self.start_location.encode(w, version)?; w.varint(self.end_group)?; - w.u8(self.subscriber_priority.unwrap_or(super::priority::ABSENT_WIRE)); + w.u8(self.subscriber_priority.unwrap_or(super::priority::DEFAULT_WIRE)); w.bool(self.forward.unwrap_or(true)); encode_params!(w, version, 0x03 => self.authorization_token.clone(), @@ -1139,6 +1139,31 @@ mod tests { assert_eq!(subscribe(&[0x02]).unwrap().filter, Filter::NextObject); } + /// From draft-15 SUBSCRIBER_PRIORITY is a parameter whose omission means 128, not this + /// stack's unset 127, so a relay forwards it unchanged. + #[test] + fn test_subscribe_omitted_priority_is_128() { + for version in [ + Version::Draft15, + Version::Draft16, + Version::Draft17, + Version::Draft18, + Version::Draft19, + Version::Draft20, + Version::Draft21, + Version::Draft22, + ] { + let mut bytes = vec![0x00]; // request_id + if version == Version::Draft17 { + bytes.push(0x00); // required_request_id_delta + } + bytes.extend_from_slice(b"\x01\x0bnonexistent\x0dno-such-track"); // namespace, name + bytes.push(0x00); // no parameters + let msg = decode_message::(&bytes, version).unwrap(); + assert_eq!(msg.subscriber_priority, 128, "{version}"); + } + } + #[test] fn test_subscribe_update_v15_round_trip() { let msg = SubscribeUpdate { diff --git a/rs/moq-net/src/ietf/subscriber.rs b/rs/moq-net/src/ietf/subscriber.rs index 36a788a5b3e..54a70e1752b 100644 --- a/rs/moq-net/src/ietf/subscriber.rs +++ b/rs/moq-net/src/ietf/subscriber.rs @@ -511,7 +511,7 @@ fn accepted_info(properties: &ietf::Properties, version: Version) -> track::Info // Drafts 14 and 15 carry only per-subgroup priorities, which the model does not keep, // so they get the later drafts' default too. .with_priority(super::priority::from_wire( - properties.priority.unwrap_or(super::priority::DEFAULT_PUBLISHER_WIRE), + properties.priority.unwrap_or(super::priority::DEFAULT_WIRE), )) // A publisher answering NEW_GROUP_REQUEST refreshes on any join with a delta to skip; // this session carries the request back to it. @@ -8175,7 +8175,8 @@ mod tests { .expect("the subscription is registered"); assert_eq!( track.producer.as_ref().unwrap().publisher_priority(), - super::super::priority::from_wire(priority.unwrap_or(super::super::priority::DEFAULT_PUBLISHER_WIRE)), + // An omitted priority is the drafts' 128, one step below the unset 127. + priority.map_or(-1, super::super::priority::from_wire), "SUBSCRIBE_OK priority must be committed before alias registration" ); // The answer's largest is known before any group arrives. diff --git a/rs/moq-net/src/ietf/subscriber/tracks.rs b/rs/moq-net/src/ietf/subscriber/tracks.rs index 63af5130715..a628c7cf5ba 100644 --- a/rs/moq-net/src/ietf/subscriber/tracks.rs +++ b/rs/moq-net/src/ietf/subscriber/tracks.rs @@ -661,7 +661,7 @@ where request_id, track_namespace: key.0.as_path(), track_name: key.1.as_ref().into(), - subscriber_priority: super::super::priority::ABSENT_WIRE, + subscriber_priority: super::super::priority::DEFAULT_WIRE, // No update can change it, so it takes the order a reader gets by default. group_order: track::Order::default().into(), filter: Filter::NextObject, From 308f67c803829c14dd4ff6289fa40ae7fc95ee5a Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 23 Oct 2026 09:02:36 -0700 Subject: [PATCH 6/9] quest: record the settled priority and backport decisions in the m2 audit Co-Authored-By: Claude Opus 5.5 --- quest/m2/audit-interop.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quest/m2/audit-interop.md b/quest/m2/audit-interop.md index 353141e7412..feac7524a7a 100644 --- a/quest/m2/audit-interop.md +++ b/quest/m2/audit-interop.md @@ -72,14 +72,15 @@ each turned green: [moq-dev/moq#6518](https://github.com/moq-dev/moq/pull/6518) backports it to `release`. Released Rust never sees the NAMESPACE itself from quic-zig or moxygen (docker, and draft-14 over raw QUIC); the client built on - `main` passes against both. + `main` passes against both, so it gets no backport: the runner client bump + fixes it. - Our relay through third-party clients: `rendezvous-timeout` 0x10 (aiomoqt, imquic, quic-zig, Cloudflare draft-18), the relay stamping a Timestamp property on every object ([moq-dev/moq#5083](https://github.com/moq-dev/moq/pull/5083)), and moq-go refusing a server without RESET_STREAM_AT (moq-quic) are fixed on `main`, as are xquic's raw-QUIC connection errors (5 of 6 cases pass). An omitted - DEFAULT_PUBLISHER_PRIORITY now forwards as 128, not 127. + DEFAULT_PUBLISHER_PRIORITY or SUBSCRIBER_PRIORITY now forwards as 128, not 127. - Through our relay, Cloudflare's draft-18 `data-subgroup-basic` still fails on two items reported upstream: [cloudflare/moq-rs#281](https://github.com/cloudflare/moq-rs/issues/281) From 9c25be8631f5e65aa11ebe2f2d0c196871d5d64f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 23 Oct 2026 10:52:14 -0700 Subject: [PATCH 7/9] fix(net): restate the priority in a draft-14 max-age update Draft-14's SUBSCRIBE_UPDATE carries a mandatory priority, so an update for the max age alone wrote the omission default 128 and reset an unset subscription from 127. It now restates the priority in force. Co-Authored-By: Claude Opus 5.5 --- rs/moq-net/src/ietf/subscriber.rs | 85 +++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 4 deletions(-) diff --git a/rs/moq-net/src/ietf/subscriber.rs b/rs/moq-net/src/ietf/subscriber.rs index 95a4f61a77a..f0885d10213 100644 --- a/rs/moq-net/src/ietf/subscriber.rs +++ b/rs/moq-net/src/ietf/subscriber.rs @@ -3472,16 +3472,21 @@ where && largest_group(&track, largest).is_some_and(|largest| value > largest) && requested.is_none_or(|requested| value > requested) }); - let update = Update { + let mut update = Update { start_location, priority: (priority != sent_priority).then_some(priority), max_age: wanted_max_age.filter(|_| wanted_max_age != sent_max_age), new_group, }; - match update.priority.is_some() || update.max_age.is_some() || update.new_group.is_some() { - true => Poll::Ready(End::Update(update)), - false => Poll::Pending, + if update.priority.is_none() && update.max_age.is_none() && update.new_group.is_none() { + return Poll::Pending; } + // Draft-14's SUBSCRIBE_UPDATE cannot omit the priority, so it restates the one + // in force rather than resetting it to the omission default. + if self.version == Version::Draft14 { + update.priority = Some(priority); + } + Poll::Ready(End::Update(update)) }) .await; @@ -8065,6 +8070,78 @@ mod tests { assert_eq!(update.forward, Some(true)); } + /// Draft-14's SUBSCRIBE_UPDATE cannot omit the priority, so an update for the max age + /// alone restates the unset priority in force instead of the omission default 128. + #[moq_clock::test] + async fn a_draft14_max_age_update_restates_the_priority() { + const VERSION: Version = Version::Draft14; + + let subscribe_ok = message( + ietf::SubscribeOk::ID, + &ietf::SubscribeOk { + request_id: Some(RequestId(0)), + track_alias: 7, + largest: None, + properties: Default::default(), + }, + VERSION, + ); + let session = crate::lite::test_transport::ScriptedSession::new(subscribe_ok); + let log = session.log.clone(); + + let (tasks, _task_set) = crate::util::TaskSet::new(); + let mut subscriber = Subscriber::new( + crate::time::sim(), + session, + crate::origin::Config::new(crate::Hop::new(1).unwrap()).produce(), + Control::new(None, false), + None, + peer::PeerSetup::declared(peer::Peer { + max_age: true, + ..Default::default() + }), + crate::Hop::new(1).unwrap(), + None, + VERSION, + tasks, + Default::default(), + ); + + let producer = crate::broadcast::Info::default().produce(); + let mut dynamic = producer.dynamic(); + let consumer = producer.consume(); + let track = consumer.track("video").unwrap(); + let _short = track.subscribe(track::Subscription::default().with_max_delay(Duration::from_secs(1))); + let request = dynamic.requested_track().await.expect("no track requested"); + let _serving = moq_clock::sim::spawn(async move { + subscriber + .run_subscribe(Path::new("broadcast"), dynamic, None, request) + .await; + }); + settle().await; + + let _long = track.subscribe(track::Subscription::default().with_max_delay(Duration::from_secs(5))); + settle().await; + + let writes = log.writes.lock().unwrap().clone(); + let mut buf = Decoder::new(&writes, VERSION.into()); + let mut updates = Vec::new(); + while !buf.is_empty() { + let type_id = buf.varint().unwrap(); + let size = buf.u16().unwrap() as usize; + let mut body = Decoder::new(buf.slice(size).unwrap(), VERSION.into()); + if type_id == ietf::SubscribeUpdate::ID { + updates.push(ietf::SubscribeUpdate::decode_msg(&mut body, VERSION).unwrap()); + } + } + + let [update] = updates.as_slice() else { + panic!("one update, not {updates:?}"); + }; + assert_eq!(update.max_age, Some(5_000)); + assert_eq!(update.subscriber_priority, Some(super::super::priority::to_wire(0))); + } + /// Establish a subscription on `version`, then drop its last consumer, and hand back /// what the session recorded on the way out. async fn cancel_a_subscription(version: Version) -> crate::lite::test_transport::Log { From d4fd42f4a5bb61ac4184d513e4a91e358c9ebf80 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 23 Oct 2026 11:30:34 -0700 Subject: [PATCH 8/9] quest: count unsupported cells as done in the m2 interop audit summary Co-Authored-By: Claude Opus 5.5 --- quest/m2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quest/m2/README.md b/quest/m2/README.md index f07c97654a8..fb88dcc0a3b 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -232,4 +232,4 @@ ranked just below deterministic TS legs, which it requires. - [Quest tree audit](/quest/m2/audit-quests.md) - repeat the whole-tree audit after the release ships, against the m1 baseline - [CI workflow audit](/quest/m2/audit-ci.md) - repeat the per-workflow and per-job review after the release ships, against the m1 baselines - [Performance audit](/quest/m2/audit-perf.md) - benchmarks that regressed since the m1 run are explained, fixed, or planned, and unbenched hot paths get coverage -- [Interop audit](/quest/m2/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down +- [Interop audit](/quest/m2/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down or unsupported From 95e69ec8ec557356da3d48083a22646115b18931 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 23 Oct 2026 11:36:24 -0700 Subject: [PATCH 9/9] docs(net): the omitted track priority is 128 in js/net properties Co-Authored-By: Claude Opus 5.5 --- js/net/src/ietf/properties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/net/src/ietf/properties.ts b/js/net/src/ietf/properties.ts index 2f7d91fa61a..5d2f2065635 100644 --- a/js/net/src/ietf/properties.ts +++ b/js/net/src/ietf/properties.ts @@ -30,7 +30,7 @@ export interface Properties { /// `undefined` declares no timeline, so the track and its objects are untimed. timescale?: Timescale; - /// Publisher priority for a group header without its priority flag. The wire default is 127, the unset priority 0. + /// Publisher priority for a group header without its priority flag. Omitted, it is the wire default 128, priority -1. priority?: number; /// The publisher's preference for prioritizing groups within a subscription,