diff --git a/quest/m1/public-model/README.md b/quest/m1/public-model/README.md index 3f5981bacde..d4ba6348c62 100644 --- a/quest/m1/public-model/README.md +++ b/quest/m1/public-model/README.md @@ -101,6 +101,7 @@ Work owned by this README, after the children land: ## Required +- [Claim request type](/quest/m1/public-model/claim-request-type.md) - accepting an application claim's request fails to compile instead of panicking - [Public ingest](/quest/m1/public-model/ingest.md) - a custom subscriber writes received groups, frames, starts, and ends into a track through public calls - [Public serving](/quest/m1/public-model/serve.md) - a custom publisher reads a track's start, cursor, and group expiry for its wire through public calls - [Public routes and answering](/quest/m1/public-model/answer.md) - a custom relay ingests routes, answers broadcast and track requests on demand, and advertises without echoing a peer's routes back diff --git a/quest/m1/public-model/claim-request-type.md b/quest/m1/public-model/claim-request-type.md new file mode 100644 index 00000000000..cb9e1bdf30b --- /dev/null +++ b/quest/m1/public-model/claim-request-type.md @@ -0,0 +1,41 @@ +# [S] An application claim's request cannot be accepted + +## Goal + +Answering an application claim's request with `accept` fails to compile in +Rust and to typecheck in TypeScript, instead of panicking (Rust) or throwing +(JS) at runtime. `origin::Producer::dynamic(prefix)` hands out requests that +only `prepare` and `reject`; the session-forwarded claim from +`dynamic_route` / `dynamicRoute` keeps `accept`. Behavior is otherwise +unchanged: the escape hatches stay hidden until +[Public routes and answering](/quest/m1/public-model/answer.md) gives them a +public shape. + +## Plan + +Decided 2026-10-21 (maintainer), while moving a downstream application onto +[#5678](https://github.com/moq-dev/moq/pull/5678): its handler's +`request.accept(..)` on a `dynamic()` claim still compiled against the new +API and would have panicked on the first request in production. #5678's +decision 1 kept `accept` `#[doc(hidden)] pub` as the interim, guarded only by +the runtime check. Rejected: folding this into answer.md, which leaves the +trap until that [L] lands; opening the code PR without a quest. + +Kept from #5678: prepare and publish, one epoch per answer, and the accepted +cold-start reset until +[announce takeover](/quest/m1/announce-takeover.md) lands. The downstream +check confirmed the reset is recoverable: a reader that follows the +announcement reaches the published answer, while a one-shot reader (an HTTP +fetch) cannot and gets `Unroutable`. + +Guidance: split the request type by the handle that yields it, for example +`dynamic_route` returning its own handle whose request carries `accept`, +rather than one `Request` with an optional publisher. Delete the runtime +assert and its test once the type makes the call unreachable; a +compile-fail doctest (Rust) and a `@ts-expect-error` line (JS) take their +place. Bindings (moq-ffi, moq-c) already expose no `accept` and need no +change. + +## Related + +- [Public routes and answering](/quest/m1/public-model/answer.md) - later removes the hidden peer-claim API this quest narrows