Repository navigation
fix(moq-net): a drop poll's change reopens the ordered read gates - #9051
Conversation
An ordered reader drop-polls its source on every read since #8910, and on a resumed subscription that poll reaches the serving cursor's `poll_drop`. That poll syncs the window and probes fills on its own waiter: it can move the window, ask a fill, or hear a fill's answer, all of which change what the cursor's group read walks. Nothing reopened the read gate, and a disarm would not have helped: the resume and ordered gates parked on the cursor's gate and answer `Pending` again until a wake reaches them, which a silent disarm never sends. The reader parks for good on a group that is already servable. `Idle::reopen` disarms and wakes through the gate's own waiter, so every gate the read nests in reads again. `Cursor::poll_drop` reopens the read gate when the window revision or the fill view it walks changed. Plain `disarm` stays silent for the hot paths that disarm inside or alongside the read. 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 7 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 blocking issues — one doc line to bring in line with the new API.
Approach: right layer and right shape. The silent mutator (poll_drop's sync/probe, running on its own waiter) reopens the gate it changed and leaves every in-read disarm silent, which keeps the early-exit path intact for the entities that disarm from inside a read.
Reviewed changes — full read of all three files, plus resume.rs's gate chain, miss.rs, record.rs, and kio::Park::hold to check the wake chain and the snapshot's completeness.
Idle::reopen(util/idle.rs) disarms and then wakes through the gate's ownWoken, so the wake forwards to the waker the gate parked with — the outer gate's waiter, ultimately the task — and every gate in the nest reads through again. New unit test builds a two-gate nest and assertsdisarmleaves the outer gate parked and the task unwoken whilereopenunparks both.Cursor::poll_dropsnapshot (model/track.rs) compares(filter.revision, fill_view())across thesync/probeand reopens when either moved. I traced both halves:sync/look_upbump the revision on every window move (including therefusedarm), and every fill mutationprobecan make (judge/ask/resolve/expire/retain) shows up inwanted/filled.Cursor::fill_viewmaps a still-Nonemissesto the empty view, so a probe that only creates an emptyMissesdoes not force a reopen.- Doc (
model/idle.rs) covers the outside-the-read reopen case.
Validation I ran here: cargo test -p moq-net --lib --features async (3515 passed, 36 ignored), the idle:: slice (4 passed, new test included), cargo check -p moq-net --no-default-features, and rustfmt --check on the three files — all clean.
deepseek-v4.1-flash | 𝕏
|
quest land watch: ended this pull request's pick, disarming its auto-merge, since its head 25faf8b is held by finding by pullfrog[bot]: The module doc at the top of this file (lines 8-9) still says a change that notifies nothing "has to (written by quest land watch) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the one commit since the prior Pullfrog review.
- Module doc (
util/idle.rs) now namesIdle::reopenbesideIdle::disarmfor a change made outside the read. That addresses the earlier doc nit.
claude-sonnet-5-5 | 𝕏
|
Decisions from the maintainer:
(Written by Claude Opus 5.5 with high) |

Problem
Since #8910, an ordered reader drop-polls its source on every read. On a resumed subscription that poll reaches the serving cursor's
poll_drop, which syncs the window and probes fills on the drop poll's own waiter. It can move the window, ask a fill, or hear a fill's answer, and each of those changes what the cursor's group read walks (lowest_wanted,has_filled,is_waiting, the window revision).Nothing reopened the cursor's read gate for that, and a disarm alone would not have helped: the resume and ordered gates parked on the cursor's gate, and a gate answers
Pendingagain until a wake reaches it. A silent disarm never sends one, so the reader parks for good on a group that is already servable.Seen as an HLS export over a relay under concurrent load: renditions intermittently never produced a first segment. The export's checks failed in every full run at a pin past #8910 (5 of 5) and passed before it. A lost-wake probe placed on the gates showed the stuck readers parked on an ordered gate whose cursor had changed under the drop poll. A unit-level reproduction of the composite resume path was not found, so the cursor change is validated end to end; the gate behavior has its own unit test.
Approach
Idle::reopendisarms likeIdle::disarmand also wakes through the gate's own waiter, so every gate the read nests in reads through again, as does the task.Cursor::poll_dropsnapshots the window revision and the fill view before it syncs and probes, and reopens the read gate when either changed.disarmstays silent: its other callers (a retired group machine in the publisher, a frame read, the servable update) disarm inside or alongside the read, where a wake would only cost spurious polls.Impact
Alternatives
disarmwake: also fixes it, but wakes the publisher's and group reader's hot paths on every retire and frame read (over a thousand extra wakes in one run).Validation
cargo nextest run -p moq-net --features async: 4093 passed.just ci: passed.quest review --harness codex(gpt-6.1-sol, high): no findings.disarm) fixed in ff79f88; doc-only, reviewed again with no findings.Caused by
Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, XS, arm B)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: ff79f88
Base: origin/main at b25a655
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, high effort
Session:
01a1ee70-4a86-7db3-8b13-8c9bdafd5494, round 1Score: 9/10,
Source inspection found no actionable defects in the gate reopening and nested wake chain, but runtime behavior remains unverified because builds and tests were not run.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none