Skip to content

fix(net): a front's reader waits on no copy for a group another copy declared skipped - #9563

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/backfill-waits-below-answered-start
Nov 25, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/backfill-waits-below-answered-start

Conversation

@kixelated

@kixelated kixelated commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m1/backfill-waits-below-answered-start.md.

Summary

A front's reader no longer waits on any copy for a group that another copy declared skipped. Rust and JS now agree in the case the quest describes.

Which side was right about START. JS is right about what a lowered floor asks of the wire: it asks the feed for the groups below START. Rust's subscriber does the same thing: on lite-05/06 it calls start_at(active.start) ("moving below a declared SUBSCRIBE_START reopens those groups"), and on lite-07 it leaves the new range's START pending. Neither START rule changes, and the lowered-floor exception that owedRuns relies on for fills stays as it is.

What actually diverged. The plan says Rust ended because find_landable clamps to the START, and that is true. The clamp, though, only hid a wait that was wrong on both sides. In the test, the replaced copy b declared group 7 skipped. A skip means the publisher never produced the group, and since group identity is global, no route will ever deliver it. Both Copy::retains (Rust) and #retains (JS) still waited for 7 on the serving route's backfill through may_land, because that check only reads the backfill copy's own drops:

  • JS waited for the budget's grace. With an unbounded budget that means forever: one hour of mock time still left recvGroup pending.
  • Rust waited the same way once the serving copy declared no START. Removing the clamp alone hangs all three an_unplaced_time_start_* tests.

Rust's fill path (Reader::owed) already subtracts what any copy declared skipped. The may_land path now does the same on both sides:

  • Rust: let_go collects skipped_in once over the replaced copies' caps (Retain::skipped), and retains asks may_land only for the parts of each window run that are not skipped.
  • JS: #retains asks mayLand only for the parts of each run that skippedIn does not cover.

The twin tests an_unplaced_time_start_waits_below_its_time_on_a_replaced_copy (Rust) and an unplaced time start waits below its time on a replaced copy (JS) now run with and without the serving copy's START at 9. Both end with the same assertion: poll_recv_group returns Ready(Ok(None)), and recvGroup() resolves undefined.

Choices made without asking

  • I fixed the skip-blind wait on both sides and did not change either START rule. The plan offered "fix the wrong side's START handling". The investigation shows the START rules already agree on a real wire, so changing either would not address the hang.
  • Rust computes the skipped set only when a replaced copy with a cap is still live, so a reader that follows one route pays nothing for it.

Validation

  • Reproduced first. JS: with the end assertion added and no fix, the test timed out (5 s), and recvGroup was still pending after an hour of mock time. Rust: with the serving copy given no START, the test failed at the end assertion (started=false).
  • With the fix, both variants pass on both sides. Reverting only the Rust retains change makes started=false fail again.
  • Second, independent check: I instrumented both readers. JS created a raised backfill on tc (floor 0, until 7) and waited on run 6..8. Rust created the same backfill (7..8) and dropped it in the same poll because of the clamp. That confirms the two sides diverged only in that wait.
  • cargo test -p moq-net --features async: all pass (3786 + 657 + others). bun test in js/net: 3838 pass.
  • /verify-resume was not run: its model leaves out drops and skips ("Not covered"), so it cannot exercise this change.
  • just check: everything passes except check quest, which flags the .claude/skills/quest-* stubs as outdated against the local quest binary (59b106e). That drift is in the pin and not related to this PR.

Public API

None. Wire: none.

Caused by

No single PR. The skip-blind may_land wait in retains is as old as cross-copy skip records. moq-dev/moq#9438 only exposed it, through a JS test that had no end assertion (found by reviewer).

Follow-ups

None. The related audit quest quest/m1/subscribe-progress-fixes.md lists none of this.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 9365505

  • Base: origin/main at 2311175

  • Risk: medium, This is a bug fix in the internal resume logic of `rs/moq-net` and `js/net`: a front's reader stops waiting on a group that a replaced copy declared skipped, so reads that used to hang now resolve. It keeps the public API and wire format, so consumers of the published packages could only notice a changed read ending, and a revert fully undoes it, which makes it medium rather than high. The quest plan deletion and test changes are low-risk on their own.

  • Classified: medium by Claude Code, claude-haiku-5-5, low effort, session bcd1a766-8623-4a2b-9513-427aff2be7ea

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a21027-7a91-70a2-a81c-45fe775fce00, round 1

  • Score: 9/10, Focused fix with matching regression coverage and no actionable regressions found; checks were not run as instructed.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, high effort, shadow

  • Session: 01a21027-7a91-7dc0-a61f-1d139eaafe2d, round 2

  • Score: 10/10, The sole finding is refuted by the models’ documented scope and transitions, and the head is unchanged since the previous review.

  • Rounds: 2; first round 1 (medium 1); findings 1 (medium 1): fixed 0, refuted 1, open 0

  • Findings: none

  • The last round's findings, at 9365505:

    • Refuted: medium, rs/moq-net/src/model/resume.rs:1126: Mirror skip-aware retention in the covered models; The exclusions in .claude/skills/verify-resume/SKILL.md:58 and .claude/skills/verify-failover/SKILL.md:57 match the models’ lack of skip declarations, so the new skip exclusion changes no modeled transition and requires no model synchronization.

kixelated and others added 2 commits November 24, 2026 15:54
…declared skipped

Rust and JS now agree when the only copy that might still deliver a group is a
backfill under the serving copy's START: a group a replaced copy declared skipped
was never produced, so neither side waits for it on another copy. JS waited out
the budget's grace (forever, unbounded); Rust ended only because its START clamp
hid the same wait, which it kept once the copy declared no START.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Rust and JS agree on whether a backfill waits below a copy's answered START fix(net): a front's reader waits on no copy for a group another copy declared skipped Nov 25, 2026
@kixelated
kixelated marked this pull request as ready for review November 25, 2026 00:45
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 757237e2-9333-480e-8875-edc1c60d36e1
Commits

Reviewing files that changed from the base of the PR and between 7d831cf and 9365505.

Files selected for processing: 4

  • js/net/src/resume.test.ts
  • js/net/src/resume.ts
  • quest/m1/backfill-waits-below-answered-start.md
  • rs/moq-net/src/model/resume.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@kixelated
kixelated added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 36eda93 Nov 25, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/backfill-waits-below-answered-start branch November 25, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant