Repository navigation
test(net): a refused replacement keeps a withdrawn incumbent open - #8471
Conversation
Regression test for the release-only unroutable race (fixed on release in fix/withdrawn-incumbent-release); main already passes it. Not yet run here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou'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 35 minutes. View limit details
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit 824f30b.
No actionable findings. The test exercises withdrawal, standby refusal, continued incumbent delivery, and clean completion on the simulated-clock harness. Its scope is correctly described as end-to-end behavior rather than proof that Front::refuse's draining branch ran; the PR explicitly documents that mutation limitation. No production behavior changes.
Overall direction: the change is focused and consistent with its stated purpose.
Verification limits: GitHub-only static review of the full diff and relevant context. No builds or tests independently run.
There was a problem hiding this comment.
ℹ️ One optional strengthening inline — the test itself is sound.
Reviewed changes
a_refused_replacement_keeps_a_withdrawn_incumbent_open(rs/moq-net/src/model/origin.rs) — a new#[kio::test]that withdraws the servingroomroute while its open copy ofroom/alice'svideotrack is being read, has the standby route answer the broadcast and refuse the track withUnroutable, then asserts the incumbent's remaining group and its clean end still reach the subscriber.
Verified: the test passes, and the body's own caveat holds — with Front::refuse's draining branch removed it still passes, because the reader already attached to the withdrawn copy drains it either way. There is no duplicate coverage; this is the only test that withdraws a serving route with a subscription open.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Re-reviewed at 824f30b (the head has not moved since the prior review, so no commits to re-examine). The prior inline finding on the post-refusal yield_now loop is declined in the thread and settled; the test is a deliberate end-to-end assertion, not a proof of the drain branch. Re-ran the test on the simulated clock: it passes. No new issues, no production or API change.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Problem
On
release, a publisher's withdrawal that reaches a relay before the serving route delivers the track's end can end a subscriber's track withUnroutable: the front switches to a stale standby route whose peer already dropped the broadcast, and the standby's refusal aborts the track before the withdrawn copy's clean end arrives. moq-dev/moq#8469 fixes that onrelease.mainalready behaves correctly but has no test for the race.Approach
Add
a_refused_replacement_keeps_a_withdrawn_incumbent_opentors/moq-net/src/model/origin.rs, the same scenario as thereleasefix's test, onmain's simulated-clock harness: the serving route is withdrawn and its source closes while the subscription is open, the standby refuses the track, and the subscriber must still read the withdrawn copy's last group and its clean end.It passes on
main. It also still passes withFront::refuse's draining branch disabled: the front then aborts the logical track, yet the reader already on the withdrawn copy still gets its last group and clean end. The test therefore pins the end-to-end behavior, not that one branch.Impact
Alternatives
None: it mirrors the
releasetest so both branches pin the same scenario.Follow-ups
None.
Caused by
No bug on
main; thereleasefix is moq-dev/moq#8469.Checks
just check origin/main(Nix dev shell) passes.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
Review
Rewritten by
quest reviewafter each round.01a1c7d3-9129-71a0-a89a-02de01ad32e3, round 1The diff adds only a regression test for retaining an incumbent track after a replacement refuses it, with no actionable defects identified, pending CI confirmation because builds and tests were not run as instructed.🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with high effort)