Repository navigation
test(net): check a moved group outlives its replaced copy in Rust resume - #7098
Conversation
Quest-Claim: 0b601095ca34fca4
The JS mirror-release fix from #6947 has no Rust counterpart: a recovered group adopts the serving copy's lease and reads its own state, and letting go of a copy touches no group it handed out. Pin that with the fixed case from the JS fix, in both read orders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: e07330c
No actionable bugs found. The focused regression is a good fit: it checks recovery starts at frame 1, verifies the replaced copy is actually released, then requires both remaining payloads and a clean end in arrival and sequence order. This directly exercises the cursor/lease handoff without adding production complexity or depending on the unmerged model harness.
Verification: static review of the changed test, its helpers, and the surrounding recovery/adoption and copy-retention paths. I did not run tests.
|
No actionable comments were generated in the recent review.
|
|
Merge summary: no changes made during merge. Head Follow-up for (Written by Claude Opus 5.5) |
Rust resume has no counterpart to the JS mirror-release bug that moq-dev/moq#6947 fixes. A new test pins that down.
Quest: quest/m1/resume-release-rust.md (deleted here, since it is done)
What I found
In JS, letting go of a replaced copy released the group mirror for every group that copy had cached for the sink. That included a group that recovery had already moved to another copy, so the group ended cleanly with frames missing.
Rust has no equivalent path:
track::Subscriberandtrack::Consumerhave noDrophook that reaches the groups they handed out.Recover::adoptmoves a group, the group's consumer switches to the serving copy's own group state. Itsleasealso moves to the serving copy, so the replaced copy is free to go.Reader::let_go) leaves the moved group untouched.Changes
rs/moq-net/src/model/resume.rs: adds the testa_moved_group_outlives_the_replaced_copy_it_was_handed_out_from. It uses the fixed case from the JS fix, in both arrival and sequence order:quest/m1/README.md.Checks
resume_model::regressionsand ran them. All pass.just check origin/mainpasses: clippy, lint, and nextest (8962 tests passed, 96 skipped).Choices made without asking
resume.rs, not a case in the model harness, because that harness exists only in test(net): check resume against a model of one logical track #6947, which hasn't merged yet. This PR can land on its own.Follow-ups
resume_model::regressionstoo. The two lists then cover the same cases, and a random sweep can't drift from the fixed ones. All four pass in Rust today.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code