Skip to content

test(net): pin the late better path on lite-07 and lite-06 meshes - #7762

Merged
kixelated merged 3 commits into
mainfrom
test/late-better-path
Nov 3, 2026
Merged

kixelated merged 3 commits into
mainfrom
test/late-better-path

Conversation

@kixelated

@kixelated kixelated commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A relay that hears a broadcast first over a longer path moves to the shorter one when it arrives. Before routes carried an instance (moq-dev/moq#7489), that move was an epochless restart, which a lite-06 client receives as a retraction and a fresh announcement while the broadcast stays live. A deployment that meshes its relays on lite-07 and serves lite-06 clients saw this at every relay two hops from a publisher: on a five-relay mesh under steady churn, each such relay toggled about a third of the broadcasts it learned, always as a back-to-back retraction and announcement.

routes asked for this fixture ("Publishing toggles too", decided 2026-10-13), and nothing covered a lite-06 client behind a lite-07 mesh.

Change

Test-only. mesh_withdraw.rs gains a five-relay fixture where relay 3 hears a broadcast first through two relays (30 ms) and 280 ms later through one (310 ms):

  • late_better_path_updates_in_place: on a lite-07 mesh, lite-06 and lite-07 watchers both see Start, Update while the broadcast is live and one End on close. At 80cafb3af (before feat(net)!: routes carry an instance and a per-instance epoch #7489) the lite-06 watcher saw Start, End, Start, and the lite-07 watcher Start, Restart.
  • residual_late_better_path_restarts_on_lite06: on a lite-06 mesh each relay mints its own instance, so the watcher still sees Start, End, Start. Pinned beside the other residual_* tests for routes to turn into an update.

The routes quest's "Publishing toggles" paragraph, now in routes/acceptance.md after moq-dev/moq#7676 split the quest, names both tests.

Impact

No public API or wire change.

Testing

  • just check origin/main after merging main: passed (nextest 9701 run, 9701 passed).
  • cargo test -p moq-net --test integration late_better_path: both tests pass after the merge.
  • Both tests run on 80cafb3af as probes, giving the sequences quoted above.

Review

  • Reviewer: Codex via quest review --base origin/main, gpt-6.1-sol, medium effort, session 01a1a35c-2db7-7001-aed3-28c7622b33f2.
  • Round 1, head ca536a18a5c11d0c56456c64e5b756a6d59ef35f: 0 findings.
  • After merging main (moving the quest edit to routes/acceptance.md) and applying Pullfrog's doc-comment suggestion on the path latencies: new session 01a1a37e-e41d-7303-8100-78b10d3edcfb, round 1, head 48544b34fb86c4c18cd0450812c5aded4b35fc69: 0 findings.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

A relay that hears a broadcast over a longer path first moves to the
shorter one when it arrives. On a lite-07 mesh the move keeps the
instance, so lite-06 and lite-07 watchers see an update in place. On a
lite-06 mesh each relay mints its own instance, so the watcher sees the
live broadcast retracted and announced again; pinned as a residual for
routes and announces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 3, 2026 21:43
@coderabbitai

coderabbitai Bot commented Nov 3, 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 8 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: 1922df66-0e8d-476b-90b2-8e230a44d6c4
Commits

Reviewing files that changed from the base of the PR and between cd575d2 and 48544b3.

Files selected for processing: 2
  • quest/m1/cluster-routing/routes/acceptance.md
  • rs/moq-net/tests/integration/mesh_withdraw.rs
  • 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed head ca536a1 against base 51b1ff2.

No actionable issue found in the new late-better-path fixture. It observes the publisher and watcher over real mock sessions, drains intermediate announcements from a separate task, checks both lite-06 and lite-07 clients on the lite-07 mesh, and retains the lite-06 mesh restart as an explicit residual case. The quest now points to both outcomes.

Static GitHub-only review; I did not run the simulated-clock tests or the pre-fix probes.

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

Important

The branch conflicts with main: #7676 split the quest file this PR edits. Rebase and move the doc change to quest/m1/cluster-routing/routes/acceptance.md before merging. The test file auto-merges, and both new tests pass at this head.

Reviewed changes

  • Late better path fixture — LATE_BETTER_PATH and late_better_path build a five-relay mesh where relay 3 first hears the broadcast over the 3-hop 0-2-4-3 path and then over the 2-hop 0-1-3 path.
  • In-place update — late_better_path_updates_in_place checks that a lite-06 and a lite-07 client on a lite-07 mesh both see Start, Update while live and a single End on close.
  • Residual restart — residual_late_better_path_restarts_on_lite06 pins Start, End, Start then End on a lite-06 mesh.
  • Quest doc — the "Publishing toggles" paragraph now names both tests.

Both new tests pass at ca536a1, and cargo fmt --all -- --check is clean.

⚠️ The quest doc edit targets a file #7676 removed

quest/m1/cluster-routing/routes.md no longer exists on main: #7676 (85b2bef78) renamed it to routes/README.md and moved the "Publishing toggles" paragraph into routes/acceptance.md. The branch forked at 571c956a (before that split), so GitHub reports CONFLICTING, and the merge conflicts in routes/README.md via rename detection.

Technical details
# Retarget the quest doc hunk to routes/acceptance.md

## Affected sites
- `quest/m1/cluster-routing/routes.md:601-606` — deleted on main; the paragraph now lives at `quest/m1/cluster-routing/routes/acceptance.md:44-48`
- `rs/moq-net/tests/integration/mesh_withdraw.rs` — auto-merges; only the residual comment's link changed on main

## Required outcome
- Rebase onto `main`, drop the `routes.md` hunk, and apply the updated paragraph to `routes/acceptance.md`.
- Keep the two new tests; main already points the residual comment at `routes/README.md`.
- Re-run `late_better_path_updates_in_place` and `residual_late_better_path_restarts_on_lite06` after the rebase.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

kixelated and others added 2 commits November 3, 2026 14:08
# Conflicts:
#	quest/m1/cluster-routing/routes/README.md
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

  • Merged main, retargeting the quest edit to quest/m1/cluster-routing/routes/acceptance.md and dropping the removed routes.md hunk, which clears the prior conflict.
  • Clarified the LATE_BETTER_PATH doc comment with the 3-hop/30 ms and 2-hop/310 ms path timings, applying the earlier suggestion.
  • Updated the residual comment's link to routes/README.md.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 7c05aea Nov 3, 2026
8 of 9 checks passed
@kixelated
kixelated deleted the test/late-better-path branch November 3, 2026 23:42
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