Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions quest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ grouped into milestones ordered by priority.

## Plan

m0 is everything in flight now: relay hardening and the last known IETF
interop fix ahead of Seattle, wildcard routing, broadcast epochs, and audio playout (the jitter target). m1 is the next wave across reliability, features, performance, and
m0 is everything in flight now: relay hardening and the IETF interop
fixes ahead of Seattle, wildcard routing, broadcast epochs, and audio playout (the jitter target). m1 is the next wave across reliability, features, performance, and
planning. m2 holds later features, design studies, and experiments. m3 is
gated on the outside world (hardware, a partner, a consumer, or a provider's
offer) or is speculative work with no named consumer yet. m4 waits on an upstream release.
Expand All @@ -20,7 +20,7 @@ move the blocked quest to the milestone its priority belongs in.

## Required

- [m0: immediate priorities](/quest/m0/README.md) - everything in flight now: relay hardening and the last known IETF interop fix for Seattle, wildcard routing, broadcast epochs, and audio playout
- [m0: immediate priorities](/quest/m0/README.md) - everything in flight now: relay hardening and the IETF interop fixes for Seattle, wildcard routing, broadcast epochs, and audio playout
- [m1: next wave](/quest/m1/README.md) - reliability, capabilities, performance, and the planning that settles their contracts
- [m2: later work](/quest/m2/README.md) - deferred features, design studies, and experiments
- [m3: deferred](/quest/m3/README.md) - gated on the outside world (hardware, a partner, a consumer, or a provider's offer), or speculative with no named consumer
Expand Down
15 changes: 15 additions & 0 deletions quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ serve instead of enumerating broadcasts. Serving the relay's ingested-only
view (`origin::Consumer::local()`) to localhost workers belongs to moq.pro's
edge, which embeds moq-relay; it moved there on 2026-09-28.

Interop: Fastly's moq-relay-interop report (run of 2026-09-23, build
7ee2b02) was triaged against `main` on 2026-10-07. Its SETUP, UNSUBSCRIBE
and error-code items were already fixed. Fastly's reruns that day found
that a relay moves End of Track's Location and refuses imquic's End of
Group status. The seven fixes below LOCATION_FILTER come from them and go
ahead of Seattle. The cold-relay Largest and the deviations it flagged are
in m1.

