Repository navigation
fix(net): a held or kept route stream resumes with what it missed - #8860
Conversation
A stream that is held or kept is sent no batches, so the claims it was last sent can fall behind its view. An edit that moves such a stream onto another route resumes it with no dirty region, and the incremental batch missed withdrawals made meanwhile. Holding or keeping a stream now clears its presented-from prefix, so its next batch diffs against all it holds, and the per-region patch for held streams goes. 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 15 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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the single commit that fixes the nightly route-sweep failure in rs/moq-net/src/route/path.rs: a route stream that was sent nothing is now diffed whole when it resumes.
Sent::behind: a new helper clearsSentOffer::from. This is the same signalCarried::viewalready uses after a rekey, and it makespresenttake thefreshfull-diff path on the next batch.Sent::holdmarks behind: every hold now clearsfrom. That coversadvertise'sWant::Holdand both hold sites in the dead-hopreportpath.Want::Keepinadvertise: this arm used to do nothing. It now marks the sent entry behind, so a kept stream that resumes on another route can't keep a claim that was withdrawn while it was kept.- Region patch removed from
present: the code that merged the old sent view's claims under each dirty region is gone. Held and kept streams now take the full-diff path, so the patch has nothing left to cover.meet,belowanddirty.regionsare still used byexpand_dirty,streamandrun.
I traced the change against stream, expand_dirty and the dead-hop Want::Keep path that doesn't call hold(). That path sends no batches, and the next advertise visit marks the stream behind, so I found no case where a stream misses batches and still keeps from. The #[cfg(test)] assertion at the end of present compares every incremental batch with the full presentation, so the 20,000-scenario sweeps the author ran check the fix differentially. from is local to the sender and isn't part of the TLA Mirrored state, so the models don't need to change.
claude-opus-5-5 | 𝕏
…-resume # Conflicts: # rs/moq-net/src/route/path.rs
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: c69c2127fe74b4cafebda1d3a37ee3201f625e30
No actionable defect found in the changed code. I traced Sent::hold, Want::Keep, and present: clearing SentOffer::from forces a full presentation diff after either path skips batches, including a resume with no dirty region. Updating the marker after a sent batch restores incremental operation. That addresses missed withdrawals without retaining the old region-specific workaround.
Limits: static review of the GitHub diff and relevant surrounding source only. I did not build, run tests, replay the model sweeps, or run performance/TSan checks. This is a COMMENT review, not an approval.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The only change since the last Pullfrog review is the merge from main. I checked how the conflict in present was resolved.
- Merge conflict in
present: the incremental branch now usesmain's ownedOption<A>values (view.items.get(claim).cloned()). The held-stream region patch stays removed, soSent::behindis still the only path that resyncs a held or kept stream.meetandbeloware still called by the scope,streamandexpand_dirtypaths, so the merge leaves no dead helpers.
claude-opus-5-5 | 𝕏

OPEN
Problem
Nightly's
Tests (test route-sweep)fails onmain(run):route::tests::scope::sweep_scoped_meshes_show_what_the_rule_says(scenario 5413 ofMOQ_ROUTE_SCENARIOS=20000, step 82) panics on the router's own check that an incremental batch equals the whole presentation:A route stream that is held (or kept) is sent no batches, so what it was last sent falls behind its view: here
a/xwas withdrawn while relay 1's stream(7, "a")to relay 0 was held. Relay 0 then edited its interest from""toa, which moved the held stream onto the live""route. No route changed, so the update had no dirty region, and the incremental batch, built from dirty claims alone, never withdrewa/x. Relay 0 would keep showing a withdrawn claim.Approach
A stream that is sent nothing loses its presented-from prefix (
SentOffer::from = None, the mechanism a rekeyed stream already uses), so its next batch diffs against everything it holds.Sent::holdand aWant::Keepvisit both mark it (Sent::behind).That makes the per-region patch in
present("A held stream may have missed withdrawals ... include its own previous claims") redundant, so it goes: every route and lite test, including all route sweeps at 20,000 scenarios, passes without it once kept streams are marked too. (Without theKeepmarking, dropping the patch failssweep_handoff, so the patch was covering the same root cause for kept streams.)Impact
Validation
MOQ_ROUTE_SCENARIOS=20000on the scoped sweep fails at the same assertion and claims; traced it to scenario 5413 step 82 (relay 1 handling relay 0'sEdit { remove: [""], add: ["a"] }with the held stream).route::andlite::tests (375) pass atMOQ_ROUTE_SCENARIOS=20000in release with debug assertions;just test route-sweepwith the failing run'sMOQ_ROUTE_SEED=1225026421passes every stage (mesh sweep, the four handoff and scoped sweeps, the 7 delivery-order searches, the long cache sweep).#[cfg(test)]assertion inpresentcompares every incremental batch to the full presentation on every update of every sweep, so the sweeps check the fix differentially.just checkpasses.main(through moq-dev/moq#8881, moq-dev/moq#8890, moq-dev/moq#8827):just test route-sweepwithMOQ_ROUTE_SEED=1225026421passes every stage again,route::andlite::tests (383) pass atMOQ_ROUTE_SCENARIOS=20000in release with debug assertions, andjust checkpasses. The TLA+ route model (verify-route) was not rerun: neither this PR nor the merge changes the route rule, only how an incremental batch is diffed.Decisions
present:mainchanged the incremental batch to carry ownedOption<A>values, and this PR drops the held-stream region patch. ✅ keep the patch removed and takemain's owned values (rejected: keeping the region patch alongsideSent::behind, which the sweeps show redundant). Recorded unattended; a review can undo it.Sent::hold, theWant::Keepvisit, orpresent's incremental diff, so this PR needs no coordination with it.Alternatives
Caused by
rekey(before,peer_interestdropped them all), so a held stream can now resume on another route with no route change, which the region patch did not cover (found by check: Nightly route sweep)Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 376e616
Base: origin/main at 1ca6136
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1e3e7-ab8b-7ee3-b8a9-8dcb2f412d48, round 1Score: 9/10,
Source review found no actionable regressions in reconciling held or kept streams when batching resumes; tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none