From 39c9defc5cc578d536f29a2bf0a77924fb241f97 Mon Sep 17 00:00:00 2001 From: opencode agent Date: Tue, 22 Sep 2026 13:48:01 -0700 Subject: [PATCH 1/2] quest: plan local announcements and front-side request parking Both fell out of #3901. Dropping `routed_broadcast`'s announce-cursor gate made an unannounced local broadcast resolve, which is right for the resolver but leaves the cursor reporting less than the origin can serve; local announcements would make the two agree by construction. The retry loop the same PR kept is the other half: the wait belongs in the front, once a requester can carry whether it wants to park or wants a verdict. Co-Authored-By: Claude Opus 5 --- quest/next/README.md | 2 ++ quest/next/local-announce.md | 52 ++++++++++++++++++++++++++++++++ quest/next/origin-front-parks.md | 32 ++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 quest/next/local-announce.md create mode 100644 quest/next/origin-front-parks.md diff --git a/quest/next/README.md b/quest/next/README.md index 3348ce4d332..e34e938c413 100644 --- a/quest/next/README.md +++ b/quest/next/README.md @@ -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 @@ -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 diff --git a/quest/next/local-announce.md b/quest/next/local-announce.md new file mode 100644 index 00000000000..91046b9ed0d --- /dev/null +++ b/quest/next/local-announce.md @@ -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 diff --git a/quest/next/origin-front-parks.md b/quest/next/origin-front-parks.md new file mode 100644 index 00000000000..4e574fd1251 --- /dev/null +++ b/quest/next/origin-front-parks.md @@ -0,0 +1,32 @@ +# [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: a front would end when no waiting requester remains and answer +`Unroutable` to the ones that asked for an answer. + +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 From abca1cf3e109f92e6f2a9c7fbf495cbe266a9e1d Mon Sep 17 00:00:00 2001 From: opencode agent Date: Tue, 22 Sep 2026 14:58:58 -0700 Subject: [PATCH 2/2] docs(quest): define the requester lifecycle for front parking `request_broadcast` resolves its verdict at once and never parks, while `routed_broadcast` stays registered until its route completes; the front ends only once every parked requester has been handled. Co-authored-by: DeepSeek V4.1 Flash --- quest/next/origin-front-parks.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quest/next/origin-front-parks.md b/quest/next/origin-front-parks.md index 4e574fd1251..4df4557a07f 100644 --- a/quest/next/origin-front-parks.md +++ b/quest/next/origin-front-parks.md @@ -15,8 +15,10 @@ 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: a front would end when no waiting requester remains and answer -`Unroutable` to the ones that asked for an answer. +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