You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(quest): finish ordered-late-arrival-old, fixed by #9426 - #9544
The quest records a key-order reader (track::Ordered) behind moq export fmp4 reporting a group as an Old gap. The group landed 11 ms after a newer one, well inside the 500 ms budget. That happened in 2 of 40 runs, and once more in 80 runs at 020866c, all on moq-dev/moq#9422's branch.
Approach
Each observation ran a build of #9422's branch from before it first merged main (1e9a0c3, 2026-11-23 18:06 UTC). 020866c is one of those commits. None of those builds had #9426 (32e5738), which fixed this symptom: "a key-order reader could hand out a group, then report a lower group that the feed did deliver as a gap Old". It had two causes:
Before SUBSCRIBE_START arrived, the reader took the first arrival as its floor.
A cross-thread race: the lower group landed between the walk picking the newer candidate and Cursor::poll_owed taking the lock. owed then counted the lower group as accounted for, so the newer group went out first.
The quest's pattern matches cause 2: a lower group landing just after a newer one on a loaded host (load 12 to 30), and reported Old at once. #9426 makes poll_owed walk again when a group was cached after the walk began. A front's key-order reader reads its copies through the same Cursor::poll_next_with, so the fix covers the export's path. JS reads on one thread, so it has no such race, and #9426 already mirrored cause 1 there.
I found no other path on main that passes a group still owed within the budget, with one exception that #9422 decided on purpose (see Decisions).
Impact
None. This only deletes a quest file. No public API, wire, or behavior change.
Alternatives
Keep the quest until the real-surface repro fails again on a main build. My environment never produced the relay eviction pattern the original sweeps had (see Validation), so it can't settle the question. Waiting on it would keep the quest open on a symptom whose cause is already fixed and tested.
Validation
Real surface, main (cc50db3 plus temporary probes in poll_owed and note_late). I ran moq-relay with [cache] headroom = "100%", moq import ts (lite-07, bbb5s_cbr.ts paced at its 400 kbit/s mux rate), and moq export fmp4 --max-delay 500ms. That was 312 runs, 4 to 16 in parallel at load 20 to 24. Results: 0 media skipped upstream warnings, and no late arrival on the opus or video tracks below the key just handed out.
Real surface, 020866c (the build the quest names). 288 runs, including 96 with capacity = "0" on top. Also 0 opus gaps. So my environment never reproduces the out-of-order relay delivery: fix(net): a pool held over capacity by its live edges still serves them #9422's sweeps saw 3 to 14 opus gaps per run, and I saw none on either build. These runs neither confirm nor refute the cause above.
Debt shedding (a key-order reader giving up a group still in flight under pool debt): ✅ no follow-up quest (rejected: add one so the owed wait survives debt). fix(net): a pool held over capacity by its live edges still serves them #9422 decided this on purpose: at capacity 0 no hold fits, client pools are unbounded by default, and a relay's publishers read in arrival order.
Follow-ups
None.
Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS, arm B)
Risk: low, The change only deletes one quest plan file (quest/m1/ordered-late-arrival-old.md), which no consumer, peer, or build reads, and a revert restores it fully; the risk file lists quest plans as low.
Classified: low by Claude Code, claude-haiku-5-5, low effort, session 2f633154-1ad2-4d0d-ab43-7508aff3a2fb
Local review: none, since a low-risk head needs only the online reviewer
The recorded Old gaps came from builds of #9422's branch before it merged
main, so they lacked #9426, which fixed an ordered read handing out a group
while a lower one landed between its walk and its owed check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
changed the title
A key-order reader passes a group that arrived late but within its budget
chore(quest): finish ordered-late-arrival-old, fixed by #9426
Nov 24, 2026
Applied #9544 (comment) on head 1e6c7ef: the head deletes quest/m1/ordered-late-arrival-old.md (no remaining links; quest check passes) and adds no follow-up quest for losses under cache memory pressure. Both are recorded under ## Decisions in the PR body, and ## Waiting is removed.
No actionable comments were generated in the recent review.
Walkthrough
The pull request deletes the quest note about late-arriving groups in track::Ordered. The note described relay-repro observations and planned investigation and testing.
Merge Risk: Minimal · up to 1e6c7
This change removes a tracking note and does not alter runtime behavior, so it carries essentially no merge risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title says the PR finishes the ordered-late-arrival-old quest and cites #9426 as the fix. The change deletes quest/m1/ordered-late-arrival-old.md (26 lines), which matches that claim. The title is…
Description check
The description states that the PR deletes the quest file because the fix landed in #9426. It explains the problem, the approach, validation, and the maintainer decisions. All of this relat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title says the PR finishes the ordered-late-arrival-old quest and cites #9426 as the fix. The change deletes quest/m1/ordered-late-arrival-old.md (26 lines), which matches that claim. The title is short and specific, but the 'chore(quest):' prefix and the reference to another PR add some noise. It still conveys the primary change.
Full details: Description check
Explanation
The description states that the PR deletes the quest file because the fix landed in #9426. It explains the problem, the approach, validation, and the maintainer decisions. All of this relates to the single deleted file in the changeset.
Finishing Touches
Simplify code
Commit to this branch
Create a new PR
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 1b13ce8d-b1b7-43a3-b79b-df9381143779
Commits
Reviewing files that changed from the base of the PR and between 9b6183c and 1e6c7ef.
Files selected for processing: 1
quest/m1/ordered-late-arrival-old.md
Files with no reviewable changes: 1
quest/m1/ordered-late-arrival-old.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes quest/m1/ordered-late-arrival-old.md by deleting it. The fix already landed in moq-dev/moq#9426. The maintainer chose to delete it (see Decisions).
Problem
The quest records a key-order reader (
track::Ordered) behindmoq export fmp4reporting a group as anOldgap. The group landed 11 ms after a newer one, well inside the 500 ms budget. That happened in 2 of 40 runs, and once more in 80 runs at 020866c, all on moq-dev/moq#9422's branch.Approach
Each observation ran a build of #9422's branch from before it first merged
main(1e9a0c3, 2026-11-23 18:06 UTC). 020866c is one of those commits. None of those builds had #9426 (32e5738), which fixed this symptom: "a key-order reader could hand out a group, then report a lower group that the feed did deliver as a gapOld". It had two causes:Cursor::poll_owedtaking the lock.owedthen counted the lower group as accounted for, so the newer group went out first.The quest's pattern matches cause 2: a lower group landing just after a newer one on a loaded host (load 12 to 30), and reported
Oldat once. #9426 makespoll_owedwalk again when a group was cached after the walk began. A front's key-order reader reads its copies through the sameCursor::poll_next_with, so the fix covers the export's path. JS reads on one thread, so it has no such race, and #9426 already mirrored cause 1 there.I found no other path on
mainthat passes a group still owed within the budget, with one exception that #9422 decided on purpose (see Decisions).Impact
None. This only deletes a quest file. No public API, wire, or behavior change.
Alternatives
mainbuild. My environment never produced the relay eviction pattern the original sweeps had (see Validation), so it can't settle the question. Waiting on it would keep the quest open on a symptom whose cause is already fixed and tested.Validation
main(cc50db3 plus temporary probes inpoll_owedandnote_late). I ranmoq-relaywith[cache] headroom = "100%",moq import ts(lite-07,bbb5s_cbr.tspaced at its 400 kbit/s mux rate), andmoq export fmp4 --max-delay 500ms. That was 312 runs, 4 to 16 in parallel at load 20 to 24. Results: 0media skipped upstreamwarnings, and no late arrival on the opus or video tracks below the key just handed out.capacity = "0"on top. Also 0 opus gaps. So my environment never reproduces the out-of-order relay delivery: fix(net): a pool held over capacity by its live edges still serves them #9422's sweeps saw 3 to 14 opus gaps per run, and I saw none on either build. These runs neither confirm nor refute the cause above.a_group_landing_behind_the_walk_is_walked_again(which lands groups between the walk and the owed check through thetest::before_owedhook),an_ordered_read_waits_on_a_pending_start,an_ordered_read_of_a_received_copy_waits_below_a_later_group, and resume'sa_key_order_read_holding_a_copy_wakes_when_the_owed_group_lands. fix(net): an ordered read hands out no group before one below it that may still come #9426's own validation shows the race test failing without the fix.quest check --base origin/main: 510 documents ok.Decisions
Settled by the maintainer in #9544 (comment):
mainbuild first"). Every recorded failure predates fix(net): an ordered read hands out no group before one below it that may still come #9426, which fixed both known causes with deterministic tests.Follow-ups
None.
Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS, arm B)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.The change only deletes one quest plan file (quest/m1/ordered-late-arrival-old.md), which no consumer, peer, or build reads, and a revert restores it fully; the risk file lists quest plans as low.2f633154-1ad2-4d0d-ab43-7508aff3a2fb