Identity: the [broadcast epoch](/quest/m0/broadcast-epoch/README.md) line
gates the next release (decided 2026-10-03:
#4741 resumes an un-epoched republish into the old broadcast and stalls its
Expand All @@ -43,6 +51,13 @@ a published `@moq/watch` break.

- [Held group wakes](/quest/m0/held-group-wakes.md) - a group held across a route switch is woken when its successor's first timestamp or abort makes it stale, not at the next unrelated append
- [Draft-22 LOCATION_FILTER](/quest/m0/ietf-location-filter-22.md) - moqt-22 LOCATION_FILTER carries its type instead of a Length in Rust and JS, so a draft-22 peer reads our Next Object correctly
- [moq-transport parameters per draft](/quest/m0/ietf-params-per-draft.md) - every control message accepts exactly the parameters its draft allows, so moqx's draft-16 SUBSCRIBE_NAMESPACE with FORWARD stops failing
- [NAMESPACE on the stream](/quest/m0/ietf-namespace-stream.md) - every draft-16+ SUBSCRIBE_NAMESPACE stream carries NAMESPACE for each match, whatever the peer's SETUP options
- [Dialed split horizon](/quest/m0/dial-split-horizon.md) - a session moq-net dials gets a per-connection hop, so routes never echo back to the peer they came from
- [No empty d14 prefix](/quest/m0/ietf-d14-root-prefix.md) - draft-14 never sends SUBSCRIBE_NAMESPACE with an empty prefix, and the docs say to scope a d14 link to moxygen
- [End of Track Location](/quest/m0/ietf-end-of-track-location.md) - a relay forwards END_OF_TRACK at its upstream's Location, on the last group's stream, instead of re-sending it at the next group's object 0
- [End of Group status](/quest/m0/ietf-end-of-group-status.md) - an End of Group status on a stream whose header already marks the group's end is accepted, so imquic's last object per group arrives
- [Subgroup at object 0](/quest/m0/ietf-first-object-zero.md) - a draft-18 subgroup with FIRST_OBJECT clear that starts at object 0 is read whole
- [Request caps](/quest/m0/request-caps.md) - lite message sizes, IETF request IDs, and per-session announces and subscriptions are bounded
- [Prefix route fronts](/quest/m0/prefix-route-fronts.md) - a prefix route cannot be made to mint one front per requested path
- [qmux credit](/quest/m0/qmux-credit.md) - qmux returns connection credit for dropped and stopped streams and delivers its close frame, on both lines
Expand Down
52 changes: 52 additions & 0 deletions quest/m0/dial-split-horizon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# [S] Dialed sessions get split horizon

## Goal

A session moq-net dials, whose peer negotiates no identity, never has a
route it learned from that peer offered back to it, and a SUBSCRIBE it sends
never routes back to it. Today such a session is anonymous: moq-relay
dialing moxygen, moqx or moq-rs over moq-transport (d16, or d17+ without
HOP_ID) echoes the peer's namespaces back, and both sides subscribe to each
other while no objects flow.

## Plan

Triaged from Fastly's moq-relay-interop report (2026-09-23 run; items 3 and
13's echo) on 2026-10-07. The draft leaves loop prevention to
implementations (d16 §6.2).

Facts from `main`:

- Split horizon keys on the peer's identity: `exclude()` is
`peer.identity().or(self.peer_hop).unwrap_or(UNKNOWN)`
(`rs/moq-net/src/ietf/publisher.rs`, around line 445), and `Hop::UNKNOWN`
excludes nothing (`visible_to`, `rs/moq-net/src/model/origin.rs`).
- Accepted sessions already get a random assigned hop
(`rs/moq-net/src/server.rs`, around lines 231, 381 and 417).
- `Client::with_peer_hop` (`rs/moq-net/src/client.rs:128`) exists, but the
relay's cluster dial (`run_remote_session`, `rs/moq-relay/src/cluster.rs`)
never calls it. An `upstream: true` link already hides upstream-learned
routes, but that is not the default.

Decided 2026-10-07: fix it in moq-net's `Client`, not only the relay's
dial. A session with no negotiated identity gets a random per-connection hop,
the same way `server.rs` does. Rejected: calling `with_peer_hop` from
moq-relay only, which leaves other moq-net users anonymous. Keep
`with_peer_hop` as an explicit override of the random default, as the
server side does: a random hop changes on every redial, so only a pinned one
lets every session dialing the same relay resolve to one route.

The same gap let a d16 moq-dev origin route its edges' SUBSCRIBEs to two of
the edges (the report's T4 fanout-late-join, two runs). Check that this case
is covered too.

Test: a dialed anonymous ietf session that announces a namespace does not
receive it back, and a SUBSCRIBE that arrives on it is not routed back to it.
Check that a redialed anonymous peer's routes do not pile up across hops.

Public API: none. Wire: none.

## Related

- [moq-transport cluster peers](/quest/m2/ietf-cluster-peers.md) - multi-hop loop safety for moq-transport peers through the cluster extension
- [Cluster routing](/quest/m1/cluster-routing/README.md) - the route layer split horizon feeds
39 changes: 39 additions & 0 deletions quest/m0/ietf-d14-root-prefix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# [XS] No empty namespace prefix on draft-14

## Goal

On draft-14, moq-net never sends SUBSCRIBE_NAMESPACE with an empty prefix.
d14 §9.28 makes a prefix with N = 0 a PROTOCOL_VIOLATION, and moxygen
refuses it today when an unscoped moq-relay cluster link dials it. The
relay docs say an unscoped d14 link discovers nothing from moxygen, so
operators scope it.

## Plan

Triaged from Fastly's moq-relay-interop report (2026-09-23 run, item 2) on
2026-10-07.

Decided 2026-10-07: on d14, skip a SUBSCRIBE_NAMESPACE whose prefix is
empty. Keep today's warn-and-continue when the peer refuses a namespace
subscription. Rejected: failing the link on refusal, and requiring a scope
on d14 links at startup.

Revised 2026-10-07 after Fastly's pcap runs (#issuecomment-6046932019):
moxygen sends no PUBLISH_NAMESPACE on d14 to a peer that has not
subscribed, and moqx no longer speaks d14. So skipping alone leaves an
unscoped moq-dev downstream of moxygen with no namespaces. Decided to keep
the quest narrow and document the gap, since moxygen on d14 is the only
affected pair and scoped links already work. Rejected: subscribing per
prefix on demand when a local subscriber misses, and routing unknown
SUBSCRIBEs upstream; both need a hook on origin misses.

Where it lives: `subscribe_prefixes` (`rs/moq-net/src/ietf/subscriber.rs`,
around line 600) returns `interest_prefixes(origin.allowed())`, which is
`[""]` for an unscoped origin. `run_subscribe_namespace` (around line 861)
sends it. Log at debug when the root is skipped. The note belongs in
`doc/bin/relay/cluster.md`.

Test: a d14 session with an unscoped origin sends no SUBSCRIBE_NAMESPACE,
and a scoped one still does. Check `js/net` for the same path.

Public API: none. Wire: d14 stops sending a message the draft forbids.
26 changes: 26 additions & 0 deletions quest/m0/ietf-end-of-group-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# [XS] End of Group status on a marked stream

## Goal

`rs/moq-net` and `js/net` accept an End of Group status object (0x3) on a
subgroup stream whose header sets the END_OF_GROUP bit, and end the group
there, instead of refusing the stream. imquic sends both on d16, d18 and
d21, and moq-dev loses each group's last object today.

## Plan

Triaged from Fastly's follow-up on #5020 (#issuecomment-6046932019, runs of
2026-10-07 on `0f310a5`). d16 §10.4.2 says the bit only lets a subscriber
infer the group's end at FIN, and nothing forbids sending the status too.

Where it lives: `IngestPhase::Status` in `rs/moq-net/src/ietf/subscriber.rs`
(around line 3992) accepts 0x3 only when `!self.has_end` and otherwise
returns `Unsupported`, which aborts the local group producer (`recv_group`
then returns `Ok`, so the session is not stopped). A downstream reader only
gets the rest of the group if the model's fetch path recovers it. Accept the
status either way, as END_OF_TRACK already is. Check the matching status parse in `js/net/src/ietf/object.ts`.

Test: a d18 stream with the END_OF_GROUP bit, objects 0..4, then a 0x3
status at 5 delivers a finished group with five frames.

Public API: none. Wire: none.
52 changes: 52 additions & 0 deletions quest/m0/ietf-end-of-track-location.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# [S] End of Track keeps its Location

## Goal

A relay forwards END_OF_TRACK at the Location its upstream sent, in
`rs/moq-net` and `js/net`. An upstream that ends the track at 5/5 on group
5's stream yields 5/5 on group 5's stream downstream, not 6/0 on a new
stream. A track whose last group stream has already closed still gets the
standalone marker at the next group's object 0, as today.

## Plan

Triaged from Fastly's follow-up on #5020 (runs of 2026-10-07 on `0f310a5`,
d18 and d21, cells `status-end-of-track` and `publish-done`). PUBLISH_DONE
was already right; only the marker moved. A subscriber still learns that
group 5 ended after object 4 from the subgroup header's END_OF_GROUP bit,
so the reasons are conformance with the upstream's Location and one stream
fewer.

