Repository navigation
id-sync: B15 prioritized remote selection - #11963
Merged
Merged
Conversation
Adds the B15 slice: a plan that orders configured remotes by priority then list position, gated by the B31 peer-class policy (query only fully_trusted and accept_signed_from peers in force and not disabled), with opt-in routing advice that only moves down peers to the end. A search state machine asks the local store first, then one remote at a time, deduplicates result ids, and stops at the limit, the deadline or the end of the list. A remote's "not found" is recorded against that peer only; the outcome never claims global absence. Refs #10229 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 56 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. |
Codex Review Summary: ✅ CompletedThis 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: there was no code for choosing which remotes a federated query asks, in what order, or what a remote's "not found" means. Statements S1.47-S1.53 and fan-out design section 3 described it only in prose.
After: the B15 slice turns the configured remote list into a deterministic order and runs the search. Local goes first. Remotes go by priority, then list position. Only peers whose B31 policy is in force and allows querying are asked. Routing advice can push down peers to the end only when the operator passes it. A remote's "not found" means absent at that peer, never globally.
How:
plan()gates each entry (no policy, policy not in force, class forbids query, disabled, duplicate) and does a stable sort on (reported down, priority, position).Searchenforces local-first, one remote in flight, each peer answering once, result-id dedup towards the limit, and stop on limit, deadline or exhaustion. A remote still in flight at the deadline counts as failed.Outcomenames absent_at, failed_at, pending and not_asked peers. The integration test checks the slice against an independent reference model for ordering, skip reasons and search outcomes (proptest, 512 cases each), plus a permutation property for distinct priorities. 21 of 22 mutants are killed; the survivor drops the explicit position tiebreak, which the stable sort already gives.Refs #10229
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.