Skip to content

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

Merged
kixelated merged 5 commits into
mainfrom
quest/m2/route-rtt
Nov 15, 2026
Merged

kixelated merged 5 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.
  • Maintainer, 2026-11-15: ✅ keep quest/m0/test-flakes-3/py-socket-abort.md (rejected: drop) as the one quest for the Python unroutable-vs-Closed socket flake; moq-dev/moq#8817's duplicate is dropped. Its Plan now starts by checking whether the flake still reproduces after moq-dev/moq#8825, which has since merged and deleted the quest the Plan used to link.

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)
Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, S, 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

Changes after the reviewed head b27db51, which need no new round: Pullfrog's two low-severity findings fixed (the encode_offer doc reflowed under max_width as suggested, and drain_news_is_linear_in_neighbours's doc and assertion now name closing an idle session), and the pick round's follow-up answer recorded in py-socket-abort.md's Plan.

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

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change removes RTT from Lite-07 route offers, including its wire flag and payload. Route selection and routed subscribers no longer accumulate or sample RTT. Route information types and bindings no longer expose RTT. Related tests, fixtures, documentation, and a benchmark are updated or removed. A separate quest records an intermittent socket test failure and a reproduction check.

Merge Risk: Minimal · up to 2af5b

This change removes informational RTT from lite-07 route offers and from the public route information APIs. The wire change affects only the unpublished, opt-in lite-07 work-in-progress format. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: lite-07 ROUTE messages and the RouteInfo API stop carrying the informational RTT. The raw summary shows RTT removal across the draft, Rust, JS, and bindings, so the ti…
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.
Description check Passed The description explains that the PR removes RTT from lite-07 ROUTE messages, from the Rust, JS, and binding APIs, and from the associated samplers, tests, docs, and benchmarks. It also covers the dra…
Full details: Title check

Explanation

The title names the main change: lite-07 ROUTE messages and the RouteInfo API stop carrying the informational RTT. The raw summary shows RTT removal across the draft, Rust, JS, and bindings, so the title matches the changeset.

Full details: Description check

Explanation

The description explains that the PR removes RTT from lite-07 ROUTE messages, from the Rust, JS, and binding APIs, and from the associated samplers, tests, docs, and benchmarks. It also covers the draining flag move from 0x4 to 0x2, the Python flake follow-up, and validation. This matches the changeset shown in the summary, so it is related and detailed enough to pass.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

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: 42fe3fbf-4229-4b2a-b4a8-0757587786ac
Commits

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

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
Files with no reviewable changes: 21

  • doc/bin/relay/cluster.md
  • js/net/api/index.api.md
  • 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
  • quest/m2/lite07-finalize.md
  • quest/m2/route-rtt.md
  • rs/moq-ffi/src/origin.rs
  • rs/moq-net/src/lite/publisher.rs
  • rs/moq-net/src/lite/subscriber.rs
  • rs/moq-net/src/lite/subscriber/routed/tests.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-tokio/tests/integration/broadcast.rs

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

@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 | 𝕏

Comment thread rs/moq-net/src/lite/announce.rs Resolved
Comment thread rs/moq-net/src/route/tests/scope.rs Resolved
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (2026-11-15, /quest-complete):

(Written by Opus 5.5)

Reflow the encode_offer doc under max_width, and name the scope test's third
measurement (closing an idle session) in its doc and assertion. Record the
maintainer's keep of py-socket-abort.md: its first step checks whether #8825
fixed the flake, and it drops the link to the quest #8825 deleted.

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

Copy link
Copy Markdown
Collaborator Author

Applied the maintainer decision in 2af5bee: quest/m0/test-flakes-3/py-socket-abort.md stays as the one quest for the Python socket flake, and its Plan now starts by checking whether the flake still reproduces after #8825 (since merged), deleting the quest if not. The Plan also drops its link to quest/m1/socket-endpoint-end.md, which #8825 deleted.

(Written by Opus 5.5 with medium)

@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 new issues found.

Reviewed changes

Reviewed the delta since the prior Pullfrog review (b27db51 → 2af5bee).

  • Doc reflow: encode_offer's doc comment now reflows under the line width and no longer mentions RTT.
  • Idle-session wording: drain_news_is_linear_in_neighbours's doc and assertion message now describe closing an idle session instead of the removed RTT update.
  • Quest note: py-socket-abort.md's Plan now starts by checking whether #8825 already fixed the flake.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 15, 2026
kixelated added a commit that referenced this pull request Nov 15, 2026
…t-abort

The maintainer dropped this follow-up: #8838 adds the same flake as
quest/m0/test-flakes-3/py-socket-abort.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged via the queue into main with commit f0b8007 Nov 15, 2026
8 checks passed
@kixelated
kixelated deleted the quest/m2/route-rtt branch November 15, 2026 20:15
kixelated added a commit that referenced this pull request Nov 15, 2026
#8838 dropped ROUTE's informational RTT and `Router::rtt`, so the link
update this PR measured no longer exists. The routes/path/relink bench,
`PathRouteChange::relink`, the cost test `a_link_update_costs_...`, and the
RTT half of `residual_a_route_update_reserves_every_claim` go; repath
stays. The route-fanout quest now cites the repath bench (9.8 us beside 10
unrelated streams, 1.09 ms beside 1,000) in place of the RTT measurement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated added a commit that referenced this pull request Nov 16, 2026
…es/route-stream

Main's lite-07 ROUTE drops its informational RTT (#8838): the Announce
Stream's Route Offer loses it here too, with the draining flag at 0x2, and
js/net's Routed stops sampling the link.

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