Skip to content

fix(relay): match the uring driver's terminal error - #3860

Merged
kixelated merged 1 commit into
mainfrom
fix/uring-driver-run
Sep 21, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/uring-driver-run

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

Check is red on main: rs/moq-relay/src/uring.rs:771 still does if let Err(err) = driver_handle.run(driver).await, but #3828 changed the worker driver to return moq_net::Error directly. The io_uring path is Linux-only, so macOS just check never caught it. Every open PR inherits the failure.

Approach

Match the terminal error the way websocket.rs does: a clean Closed is silent, anything else is logged at debug.

Public API and wire impact

None.

Closes #3848

🤖 Generated with Claude Code

#3828 changed the worker driver to return `moq_net::Error` directly, but the
io_uring accept path still pattern-matched a `Result`, so `just check` fails
on Linux with the `io-uring` feature. Treat a clean close as silent and log
any other terminal error, matching the WebSocket path.

Closes #3848

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kixelated
kixelated enabled auto-merge (squash) September 21, 2026 20:40
@kixelated

Copy link
Copy Markdown
Collaborator Author

MERGE

Positive improvement: yes. #3828 made driver_handle.run(...) return moq_net::Error directly; this site still treated it as a Result, which breaks Linux io-uring builds and keeps Check red on main. The one-line pattern match restores compile and preserves the old behavior (silent clean close, debug-log anything else).

Worth the complexity: yes — three lines, no API or wire change, no new abstraction.

Different approach: the WebSocket path uses an ended() helper that turns Closed into Ok(()) and other errors into Err, because that path returns the outcome up the stack. Here the driver runs in a spawned task that only logs, so matching in place is the right equivalent. Extracting a shared helper would be optional cleanup, not a blocker.

This is an automated review, not the maintainer's decision
(Written by Grok)

@moq-bot

moq-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

No issues found.
Verdict: approve
(Written by Muse Spark)

New%20session%20-%202026-09-21T20%3A41%3A06.104Z
opencode session  |  github run

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 12f186fe-2179-4238-8bf9-e57bc8e30ab4

📥 Commits

Reviewing files that changed from the base of the PR and between 7503555 and 2a85335.

📒 Files selected for processing (1)
  • rs/moq-relay/src/uring.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


Walkthrough

serve_connection now handles the session driver's direct moq_net::Error result. moq_net::Error::Closed ends silently. Other errors still produce the "session driver ended" debug log. This also fixes the outdated result-pattern match after the driver run() signature changed.

Priority: ⬆️ High

Severity of issue fixed: High

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix to terminal error handling in the io_uring relay driver. It matches the primary change.
Description check ✅ Passed The description explains the compilation failure, the direct moq_net::Error handling, the Closed termination behavior, and the affected io_uring path. It is directly related to the changeset.
Linked Issues check ✅ Passed The change satisfies #3848. In rs/moq-relay/src/uring.rs, driver_handle.run(driver).await is matched as moq_net::Error, not as a Result. moq_net::Error::Closed produces no log. Other termina…
Out of Scope Changes check ✅ Passed The diff contains only the uring.rs driver termination handling required by #3848. It changes no unrelated files, public APIs, or wire behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR

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.

@kixelated
kixelated merged commit cfbf8d2 into main Sep 21, 2026
4 checks passed
@kixelated
kixelated deleted the fix/uring-driver-run branch September 21, 2026 20:49
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.

Check red on main: rs/moq-relay/src/uring.rs missed by #3828 driver run() signature change

1 participant