Skip to content

feat(net)!: lite-07 ROUTE drops its informational RTT - #8838

Open
kixelated wants to merge 4 commits into
mainfrom
quest/m2/route-rtt
Open

kixelated wants to merge 4 commits into
mainfrom
quest/m2/route-rtt

Conversation

@kixelated

@kixelated kixelated commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m2/route-rtt.md: lite-07's ROUTE_START and ROUTE_UPDATE no longer carry an RTT, and RouteInfo::rtt is gone from Rust, JS, and every binding, along with the per-link min-RTT samplers that fed it.

Summary

  • Draft (drafts/draft-lcurley-moq-lite.md): the Route Offer loses [RTT (i)], the routing section loses its RTT paragraph, ROUTE_UPDATE no longer lists RTT among its triggers, and the changelog entry for the RTT flag is gone. The draining flag moves from 0x4 to 0x2, so the defined bits stay contiguous (0x1 down-only, 0x2 draining).
  • Rust (moq-net): removes route::LinkRtt (route/rtt.rs) and its tests, path::Router::rtt, route::node::Stream::rtt, Offer::rtt, Served::rtt, and the Routed sampler: its timer, sample, and read_link. Also removes RouteInfo::rtt and with_rtt, and drops the RTT from the origin's route metadata tuple. Encode and decode lose the field and the RTT flag.
  • JS (@moq/net): removes link_rtt.ts, the getStats() sampler in lite/subscriber.ts (which polled once a second while a route existed), Offer.rtt, RouteInfo.rtt, and WireRoute.rtt. startRoute no longer waits on a first link read, so it is now synchronous.
  • Bindings: MoqRouteInfo.rtt is removed from moq-ffi, and the Dart bindings are regenerated. The RouteInfo doc comments in Go, Swift, Kotlin, and Dart drop rtt. They also drop the stale "relay hop ids", which MoqRouteInfo never carried, and now name available.
  • Docs: drops the "Route latency" section from doc/bin/relay/cluster.md and the RTT mention in the verify-route skill.
  • Tests and benches: drops the RTT-specific tests in Rust, JS, and the moq-tokio integration suite. It also drops the routes/path/drained bench and fuzz::PathRouteDrain::idle, because their only operation was an RTT change on an idle session, and no periodic idle update remains. drain_news_is_linear_in_neighbours now measures closing an idle session after the drain where it used to measure an RTT change. The shared fixtures/lite.json corpus drops its RTT cases and moves its draining case to 0x2.

Impact

Public API (breaking):

  • Rust: moq_net::origin::RouteInfo::rtt() is removed.
  • JS: RouteInfo.rtt is removed from @moq/net.
  • moq-ffi and the bindings: MoqRouteInfo.rtt is removed (C, C++, Go, Python, Kotlin, Swift, Dart).

Migration: nothing ranked by this value. An application that wants a round trip should read its own session's stats().rtt. A path-wide sum is not available any more.

Wire: moq-lite-07-wip only, which is unpublished and opt-in. The Route Offer loses its RTT field, and the draining flag moves from 0x4 to 0x2. The released lite-07-wip has no Route Offer at all, so relays on the previous release are not affected. lite-06 and earlier are unchanged.

Decisions

Choices made without the maintainer (the user is away), each easy to undo in review:

  • The draining flag moves to 0x2 instead of leaving a gap at 0x2. lite-07-wip is unpublished, so the change is free, and both 0x4 and 0x8 are now refused as unknown flags, with test coverage.
  • The routes/path/drained bench is deleted instead of being repointed. Its only operation was the removed RTT update. Once that is gone, no recurring "update that changes no route" is left to measure. In the matching scope unit test, the third measurement now closes the idle session.
  • The alias docs drop "relay hop ids", which were stale, while they were being edited anyway.

Caused by

Validation

  • just check over the branch: everything passes except one Python test, test_socket.py::test_abort_and_endpoint_close_are_errors. That test flakes about 1 run in 3 with the same failure at line 90, and it runs only on a local origin with no lite-07 session, so it never touches this change. It is filed as a follow-up below.
  • The shared rs/moq-net/fixtures/lite.json corpus is replayed byte for byte by both the Rust (lite::corpus) and JS (corpus.test.ts) decoders, so both agree on the new Route Offer encoding. Separately, the Rust and JS unit tests pin the exact Route Offer bytes, including draining under 0x2.
  • just test interop --all passes across Rust, JS (node and bun), and the Python sockets, over moq-lite-07-wip and the older versions.
  • @moq/net: 3331 tests pass.

Follow-ups

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: b27db51

  • Base: origin/main at ca88fc1

  • Risk: high, Changes to the wire format and public bindings could break interoperability or downstream consumers, and reverting cannot undo versions already adopted externally.

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1df9e-743a-7a53-8a57-f36d9440d16f, round 1

  • Score: 9/10, RTT removal is consistent across Rust, JS, bindings, and the draft wire format, with no actionable regression found in the source-only review; builds and tests were not run.

  • Raised the risk to high: Changes to the wire format and public bindings could break interoperability or downstream consumers, and reverting cannot undo versions already adopted externally.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 4 commits November 15, 2026 05:03
