From cc81294c09464dd9b575a570f8ea1ef0a0f4d39f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 31 Oct 2026 09:32:02 -0700 Subject: [PATCH] quest: plan the FFI moq-transport run end Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 + quest/m1/ffi-ietf-run-end.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 quest/m1/ffi-ietf-run-end.md diff --git a/quest/m1/README.md b/quest/m1/README.md index fdf97415a72..6a33e592cd1 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -133,6 +133,7 @@ removed). - [moq-c at parity](/quest/m1/c/README.md) - the hand-written `moq-c` ships at the cut with every m1 binding feature moq-ffi gains - [Lite-05/06 timestamps pass through](/quest/m1/lite-timestamps-through.md) - a timed track received over lite-05/06 stays timed and is forwarded with its timestamps over every version - [Exact timestamps in every binding](/quest/m1/binding-timestamps.md) - bindings carry `{value, scale}` timestamps instead of lossy microseconds +- [Bindings see a moq-transport run end as an end](/quest/m1/ffi-ietf-run-end.md) - an IETF publisher ending its run reaches moq-ffi consumers as an end, not `Internal` - [A broadcast stamps everything from one clock](/quest/m1/broadcast-clock.md) - catalog, MSF, and HLS record groups are stamped from the broadcast's clock, never the ambient one - [Announcement takeover](/quest/m1/announce-takeover.md) - a new independent route explicitly continues instances served through its predecessor, with shared Rust/JS semantics and lite-07 wire - [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - a lite-07 SUBSCRIBE asks for past and live ranges with absolute or relative ends, in either order, and replaces FETCH; merged ranges never starve a subscriber; relays fill misses by range, including over moq-transport diff --git a/quest/m1/ffi-ietf-run-end.md b/quest/m1/ffi-ietf-run-end.md new file mode 100644 index 00000000000..5daa053b84f --- /dev/null +++ b/quest/m1/ffi-ietf-run-end.md @@ -0,0 +1,30 @@ +# [S] Bindings see a moq-transport run end as an end + +## Goal + +When a moq-transport publisher ends a run, a moq-ffi consumer (Python, Swift, +Kotlin, Go) sees the same kind of end it sees over moq-lite, not +`MoqError.Internal`. A binding can then follow a replaced publisher over +either protocol by error kind, without treating an IETF run's end as fatal. + +## Plan + +Decided 2026-10-31 (maintainer, /quest-plan of the follow-ups from +[moq-dev/moq.pro#3169](https://github.com/moq-dev/moq.pro/pull/3169)). That +PR's Go and Kotlin samples follow a lite run's end, which reaches the FFI as +a protocol reset (`MoqException.Protocol`), but over moq-transport the old +run's catalog ends with a stream reset that decodes as +`moq_net::Error::Remote(0)`. `rs/moq-net/src/error.rs` maps every `Remote(_)` +to `StreamError::Internal`, so the FFI raises `Internal` and the samples stop. + +- First establish what code 0 means on the moq-transport drafts we keep + ([the IETF drop](/quest/m1/ietf-drop/README.md)): a clean end of the + publisher's run, or a real internal error. Only a code that means the run + ended maps to an end; others stay errors. +- Map it in one place (moq-net's `Remote` conversion or the FFI's + `From`), keep the JS consumer consistent, and cover it with a + moq-transport publisher that ends a run under an FFI consumer. +- The broadcast-closed signal itself already shipped on main as + `MoqBroadcastConsumer.closed()` + ([moq-dev/moq#7304](https://github.com/moq-dev/moq/pull/7304)); it reaches + the bindings with the next release, which moq.pro's reader quest adopts.