Root cause, both sides:

- Ingress: `rs/moq-net/src/ietf/subscriber.rs` (`Ended::Track`, around line
2688) finishes the group producer, then calls `end_track(group + 1)`. An
egress reader that sees the group finish cannot yet know the track ends
after it. Set the end first, and abort the group producer if `end_track`
returns `ProtocolViolation`, so it is never left unfinished.
- Egress: `write_end_of_track` in `rs/moq-net/src/ietf/publisher.rs` always
opens its own stream at `end`/0. When a group stream reaches the group's
real end (the slice has no `until`, and the group finished rather than
aborted or expired) and the track's `final_sequence()` is that group + 1,
append END_OF_TRACK at (group, next object ID) before FIN, and skip the
standalone marker for that subscription. A stream capped by the
subscription's end Location (`GroupSlice::until`) keeps the standalone
marker, since appending would deny objects past the cap that do exist.

The capped stream has a related false claim on `main`: its header still
sets the END_OF_GROUP bit (`has_end` defaults to true). Clear it when
`until` cuts the group short.

`js/net` mirrors both: `#runEndOfTrack` in `js/net/src/ietf/publisher.ts`
runs after every group, and its ingress closes the group before
`track.finishAt`.

Test: a d18 subscriber stream that ends 5/0..5/4 then END_OF_TRACK at 5/5,
forwarded through the ietf publisher, reaches the downstream as 5/5 on the
group 5 stream, with no extra stream and a PUBLISH_DONE count to match.
A track finished after its last group closed still gets 6/0. A
subscription whose end Location falls inside the last group gets 6/0 and a
header without END_OF_GROUP.

Public API: none. Wire: none (the marker's Location and a capped stream's
header bit change, their formats do not).
32 changes: 32 additions & 0 deletions quest/m0/ietf-first-object-zero.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# [XS] A subgroup starting at object 0 is whole

## Goal

A draft-18+ subgroup stream with FIRST_OBJECT clear whose first Object ID
is 0 is read as a whole group, in `rs/moq-net`, instead of being dropped as
"a group with no head". A clear bit with any other first ID is still dropped
as it is today.

