diff --git a/quest/m1/README.md b/quest/m1/README.md index 93cb6d34588..9bd6d051715 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -19,6 +19,7 @@ transport, benchmark tooling); worktrees isolate commits, not semantics. - [Play harness](/quest/m1/play-harness.md) - moq play's tune-in, rendition-switch, and drain logic runs in per-PR CI without a device - [Missing fetch group](/quest/m1/fetch-missing-group.md) - HTTP /fetch answers 404 and `moq fetch` fails cleanly for a group the track lacks +- [JS fetch answer](/quest/m1/js-fetch-answer.md) - js/net's lite fetch settles on the publisher's answer, and a JS publisher's miss resets with NotFound - [libmoq hidden opt-in](/quest/m1/libmoq-hidden.md) - `moq_origin_announced` takes a `hidden` flag so C callers can list `.`-named broadcasts - [lite-07 stream count](/quest/m1/lite-stream-count.md) - moq-lite-07 replaces SUBSCRIBE_DROP with a group-stream count in SUBSCRIBE_END, like moq-transport - [Announce compression](/quest/m1/announce-compression.md) - a lite-07 announce reuses the path head and hop-chain tail of a live announcement on its stream instead of resending them diff --git a/quest/m1/js-fetch-answer.md b/quest/m1/js-fetch-answer.md new file mode 100644 index 00000000000..0e9bc28b3b5 --- /dev/null +++ b/quest/m1/js-fetch-answer.md @@ -0,0 +1,32 @@ +# [S] JS lite fetch waits for the publisher's answer + +## Goal + +`js/net`'s lite `fetchGroup` resolves only once the publisher has answered: +the first response byte, or a FIN for an empty group. A missing group rejects +the fetch itself, and every coalesced caller sees the same rejection, instead +of receiving a group whose first `readFrame()` fails. A JS publisher that +cannot serve a group resets the stream with `NotFound`, not a generic error, +so a Rust or JS subscriber can tell a miss from a failure. + +## Plan + +- Rust already behaves this way since #4164, which waits in the lite + subscriber before accepting and rejects on reset. Mirror it: resolve after + the first response byte or an empty-group FIN, and reject on reset. Today + the fetch path returns its mirror before the response arrives; the stream + reader can already block until data or FIN and throw on reset. +- The publisher side throws a plain error for a local miss, which reaches the + wire as a generic reset code. Give it the `NotFound` code the Rust side uses. +- The IETF JS path refuses `fetchGroup` outright and is out of scope. +- Tests in the lite integration suite: a missing group rejects the fetch, a + coalesced second caller rejects too, an existing group is unchanged, and a + JS publisher's miss reaches a subscriber as `NotFound`. + +Public API: none; a behavior change in when `fetchGroup` settles. Wire: no +format change; a miss resets with the existing `NotFound` code instead of a +generic one. + +## Related + +- [#4164](https://github.com/moq-dev/moq/pull/4164) - the same fix in Rust