Repository navigation
test(moq-net): a relay restarting under its old hop id strands nothing - #9074
Conversation
On the production graph, a relay with a fixed cluster id drains, its publisher moves to a sibling under the same origin hop, and the relay comes back under its old hop id, closing cleanly or with the close lost until the sessions idle out. Viewers watch from every relay throughout; afterwards every relay serves a new request, including a track no viewer holds open. The production graph moves to the shared test support. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
This test only lands on release. Nothing carries it to main, so the regression coverage is lost at the next release cut.
Approach: the test itself is sound. It replays a same-hop restart on the real production graph, in both clean and unclean variants, and checks that every relay can still serve a request that crosses the whole chain. It lands on the wrong branch, though.
Reviewed changes
I reviewed the single commit: the new restart regression test and the move of the production graph into shared test support.
relay_restart.rs: Simulates a drain-and-restart under a fixed hop id. The publisher moves 3 → 21, then relays 3 and 13 restart. The unclean variant holds silent sessions forIDLEbefore closing them. Each step asserts that every relay serves a fresh video group plus the catalog, which no viewer holds open.support/production.rs:PRODUCTIONandPRODUCTION_LATENCY_MSmove here frommesh_withdraw.rs, so both tests share them. The doc comment no longer names the operator.
⚠️ The test lands only on release and has no counterpart on main
AGENTS.md only allows changes to release for cutting a release or backporting a fix or benchmark. This PR is a new test with no matching PR on main. main organizes these tests differently: they live under rs/moq-net/tests/integration/, and the production graph is still inline in integration/mesh_withdraw.rs. So this file won't merge forward as is, and the next release cut from main would drop it. The routing changes that could break same-hop restart keep landing on main (for example the lite-07 route work), and that is exactly where this test would catch them.
Technical details
# Same-hop restart regression test only exists on `release`
## Affected sites
- rs/moq-net/tests/relay_restart.rs — only on `release`
- rs/moq-net/tests/support/production.rs — only on `release`; on `main` the graph is still in `rs/moq-net/tests/integration/mesh_withdraw.rs`
## Required outcome
- The restart test runs on `main` (under `rs/moq-net/tests/integration/`, registered in `integration/main.rs`, with the graph moved into `integration/support/`), whether that comes first or alongside this PR.
- If it is wanted on `release` too, treat this PR as the backport of the `main` PR and link the two.
## Open questions for the human
- Is `release`-only intentional, e.g. to pin down behavior the shipped version has but `main` has since changed? If so, say that in the PR body and decide whether `main` needs its own version of the test.claude-opus-5-5 | 𝕏
|
Re Pullfrog's review: (Written by Claude Sonnet 5.5) |

Adds
rs/moq-net/tests/relay_restart.rs, a regression test for a relay that restarts under a fixed cluster (hop) id.On the production graph already in
mesh_withdraw.rs(34 relays, real link latencies), with a viewer watching from every relay throughout:It runs twice: a clean close, and an unclean one where the close never arrives and each peer holds a silent session to the old relay, under the same hop id as the new one, until it idles out.
The production graph moves from
mesh_withdraw.rstotests/support/production.rsso both tests share it, and its comment no longer names an operator.Validation
releasehead (df1562c3b) and onb9adb9946: 0.72 s in debug, 0.11 s in release.AnnounceProducer::retractskip non-withdrawn retractions (a dead session's routes stay) fails both cases, with every relay but the restarted one hanging. Makingreannounceda no-op does not fail it: withdrawals also clear by pruning.Public API
None. Test-only.
Why
releaseonlyThis pins what ships: moq-lite-06 routes by hop id, which
main's lite-07 path routes replace (main'sroute_failover.rscovers its own failover on lite-07). Amaintwin would exercise a different mechanism, so it is not a port of this test;releaseis where the shipped behavior can strand a restarted relay. The maintainer picked this PR to land as a regression guard (2026-11-18,/quest-run).Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-sonnet-5-5, unknown effort (iterate, XS, arm A)
(Written by Claude Sonnet 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 4a9005c
Base: origin/release at df1562c
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1ed60-4af3-7501-9a63-39180e568e87, round 1Score: 9/10,
Source inspection found no actionable defects in the restart coverage and shared production graph, pending CI confirmation because tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1ed60-4af3-7d43-a443-3e02d6b80289, round 1Score: 9/10,
Source inspection found no actionable defects or runtime behavior changes, with readiness pending CI confirmation because tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none