## Plan

Triaged from Fastly's moq-relay-interop report (2026-09-23 run, item 7) on
2026-10-07. d18 §2.2 says the original publisher MUST set FIRST_OBJECT when
it opens a subgroup, and a relay MUST keep it set, so the probe that left it
clear was the one out of spec. The first Object ID is absolute whatever
the bit says (§11.4.2), and object IDs in our model start at 0, so ID 0 is
the head either way.

Decided 2026-10-07: accept it anyway, to be lenient toward publishers that
are out of spec. Rejected: keeping the drop and documenting it.

Where it lives: `rs/moq-net/src/ietf/subscriber.rs` (around line 2611)
drops the stream before reading any object. `next_object_id` already
refuses a first ID other than the group's start (0 for a whole group), so
check whether letting a clear-bit stream through to it is enough before
adding a second peek. Check whether `js/net` drops these streams at all; it
has no matching check today.

Test: a d18 stream with FIRST_OBJECT clear and first ID 0 delivers its
group; one with first ID 3 is still dropped.

Public API: none. Wire: none.
59 changes: 59 additions & 0 deletions quest/m0/ietf-namespace-stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# [S] SUBSCRIBE_NAMESPACE streams carry NAMESPACE

## Goal

On draft-16 and later, a SUBSCRIBE_NAMESPACE that asks for namespaces
gets NAMESPACE and NAMESPACE_DONE on its response stream for each matching
namespace, whatever the peer's SETUP options, in `rs/moq-net` and `js/net`.
Today a peer that did not send our SOLICIT option (0x40B5A), which is every
other implementation, gets an empty stream and only the unsolicited
PUBLISH_NAMESPACE pushes.

## Plan

Triaged from Fastly's moq-relay-interop report (2026-09-23 run) on
2026-10-07. d18 §6.2 says the publisher "MUST send a NAMESPACE message to
any subscriber that has sent SUBSCRIBE_NAMESPACE" for a matching prefix,
and §10.18 puts them on the response stream. d16 §9.25 says the same
without the MUST. Both drafts let a publisher send PUBLISH_NAMESPACE to any
subscriber, and neither says anything about duplicates.

On d16 and d17 the message's Subscribe Options choose what the subscriber
wants: PUBLISH (0x00), NAMESPACE (0x01) or both (0x02) (d16 §9.25, d17
§9.20). d18 moved track requests to SUBSCRIBE_TRACKS, so its
SUBSCRIBE_NAMESPACE always asks for namespaces. Both `rs/moq-net` and
`js/net` decode the field but drop it before dispatch, so the publisher
cannot tell the options apart today.

Decided 2026-10-07: fill the stream on d16+ whenever NAMESPACE is
requested, and keep the unsolicited pushes to non-SOLICIT peers, so those
peers hear each namespace twice. Carry Subscribe Options through dispatch:
0x01 and 0x02 both ask for namespaces, so both get NAMESPACE; 0x00 gets none.
We send no PUBLISH for a namespace subscription, so decide how the track half
is answered. For 0x00 (tracks only), refusing is the recommendation, since it
fails loud. For 0x02, the recommendation is to answer with namespaces only,
since refusing would drop the NAMESPACE it asked for. A value above 0x02 is
malformed and refused.
Rejected: stopping unsolicited pushes on d16+ (a peer that never subscribes
would learn nothing), and filling only on d18+ (two behaviours for one
message).

Where it lives: `rs/moq-net/src/ietf/publisher.rs` (around line 2180)
picks `origin.empty()`, or only the hidden remainder, when
`declared.solicit` is unset. Its comment explains the old reason: a peer
hearing both would hold two sources for one namespace. A NAMESPACE is
discovery only, not a route, so that no longer applies; rewrite the comment.
Drafts 14 and 15 keep answering with PUBLISH_NAMESPACE requests, unchanged.
`js/net` mirrors the solicit logic (`js/net/src/ietf/connection.ts`,
`publisher.ts`).

Update `doc/concept/standard.md` where it describes solicit: a non-SOLICIT
d16+ peer now also gets NAMESPACE on its SUBSCRIBE_NAMESPACE stream, so it
hears each namespace twice.

Test: a non-SOLICIT d16 and d18 peer's SUBSCRIBE_NAMESPACE receives
NAMESPACE for an existing match and for one announced later, then
NAMESPACE_DONE when it ends. On d16, options 0x00, 0x01, 0x02 and 0x03 each
get the chosen behaviour, in both languages.

Public API: none. Wire: moq-transport replies move closer to the drafts.
Loading
Loading