Repository navigation
Conversation
A finished group whose cache is released (Old, Timeout, Evicted) still finished whole, but group::Consumer::end returned None once it was, so a reader that drained every frame and asked after the release lost where the group ends, and a lite-07 publisher serving it skipped GROUP_END. 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 24 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. |
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. The end is carried inside the existing Outcome::Released variant rather than added as a side field, so the lifecycle stays one enum and every end() reader picks it up without extra work.
Reviewed changes
This run reviewed the single commit, which keeps a finished group's declared end after cache policy releases it.
Outcome::Releasedcarries the end:commit_abortnow movesFinished(frames, end)intoReleased(frames, end, err)instead of droppingend.- Both
end()accessors report it: the publicgroup::Consumer::endand the crate'sHandle::endnow return the end forReleasedgroups too. Reads are unchanged: a reader short of the last frame still gets the release error. - Downstream effect is consistent: the same group identity now reports the same end before and after release. This also covers paths the PR body doesn't mention:
ietf/publisher.rsend_objectnow builds END_OF_GROUP for such groups, andmodel/track.rsown_end/ended_atsee the end when they compute expiry bounds. - Regression test:
abort_after_finish_keeps_the_clean_end_for_a_drained_readernow finishes withfinish_at(1)and checks thatend()returnsSome(1)afterabort(Error::Old).
claude-opus-5-5 | 𝕏

A finished group keeps where it ends after its cache is released.
Bug
commit_abortturnsOutcome::Finished(frames, end)intoOutcome::Released(frames, err)when cache policy (Old,Timeout,Evicted) frees a finished group, droppingend. Sogroup::Consumer::endreturnsNonefor a group that still finished whole:buffer_group_endinlite/publisher.rs) skips GROUP_END when the release lands between its last frame and the end, so the subscriber's copy ends without its end.Change
Outcome::Releasedcarries the declared end (Released(usize, Option<u64>, Error)), and bothend()s (the publicgroup::Consumer::endand the crate's own) report it. A reader short of the last frame still gets the release error from its next read, as before.Validation
abort_after_finish_keeps_the_clean_end_for_a_drained_readerto finish withfinish_at(1)and assert the drained reader'send()isSome(1)afterabort(Error::Old). Reverting only the twoend()arms fails it (left: None, right: Some(1)); with the fix it passes.cargo test -p moq-net --all-features: all pass.just check(in the dev shell): passed.Caused by
Outcome::Finishedbut discarded it on the move toOutcome::Released(found by reviewer)Public API
No signature change. Behavior:
group::Consumer::endnow returns the declared end of a finished group after its cache is released, instead ofNone. No wire format change; a lite-07 publisher now sends GROUP_END for such a group where it used to omit it.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 28953b3
Base: origin/main at 037c6f1
Risk: medium,
Preserving finished-group end timestamps after cache release changes behavior consumers rely on and could affect their end-of-group handling, but keeps the API and wire format intact and is fully undone by a revert.Classified: medium by Codex, gpt-6.1-sol, low effort, session
01a1fb95-2c0d-7933-a2fe-aa300876e176Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1fb95-3c93-7ce0-b1f9-403aa69dfee4, round 1Score: 9/10,
The focused fix preserves the declared end after cache release without changing incomplete readers' error behavior and includes regression coverage, though tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none