Repository navigation
test(moq-tokio,moq-relay): the relay, Client, and Server over QUIC on the sim - #8709
Conversation
Quest-Claim: c0c5637117125976
… the sim A `quic::driver::sim::Host` is one address on the sim `Network`. `client::Config::sim`, `server::Config::sim`, and `cluster::Options::sim` bind QUIC endpoints there instead of on UDP sockets, fresh-port redials included, with each endpoint's seed drawn from the network. A simulated client dials only QUIC and refuses names it would have to resolve. Session-level spawns go through `runtime::Spawner`, so they land on the simulator when one runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
ℹ️ No critical issues — one misplaced doc comment inline.
Reviewed changes
Reviewed the full diff: Client, Server, and the relay can now bind their QUIC endpoint on a simulated host, and the session-level spawns now run on the simulator.
quic::driver::sim::Host— one IP on a simNetwork. Binding a port it already holds returnsAddrInUse, port 0 picks the next free ephemeral port, and each endpoint'srng_seedcomes from the network's seed.client::Config::sim/server::Config::sim— the backendClientkeeps aBindenum, sofresh_portredials on the sim as well. The server's sim path skips the UDP and reuseportmemberbinding.- Fail-loud guards — a simulated client refuses non-QUIC schemes (
Error::SimScheme), skips the WebSocket race, and refuses unpinned hostnames (quic::Error::SimResolve). IP literals undermoqt://still pass, because theIpAddrparse covers the opaqueHost::Domaincase. - Spawns through
runtime::Spawner::current()—Request::ok,Server::serve,origin::spawn_config,spawn_qmux, andconnect_session. Outside the sim they keep the same fallback-runtime behavior.connect_sessionused a baretokio::spawnbefore, so it no longer panics outside a runtime. - Relay
cluster::Options::sim— passed into each peer'sclient::Config. - Tests —
sim_client.rscovers raw QUIC and WebTransport over a lossy path, the Happy Eyeballs race, and reconnect after a restart.quic_sim.rscovers one relay and two clustered relays.
claude-opus-5-5 | 𝕏
|
Warning Review limit reachedYou'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 25 minutes. View limit details
No actionable comments were generated in the recent review. WalkthroughThe change adds simulated QUIC host binding and configuration support in moq-tokio and moq-relay. It adds integration tests for simulated client connections, relay delivery, impaired paths, connection racing, and reconnects. Driver spawning now uses the current runtime spawner in several paths. Quest documents are updated to reflect the harness and remove links to the deleted simulation plan. Merge Risk:
|
# Conflicts: # quest/m1/quic-sim.md # quest/m4/quic-realtime.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run reviewed the two commits added since the prior Pullfrog review at 92f469b.
- Moved
race_error's doc comment —simulated_schemeand its doc now sit aboverace_error's doc, so each function keeps its own rustdoc. This addresses the earlier finding. - Merged
origin/main— the PR's own diff changed only in the quest files: the droppedRelatedlinks now point at the relocatedquest/m4/quic-realtime.mdandquest/m5/bench-transport-sweep.md. The Rust code in the PR is unchanged by the merge.
claude-opus-5-5 | 𝕏

Finishes quest/m1/quic-sim.md.
Problem
MoQ sessions already ran over moq-quic on the
kio::clocksim, but only on the raw driver. moq-tokio'sClientandServeralways bound a UDP socket, so the relay, the Happy Eyeballs race, WebTransport, and the reconnect loop could only be tested over real sockets and the host clock, or over the in-memory transport, which skips QUIC.Approach
quic::driver::sim::Hostis one IP on the simNetwork.Host::bindbinds a port on it, or the next free ephemeral port for 0 (it fails withAddrInUseinstead of panicking), and draws the endpoint'srng_seedfrom the network's seed, so endpoints replay with the network.client::Config::simandserver::Config::sim(undersim+quic) bind the QUIC endpoint on that host at the configured bind port. The client backend keeps aBind(UDP address or sim host), sofresh_portredials on the sim too. The relay getscluster::Options::simfor its peer dials.https,moqt, andmoql(newError::SimScheme). It skips the WebSocket fallback race, and it refuses a hostname that would needgetaddrinfounless the addresses are pinned (newquic::Error::SimResolve).runtime::Spawnerinstead of tokio:server::Request::ok,Server::serve's per-session task,origin::spawn_config, qmux drivers, andconnect_session. They land on the simulator when one runs. The TCP/Unix accept loops keep tokio because they need its sockets.rs/moq-tokio/tests/integration/sim_client.rs: raw QUIC and WebTransport over a lossy, reordering path. Happy Eyeballs across two pinned addresses, where the first path's handshake takes seconds and the second wins after the race delay. A server restart on the same address, which the reconnect loop redials.rs/moq-relay/tests/integration/quic_sim.rs: publisher → relay → subscriber, and publisher → relay A ← relay B (cluster peer over QUIC) → subscriber, every hop lossy.Decisions
ClientandServertake a simulated QUIC socket. Taken by the agent under /quest-afk, for the maintainer's review: asim: Option<quic::driver::sim::Host>field onclient::Configandserver::Config(andcluster::Options::simin the relay), with the port still coming from the bind config. Rejected options:Client::with_networkto carry the QUIC network. It routes dials around the transports entirely, and it has no server half.with_socket(driver::endpoint::Socket)on each. One socket can't servefresh_port's redials or the relay's per-peer clients.quic-realtimetoquest/m4/quic-realtime.md. The merge of main keeps the file deleted and drops the moved quest'sRelatedlink to it.Impact
simfeature only (test support, documented as tracking internals): newquic::driver::sim::Host,Network::host,client::Config::sim,server::Config::sim,Error::SimScheme,quic::Error::SimResolve. Not breaking: the config structs are#[non_exhaustive].test-support+quic: newcluster::Options::sim.kio::clock::sim::run,origin::spawn, accepted sessions' drivers, and qmux/connect_withdrivers now run on the simulator instead of tokio. Outside the sim, nothing changes.Validation
cargo test -p moq-tokio --test integration sim: 7 passed (the 3 new tests plus the 4 existing driver tests).cargo test -p moq-relay --features test-support --test integration quic_sim: 2 passed, in 1.6 s.tls::Serve.just checkpasses: 7625 tests run, all passed. The merge gate grows by about 2 s of sim tests.Alternatives
See Decisions.
Follow-ups
None.
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, M)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 85442c1
Base: origin/main at a6ba6aa
Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a1d864-34ee-7550-a009-b0c8af5d0e60, round 2Score: 10/10,
The only new branch change moves documentation onto the correct function, introduces no behavioral changes, and leaves no actionable findings; builds and tests were not run as instructed.Rounds: 2; findings 0: fixed 0, refuted 0, open 0
Findings: none