Repository navigation
feat(id): paginated visible link queries with a two-store derived-visibility fixture (#13583) - #13781
Merged
Merged
Conversation
…ibility fixture (#13583) Adds links_from_visible_page / backlinks_to_visible_page to LinkProjection: a reader walks visible adjacency one page at a time, and the cursor is resolved inside the already-filtered visible list, so a hidden neighbour can never change a page, its count, or its next-page flag. The deterministic two-store fixture builds two stores differing only by a hidden neighbour and asserts authorized adjacency, counts, and every page agree, while the full-trust view still shows the hidden edge. No timing claim.
|
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 21 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. |
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.
Summary
Slice 1 of #13583 (derived-visibility oracle; design proposal in open PR #13582,
doc/2026-11-23T14-05-00Z_design_id_derived_visibility/). Adds paginated visible-adjacency queries to the existing link projection and a deterministic two-store fixture for the graph-query surface:LinkProjection::links_from_visible_page/backlinks_to_visible_page(pkgs/id/crates/id-store/src/note_links.rs): walk visible adjacency one page at a time. The cursor (the link ID that ended the previous page) is resolved inside the already-filtered visible list, never in the full edge set, so a hidden neighbour can never change a page's contents, its count, or its next-page flag. An unknown cursor yields an empty page withhas_next: falsein every store.test_two_stores_agree_on_visible_adjacency_count_and_pagination: store A holds A, B, C and edges A->B, A->C; store B adds hidden neighbour H plus A->H and H->B. For reader {A, B, C} every declared graph-query observable agrees — authorized adjacency, counts, and every page plus its next-page flag — a cursor naming a hidden edge steers neither store, and the full-trust view of store B still shows H and its edges. A limit-0 edge-case test covers the empty-page / has-next reporting.No new view machinery, no change to the #11185 presets, no timing or physical-erasure claim.
Evidence
cd pkgs/id && CARGO_TARGET_DIR=/tmp/id-target cargo test -p id-store --lib note_linkson the pushed branch via thefleet-command.ymlworkflow fallback (fleet queue dispatch is blocked by TLS defect #13185):cargo testfrom the repo root, whereid-storeis not a workspace member (error: package ID specification 'id-store' did not match any packages); run 45263373280 hit a corrupt shared cargo cache (ring v0.17.14build-script binary missing from/.fleet/cache/cargo-target). The green run used a fresh target dir per the fleet-build runner form.Merge Danger
Low. Additive API on
LinkProjectionplus in-module tests; no existing callers change, no behaviour change for unpaginated queries. Revert-safe: deleting the new methods and tests restores the prior file.Refs #13583. Design: #13582 (open).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.