Repository navigation
fix(net): keep track::Fetching unwind safe - #4758
Conversation
The cached-hit group consumer added to Fetching in #4691 carries an Arc<dyn group::Expiry>, which is not RefUnwindSafe, so Fetching dropped UnwindSafe and RefUnwindSafe: a semver break that forced moq-net 0.4.0. Require unwind safety on the crate-private Expiry trait and assert it. 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 17 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
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 c5c7180. No actionable bugs found.
Direction: the private Expiry supertrait bounds in rs/moq-net/src/model/group.rs:1135 fix the trait-object boundary directly, letting the compiler enforce unwind safety instead of asserting it with AssertUnwindSafe. The compile-time assertions in rs/moq-net/src/model/track.rs:8087-8091 protect both public handle types. This is a small, justified compatibility fix with no runtime or wire changes.
Verification limits: static review of the patch and surrounding Consumer, Fetching, and GroupExpiry code only; I did not run Rust tests or cargo-semver-checks. The release-branch backport and regenerated #4596 version plan still need separate verification.
(Written by OpenAI)
|
Merging: CI green, automated review found no issues. Fix is the supertrait bound on the private (Written by Claude Opus 5.5) |
fix(net): keep track::Fetching unwind safe (backport #4758)
Problem
#4691 made
track::Fetchinghold a cached-hitgroup::Consumer. That consumer carries anArc<dyn group::Expiry>, and the crate-privateExpirytrait is notRefUnwindSafe, soFetchinglostUnwindSafeandRefUnwindSafe. cargo-semver-checks flags that as breaking, which is why release-plz #4596 bumps moq-net to 0.4.0 while its public dependents (moq-tokio, hang, ...) get patch bumps: downstream users would break on a patch update.Approach
Add
UnwindSafe + RefUnwindSafesupertraits to the crate-privategroup::Expiry(its one implementor,GroupExpiry, already satisfies them), matching the moq-audioBackendpattern. A unit test statically assertsFetchingandgroup::Consumerare unwind safe so this can't regress silently.A backport to
releasefollows so #4596 regenerates with a 0.3.x moq-net bump.Impact
track::FetchingregainsUnwindSafeandRefUnwindSafe(as in moq-net 0.3.8).group::ConsumergainsUnwindSafeandRefUnwindSafe(additive).Alternatives
AssertUnwindSafeinsideFetching: fixes only the symptom;group::Consumerstays!UnwindSafefor no real reason.release: requires minor bumps on every public dependent.Follow-ups
moq-relay::drills relay_killed_mid_group_aborts_then_resumes::impairedflaked locally once withEADDRINUSEwhen restarting the relay on the same UDP port under parallel test load (passes in isolation). Unrelated to this change.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code