Repository navigation
Conversation
…used clock before checking for leaked tasks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. The leak check stays exact, and the debounce is waited out on a paused clock, so it costs no wall time.
Reviewed changes
ROUTE_LINGERconstant: 32 × 25 ms, matchingroute::relay::HOPandMAX_HOPSviadebounce.retirewaits out the linger: it pauses the clock, settles, sleepsROUTE_LINGER, and settles again before assertingnum_alive_tasks() == 0.tokio::time::pause()is safe here because every call site uses a freshcurrent_threadruntime withenable_time(), andretireruns once per runtime.
claude-sonnet-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughThe session benchmark teardown now pauses Tokio time, drains tasks for up to 1,024 yield passes, advances the paused clock through an 800 ms route linger, and performs a second bounded drain before the existing task-count assertion. Merge Risk:
|

Problem
Every lite-07 cell of the
moq-netandmoq-relaysession benches panics inretirewithtasks outlived the cell's handles(left 2). This fails Nightly's "Rust bench targets" and "Relay session benchmarks" on main (run 44342367698).The two tasks are the relay's and the viewer's origin drivers. When a lite-07 session closes,
Routed::orphanleaves the claims it served in the origin's route node, so another session can pick them up during the node's debounce (route::relay::debounce, 32 hops of 25 ms). Each orphan holds anorigin::Claim, which keeps the origin's driver alive until the node'sRouteTimerreleases it. Both origins end exactly 800 ms after teardown. That is a bounded linger the route layer intends, not a leak, butretireonly yields and never lets protocol time pass.The
relay_session_delivery_credit/moq-lite-07-wiphang in run 44127032469, and themoq-net/authandmoq-relay/authhangs, were already fixed on main by moq-dev/moq#9039. Bisected locally: it hangs through2668d1a65band passes fromd9ccbad992, the only moq-net change in that range. Today's Nightly still showed those hangs only because its paired base wascd9a8e9ccf.Approach
retirepauses the cell's runtime clock, settles, sleepsROUTE_LINGER(800 ms, which auto-advances instantly), and settles again before asserting that no task is alive. The wait costs no wall time, and the assertion stays exact: a driver still alive past the debounce fails it.Impact
Alternatives
retire. That adds 800 ms to every cell.Validation
4f3ba3317f:session_delivery_burst/moq-lite-07-wip/...andsession_delivery_credit/moq-lite-07-wip/...panic inretire(left 2). lite-06 passes.Closed800 ms after teardown on the wall clock. All session drivers had already ended.cd9a8e9ccf..4f3ba3317fwith that check: first bad is moq-dev/moq#8987.ROUTE_LINGER1 ms short (799 ms),retirestill panics, so the debounce is exactly what the tasks wait on.cargo bench -p moq-net --features fuzz --bench session -- --test: all 448 cells pass.cargo bench -p moq-relay --features test-support --bench session -- --test: all 431 pass.--quick --warm-up-time 0.05 --measurement-time 0.2) over the relay's 27creditcells completes, including every lite-07 one.just checkpasses.Caused by
retirecheck to let that time pass (found by check: Nightly).Follow-ups
moq-net/publisherwake/8192fixture setup costs O(drops × ranges) since moq-dev/moq#8638, and its runtime pushes the job into its 55-minute timeout. Planned separately.mesh_sweep::benchmark_route_meshpanics atrs/moq-net/tests/integration/mesh_sweep.rs:790. Out of this PR's scope.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 1aa7818
Base: origin/main at 4f3ba33
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1f002-b8a6-7073-8b7c-9687652ba328, round 1Score: 9/10,
The narrowly scoped teardown change preserves the leak assertion, with no actionable regressions found by source inspection; builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none