Skip to content

feat(relay): serve moq-transport from the io_uring workers - #5821

Merged
kixelated merged 7 commits into
mainfrom
quest/m2/uring-ietf
Oct 17, 2026
Merged

kixelated merged 7 commits into
mainfrom
quest/m2/uring-ietf

Conversation

@kixelated

@kixelated kixelated commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m2/uring-ietf.md: a relay started with --runtime-io-uring now serves every version its config lists, moq-transport included, instead of advertising only the moq-lite ALPNs and warning that the rest are not served.

What changed

  • moq_uring::transport::Local<T> (new): wraps a worker's !Send session, plus its streams and send groups, so it meets moq-net's poll::Boxable bounds. It uses send_wrapper (already in the lockfile through iroh), so any use or drop on another thread panics instead of racing the worker. moq-transport's driver boxes its futures with a native Send bound, which is the whole reason this exists.
  • Relay accept path (rs/moq-relay/src/uring.rs): the bind advertises versions.alpns() + h3, the same as the tokio listener. The lite-only filter, the refusal of SETUP-negotiated lite versions named in the config, and the warning are gone. After the transport handshake:
    • moq-lite on its own ALPN (03..07) still goes through accept_request_lite unboxed. That hot path doesn't change.
    • Everything else goes through accept_request(Local::new(session)): moq-transport 14..22, lite 01/02 over moql, and a browser offering no subprotocol (bidi SETUP fallback, which the tokio listener already accepts).
    • Everything after the handshake (auth, ok, driver, supervision) moved unchanged into a generic serve_request<S>. That avoids re-indenting it, so the conflict with fix(relay): share connection lifecycle across runtimes #5761 stays small.
  • Test: runtime_uring::uring_workers_serve_every_configured_version. A moq-transport-22 publisher feeds subscribers pinned to moq-transport-22, -16, -14 and moq-lite-02, over both raw QUIC and WebTransport. Each subscriber must negotiate exactly its pinned version and receive the frame. It skips loudly below the kernel floor like the rest. It fails on main, because the moqt ALPNs are not advertised there.
  • Docs: doc/bin/relay/config.md, the --runtime-io-uring help, and the moq-uring README/crate docs drop the lite-only caveat. The quest is deleted and its references are removed (it unblocks relay-io-uring-package).

Public API and wire impact

  • New exported type moq_uring::transport::Local (new, plus poll::Session / SendStream / RecvStream / SendGroup impls). moq-uring is pre-1.0 and experimental. New dependency: send_wrapper 0.6 (the newest release).
  • Relay behavior: the io_uring listener now advertises and serves the moq-transport and moql ALPNs. A config that names lite-01/02 now starts instead of refusing.
  • Wire: none.

Decisions

Settled by the maintainer:

  1. Location: (a) public moq_uring::transport::Local. The ring is what makes sessions !Send, so a uring client dialing moq-transport needs the same thing. (c) is a follow-up quest: convert moq-net's moq-transport path into named machines like lite, which retires Boxable and Local. (b), private to moq-relay, was rejected.
  2. Name: Local (renamed from Pinned, to avoid confusion with std::pin::Pin).
  3. Runtime thread check: accepted until (c). Every transport call on a moq-transport session pays a thread::current().id() comparison; the lite path pays nothing. No benchmark was added because no existing ring path changes cost.

Checks

  • just check passed (lint plus 8097 tests).
  • MOQ_STRICT=1 just rs uring passed (444 + 103 tests, the new one included, and clippy with io-uring/qlog). The host is shared and heavily loaded, so treat any timings in the logs as rough.
  • quest check passed.
  • Not run: just test interop (no wire change).

Follow-ups

  • Quest: moq-transport becomes named machines, which retires Boxable and Local (decision 1, option c).
  • fix(relay): share connection lifecycle across runtimes #5761 (uring-connection-log) touches the same accept path. Whichever lands second rebases, and the conflict should stay small since serve_request's body is untouched.
  • uring_workers_drain_on_the_trigger could now also check the moq-transport-17+ "time left in the drain window" GOAWAY on the ring. Today only shutdown_signal.rs covers it, through the shared runtime.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 5 commits October 16, 2026 18:29
The ring advertised only the moq-lite ALPNs, refused SETUP-negotiated lite
versions named in the config, and warned that moq-transport was not served.
It now serves every configured version, like the shared runtime.

moq-lite on its own ALPN still runs unboxed on the worker. moq-transport and
the SETUP-negotiated versions box their futures with a native `Send` bound,
so their session goes through the new `moq_uring::transport::Pinned`, which
checks the thread on every use and panics anywhere else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 17, 2026 02:43
@kixelated

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: a9970346-3fe2-46ff-9906-fb0531e863d0
📥 Commits

Reviewing files that changed from the base of the PR and between 291e392 and 885684f.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 14
  • Cargo.toml
  • doc/bin/relay/config.md
  • quest/m2/README.md
  • quest/m2/relay-io-uring-package.md
  • quest/m2/uring-connection-log.md
  • quest/m2/uring-ietf.md
  • rs/moq-relay/src/runtime.rs
  • rs/moq-relay/src/uring.rs
  • rs/moq-relay/tests/integration/runtime_uring.rs
  • rs/moq-uring/Cargo.toml
  • rs/moq-uring/README.md
  • rs/moq-uring/src/lib.rs
  • rs/moq-uring/src/transport.rs
  • rs/moq-uring/src/transport/local.rs
💤 Files with no reviewable changes: 4
  • quest/m2/uring-connection-log.md
  • quest/m2/README.md
  • quest/m2/relay-io-uring-package.md
  • quest/m2/uring-ietf.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

Walkthrough

The io_uring relay now advertises all configured MoQ versions. It uses the MoQ-Lite handshake for Lite sessions and a thread-bound Local transport with the general handshake for other sessions. Integration tests cover pinned versions over raw QUIC and WebTransport.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 88568

The configured-version support is ready to merge after normal checks; no actionable risk remains established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 6 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: enabling io_uring workers to serve moq-transport versions.
Description check Passed The description directly explains the relay behavior change, the new Local wrapper, tests, documentation updates, and validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 6 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.1)

Clippy execution timed out

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 17, 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-17T03:06:04.042574Z b94040e Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60d603389b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rs/moq-uring/Cargo.toml Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: b94040e2e0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kixelated
kixelated added this pull request to the merge queue Oct 17, 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 17, 2026
Port Local to main's send_datagram signature and carry the connection handle
through Accepted for main's QUIC limit widening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated enabled auto-merge October 17, 2026 15:12
@kixelated
kixelated added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit c0eb974 Oct 17, 2026
14 checks passed
@kixelated
kixelated deleted the quest/m2/uring-ietf branch October 17, 2026 16:21
kixelated added a commit that referenced this pull request Oct 17, 2026
…tion-log

Thread the ring's Lifecycle through #5821's split handshake: serve_request
takes it in place of the connection id and returns the boxed supervision,
so both the moq-lite and moq-transport paths hand the close to the shared
runtime.

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