Repository navigation
Conversation
…te, not a restart to the same instance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 4 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.
Approach: sound. The fix records the instance the consumer last got in delivered. A restart that returns to that instance before the next poll then becomes an Update, so the consumer no longer gets a Restart naming the instance it already holds. This fixes the coalescer where the bug lives, and costs one Instance per delivered prefix.
Reviewed changes
This run reviewed the single-file change to the origin consumer's coalescing state and its regression test.
deliveredtracks the instance:BTreeSet<Path>becomesBTreeMap<Path, Instance>.take_updatestoresmeta.0.3when it delivers anAnnounceorRestart, and every membership check moves tocontains_key.apply_restartback to the held instance: the new arm sits after theUnannounce/UnannounceAnnouncearm, so a pending retraction still wins. Otherwise it queuesPendingUpdate::Announce, which goes out asRouteKind::Updateunder the normal update hold.- Consistent identity: the origin table only calls
apply_restartwhenprevious.instance != entry.instance, so it decides restarts by instance alone. Comparing only the instance (not the epoch) indeliveredmatches that.owe()treats a pendingAnnounceon a delivered prefix as not owed, the same as theRestartit replaces, so sync accounting doesn't change. - Regression test:
restart_away_and_back_is_an_updatesends a flip to a cheaper instance and back before a poll, then checks that the next event is anUpdatenaming the held instance.
The JS Announce.Producer appends events without coalescing them, so js/net doesn't have this bug and needs no counterpart change.
claude-opus-5-5 | 𝕏

Problem
Nightly
route-sweepandbenchmark_route_meshfail withRESTART to the same instance: a route cursor deliveredRestart(C)twice in a row.The winner at a relay went C -> B -> C before the consumer polled. B is the superseded instance of a restarted publisher, briefly back through a stale path. The first flip queued
Restart(B). The flip back kept the pending entry aRestart, now naming C, which the consumer already held.RouteKind::Restartmeans another instance, so a consumer keyed on it tears down and rebuilds a stream that never changed.Approach
The consumer state's
deliveredset becomes a map from prefix to the instance last delivered there.apply_restartonto that instance queues anAnnounce, which is delivered as anUpdate(held like any metadata change), whatever was pending.Impact
Updateinstead of aRestartto the instance it already holds.Validation
restart_away_and_back_is_an_update: fails onmainwith the duplicateRestart, passes with the fix.MOQ_ROUTE_SEED=255657690 MOQ_ROUTE_CASE=41(the nightly failure) replays green; full 500-case sweeps with seeds 255657690 and 7 pass.benchmark_route_mesh(fixed seeds) fails at61f8956839and passes at its parent and with this fix.just cipasses. One earlier run hitmoq-gst a_protocol_violation_redials_after_playback("sink dropped 2 as late"). That test passes 3/3 when run alone and in a full rerun, so it is a load-sensitive flake that this change doesn't touch.Caused by
benchmark_route_meshandroute-sweep). The coalescing gap itself is as old as pending-Restartcoalescing inOriginConsumerState::apply_restart.Alternatives
Update. That costs a second copy of every delivered route's metadata to save a rare message.Follow-ups
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 reviewafter each round.Head: 46c9a33
Base: origin/main at ee08224
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:
01a1f054-de5d-7942-95a5-cb68cb5b8ea9, round 1Score: 9/10,
The coalescer correctly handles returning to the last delivered instance while preserving explicit retractions, with regression coverage and no actionable defects found by source review; tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none