Skip to content

test(moq-net): the resume model drops a group its route held only a fetched tail of - #8969

Merged
kixelated merged 1 commit into
mainfrom
fix/resume-model-fetched-give-up
Nov 16, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/resume-model-fetched-give-up

Conversation

@kixelated

@kixelated kixelated commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Nightly's Tests (test resume-model) fails (job, MOQ_RESUME_SEED=762648400): an ordered reader is handed groups 0–4 and then never 6–11.

The model was wrong, not resume. Reader 1 read group 5's first frame from the replaced route (slot 0). Its recovery then fetched the rest (from frame 1) on the serving route (slot 1), so slot 1's cache held a fetched tail of group 5. When slot 1 then gave up group 5, Op::GiveUp saw a held group and only aborted that fetch. Slot 1's live feed never carried group 5 and never reported it dropped. A fetch-only copy that fails "holds nothing open, since the feed never promised it" (Slot::is_settled), so the ordered cursor on slot 1 rightly waited for a live group 5. With the Hour budget, it would wait for good. Meanwhile the model owed everything after it.

Approach

Op::GiveUp aborts every held copy of the group, as before. It now also drops the group from the route's live feed unless a live (from == 0) copy exists. The shrunk counterexample joins regressions.

The JS model (js/net/src/resume.model.test.ts) needs no change: its fill creates the whole group on the route's own track, so it has no fetch-only tail.

The other model failure from yesterday's Nightly (MOQ_RESUME_SEED=1648062584, reader 3 with range (3, 4) never ending) was already fixed by moq-dev/moq#8859 and is in regressions. The route-sweep failure in the same Nightly (sweep_scoped_meshes_show_what_the_rule_says) was fixed by moq-dev/moq#8860.

Impact

None: test-only.

Validation

  • The new regression case fails before the fix with Nightly's exact message, and passes after it.
  • Minimized by dropping each op in turn: every op is needed. Instrumentation showed the fill (i1 s1 5..6, accepted from frame 1) and then GiveUp hitting the held branch.
  • readers_match_the_logical_track passes at both Nightly seeds (762648400, 1648062584) and eight fresh seeds (4096 cases each).
  • just check: everything passes except moq-relay bitrate_caps::uring::session_is_held_to_its_caps ("io_uring worker setup failed"), which is a host limitation unrelated to this change.
  • The scoped route sweep passes on main at MOQ_ROUTE_SCENARIOS=20000.

Caused by

  • moq-dev/moq#6947 - the model's GiveUp treated a fetched tail as the live group, so it never dropped the group from the live feed (found by check).

Models

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

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 329c010

  • Base: origin/main at 13e593c

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

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

  • Session: 01a1e569-ee03-7822-b48d-f0a5941dc240, round 1

  • Score: 9/10, The change correctly reports a live-feed drop when only fetched tails exist and adds a focused regression case; source review found no actionable defects, though tests were not run as instructed.

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

  • Findings: none

…etched tail of

A route that gave up a group it held only through a fill aborted the fill
and recorded nothing on its live feed, so an ordered reader on that route
rightly waited for the group forever while the model owed what followed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 16, 2026 17:32
@coderabbitai

coderabbitai Bot commented Nov 16, 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 11 minutes.

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: 19f12f27-b459-45e5-8549-484186ddd02c
Commits

Reviewing files that changed from the base of the PR and between 13e593c and 329c010.

Files selected for processing: 1

  • rs/moq-net/src/model/resume_model.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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

I reviewed a test-only fix to the resume model's Op::GiveUp handling, plus its regression case.

  • Op::GiveUp drops fetched-only groups from the live feed: every held part's writer is still aborted. drop_groups is now also called whenever no live (from == 0) part exists, so a route that held only a fill's tail tells its ordered cursor that the group is gone. Before this change, the ordered reader waited for that group forever. This matches write(), which counts only a from == 0 part as the live feed's group, and fill(), which records fetched tails with from > 0.
  • New regressions() case: replays the shrunk counterexample from Nightly seed 762648400.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed 329c010da389bf2147df601d215266d4e0e16606. The regression fixture is useful, but P2: frame zero is not proof a part came from the live feed (resume_model.rs:406). fill() stores the request's frame_start directly; a fetch can start at 0 and still hold only an incomplete group. An on-demand FETCH with no live slot is inserted as invisible to the live feed, regardless of its start. If GiveUp aborts that copy, the new predicate still suppresses the live-feed drop and an ordered reader can stay parked. Track live-vs-fetch provenance explicitly on Part, and add a case that gives up an incomplete fetch from frame 0 with the next group already owed. Static review only; I did not rerun the model.

@kixelated
kixelated added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 5ca006f Nov 16, 2026
6 checks passed
@kixelated
kixelated deleted the fix/resume-model-fetched-give-up branch November 16, 2026 20:29
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