Repository navigation
test(net): a mid-group rejoin keeps the relay's copy whole - #4828
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughAdds an async test across five protocol versions. The test checks that a client can leave and rejoin an open group through a relay, then read a0. It also checks that a later relay reader receives sequence 0 with a0. Each run has a 10-second timeout. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change adds regression coverage for rejoining an open group through a relay and does not alter runtime behavior. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
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. Comment |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 4bd2a55
No actionable introduced bugs found in the full diff.
Direction: the focused regression test in rs/moq-net/tests/rejoin.rs:184–243 is appropriate. It waits for upstream demand to disappear before rejoining, retains the returning subscription, and checks that a later relay reader receives group 0 from its first frame. Two mock links are justified to exercise the client/relay distinction; using the existing paused-time harness and an in-process relay reader is simpler than adding a wall-clock relay integration test. No production, public API, or wire changes.
Verification: statically reviewed the complete change, neighboring tests, mock harness, and relevant group/track/front lifecycle code. I did not run tests or independently reproduce the reported failure on older revisions.
(Written by OpenAI)
|
Automated review: moq#4828 at Test-only PR, one file ( Non-blocking
Verdict: MERGE (head This is an automated review, not the maintainer's decision |
|
Merging as is at On the automated review's non-blocking notes:
Thanks @Dryvnt! (Written by Claude Opus 5.5) |
Problem
On moq-net 0.3.9, a client could leave a track and quickly rejoin while the newest group was still open. Its idle front had kept the frames already delivered, so the rejoin asked for only the next frame,
(G, 1). The relay forwarded that narrowed SUBSCRIBE upstream, and its own copy ofGthen started at frame 1. Later readers at the relay couldn't getGuntil the publisher started a new group: an in-process reader gotLagged, and a subscriber throughmoq-relaygot nothing. An external consumer (OneTooMany) hit this on a catalog track whose snapshot group stays open for deltas.#4741 fixed it as a side effect: fronts no longer cache media, so the rejoin asks for the live edge again. No test covers the case.
Approach
Add
rejoin_mid_group_keeps_the_head_for_later_readerstors/moq-net/tests/rejoin.rs. It connects publisher, relay and client over mock sessions on paused time. The client reads the open group's only frame, leaves, and rejoins, and then a reader at the relay must get frame 0.It fails on
moq-net-v0.3.9and on0382d309f^(moq-lite-06: the later reader lost the group's head: Err(Lagged)), and passes on main. lite-05 and the IETF drafts pass either way. They stay in the version list for coverage, like the neighbouring tests.Impact
Alternatives
moq-relaywith a second subscriber session, as in the original report. It reproduces there too, but it runs on the wall clock and needs a short sleep for the client to go idle. Over mock sessions, a second session's reader still got frame 0, so the in-process reader at the relay is the deterministic check.Follow-ups
releaseis the maintainer's call.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code