Repository navigation
Conversation
Quest-Claim: c7db27c545085bfd
…nd waits on its kept copies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat front keeps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 5 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 critical issues. One side effect worth a look, inline.
Approach: sound. The PR forwards resolution and may_land through the inner front's reader instead of answering None or false for it, and it asks every copy the inner front keeps, not only its serving copy. That fixes the cause in both languages and follows the same pattern as the existing skipped_in forward.
Reviewed changes
I reviewed all 8 files. That covers the Rust and JS forwarding changes, the two mirrored tests, and the quest file swap.
resolved_rangesfolded intoresolved_keys: everyresume.rscall site now gets the inner front's placement, so the outerReader::windowlearns where a nested range placed.track::Subscriber::may_land/resume::Subscriber::may_land: a front's reader asks each kept copy, clamped byCopy::startandCopy::end. It takes the inner reader lock while the outer one is held, the same lock order asskipped_in.Copy::may_land:Copy::retainsnow asks through the ready subscriber and falls back to the track while pending.- JS
Reader.mayLand/hooks.mayLand: these mirror the Rust forward, using the same floor and backfill clamp and the samecopyEnd. - Tests: the renamed placement test now asserts
[7],7..8, and a clean end. The new replaced-copy test pins down the case the serving-only forward missed.
claude-opus-5-5 | 𝕏
|
quest land watch: ended this pull request's pick, disarming its auto-merge, since its head 9b0fb20 is held by finding by pullfrog[bot]: This forward also reaches a third caller that the PR doesn't mention: the (written by quest land watch) |
…rving copy A front's track::Consumer::poll_group forwards to its serving copy, as may_land and fetch_group do, so a refused fetch through a nested front waits for the group there and reads it on; pinned in Rust and JS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the delta since 9b0fb20. It answers the earlier Recover thread by fixing the Rust side and pinning both languages with a test.
- Forwarded
track::Consumer::poll_groupto the serving copy: a front's track now answers fromself.serving(), asaskandfetch_groupalready do. RustRecovertherefore reads a group that lands on a nested front's serving copy, where before it waited forever. - Added
a_short_group_a_nested_replacement_lacks_reads_on_once_it_lands(Rust + JS): the replacement is a nested front and the fetch of the rest is refused. The read then continues once the group lands whole, or ends where that copy closed it.
claude-opus-5-5 | 𝕏
|
quest land watch: the merge queue removed this pull request at 7b4fd0b because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
…-time-start # Conflicts: # js/net/src/resume.test.ts
|
quest land watch: Another session holds this pull request, so the watcher stops acting on it and leaves it to that session: the hold ends the pick, and a maintainer enqueues it again once that session is done. (written by quest land watch) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The only change since 7b4fd0b merges origin/main into the branch.
- Merged
origin/main: the range-diff shows only shifted context around a test that main added tojs/net/src/resume.test.ts. The PR's Rust and JS forwarding changes and its tests are the same as already reviewed.
claude-opus-5-5 | 𝕏