Quest-Claim: 56cec0b9a8b9ec20
ROUTE_START and ROUTE_UPDATE carry no RTT, the draining flag moves to 0x2,
and RouteInfo::rtt is gone from Rust, JS, and the bindings, with the
per-link min-RTT sampler in both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e quest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title ROUTE drops its informational RTT feat(net)!: lite-07 ROUTE drops its informational RTT Nov 15, 2026
@kixelated
kixelated marked this pull request as ready for review November 15, 2026 14:31
@coderabbitai

coderabbitai Bot commented Nov 15, 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 30 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: 87ff9806-b130-4811-8387-d71b0a3e0e9f
Commits

Reviewing files that changed from the base of the PR and between 250a13a and b27db51.

Files selected for processing: 42

  • .claude/skills/verify-route/SKILL.md
  • dart/moq/lib/src/aliases.dart
  • dart/moq_ffi/lib/src/moq.dart
  • doc/bin/relay/cluster.md
  • drafts/draft-lcurley-moq-lite.md
  • go/wrapper/types.go
  • js/net/api/index.api.md
  • js/net/src/announced.test.ts
  • js/net/src/hop.ts
  • js/net/src/lite/announce.test.ts
  • js/net/src/lite/announce.ts
  • js/net/src/lite/link_rtt.test.ts
  • js/net/src/lite/link_rtt.ts
  • js/net/src/lite/publisher.test.ts
  • js/net/src/lite/publisher.ts
  • js/net/src/lite/subscriber.test.ts
  • js/net/src/lite/subscriber.ts
  • kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/Aliases.kt
  • quest/m0/test-flakes-3/py-socket-abort.md
  • quest/m2/lite07-finalize.md
  • quest/m2/route-rtt.md
  • rs/moq-ffi/src/origin.rs
  • rs/moq-net/benches/routes.rs
  • rs/moq-net/fixtures/lite.json
  • rs/moq-net/src/fuzz.rs
  • rs/moq-net/src/lite/announce.rs
  • rs/moq-net/src/lite/publisher.rs
  • rs/moq-net/src/lite/subscriber.rs
  • rs/moq-net/src/lite/subscriber/routed.rs
  • rs/moq-net/src/lite/subscriber/routed/tests.rs
  • rs/moq-net/src/model/origin.rs
  • rs/moq-net/src/route/mod.rs
  • rs/moq-net/src/route/node.rs
  • rs/moq-net/src/route/node/tests.rs
  • rs/moq-net/src/route/path.rs
  • rs/moq-net/src/route/rtt.rs
  • rs/moq-net/src/route/tests/mod.rs
  • rs/moq-net/src/route/tests/routing.rs
  • rs/moq-net/src/route/tests/rtt.rs
  • rs/moq-net/src/route/tests/scope.rs
  • rs/moq-tokio/tests/integration/broadcast.rs
  • swift/Sources/Moq/Aliases.swift
  • 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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — two small leftovers from the edit, inline.

Reviewed changes

I reviewed the full removal of lite-07's Route Offer RTT across the draft, Rust, JS, the FFI bindings, docs, and tests. I also checked that no readers remain, and that the flag renumbering is safe for relays on mixed versions (release has no Route Offer at all, so moving draining to 0x2 costs nothing).

  • Wire and draft: the Route Offer drops [RTT (i)], and the flags become 0x1 down-only and 0x2 draining. Any other bit is refused. The JS test refuses 0x4 and 0x8, and the Rust test refuses 0x8 and 0x86.
  • Rust moq-net: removes LinkRtt, Router::rtt, Stream::rtt, the Routed sampler and its timer, Offer/Served/RouteInfo::rtt, and the RTT slot in RouteMeta.
  • JS @moq/net: removes link_rtt.ts and the getStats() sampler. startRoute is now synchronous, and rtt is gone from Offer, RouteInfo, WireRoute, and routesEqual.
  • Bindings: MoqRouteInfo.rtt is removed. Dart is regenerated, and the dropped blank lines between imports are harmless because check.sh diffs with -B. The Go, Kotlin, Swift, and Dart alias docs now name available.
  • Tests, bench, and corpus: the RTT tests, the routes/path/drained bench, and PathRouteDrain::idle are gone. The lite.json corpus is re-encoded for the new offer layout.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏


/// Encode a Route Offer: the path, then flags, priority, metric, and RTT in
/// milliseconds. No node offers an empty path or one past the hop limit, nor names Node
/// Encode a Route Offer: the path, then flags, priority, and metric. No node offers an empty path or one past the hop limit, nor names Node

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The edit merged two doc lines into one that runs about 140 columns, past the 120-column max_width. rustfmt doesn't wrap comments, so nothing will fix it automatically. Reflow it to match the surrounding docs.

Suggested change
/// Encode a Route Offer: the path, then flags, priority, and metric. No node offers an empty path or one past the hop limit, nor names Node
/// Encode a Route Offer: the path, then flags, priority, and metric. No node offers an
/// empty path or one past the hop limit, nor names Node

);
let before = router.work();
router.rtt(idle, Some(Duration::from_millis(5)));
router.disconnect([idle], Instant::ZERO);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The third measurement now disconnects the idle session, but the test's doc (L303, "any later update that changes no route") and its assertion message (L386, "an idle update: {costs:?}") still describe the RTT update this replaced. Update both so a failure names what was actually measured, e.g. "closing an idle session: {costs:?}".

This branch has not been deployed

No deployments
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