Skip to content

test(moq-net): a relay's listing follows its broadcast onto another route - #8889

Merged
kixelated merged 1 commit into
mainfrom
test/listing-follows-route
Nov 16, 2026
Merged

kixelated merged 1 commit into
mainfrom
test/listing-follows-route

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

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_takeover never caught it. #8731 (lite-07 sessions run the path router) fixed it incidentally: bisecting this test between 7c93d6a68 and main lands on cbb742cec.

Approach

An integration test over real lite-07 sessions. P is pulled by A directly and through B, and D lists through A. A's session to P dies, then P creates a track, and D's listing must report it.

  • Fails at 7c93d6a68: the listing reads end instead of +b.
  • Passes on 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_tracks fails). 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

…oute

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

@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

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 at 1_000, and A→D. It cuts P↔A and then has P add a track. It asserts that D's listing next reads +b instead of end. 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 existing route_change::{link, priced_link, settle} helpers.

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

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The 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: Minimal · up to 86f6c

This change only adds a test for listing behavior after a route failover. It does not alter production behavior, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: a test showing that a relay's listing follows its broadcast onto another route. The raw summary confirms the PR adds exactly this integration test in tests/integration/trac…
Description check Passed The description covers the problem (a front ending a TRACKS listing with a clean FIN after its route dies), the test approach, the regression bisection, the test-only impact, and the rejected alternat…
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.
Full details: Title check

Explanation

The title names the change: a test showing that a relay's listing follows its broadcast onto another route. The raw summary confirms the PR adds exactly this integration test in tests/integration/tracks.rs, so the title matches the main change.

Full details: Description check

Explanation

The description covers the problem (a front ending a TRACKS listing with a clean FIN after its route dies), the test approach, the regression bisection, the test-only impact, and the rejected alternative. It matches the changeset, which adds one integration test.

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: e9e6dcca-9822-4359-a3da-44008b4f689b
Commits

Reviewing files that changed from the base of the PR and between 815b317 and 86f6c9f.

Files selected for processing: 1

  • rs/moq-net/tests/integration/tracks.rs

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

@kixelated
kixelated added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit e807562 Nov 16, 2026
5 checks passed
@kixelated
kixelated deleted the test/listing-follows-route branch November 16, 2026 08:09
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