Skip to content

refactor(net)!: remove Error::SessionClosed - #6482

Merged
kixelated merged 11 commits into
mainfrom
quest/m1/error-cleanups
Oct 24, 2026
Merged

kixelated merged 11 commits into
mainfrom
quest/m1/error-cleanups

Conversation

@kixelated

@kixelated kixelated commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m1/error-cleanups.md: deletes moq_net::Error::SessionClosed, which had no meaning of its own.

Change

  • track::Producer::close was its only producer. It now aborts open groups with Error::Stream(StreamError::Session(SessionError::Cancel)) directly, the value SessionClosed was converted to anyway, so relays forward the same SESSION_CLOSED stream code.
  • Match arms dropped in moq-net (From<&Error> for both registries, resume::route_failed, which already accepts StreamError::Session(_)), moq-relay (connection::failure) and moq-ffi.
  • moq-ffi maps Stream(Session(Cancel)) to MoqError::Closed, so a binding reading a group whose own session closed still sees a shutdown (IsShutdown in Go) rather than a protocol error. A peer's SESSION_CLOSED decodes as Session(Internal) and stays Protocol { kind: SessionClosed }; a unit test covers both.
  • Test-only uses in moq-net, moq-hls and moq-gst use the real error for their scenario: the stream form for a closed route's groups, Transport for a publisher losing its connection.
  • The quest file and its m1 link are deleted.

Consumer: every caller that matched SessionClosed above; the variant is now unrepresentable instead of a fourth spelling of a clean close.

Public API and wire impact

  • Rust, breaking: moq_net::Error::SessionClosed removed. Nothing produces it any more. track::Producer::close aborts its open groups with Error::Stream(StreamError::Session(SessionError::Cancel)), which encodes as the same SESSION_CLOSED stream code; match that, or any StreamError::Session(_), where you matched Error::SessionClosed. (Per moq-dev/moq#6610 this note lives here rather than in MIGRATE.md; the unreleased moq-dev/moq#6111 note that close aborts with Error::SessionClosed now reads Error::Stream(StreamError::Session(SessionError::Cancel)).)
  • Errors seen by moq_net readers: a group cut by track::Producer::close now reads Error::Stream(StreamError::Session(SessionError::Cancel)) instead of Error::SessionClosed.
  • Bindings: none (still Closed).
  • Wire: none; the stream code sent is the same SESSION_CLOSED.

Checks

  • just fix: clean
  • just check: passed (8285 Rust tests plus the binding suites the moq-ffi change selects)

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 2 commits October 22, 2026 20:56
Quest-Claim: 14efbf5acb1dcab0
track::Producer::close aborts open groups with StreamError::Session(SessionError::Cancel)
directly, the value SessionClosed converted to, so the wire is unchanged. moq-ffi keeps
reporting that local close as Closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Error cleanups refactor(net)!: remove Error::SessionClosed Oct 23, 2026
@kixelated
kixelated marked this pull request as ready for review October 23, 2026 06:34
@kixelated

Copy link
Copy Markdown
Collaborator Author

Quest complete; marked ready for review. just fix and just check pass locally.

One choice made without the maintainer: moq-ffi maps Stream(Session(Cancel)) to MoqError::Closed. Without it, a binding reading a group whose own session closed would start seeing Protocol { kind: SessionClosed } instead of Closed, and Go's IsShutdown would call it a failure. A peer's SESSION_CLOSED decodes as Session(Internal), so it is unaffected. The alternative is dropping that arm and accepting the binding behavior change; the follow-up clean-close quest may revisit it.

(Written by Claude Opus 5.5)

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d04f5743-80a3-4387-994e-347a46f7feb4
Commits

Reviewing files that changed from the base of the PR and between 7b7c515 and 1e37966.

Files selected for processing: 11
  • quest/m1/README.md
  • quest/m1/error-cleanups.md
  • rs/moq-ffi/src/error.rs
  • rs/moq-gst/src/source/imp.rs
  • rs/moq-hls/src/export/mod.rs
  • rs/moq-hls/src/server/routes.rs
  • rs/moq-mux/src/container/source.rs
  • rs/moq-net/src/error.rs
  • rs/moq-net/src/model/resume.rs
  • rs/moq-net/src/model/track.rs
  • rs/moq-relay/src/connection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T08:25:29.928725Z 1e37966 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

kixelated and others added 2 commits October 23, 2026 09:05
Resolves the MIGRATE.md conflict and replaces moq-mux's new Error::SessionClosed match with the Stream(Session(Cancel)) value track::Producer::close now produces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main twice to clear conflicts; queueing for merge.

Reviews: Codex reviewed ece5edf with no findings and gave a thumbs-up on 10b50f0; the final head adds only the MIGRATE.md merge resolution. CodeRabbit was rate limited.

Checks: quest check --base origin/main passes. Locally just check passed rs, py, kt, swift and go; its dart step flagged the bindings as stale, but regenerating removed the cancellation support main's checked-in bindings already have, so the local generator lags main and this PR changes no FFI signatures. cargo test on moq-net, moq-mux, moq-hls and moq-ffi passes. Some moq-relay integration tests failed with connection-refused errors and timeouts at load average 45 and pass when run serially.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 23, 2026
kixelated and others added 2 commits October 23, 2026 12:19
A test that landed on main after this branch last merged still aborted with Error::SessionClosed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

The merge queue dropped this PR: a resume.rs test that landed on main while it was queued still called abort(Error::SessionClosed), so the merge-group build failed to compile moq-net tests. I merged origin/main and switched those three aborts to Error::Stream(StreamError::Session(SessionError::Cancel)), the same replacement this PR uses in the other route-failure tests. cargo check --workspace --tests and the moq-net, moq-ffi and moq-mux tests pass. Re-queuing on 49d8db1.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge October 23, 2026 19:41
@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
# Conflicts:
#	quest/m1/README.md
#	rs/moq-net/src/model/track.rs
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main to clear conflicts:

  • rs/moq-net/src/model/track.rs: kept main's use crate::sync::Mutex; alongside this PR's SessionError import (still used by Producer::close).
  • quest/m1/README.md: dropped both the error-cleanups link (this PR finishes it) and the from-str-trait link (main already deleted that quest).

No other moq_net::Error::SessionClosed users came in from main. just check and quest check passed locally; Codex thumbs-up on f172abe. Enqueuing.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2026
@kixelated
kixelated enabled auto-merge October 24, 2026 02:53
@kixelated
kixelated added this pull request to the merge queue Oct 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2026
@kixelated
kixelated enabled auto-merge October 24, 2026 08:24
@kixelated
kixelated added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 6ff7749 Oct 24, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/error-cleanups branch October 24, 2026 10:45
kixelated added a commit that referenced this pull request Oct 24, 2026
…grate

Keeps this PR's deletion of quest/m1/api-audit/migrate.md and main's
deletion of quest/m1/ffi-shutdown-sync.md (finished by #6436).

Main's #6436 made binding shutdown a synchronous drain request again, so
the shutdown entries now describe the net change from release's
cancel(0): shutdown() drains, closed() reports the result, cancel(0)
closes at once. Also drops the js/publish linger entry #6522 made moot
and names the abort error #6482 left behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant