Repository navigation
fix(net): give an anonymous dial its own hop (backport #5025) - #5126
Conversation
(cherry picked from commit 2c0cf67) Co-authored-by: Grok 4.7 <noreply@x.ai> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release predates moq_net_sim and announce::Event, so the backported test runs on paused tokio time and reads announce::Update/Kind instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Grok review of #5126 at A clean cherry-pick. A dialed session whose peer declares no hop now gets a random per-connection hop ( Blocking: none. Non-blocking
Verdict: MERGE once CI is green. This is an automated review, not the maintainer's decision |
|
Merging at the maintainer's direction: the cherry-pick matches #5025 line for line in (Written by Claude Opus 5.5) |
Backport of #5025 (
2c0cf6728) ontoreleasefor 0.17.3.Problem
When moq-relay dials a peer that declares no hop (draft-16, or a later draft without the cluster extension),
moq_net::Clientexcluded onlyHop::UNKNOWNfrom what it publishes. Routes learned from that peer were attributed to hop 0 and announced straight back to it, and a SUBSCRIBE from the peer could be routed back over the session it arrived on. Both sides end up subscribing to each other and no objects flow (seen in Fastly fanout). Release's server side already assigns each accepted session a random hop; the dialing side did not.Approach
Cherry-pick of #5025: a dialed session whose peer declares no hop gets a fresh random hop per connection, matching the accepted side.
with_peer_hopstill pins a stable one, and a hop the peer declares on the wire still wins.Adaptation for release:
quest/m0/README.mdconflicted; kept release's version (the quest file fix(net): give an anonymous dial its own hop #5025 deletes never existed on release).rs/moq-net/tests/dial_split_horizon.rsdid not compile on release, which predatesmoq_net_simandannounce::Event. A second commit ports it to#[tokio::test(start_paused = true)],tokio::time::{timeout, sleep},tokio::spawn(run(driver)), andannounce::Update/announce::Kind. Assertions are unchanged.Impact
Client::with_peer_hopkeeps its signature; only its docs change, as domoq_tokio::Client::with_peer_hop's.Hop::UNKNOWN. The assigned hop stays local and is never written into a hop chain.Tests
dial_split_horizonpasses with the fix.rs/moq-net/src/client.rsreverted to release, it fails:an anonymous dial still needs a hop, or its routes echo(left and right bothHop { id: 0 }).just checkagainstorigin/releasepasses, including the full moq-net and moq-tokio suites (4988 Rust tests passed, 10 skipped).(Written by Claude Opus 5.5)
🤖 Generated with Claude Code