Skip to content

quest: close the silent-peer drain quest (landed in #6201) - #6240

Merged
kixelated merged 4 commits into
mainfrom
quest/m1/quic-silent-peer-drain
Oct 22, 2026
Merged

kixelated merged 4 commits into
mainfrom
quest/m1/quic-silent-peer-drain

Conversation

@kixelated

@kixelated kixelated commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Closes out quest/m1/quic-silent-peer-drain.md (deleted here). Its fix already landed in moq-dev/moq#6201, and this PR records the decision on its open public-API question.

Status of the goal

moq-dev/moq#6201 makes moq-quic report a client handshake that never heard its peer (rem_cid_set == false) as no longer active at its local close. Endpoint::wait_all_draining, and so moq_tokio::Client::close, returns at once. The closing period still runs in the background, so a late server Initial still gets a CONNECTION_CLOSE back. I agree with that over skipping the closing period: the background cost is one table entry for 3 PTO, and a server that answered late frees its state at once instead of waiting out its own handshake timeout.

The quest's regression tests already exist on a mocked clock:

  • moq-quic tests::unanswered_handshake_drains_at_close (no time advance) and tests::answered_handshake_waits_for_peer_close
  • moq-tokio close_during_handshake_does_not_wait_for_silent_peer (paused tokio clock, asserts 0 s)

moq-uring never blocked on the drain: its driver publishes a local close once the CONNECTION_CLOSE is staged.

This PR

  • Deletes the quest and its quest/m1/README.md entry.
  • Corrects moq_uring::quic::handshake::Config::timeout's doc. It said an unset timeout leaves "no bound but the idle timeout", but the QUIC handshake is bounded by moq-quic's fixed 10 s handshake idle timeout, which Transport::idle_timeout does not change. Transport::idle_timeout only takes over once QUIC is established, for HTTP/3 and MoQ SETUP. The doc now names both.

Decision

The configured idle timeout does not bound the handshake. The maintainer chose to keep moq-quic's fixed 10 s handshake_idle_timeout separate from --quic-idle-timeout and moq-uring's Transport::idle_timeout. moq-dev/moq#5163 split them on purpose. With a short idle timeout, the idle deadline before an RTT sample is max(idle, 3 * 999 ms), which lands just before the third Initial probe, and impaired-network drills failed on exactly that. msquic and Chromium also keep separate handshake timeouts.

Rejected alternatives:

  • Bound the handshake by the idle timeout (even as min(idle, 10 s)): brings the fix(moq-quic): fix two handshake stalls under a short idle timeout #5163 flake back for any idle timeout under about 3 s.
  • A separate --quic-handshake-timeout knob: its only consumer today would be three moq-uring endpoint tests (an_unanswered_dial_times_out, the_backlog_bounds_pending_handshakes, the_backlog_bounds_queued_connections) that wait out the 10 s, and it adds a flag to every binary and a field to every binding's config.

Public API and wire

  • Public API: none. Doc-only change in moq-uring.
  • Wire: none.

Checks

  • cargo nextest run -p moq-quic -p moq-tokio for the three regression tests above: passed.
  • cargo nextest run -p moq-gst stop_: 9 passed, each in 0.3 s or less, against the unreachable test relay (before fix(quic): stop counting an unanswered handshake as active once it closes #6201 a random handful took about 3.08 s).
  • just check: check rs (clippy and rustdoc for moq-uring and its dependents) and check quest passed. check flake could not run here: the image build needs unshare for a user namespace, which the local sandbox refuses. Nothing here touches the flake.
  • quest check: passed.

Follow-ups

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits October 21, 2026 20:51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#6201 already reports an unanswered handshake as no longer active at its local close, so Client::close and a moqsink stop return at once. Correct moq-uring's handshake timeout doc, which named the idle timeout where moq-quic's fixed handshake idle timeout applies.

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

Copy link
Copy Markdown
Collaborator Author

Outcome: the quest's drain fix had already landed in moq-dev/moq#6201, so this PR deletes the quest and fixes one moq-uring doc line. The moq-gst stop tests now take at most 0.36 s each against the unreachable relay. One maintainer decision is open: whether the idle timeout should also bound the handshake. I recommend leaving it as is, because moq-dev/moq#5163 split the two timeouts on purpose. Once that is confirmed, this can go ready.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Decision settled by the maintainer: option 1. The configured idle timeout (--quic-idle-timeout, moq-uring's Transport::idle_timeout) stays separate from moq-quic's fixed 10 s handshake idle timeout, as moq-dev/moq#5163 split them on purpose. No new knob. The PR body now records this, and with no open decisions left the PR goes ready for review.

(Written by Claude Opus 5.5)

@kixelated
kixelated marked this pull request as ready for review October 22, 2026 04:32
@coderabbitai

coderabbitai Bot commented Oct 22, 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 35 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: 9893f383-f12d-4e8a-b6e4-8100d2efe52f
📥 Commits

Reviewing files that changed from the base of the PR and between 2abfb5e and 4e4419b.

📒 Files selected for processing: 3
  • quest/m1/README.md
  • quest/m1/quic-silent-peer-drain.md
  • rs/moq-uring/src/quic/handshake.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 22, 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-22T08:11:52.333616Z 4e4419b 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.

@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: f4c06d7650

ℹ️ 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/src/quic/handshake.rs Outdated
Comment thread quest/m1/quic-silent-peer-drain.md
Without Config::timeout, moq-quic's fixed handshake idle timeout bounds
the QUIC handshake, then Transport::idle_timeout bounds HTTP/3 and MoQ
SETUP on top.

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

Copy link
Copy Markdown
Collaborator Author

Merging. Both Codex findings on f4c06d7 are settled:

  • Doc wording for handshake::Config::timeout: fixed in c1b41e9, which now names both inactivity bounds (moq-quic's fixed 10 s handshake idle timeout until QUIC is established, then Transport::idle_timeout). It changes only a doc comment, so counts as trivial since the review.
  • Retry path: declined. A Retry is stateless, and after one the client is in the same position as a first Initial that got no answer, which moq-dev/moq#6201 already treats as unanswered. The CONNECTION_CLOSE is still sent, and the closing period still runs in the background.

Decision on record: the configured idle timeout does not bound the QUIC handshake (moq-dev/moq#5163 split them on purpose). quest check passes, and the branch merges into main without conflicts.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 22, 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 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit cae03a3 Oct 22, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/quic-silent-peer-drain branch October 22, 2026 10:46
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