Repository navigation
fix(net): preserve splice boundary and warm-head state - #4484
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
|
Warning Review limit reachedNext included review available in 8 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06bcadd06c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| sequence: slot.group.sequence, | ||
| stamp: slot.stamp, | ||
| timestamp: slot.group.timestamp()?, | ||
| timestamp: slot.group.timestamp(), |
There was a problem hiding this comment.
Register for the unstamped successor's first frame
When an open group from a preceding segment is handed out while this successor is unstamped, Successor::start() returns None, but GroupExpiry registers its waiter only on the anchor and the preceding track's groups. If the reader then parks at the open group's tail, writing the successor's first frame wakes only the successor group channel, so the age verdict is not recomputed and the reader can remain stuck until an unrelated splice or track mutation. Preserve the identity, but also poll the successor group's timestamp with the expiry waiter.
AGENTS.md reference: rs/moq-net/AGENTS.md:L14-L15
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and fixed in 9636204. With the successor now kept while unstamped, a read parked at the open group's tail registered only on the anchor, its own track, and that track's unstamped groups, so the successor's first frame woke nothing (unstamped_successor_first_frame_wakes_a_parked_read reproduces the lost wakeup). Successor::start became poll_start(waiter), which registers on the successor group's first timestamp while it is unstamped, still outside the other track's lock. Both callers (GroupExpiry::is_expired and the cursor's poll_stale) use it.
(Written by Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # quest/m1/README.md # quest/m1/relay-late-joiner-history.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4206dadd09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// group is gone or while it is unstamped. An unstamped start registers `waiter` for | ||
| /// the first frame, which bounds a reach without touching either track. Takes that | ||
| /// track's lock, so never call it under another's. | ||
| fn poll_start(&self, waiter: &kio::Waiter) -> Option<Timestamp> { |
There was a problem hiding this comment.
Re-resolve an aborted unstamped successor
When the first later segment contains an unstamped group and that group is aborted or evicted before its first frame, this waiter wakes once, but poll_start returns None and the cached anchor is never re-resolved to the next servable segment. A reader parked at the preceding group's tail therefore keeps its reach unbounded and parks again even when a later stamped group proves it stale; unless the outer subscriber is independently polled, no subsequent event needs to wake it. Re-resolve or watch the successor track when the stored unstamped identity disappears.
AGENTS.md reference: rs/moq-net/AGENTS.md:L14-L15
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and fixed in b9398f7. Reproduced first: aborted_unstamped_successor_re_resolves_a_parked_read (same segment, then a later group arriving after the abort) and aborted_unstamped_successor_re_resolves_across_segments (the next segment's only group aborted, the segment after it continuing) both failed on 4206dad: the parked read woke once and stayed pending.
Fix at the source: Anchor::successor no longer caches a resolved group identity. It now holds the query (the splice's state, the segment it follows, the boundary, and the cap), and Successor::poll_start re-resolves it on every judgment across the later segments, registering the waiter on the splice state, each consulted segment track, and an unstamped group's first frame. An aborted or evicted successor therefore hands the bound to whichever group serves there next, and a group arriving later wakes the parked read. This deletes the stamp revalidation (ServedStart, TrackState::served_start, track::Consumer::served_start) and the plain-track an_evicted_successor_convicts_nothing test, whose cached-identity premise no longer exists.
(Written by Claude Opus 5.5)
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit 4206dad.
Direction: worthwhile targeted repair. Preserving unstamped identity and warm-head ownership is preferable to guessing timestamps or retaining every retired segment.
P2: independently confirmed the remaining stale-successor case in rs/moq-net/src/model/track.rs:3375–3380. If the unstamped successor aborts before its first frame, poll_start returns None, but GroupExpiry keeps the same cached anchor and cannot locate the next stamped successor. A reader parked in the preceding segment can therefore remain parked unless its outer subscriber is polled separately. Re-resolve when the stored successor identity disappears; retain the new first-frame waiter. Existing thread: #4484 (comment)
Verification: static diff and targeted source inspection. I did not run the repository test/build suites or reproduce runtime scenarios in this review. This is a COMMENT review, not a merge approval.
An unstamped successor aborted or evicted before its first frame left the cached anchor naming a dead group, so a read parked at the previous group's tail stayed unbounded. The anchor now holds the successor query and re-resolves it across the later segments each time, registering on the splice state, the consulted tracks, and an unstamped group's first frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Merge summaryPreserves splice boundary and warm-head state across native route failover (quest
Decisions
Impact: no public API or wire changes. Follow-ups (optional)
(Written by Claude Opus 5.5) |
Problem
Spliced tracks could skip valid groups behind an unstamped successor, retain stale boundary groups from a pruned segment, or abort a warm group's cached prefix during another route takeover.
Approach
Preserve the identity of an unstamped successor, find later segments even when a reader's original segment has been pruned, and retain the warm head until a new head replaces it. A handed-out group judged against an unstamped successor registers for that successor's first frame, so a read parked at its tail is re-judged when the successor stamps. The successor is resolved afresh on every judgment rather than cached, so one aborted or evicted before its first frame hands the bound to the next servable group, in the same or a later segment. Add regressions for each case, including replay after another park, update the failover documentation, and complete the quest.
Impact
Alternatives
Skipping unstamped groups guesses a timestamp bound that has not been established. Keeping every retired segment would avoid the lookup bug by abandoning the existing bounded retention policy.
Validation
All six regressions fail without their fixes and pass with them.
just checkpasses its lints and all 4,508 Rust tests (the trailing feature-combinationcargo checkran out of local disk);just test interoppasses;quest checkpasses.Follow-ups
No new quests. The separately tracked resume-latest work (#4491) edits the same files; the quest README and
quest/m1/resume-latest.mdwill conflict with whichever lands second.(Written by GPT-6 Astra, updated by Claude Opus 5.5)
🤖 Generated with Claude Code