Repository navigation
test(moq-net): a relay's listing follows its broadcast onto another route - #8889
Conversation
…oute Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the one new integration test, which guards against a relay's TRACKS listing ending when its serving route dies.
a_listing_follows_its_broadcast_onto_another_route: The test builds P→A directly, P→B→A with B→A priced at1_000, and A→D. It cuts P↔A and then has P add a track. It asserts that D's listing next reads+binstead ofend. Because of the price, A serves from the direct route before the cut, so the cut really makes A switch routes. The test reuses the existingroute_change::{link, priced_link, settle}helpers.
claude-opus-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughThe integration test checks that a downstream listing continues to receive track additions after relay A’s direct publisher session is aborted. It establishes an alternate route through relay B, confirms the reader lists and syncs on track a, then creates track b and asserts that the existing listing receives +b. Merge Risk:
|

Problem
A relay's front answers a downstream TRACKS listing from whichever route serves the broadcast. Before #8731, when that route's session died, a front with another route of the same instance ended instead of moving. That closed its broadcast, which ends every listing with a clean end, and each hop forwarded it as a FIN. A downstream lister saw the "broadcast finished" end while the broadcast stayed announced. It never relisted, and tracks listed later never reached it.
This happened on a production stats mesh, and the unit test
a_front_reconciles_a_takeovernever caught it. #8731 (lite-07 sessions run the path router) fixed it incidentally: bisecting this test between7c93d6a68andmainlands oncbb742cec.Approach
An integration test over real lite-07 sessions.
Pis pulled byAdirectly and throughB, andDlists throughA.A's session toPdies, thenPcreates a track, andD's listing must report it.7c93d6a68: the listing readsendinstead of+b.main, 20 of 20 random sim seeds.Impact
None: the change is test-only.
Alternatives
Considered but not done: ending a front's listing with the front's error instead of a clean end, so a lost route never reads as a finish. A publisher's close sends both the TRACKS FIN and the route retraction, on different streams. When the retraction lands first, a deliberate finish would then read as an error (
a_session_lists_its_peers_tracksfails). A broadcast carries no end cause past one hop, so the front can't tell the two apart.Follow-ups
None.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code