Repository navigation
quest(m1): plan the application claim request type #6195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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`. | ||
|
|
||
| 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.