Finishes quest/m1/nested-front-time-start.md and deletes it.
Problem
When a front's route is another front, the outer reader can't place a time start through it.
a_raised_start_behind_an_inner_front_hands_out_nothing_past_its_endshowed the bug: a range7..=7moved under the resume point never placed, and the read stayed pending after every group landed. Two gaps cause it:track::Subscriber::resolved_rangesreturnedNonefor every range of a front's reader, so the outerReader::windownever learned where the inner front placed a range. (JS already forwarded it throughResumeSource.resolved.)may_landcheck never looked at the copies the inner front still kept. JShooks.mayLandreturnedfalsefor any front's reader, which has no producer, so the backfill was let go before the group holding the time landed. RustCopy::retainsasked the inner front'strack::Consumer, which forwards only to its serving copy, so it missed a group that a copy the inner front replaced could still land.A third gap showed up in review: a recovered group read through a nested front. The JS
mayLandforward also reachesRecover's refusal check. RustRecoverreads the rest of a group, and judges a refused fetch, throughtrack::Consumer::poll_group. That never forwarded a front's track to its serving copy, so through a nested front Rust neither saw the group land nor reached a verdict.Approach
resolved_ranges. It differed fromresolved_keysonly in that arm, so every caller now usesresolved_keys, which forwards to the inner reader's window.may_land: new crate-privatetrack::Subscriber::may_land. A plain cursor answers from its track. A front's reader answers throughresume::Subscriber::may_land: true while any copy it still keeps may land the group, clamped to where that copy starts and under its cap.Copy::retainsasks throughCopy::may_land, which uses the subscriber once the copy has answered, asCopy::skipped_inalready does.poll_group:track::Consumer::poll_groupnow forwards a front's track to its serving copy, asmay_land,skipped_in, andfetch_groupalready do. Its only callers areRecover's three sites.ResumeSource.mayLand, implemented byReaderthe same way.hooks.mayLandforwards to it for a front's reader, and that coversRecover's refusal check too.a_raised_start_behind_an_inner_front_places_through_itnow asserts the read hands out[7], places at7..8, and ends.a_backfill_through_an_inner_front_waits_on_a_copy_it_replaced, plus its JS mirror. The inner front moves to a copy whose feed starts past a late group (start_at(9)), and the late group lands only on the copy it replaced.a_short_group_a_nested_replacement_lacks_reads_on_once_it_lands, plus its JS mirror. A short group whose replacement is a front refuses the fetch of the rest, then lands there whole (the read continues) or closed at the same frame (the read ends there).Public API: none. Wire: none.
Decisions
Choices I made without asking, for review:
resolved_rangesintoresolved_keysrather than adding a forward to it, since they were otherwise identical.floorpasses through unchanged to each kept copy, as the existing serving-copy forward did. Each copy's own floor clamps where the range starts instead (Copy::start).Recoverwait is intended (Pullfrog's thread). A refusal is a verdict only once the serving subscription will not deliver the group either. For a nested front, that subscription is the inner front's reader, which delivers from any copy it keeps. Before this PR, JS ended such a read with the refusal while the group could still land. Rust waited, but never read the group once it landed. I fixed the Rust side here, because without it the two languages disagree on this path.Consumer::poll_group), while JS asks every copy the inner front keeps. Both wait while the serving copy may land the group, and both read on once it does. They differ only when a copy the inner front replaced could land a group its serving copy never will. There Rust ends the read with the refusal while JS waits, and may yet read the group on. Reaching Rust's reader-level copies fromRecoverwould mean restructuring howRecoverreads, for that corner case. That is left as is; it isn't a follow-up quest.Validation
a_raised_start_behind_an_inner_front_places_through_itfailed in both Rust and JS, reading[]instead of[7]. With only the resolution forward, the Rust test passed.Copy::may_landreverts toself.track.may_land(the serving-only forward). It fails in JS whenReader.mayLandasks only the serving copy.hooks.mayLand(falsefor a front's reader). It fails in Rust onmain'sresume.rsandtrack.rs(the read stays pending after the group lands) and without thepoll_groupforward.readers_match_the_logical_track) passes seeds 1–8 at 1024 cases each on the first head, and seeds 1–4 at 1024 after thepoll_groupforward. It models no nested fronts, but it coversCopy::retainsandRecover, which every copy now reaches through these paths.cargo nextest run -p moq-net --all-featurespassed 4231.bun testinjs/netpassed 3585.just checkpasses.Caused by
resolved_ranges, which answered nothing for a front's reader, so an outer front never learned an inner front's placement (found by reviewer on moq-dev/moq#9278).hooks.mayLand, which answeredfalsefor a front's reader, letting a backfill through an inner front go before its group landed (found by reviewer on moq-dev/moq#9278).Recoverthrough a nested front:track::Consumer::poll_grouphas never forwarded a front's track to its serving copy, through every rename back past moq-dev/moq#8638, so no single PR introduced it (found by reviewer: Pullfrog on this PR).Follow-ups
Overlap
resume-model-placement(moq-dev/moq#9389),resume-model-route-close,resume-route-mutants, andjs-resume-model-receivedalso touchresume.rsandresume.ts. This diff touches onlyCopy::retains' twomay_landcalls, the newmay_landmethods, theresolved_rangescall sites,Consumer::poll_group, and new tests, so expect textual conflicts at most. moq-dev/moq#9316 has not landed yet, and this diff doesn't touch subscription starts.Models
Size: M
Implementer: Claude, claude-opus-5-5, unknown effort (arm B)
Implementer: Claude, claude-opus-5-5, unknown effort (iterate, M, arm B)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 491911a
Base: origin/main at 2dfd5e8
Risk: medium,
This changes shipped Rust (`rs/moq-net`) and JS (`js/net`) resume behavior, a bug fix that could leave a subscriber reading a front's copy wrongly or stalling where it previously ended, for relay and client users of fronted tracks, and a revert fully undoes it; the public API and wire format are unchanged (the touched `resolved_ranges`/`resolved_keys`/`may_land` items are `pub(super)`/`pub(crate)`/internal JS hooks), so it is not high.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
330a116e-64bc-4670-8799-5917d4a13ae3Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a2031e-8cac-7362-bcb9-b7371c2cb2a4, round 3Score: 8/10,
The merge preserves the previously reviewed branch changes and reveals no actionable integration regression, though builds and tests were not run as instructed.Rounds: 3; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none