Repository navigation
quest: plan a peer's closed session reading as Closed in the bindings - #8386
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both wires decode a received SESSION_CLOSED stream reset to
StreamError::Session(Internal), so a binding sees Protocol { kind:
SessionClosed } on moq-transport too, not Internal. The relay test the
Goal named does not exist; the related endpoint-close test is skipped.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 32ea7dd
No actionable findings in this documentation-only change. The m2 binding-error follow-up is appropriately scoped: both wire decoders already preserve SESSION_CLOSED as Stream(Session(Internal)), and the plan explicitly includes the separate Error::Session teardown path rather than assuming a stream-conversion change covers every reader. It also accounts for cross-package parity and migration impact.
Verification: GitHub-only static review of both changed quest files and the referenced FFI conversion, wire decoders, session shutdown paths, C error surface, and Python socket tests. No local commands or runtime tests were run; actual peer-close behavior remains for the implementation to verify.
|
No actionable comments were generated in the recent review. WalkthroughThe API-shape README adds a requirement to map remote Merge Risk:
|
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- New quest plan —
quest/m2/api-shape/session-closed.mdplans mapping a peer's SESSION_CLOSED toMoqError::Closedin moq-ffi, plus the comment, test,js/net, andmoq-cfollow-ups. - Epic index — links the new child from
quest/m2/api-shape/README.md. - Decode correction — the second commit fixes the quest's moq-transport decode claim to match
ietf/error.rs.
ℹ️ The PR body still says moq-transport yields Internal
Both wires decode SESSION_CLOSED to StreamError::Session(SessionError::Internal), which is what the quest now says. The body's opening paragraph still describes moq-transport as Internal, so the merged description contradicts the plan it introduces.
Technical details
# stale body claim
## Affected sites
- PR body, opening paragraph — "or `Internal` on moq-transport"
- `rs/moq-net/src/ietf/error.rs:90` — `SESSION_CLOSED => StreamError::Session(SessionError::Internal)`
- `rs/moq-ffi/src/error.rs:159` — maps any `Session(_)` to `MoqProtocolKind::SessionClosed`, carrying code `0x3`
## Required outcome
- The body describes the same mapping as `session-closed.md`.deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
| moq-transport does not turn it into `Internal`. No test on main checks this | ||
| path: the one related test, `test_tcp_rst_and_endpoint_close_are_errors` | ||
| (`py/moq-rs/tests/test_socket.py`), is skipped as flaky and covers endpoint | ||
| close, not a peer. |
There was a problem hiding this comment.
On current main, #8373 already removed this test's skip and changed its endpoint-close branch to pytest.raises(moq.Error.Closed), and added endpoint_close_resets_an_open_tcp_session_as_closed in rs/moq-ffi/src/socket.rs. Neither crosses a real session, so the gap stands, but this sentence describes a main that no longer exists. Please also name the test that will cover the peer path, since updating local_session_close_is_closed only checks the conversion.
| moq-transport does not turn it into `Internal`. No test on main checks this | |
| path: the one related test, `test_tcp_rst_and_endpoint_close_are_errors` | |
| (`py/moq-rs/tests/test_socket.py`), is skipped as flaky and covers endpoint | |
| close, not a peer. | |
| moq-transport does not turn it into `Internal`. No test on main crosses a real | |
| session: both endpoint-close tests (`test_tcp_rst_and_endpoint_close_are_errors` | |
| in `py/moq-rs/tests/test_socket.py`, and | |
| `endpoint_close_resets_an_open_tcp_session_as_closed` in | |
| `rs/moq-ffi/src/socket.rs`) cover only the shared in-process origin. |
| dropping it and documenting the difference). | ||
|
|
||
| Map a received SESSION_CLOSED to `Closed` in moq-ffi's `From<moq_net::Error>`, | ||
| with a `Stream(StreamError::Session(_))` arm beside the local one. Both wires |
There was a problem hiding this comment.
Broadening this arm to StreamError::Session(_) leaves MoqProtocolKind::SessionClosed with no producer: stream_kind is its only constructor, and every non-test from_stream caller then sees either a non-Session stream or is filtered to Internal first. The epic's rule is to delete a public item with no caller, so the plan should say whether that kind is removed and record it in the Impact.

Plans A peer's closed session reads as Closed in the bindings in the m2
api-shapeepic. This is the follow-up from moq-dev/moq#8373, which guaranteesClosedonly for two endpoints sharing one in-process origin. A peer across a real session instead seesProtocol { kind: SessionClosed }on moq-lite, orInternalon moq-transport.Decisions
Settled in /quest-complete on 2026-11-09 by the maintainer:
Impact
Quests only. Wire: none.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, high effort
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with high effort)
Review
Rewritten by
quest reviewafter each round.01a1c202-c3c6-7072-b6e3-46f89d347e5f, round 2The updated follow-up plan accurately describes the current error mappings and additional shutdown paths to investigate, with no actionable defects or runtime changes.