Repository navigation
fix(net): a redialed lite-07 session syncs once the doubt lets its routes in - #8890
Conversation
…utes in Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_off Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This review covers the whole PR: lite-07 now keeps its announce snapshot past SYNCED until no route from the peer is kept out only by doubt.
Router::doubted/kept_off: The newkept_offpredicate ishopes's old closure, unchanged.doubted(peer)applies it to every key the peer sent that has no live route.Stream::poll_undoubted: This rechecks wheneverpoll_deadlinereports that the deadline changed. It cannot spin:Locked'sDroprepublishestimerfromrouter.deadline()on every unlock, so thearmedvalue read under the lock always matches the published timer.- Snapshot release in
AnnouncePrefix: SYNCED no longer drops the snapshot. The end of theRunarm drops it oncepoll_undoubtedis ready, afteroutputs()has served what the node queued. The release only happens insiderun.routed, buthas_routes()andhas_synced()cover the same versions, so versions before lite-07 keep their own release points. syncedintegration test: The new redial test now checks sync whenever no event is ready, so a consumer that syncs early is caught.SETTLEgoes up to 2s to coverDoubt::DEFAULT.
claude-opus-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughThe router now reports when a peer’s heard route is excluded by doubt. The lite subscriber keeps its snapshot after SYNCED until routed state reports that routes are undoubted. Duplicate SYNCED messages are rejected. The integration test checks that a route synchronizes again after the session is closed and redialed. Merge Risk:
|
Takes in Above (#8827) and the redialed session's doubt-gated sync (#8890) on the single Announce Stream: - A narrowing carries a claim covering the new prefix from above with its Above grown by the segments between (`lite::rekey::Claim::lowered`, rekey.ts), on both ends, and the draft's Edits section says so. - The lite-07 subscriber releases its synced snapshot only once nothing the peer offers waits on doubt (`Routed::release` polls `Stream::poll_undoubted`). - `a_claim_above_its_path_counts_from_the_sessions_root` runs on the route stream harness (`prefix_on`) rather than the pre-lite-07 announce prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Problem
Routes::poll_syncedpromises that once synced, a prefix not announced is not announced. On moq-lite-07 that broke for a redialed session. When a session closes, the node doubts its far end for a second, and a session to that node opened since the doubt began waits it out before the node takes a route that begins there (moq-dev/moq#8731). The announce stream let go of its snapshot at SYNCED regardless, so a consumer reading a redialed peer read synced at once with none of that peer's routes, and only saw them a second later.Approach
route::path::Router::doubted(peer): whether the peer offers a route that only doubt keeps the node off, for a key with no live route. It shareshopes's predicate, nowkept_off.route::node::Stream::poll_undoubted: ready once the stream's peer offers no such route. It rechecks whenever the node's next deadline moves, which a lifting doubt does, so it needs no polling.poll_undoubtedis ready, with what the node served meanwhile already in the origin. A route that only doubt holds back thus keeps the consumer unsynced until the doubt lifts and the route shows.Impact
poll_synced's doc now says a lite-07 redial waits out the doubt.Doubt::DEFAULT), with that peer's routes shown. js/net casts no doubt, so it has nothing to mirror.Validation
synced::a_redial_syncs_once_the_doubt_lets_its_routes_in: onmainit fails withleft: {}/right: {"a"}; with the fix it passes.read_until_syncednow checks sync whenever no event is ready, since it used to block on the next event and so could not catch a consumer that synced early.just ci: 12805 tests pass.verify-route's coverage row nameskept_off.Flap.cfg(doubt and a returning link) simulates clean: 1000 traces, 600305 states.poll_syncedbefore vouching for its list failed its redial test onmain(it read whole with an empty list) and passes with this change on the same base.Caused by
Alternatives
a_flapping_link_keeps_a_dual_homed_publisher_routed).Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 2997f68
Base: origin/main at 1099279
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:
01a1e361-187e-7d03-af64-ad5b14d7f42e, round 1Score: 9/10,
No actionable defects were found: snapshot release follows doubt resolution and drains resulting outputs before reporting synced, but validation was source-only with no builds or tests run.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none