Skip to content

feat(id): paginated visible link queries with a two-store derived-visibility fixture (#13583) - #13781

Merged
dezren39 merged 1 commit into
mainfrom
xaltha/13583-derived-visibility
Nov 24, 2026
Merged

dezren39 merged 1 commit into
mainfrom
xaltha/13583-derived-visibility

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

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 with has_next: false in 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_links on the pushed branch via the fleet-command.yml workflow fallback (fleet queue dispatch is blocked by TLS defect #13185):

  • Run: https://github.com/developing-today/fleet/actions/runs/45265132247 — success, 15 passed, 0 failed (13 pre-existing note_links tests + the 2 new ones above).
  • The two earlier dispatch attempts failed for reasons unrelated to this change: run 45263202305 ran cargo test from the repo root, where id-store is 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.14 build-script binary missing from /.fleet/cache/cargo-target). The green run used a fresh target dir per the fleet-build runner form.
  • rustfmt was checked on the touched file with the seat toolchain: the only remaining diffs are three pre-existing ones that also exist on origin/main (the seat rustfmt is newer than the pinned 1.99.1 toolchain). Clippy and the full id-store suite were not run here; PR CI is the first clippy pass.

Merge Danger

Low. Additive API on LinkProjection plus 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).


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…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.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f6c0645-eb14-49e9-aca8-7a42f7327e4f
Commits

Reviewing files that changed from the base of the PR and between 57597b8 and 98b84c4.

Files selected for processing: 1

  • pkgs/id/crates/id-store/src/note_links.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@dezren39
dezren39 merged commit 3702583 into main Nov 24, 2026
2 checks passed
@dezren39
dezren39 deleted the xaltha/13583-derived-visibility branch November 24, 2026 00:14
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant