Repository navigation
fix(net): retain resume bounds across route copies - #6224
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Remember the first declared end and reject contradictory copies, reuse retained subscriptions when routes return, and restrict pending-copy retention to the reader window. Mirror returning-route reuse in JS, with mocked-clock regressions and fanout benchmark coverage. Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Place the flap sweep before replay benchmarks so the datagram history benchmark can append without a content conflict. Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Implemented the settled declared-end, flapping-route, and sparse-window fixes, including the JS returning-route regression and benchmark sweeps. No new API or wire choice remains. Source/test changes compose with moq-dev/moq#6209 and moq-dev/moq#6136; route-failure policy stays with moq-dev/moq#6102. Keep this PR draft. (Written by GPT-6) |
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 19 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. 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: 44d9b09407
ℹ️ 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".
A reused copy kept the floor and datagram watermark from its first subscription, so groups and datagrams it buffered while replaced, below what another route already handed out, were handed out again. Raise both to where a fresh copy would start, in Rust and JS, with regressions that fail without each half. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80eea6b9a1
ℹ️ 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".
…ross a flap back A group or datagram at or past the declared end, handed out or on any copy, now refuses the resumed track, matching the JS reader in #6136. Two tests that finished a replaced copy while another route continued now end it without declaring an end. An in-flight group's recovery treats a route that returned to the copy it reads as no change, adopting the new generation, so an unpolled flap back neither refuses a sparse group nor fetches a dense one from itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a88470739
ℹ️ 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".
A mid-group end now caps the group it falls in when another copy hands that group out, and a datagram at or past the end by object refuses the track, so a resumed reader never hands out frames its declared end says do not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adopt identity datagram dedup from #6209: a reused copy no longer takes a datagram watermark, and the declared-end check reads the newest datagram handed out from the identity set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e22ac137f6
ℹ️ 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".
A mid-group end learned after delivery now refuses the resumed track when any copy holds a frame at or past it in that group, or the reader handed out a datagram at or past it by object. The hand-out cap stays for frames that arrive after a group is handed out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 398118c7a0
ℹ️ 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".
A late declared end compares against the highest datagram ever handed out, as JS's #newestDatagram does, rather than the budgeted identity set that forgets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b654f22d6
ℹ️ 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".
Problem
A Rust logical-track reader could forget a declared end after changing routes, retain another subscription on every flap between the same routes, and retain replaced copies for gaps outside its requested window.
Approach
Remember the first declared end across copies, allow the existing JS-compatible group-boundary refinement, and refuse contradictory ends, including a group or datagram at or past the end on any copy (as JS does since moq-dev/moq#6136); a mid-group end caps the group it falls in on every copy, and one learned late is refused below a frame or datagram already seen. The newest datagram handed out is kept past the dedup budget, mirroring JS's
#newestDatagram. Reuse a returning route's retained subscription and leases, resetting its replacement bound and raising its floor to the reader's newest group, as a fresh copy would start. An in-flight group's recovery treats a flap back to the copy it reads as no route change. Intersect pending-group retention with the reader's sparse window. Mirror returning-route reuse in JS.Add mocked-clock regressions that reproduce each Rust gap and the JS lease duplication, plus reader/route and reader/flap benchmark sweeps. Delete the completed quest and its links.
Decisions
#newestDatagram, so Rust matches.Impact
ProtocolViolation; both readers bound repeated flaps by distinct retained routes.Alternatives
Keeping a fresh subscription per flap loses shared leases and grows with flap count. Remembering only the serving copy's end loses a publisher declaration. Retaining the entire convex range holds copies for groups the sparse reader never requested.
Validation
a_returning_route_resumes_at_the_readers_newest(and its JS mirror),an_unpolled_flap_back_keeps_reading_a_sparse_group,content_past_the_declared_end_refuses_the_track,an_end_below_a_seen_group_refuses_the_track,a_mid_group_end_caps_another_copys_group,a_late_mid_group_end_below_a_seen_object_refuses_the_track,an_end_below_an_expired_datagram_refuses_the_track. Two older tests that finished a replaced copy while another route continued now end it without declaring an end.main:Recover::wantskeeps the delivery classification from moq-dev/moq#6251 and adds the returning-route check; moq-dev/moq#6136's JS declared end merged cleanly with the JS route reuse. Earlier merges took in moq-dev/moq#6223, moq-dev/moq#6206 and moq-dev/moq#6209.moq-netcargo test3,048 passed, 13 ignored; fulljs/net2,655 passed.just checkpassed its JS, Rust lint, and quest steps; only its flake step fails locally building the unchanged GitHub runner image (unshare: write failed /proc/self/uid_map), an environment limit.Follow-ups
(Written by GPT-6, updated by Claude Opus 5.5)