Repository navigation
fix(net): prove the lite session driver Send within the default recursion limit - #8657
Conversation
…sion limit Parked and paused groups hold group and frame writers that reach the whole track model, which pushed the session driver's Send proof past the default recursion limit on nightly. SendCell proves them once at the TrackEntry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: the full diff (2 files, 1 commit).
TrackEntryregistries inSendCell:parkedandpausedinlite/subscriber.rsare nowOption<SendCell<kio::Producer<_>>>. The session driver'sSendproof stops at the cell instead of walking the group and frame writers. Existing call sites (.write(),.read(),.consume(),.clone()) go throughDerefandClone, so they are unchanged.SendCell: Default:util/cell.rsaddsimpl<T: Default + Send + Sync> Default, which keeps theget_or_insert_with(Default::default)call sites working. The bounds matchnew, so the safety invariant of theunsafe impl Send/Syncstill holds. The SAFETY comment is updated to say "both constructors".
claude-sonnet-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughSendCell now implements Default when its contained type implements Default, Send, and Sync. TrackEntry now stores its parked and paused producers in SendCell. Their optional types and roles remain unchanged. Merge Risk:
|

Problem
Every Fuzz job in the Nightly workflow fails to build moq-net (run 43447849289):
overflow evaluating the requirement driver::Driver: Sendatassert_send::<Driver>().sh/rs/fuzz.shbuilds with nightly and-D recursion_depth_exceeding_limit, so aSendproof deeper than the default limit of 128 fails the build there. Stable only warns about it now, but it will become a hard error.The overflowing path runs through the lite subscriber's
TrackEntry. Itsparkedandpausedregistries hold group and frame writers (recv::Group,frame::Producer), and those writers reach the whole track model. Lite-07 YIELDED addedpausedand apartialframe writer per opened group, which pushed the driver's proof past the limit.Approach
TrackEntrynow keepsparkedandpausedinSendCell, the cell from #5682 that provesSend + Synconce when it is built. The driver's proof stops at the cell and no longer walks through the group model.SendCellgains aDefaultwith the same bounds, soget_or_insert_with(Default::default)keeps working.Impact
Validation
nightly-2026-11-13(rustc 8eb778d04, the same nightly as the failing run) and onnightly-2026-11-12:cargo check -p moq-net --lib --features fuzzwith-D recursion_depth_exceeding_limitfails on main and passes on this branch.Options until its proof overflows at the default limit. Before feat(net)!: lite-07 YIELDED pauses a group a later stream continues, and FRAME leads with its length #8545 the driver had 8 levels to spare. Main has none (it overflows). This branch has 12. Raising the limit to 256 gives the same depth (116), so the measurement holds at either limit.just rs fuzz varint -- -max_total_time=30on nightly builds and runs (17.3M execs, rc 0).just checkandjust cipass.quest review --harness codex(gpt-6.1-sol, high) found nothing.Alternatives
recursion_limit: fix(net): prove native futures Send at the default recursion limit #5682 removed that on purpose and pins the default limit inrs send-depthand the fuzz build.cache::Track's back-reference toTrackState,kio::Shared<BroadcastState>): I measured these with the same nesting check. They made the driver's proof deeper (174 at limit 256, against 131 on main), because the old solver's depth on this cyclic model graph depends on the order it searches, not just on which edges exist. I dropped them.Follow-ups
rs send-depth), so the next deep session state can land and break it again. Running the driver'sSendproof on the pinned nightly in the merge gate would catch it before landing. I did not add that here.Caused by
pausedregistry andpartialframe writers toTrackEntry, which deepened the session driver'sSendproof past the default recursion limitModels
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 73e5ae5
Base: origin/main at 4486b7a
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1d638-9fc5-71b1-b4a3-81e3935fecdc, round 1Score: 9/10,
The wrappers preserve channel behavior and Default enforces the existing Send + Sync construction invariant, with no actionable defects found in source review, though builds and tests were not run as instructed.Rounds: 2; findings 0: fixed 0, refuted 0, open 0
Findings: none