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
2 changes: 2 additions & 0 deletions quest/next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ transport, benchmark tooling); worktrees isolate commits, not semantics.
- [Binary stats](/quest/next/stats-binary/README.md) - an allocation-free stats tick and an on-demand FlatBuffers `.fb.z` flavor with a checked-in schema
- [JSON churn](/quest/next/json-churn.md) - a moq-json update allocates a bounded amount whatever the document size, in every caller
- [Origin narrowing](/quest/next/origin-narrowing.md) - a live origin grant narrows in place and ends the subscriptions it no longer covers, the deafen boundary #2714 asked for
- [Local announcements](/quest/next/local-announce.md) - an origin's announce cursor and its broadcast resolver agree on what exists
- [Relay embedding](/quest/next/relay-embed.md) - an embedder reads the resolved config, reuses the CLI merge, registers listener health, and spawns a test relay without TOML strings
- [Auth embedder](/quest/next/auth-embedder.md) - the lease owns its re-check clock, a gateway session holds a lease, and `Cluster::admit` scopes and tags origins in one call
- [Binding docs](/quest/next/binding-docs.md) - every binding doc sample names a symbol that exists, checked nightly
Expand Down Expand Up @@ -95,6 +96,7 @@ transport, benchmark tooling); worktrees isolate commits, not semantics.
- [Relay memory](/quest/next/relay-memory.md) - remeasure what an announcement costs after prefix routes
- [PoP skipping](/quest/next/pop-skipping/README.md) - short cold paths for unpopular broadcasts without losing warm backhaul dedup
- [Route cost in the JS origin](/quest/next/route-cost.md) - the browser origin ranks routes by cost and hops like Rust instead of newest-first
- [Front parking](/quest/next/origin-front-parks.md) - an unroutable request waits on a front instead of re-asking on every route-table move
- [Publish channel count](/quest/next/publish-audio-channel-count.md) - forcing a channel count on an Audio.Capture stops costing the subscriber gaps of silence
- [JS abandonment](/quest/next/js-subscribe-abandonment.md) - a viewer returning during IETF subscribe setup keeps its track across microtasks
- [IETF stream types](/quest/next/ietf-uni-stream-types.md) - padding streams are discarded stream-only and an unknown uni type closes the session, per draft-21
Expand Down
52 changes: 52 additions & 0 deletions quest/next/local-announce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# [M] An origin announces what it can serve

## Goal

The announce cursor and the broadcast resolver agree on what exists. Today
`create_broadcast` publishes a path that `request_broadcast` will happily
serve but that no consumer could have discovered: nothing crossed the cursor.
Resolving a broadcast that was never advertised is strange on its face, and
it forces every waiter to carry two notions of reachable.

## Plan

Two shapes are on the table, and this quest picks one:

- `create_broadcast` records an announcement scoped to this origin and never
forwarded to a peer. The cursor becomes the complete local inventory and
the resolver follows it.
- `request_broadcast` stops resolving a local broadcast that was not
announced, so publishing and advertising stay two deliberate steps and the
cursor stays the only discovery path.

The first is the leaning: serving a path while hiding it from the local
inventory is the odd combination, and a relay's own ingest is exactly what a
local consumer wants to find.

Things to settle along the way:

- A local announcement must not reach a peer. Prove it with a test rather
than a comment. The outgoing announce path already filters by scope, so the
question is whether that filter is the right seam or whether the route
needs to carry the fact.
- Whether a producer's own consumer should see its own announcements at all.
It arguably should not, and the decision belongs here because it decides
what "local" scopes to.
- `origin::Consumer::routed` walks the announce cursor while the path `Watch`
watches the route table. Once the cursor reports every servable path the
two report the same events. #3901 already collapsed `routed_broadcast` onto
the watch; this is what makes that collapse principled rather than a
widening of what resolves.
- `announced_broadcast` and its libmoq, Python, Swift, Kotlin, Go, and Dart
faces describe the wait in prose. That wording moved in #3901 and moves
again here; keep it honest, and remember UniFFI hashes doc comments into
the API checksum, so the generated bindings need regenerating with it.

Public API: additive on `moq-net` and `@moq/net` if a local announcement is a
new route source, behavioral for anything reading the cursor. Wire: none, and
a test should say so rather than the PR description.

## Related

- [Ingest source](/quest/next/net-ingest-source.md) - the neighbouring question of where a route entered
- [Front parking](/quest/next/origin-front-parks.md) - the other half of retiring `routed_broadcast`'s retry loop
34 changes: 34 additions & 0 deletions quest/next/origin-front-parks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# [S] An unroutable request waits on the front, not in a retry loop

## Goal

`origin::Consumer::routed_broadcast` retries: it registers a watch on the
path, asks, and on `Unroutable` waits for the covering routes to move. The
wait lives beside the fronts the driver runs rather than in them, so a path
nothing covers is re-asked from scratch on every table move, minting and
tearing a front down each time. A request for an unroutable path should be
able to mint a front that waits for coverage, and the loop should go away.

## Plan

The obstacle, and the reason #3901 rejected this as an alternative, is that
fronts are shared per path. A front that parks would park every requester at
that path, including `request_broadcast`, whose whole contract is a verdict
now. So the disposition has to travel with the requester rather than the
front: `request_broadcast` resolves the current verdict at once without
parking, while `routed_broadcast` stays registered until its route completes.
The front ends only once every parked requester has been handled, so one
requester's disposition never ends another's wait.

Worth confirming before building it: that the retry loop costs something. A
benchmark swept over requesters and route-table churn would show whether the
re-mint is a real slope or noise, and it is the same benchmark that would
show the replacement is cheaper.

Public API: no signature change expected. `routed_broadcast` and
`request_broadcast` keep their contracts; only where the waiting happens
changes.

## Related

- [Local announcements](/quest/next/local-announce.md) - settles what the front would be waiting for
Loading