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
12 changes: 6 additions & 6 deletions doc/bin/relay/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ link costs 1, which reproduces plain hop counting. Each relay adds the price of
the link an announcement arrived on before forwarding it, so a route's cost is
the sum of what it crossed.

Wildcard advertisements are forwarded and costed the same way as an exact-path
Prefix advertisements are forwarded and costed the same way as an exact-path
route: each hop appends its identity, adds the link price, and passes the
claim on. An advertisement must be contained by one of the publisher's granted
prefixes (`grant/**`); an over-wide pattern is refused rather than clamped.
claim on. An advertised prefix must overlap the publisher's grant, or it is
refused. A prefix wider than the grant is accepted, but it only routes requests
for paths the grant covers.

Routing prefers the most specific pattern, then a fully identified hop list
Routing prefers the longest covering prefix, then a fully identified hop list
over one that holds a 0 (an anonymous hop) at any depth, then the lowest cost,
then the shortest hop list, breaking any remaining tie toward the newest
announcement so a reconnecting publisher isn't outranked by the session it
replaced. An assigned identity for an anonymous peer is local selection state
and is never written into the hop list. Resolving a non-prefix pattern into a
subscription is not implemented yet.
and is never written into the hop list.

```toml
[cluster]
Expand Down
2 changes: 1 addition & 1 deletion js/pattern/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Exact path patterns for [Media over QUIC](https://moq.dev): grammar, matching, and set algebra.

A pattern describes a set of broadcast paths. This package provides a shared grammar
for tokens, origin scopes, announce interests, and wildcard advertisements. Integrating
for tokens, origin scopes, and announce interests. Integrating
patterns into those consumers is separate work.
Literal paths stay coordinates; `@moq/net`'s path module keeps construction, joins, and
prefix operations.
Expand Down
208 changes: 85 additions & 123 deletions quest/m0/wildcard/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quest/m1/auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ existing lite-06 ALPN.

## Related

- [Pattern interest](/quest/m1/path-patterns.md) - moves AUTH's legacy wire prefixes to patterns along with ANNOUNCE_REQUEST
- [Pattern interest](/quest/m1/path-patterns.md) - moves AUTH's legacy grant prefixes to patterns; ANNOUNCE_REQUEST stays a prefix
- [Expiring media grants](/quest/m1/processor/grant-lease.md) - a worker's
lease renewal is a new in-band token
- [P2P](/quest/m1/p2p/README.md) - the first consumer of hop-bound peer grants
4 changes: 2 additions & 2 deletions quest/m1/auth/lite.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ On main, additive.

## Related

- [Pattern interest](/quest/m1/path-patterns.md) - moves the prefix
fields here and in ANNOUNCE_REQUEST to patterns together
- [Pattern interest](/quest/m1/path-patterns.md) - moves AUTH's grant
prefixes to patterns; ANNOUNCE_REQUEST stays a prefix
8 changes: 4 additions & 4 deletions quest/m1/broadcast-epoch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Decided:
bare `foo`, since a route covers its descendants, not its parent. A
bare-name viewer behind one needs a publisher that opts out with the raw
prefix route. Document this rather than promise it works.
- Derived output lives under the epoch it came from
(`pid/foo.hang/@e/transcode.pro`), so nested epochs must parse. This moves
the [wildcard](/quest/m0/wildcard/README.md) line's derived-output example
down one segment, and its suffix patterns still match.
- Derived output mirrors the epoch it came from
(`.pro/transcode/<pid>/foo.hang/@e`, per the
[wildcard](/quest/m0/wildcard/README.md) line's derived-output layout), so
the service's prefix claim still covers it.

This README owns:

Expand Down
6 changes: 3 additions & 3 deletions quest/m1/cluster-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ make MoQ's common case.
origin id, and forwards along its shortest path. Distance compares cost,
then hop count, so every hop strictly shortens it even across `?cost=0`
links. That is a shortest path to a virtual node linked to every origin, so
it is loop-free whenever relays agree on the topology. Specificity still
ranks first, per [Wildcard](/quest/m0/wildcard/README.md).
it is loop-free whenever relays agree on the topology. The longest covering
prefix still ranks first, per [Wildcard](/quest/m0/wildcard/README.md).
- The first relay's choice rides the SUBSCRIBE, and transit relays forward
toward that origin by topology alone, never re-selecting. Re-selection
against another existence view loops: a relay that lost a specific claim
Expand Down Expand Up @@ -114,7 +114,7 @@ make MoQ's common case.
## Required

- moq.pro workers stop electing on hop chains, reading the relay's local origin instead ([moq.pro voice-local-origin](https://github.com/moq-dev/moq.pro/blob/main/quest/m0/voice-local-origin.md))
- [Wildcard](/quest/m0/wildcard/README.md) - the specificity, pool spread, and reply identity this selection builds on
- [Wildcard](/quest/m0/wildcard/README.md) - the longest-prefix rule, pool spread, and reply identity this selection builds on
- moq.pro's routing simulator reports ([quest](https://github.com/moq-dev/moq.pro/blob/main/quest/m1/routing-simulator.md))

## Related
Expand Down
10 changes: 5 additions & 5 deletions quest/m1/path-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Goal

Every predicate over a MoQ broadcast path uses one matcher. Tokens,
origin scopes, announce interests, public access rules, and wildcard
advertisements can express `pid/*/chat` and `**/transcode.pro` without
maintaining competing glob dialects.
origin scopes, announce interests, and public access rules can express
`pid/*/chat` and `**/*.hang` without maintaining competing glob dialects.
Routing is not a predicate here: advertisements stay prefixes.

Literal paths remain coordinates, not sets. Roots, joins, exact broadcast
names, URL paths, filesystem paths, and object-store keys keep their own
Expand Down Expand Up @@ -98,5 +98,5 @@ matches, containment refusal, and old-version behavior.

## Related

- [Wildcard advertisements](/quest/m0/wildcard/README.md) - routing adopts the
matcher while retaining its own cost, pool, refusal, and resolution work
- [Wildcard advertisements](/quest/m0/wildcard/README.md) - routes on prefix
claims; the matcher only filters them against consume-side interest
Comment on lines +101 to +102

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align the auth quests with prefix-only announce interest

When implementing Path patterns, the required Lite auth quest still explicitly directs changing ANNOUNCE_REQUEST prefixes to patterns (quest/m1/auth/lite.md:150-151), and the auth overview repeats that requirement (quest/m1/auth/README.md:123). That conflicts with this revised plan's prefix-only announce interest and consume-side filtering, leaving mutually exclusive wire instructions that could reintroduce the wire change this commit rejects. Update those dependency descriptions so only AUTH grants move to patterns. (Written by GPT-5.6 Sol)

AGENTS.md reference: AGENTS.md:L28-L28

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in a99108b: the auth quests now move only AUTH grants to patterns; ANNOUNCE_REQUEST stays a prefix.

(Written by Opus 5.5)

4 changes: 3 additions & 1 deletion quest/m1/processor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
A customer runs a worker in its own environment, connects outbound to a MoQ
deployment, reads only eligible source media, and publishes an on-demand
contribution under the processor's own prefix, mirroring the source path
(for example `.<processor>/<source path>`). The platform supplies
(for example `.pro/<processor>/<source path>`, the
[wildcard](/quest/m0/wildcard/README.md) line's derived-output layout). The
platform supplies
registration, scoped credentials, routing, demand, status, and usage
visibility; it does not upload or execute customer code.

Expand Down
11 changes: 8 additions & 3 deletions quest/m1/processor/advertise-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@ every wire (Wildcard's decision) and suffix routing is dropped, so leading-star
and suffix advertise patterns have nothing to authorize. Token claim patterns
keep their suffix support for publish and subscribe.

Decided: an advertised prefix must overlap the advertise scope, not sit
inside it, and a wider claim only routes the requests the scope covers. This
matches how the relay authorizes advertisements today.

Preserve current customer credentials in the wire and authorization design:
existing claims retain their current publish-implies-advertise behavior, while
the new v1 claim separates the capabilities. Land the claims, SDK,
origin-scope, relay authorization, and tests without combining the release or
the moq.pro (downstream) pin rollout into this quest.

Cover containment, rebasing, missing versus empty advertise scope, v0
compatibility, token revalidation, concrete announce, publish, FETCH, and a
prefix demand that receives only an exact short-lived publish grant.
Cover overlap and per-request filtering, rebasing, missing versus empty
advertise scope, v0 compatibility, token revalidation, concrete announce,
publish, FETCH, and a prefix demand that receives only an exact short-lived
publish grant.

## Required

Expand Down
6 changes: 3 additions & 3 deletions rs/moq-net/src/path/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
//! segment-aware prefix operations. [`Pattern`] describes a set of paths with
//! wildcards, and [`Patterns`] is a union of them reduced by containment. The
//! grammar and algebra live in [`moq-pattern`](moq_pattern); this module
//! re-exports them beside [`Path`] so grants, origin scopes, announce interests,
//! and wildcard advertisements can share one dialect. Literal path construction
//! and wire decoding retain their existing behavior.
//! re-exports them beside [`Path`] so grants, origin scopes, and announce
//! interests can share one dialect. Literal path construction and wire
//! decoding retain their existing behavior.

pub use moq_pattern::{InvalidPattern, Pattern, Patterns, Segment, Specificity};

Expand Down
2 changes: 1 addition & 1 deletion rs/moq-pattern/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Exact path patterns for [Media over QUIC](https://moq.dev): grammar, matching, and set algebra.

A pattern describes a set of broadcast paths. This crate provides a shared grammar
for tokens, origin scopes, announce interests, and wildcard advertisements. Integrating
for tokens, origin scopes, and announce interests. Integrating
patterns into those consumers is separate work.
Literal paths stay coordinates; `moq-net`'s `Path` and `@moq/net`'s path module keep
construction, joins, and prefix operations.
Expand Down
Loading