Skip to content

feat(id-store): per-scope location index from signed sidecars + tombstones (A9115, #10255) - #12925

Merged
dezren39 merged 1 commit into
mainfrom
lane-ev/10255-location-index
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-ev/10255-location-index

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Slice A9115-complete-harvest for #10255 (design A-9115.2, S3.26–S3.38). Native blockers #9083, #10160, #10200, #10242 all closed — preflight recorded on the issue.

What lands (2 new files, +0/-0 elsewhere):

  • pkgs/id/crates/id-store/src/location_index.rs — LocationIndex: a rebuildable per-scope (namespace + tenant) projection folded from validated complete signed sidecars (sidecar_snapshot, Encode complete signed metadata snapshot records #10242) and signed stale/delete tombstones (LocationTombstoneV1, defined here in the A9114 envelope discipline: canonical body + detached Ed25519 over the domain-framed preimage; tombstone ID = envelope ID of the complete signed record).
    • Harvest: every visible assertion in a complete sidecar's view (locations key) is inserted — no opt-in omission (S3.29). Assertions re-commit namespace/tenant/signer and must equal the signed body's. Locators are TypedLocator (Define typed R2, laptop and Drive location values #10200) in canonical tagged form. stored_unverified assertions harvest as unverified, never as proof of content (A-9115.1); others as fresh.
    • Tombstone discipline (S3.38, designed here): absence in a later complete snapshot erases nothing; only a signed tombstone moves a location to stale/deleted; delete wins over stale (a stale after a delete is absorbed); a later assertion revives.
    • Ordering/cursor: snapshot at generation g orders (g,0,0); a tombstone issued against g orders (g,1,seq). Incremental folds enforce the order (typed generation_mismatch/parent_mismatch/basis_ahead/out_of_order); ScopeCursor exposes the scope epoch. rebuild sorts any arrival order into the same fold (S3.27/S3.28). Canonical-CBOR persistence with provenance intact.
    • No crate-root/manifest changes: the export line belongs to 9110-02, so the test includes the module by path, per the sidecar_snapshot pattern.
  • pkgs/id/crates/id-store/tests/location_index_model.rs — the declared oracle as an independent reference-model fold.

Verification (laptop, nix develop in pkgs/id): cargo test -p id-store --test location_index_model → 7 passed / 0 failed, run twice (before and after rustfmt; both new files fmt-clean — pre-existing fmt drift in sibling files untouched). Includes 3 seeds × 140 generated operations compared against the model after every event, rebuild-from-shuffled equality, byte-exact persistence round-trip, and the rejection-class table.

Refs #10255 (closes on merge via the issue's done record).


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

…tones (A9115-complete-harvest, #10255)

New location_index module: a rebuildable per-scope projection folded
from validated complete signed sidecars (A9114) and signed stale/delete
tombstones defined here, in the A9114 envelope discipline. Every visible
assertion in a complete sidecar view is harvested (typed R2/Laptop/Drive
locators from #10200); absence never erases — only a signed tombstone
transitions fresh/unverified to stale/deleted, delete wins over stale,
and a later assertion revives. Events fold in a total order (snapshot
generation, then tombstone basis+sequence); the ScopeCursor is the
scope epoch, and rebuild from any arrival order equals the incremental
fold. Crate-root export stays with 9110-02; the model test includes the
module by path, per the sibling pattern.

Oracle: cargo test -p id-store --test location_index_model — 7 passed,
0 failed (3 seeds x 140 generated ops vs an independent reference
model, rebuild-from-shuffled equality, byte-exact persistence
round-trip, rejection classes).
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 05:11
@dezren39
dezren39 merged commit 39bc396 into main Nov 23, 2026
1 check passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T05:12:58.378736Z a5734a4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 deleted the lane-ev/10255-location-index branch November 23, 2026 05:11
@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 19 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: 906e4785-1bf6-45f7-97ff-67544bafecdc
Commits

Reviewing files that changed from the base of the PR and between 73bb06e and a5734a4.

Files selected for processing: 2

  • pkgs/id/crates/id-store/src/location_index.rs
  • pkgs/id/crates/id-store/tests/location_index_model.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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant