Repository navigation
fix(moq-net): mounts respect exclusions, answered edits remove first, withdrawn copies stay withdrawn, live search keeps its cover - #9351
Conversation
Quest-Claim: 8d7c83b872848b34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cover Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 10 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. Each fix sits where the bug is: the scope check in mount, the asking side's edit order, the slot's own lifecycle state, and the shared index's cover check. It doesn't add a new mechanism.
Reviewed changes
I reviewed all six files in the diff against the surrounding code and their callers. I also ran the four new regression tests locally (cargo test --lib --all-features), and all of them pass.
Producer::mounthonours exclusions:targetand the excluded paths are both rooted withself.root.join, so the overlap check compares paths in the same space.moq-relay'sCluster::publisherapplies grant mounts inmountedbefore it callsexclude(stats_prefix), so relay grants behave as before.Router::recv(Msg::Edited)removes before it adds: this now matchesRouter::editon the answering side, which dropstoldfor each removed prefix and then exports what each added prefix covers. A remove-and-re-add of the same prefix no longer leavesaskedwithout it, and the asking side no longer answers the followingSYNCEDwithUnasked.Slot.stayreplacesleaving: bool:endedcomes from broadcast-wideKind::Endrouter events. Marking every leaving slotendedat the top ofsettletherefore matches the old one-shot verdict, and the flag now also survives aConfirm::Waitingdeferral.relane'sleave(false)keeps it, and the flag resets only when the slot is wanted again.Live::findre-indexes on a cover change between batches: if another search moved the shared index to its own cover, this search re-runscatch_up(which callsrecover). That costs oneCovercomparison per batch, plus the moved runs when two searches with different covers interleave. Both costs stay bounded per batch.
claude-opus-5-5 | 𝕏

Finishes
quest/m1/precut-audit/net-mount-and-routing.md(deleted here): four correctness fixes inrs/moq-netfrom the 2026-11-21 pre-cut audit. Each one has a regression test that fails onmainand passes here.Changes
origin::Producer::mountrespects the handle's exclusions (model/origin.rs).mountchecked only thatallowedcovers the target. So a producer fromexclude(".stats")couldmount("view", ".stats")and read the excluded subtree underview. Now a target at, above, or beneath an excluded subtree returnsError::Unauthorized. That matches the documented contract ("unless this producer reaches all oftarget"), and the doc now says it.Router::recv(Msg::Edited)appliesremovebeforeadd(route/relay.rs). The answering side (Router::edit) already does it in that order. With the old order, an edit that removed and re-added the same prefix dropped the prefix fromaskedon the asking side. The peer'sSYNCEDfor it then failed withError::Unaskedand closed the session.route/node.rs). Here is the failing case: the reader ends a claim and shows it again in one flush, through a session that has yet to confirm.settledeferred the old slot, but the retry passedended = false, so the old copy was unserved asGone::Moved(dropped) instead ofGone::Withdrawn(ended). The slot'sleaving: boolis nowstay: Stay { Wanted, Leaving { ended } }, andendedsticks until the slot is released or wanted again. When the claim is unshown, every slot still gets one verdict for why the reader let go now, so the origin retires the copies together as before.Live::findre-indexes when another search moved its cover between batches (model/track.rs). The index is shared (Arc<Live>) and the lock is released between batches of 16. A search under another cover could re-cover it in that gap, and the first search then walked groups outside its own window. The condition is now!caught_up || indexed.cover != *groups, as the quest planned.Decisions
These are choices I made without the maintainer (the run is unattended). A review can undo any of them:
Unauthorized. The alternative was to translate an exclusion beneath the target into a hole underat. I rejected that because it is the same ruleallowedalready applies (a mount needs all of its target), and it keeps mounts simple. An exclusion added after a mount still names handle-side paths, like a laterscopedoes, so it doesn't hide the target underat. Relay grants mount before excluding the stats prefix, somoq-relaybehaves the same.Lost/Endedfor the current reason, notWithdrawn.Claim::retiredrops every copy of the showing at once, so mixed verdicts would depend on the order they arrive.Validation
model::origin_impl::tests::mount_never_reaches_an_excluded_subtreeroute::relay::tests::a_prefix_asked_again_in_one_edit_is_asked_afresh: onmain,is_syncedreturnsNoneafter the edit and the nextSYNCEDis refused.route::node::tests::a_withdrawn_copy_waiting_on_another_session_still_ends: onmain, the unserve saysgone: Moved.model::track::test::a_search_keeps_its_cover_across_batches: onmain, the search met groups 20..=39 from the other cover.CHECK_MODULES=rs just check(lint, clippy, docs, and the full nextest run over every Rust crate the branch selects, 11115 tests) passes. That run includes the route simulations (multicast, node layer, warmth, mesh fuzz replay) as an independent check that the slot-state change keeps the mesh converging.Public API
None. Wire: none.
mountrefuses one more case, which is documented and could only have been reached through an exclusion.Caused by
Producer::excludewithout makingmountcheck it (found by reviewer, the pre-cut audit)Gone::Withdrawnwithendedpassed per call, so a deferred settle forgot it (found by reviewer, the pre-cut audit)Follow-ups
None.
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm B)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 5deae8a
Base: origin/main at f1b6e06
Risk: high,
The mount change alters a scope authorization boundary and can reject mounts consumers previously used, while routing fixes change delivery behavior; a revert restores the code but cannot undo data already exposed or delivery already affected.Classified: high by Codex, gpt-6.1-sol, low effort, session
01a201e3-e924-7fb1-9daa-4f145a5a2867Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a201e4-04b0-72e2-85ed-d478d40233c4, round 1Score: 9/10,
Source review found no actionable defects and the four focused fixes have targeted regression coverage, but builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none