Repository navigation
quest: bindings see a moq-transport run end as an end #7453
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
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,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<moq_net::Error>`), 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. | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mechanism here conflates two registries.
moq_net::Error::Remoteis only produced by the IETF request registry (request::from_codeinrs/moq-net/src/ietf/error.rs, andPublishDone::endatrs/moq-net/src/ietf/publish.rs:175); a stream reset decodes through the stream registry (from_stream_code,rs/moq-net/src/ietf/error.rs:68), where0x0isStreamError::Internal, neverRemote.And
0x0isINTERNAL_ERRORin every IETF registry we keep (rs/moq-net/src/ietf/error.rs:18,rs/moq-net/src/ietf/publish.rs:139), so it is an error, not a clean end.PublishDoneStatus::InternalErroris what a track that ended withErrreports (rs/moq-net/src/ietf/publisher.rs:698), so a run end arriving asRemote(0)is a failure being signalled. The fix likely belongs at the source rather than a blanketRemote(0)-> end mapping in theRemoteconversion, which would mask genuine internal errors and contradictsrs/moq-net/AGENTS.md(a session-close-induced end "ends with an error, never a clean end"): emitTrackEndedfor a deliberate finish, or map the session-close-induced end to a session kind. Worth pinning the actual trigger down before committing to the mapping bullet.