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
1 change: 1 addition & 0 deletions quest/m1/public-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions quest/m1/public-model/claim-request-type.md
Original file line number Diff line number Diff line change
@@ -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`.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

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
Loading