Skip to content

id-store: complete signed metadata sidecar snapshots (A9114-sidecar-snapshot, #10242) - #12880

Merged
dezren39 merged 1 commit into
mainfrom
lane-da/10242-sidecar-snapshot
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-da/10242-sidecar-snapshot

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Implements slice A9114-sidecar-snapshot for #10242 (parent #9114), per design doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-addressing/versioned-design.md §9114 (A-9114.1–A-9114.3, S3.11–S3.14, S3.18).

Preflight (queue task 17082): native blockers #9083, #10160, #10226 all verified closed/completed fresh on 2026-11-23 before implementing.

Changed files (2, both new, owned by this slice)

  • pkgs/id/crates/id-store/src/sidecar_snapshot.rs — SidecarBodyV1 (subject, namespace, tenant scope consumed from the design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects #9083 contract, generation, parent snapshot, advisory created_at, domain, signer/key/suite, payload profile/id/length) in canonical CBOR with unknown-critical-field rejection and absent-parent omission; SidecarEnvelopeV1 carrying the complete metadata view as payload; SnapshotId = EnvelopeId over the complete signed envelope (never embedded in bytes it hashes — no recursive self-ID); SidecarHeadV1 advancing by CAS on (generation, snapshot_id) with generation +1 exactly, parent = prior head, scope immutable mid-chain; digest-derived storage names (hash.metadata.<digest>, head hash.metadata).
  • pkgs/id/crates/id-store/tests/sidecar_snapshot.rs — model-oracle test: generated operations against a complete-scope reference model (digest derivation via id-core only), comparing every resulting state and error class; fixed tests for genesis shape, stale CAS, scope break, parent break, tamper classes, non-recursion, omitted-parent encoding, file naming.

Crate-root export stays with slice 9110-02 per the issue's ownership split; the test includes the module by path (the #10226 pattern).

Evidence

cargo test -p id-store --test sidecar_snapshot (nix develop, pkgs/id, laptop):

running 6 tests
test absent_parent_is_omitted_never_null ... ok
test snapshot_digest_is_not_recursively_embedded ... ok
test storage_names_are_digest_derived ... ok
test tampered_head_does_not_verify ... ok
test genesis_shape_and_stale_head ... ok
test generated_operations_match_the_model ... ok
test result: ok. 6 passed; 0 failed

rustfmt clean on both files; clippy clean for both files.


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

…napshot, #10242)

New module pkgs/id/crates/id-store/src/sidecar_snapshot.rs implementing
design A-9114.1-A-9114.3 (statements S3.11-S3.14, S3.18): SidecarBodyV1
commits subject, namespace, tenant scope, generation, parent snapshot,
payload id/length/profile, signer/key/suite in canonical CBOR with
unknown-critical-field rejection; SidecarEnvelopeV1 carries the complete
metadata view as its payload; SnapshotId is the EnvelopeId over the
complete signed envelope, never embedded in bytes it hashes.
SidecarHeadV1 advances by CAS on (generation, snapshot_id): generation
increments exactly once, parent equals prior head, scope may not change
mid-chain. Storage names are digest-derived (hash.metadata.<digest>,
mutable head hash.metadata).

Model-oracle test pkgs/id/crates/id-store/tests/sidecar_snapshot.rs:
generated operations against a complete-scope reference model compare
every resulting state and error class; fixed tests cover genesis shape,
stale CAS, non-recursion, omitted-parent encoding and file naming.
cargo test -p id-store --test sidecar_snapshot: 6 passed, 0 failed.

Crate-root export stays with slice 9110-02 per the issue ownership
split; the test includes the module by path, as in #10226.
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 04:23
@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 6 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: 81bb015c-0734-4d37-a7c4-65935f1b5ec7
Commits

Reviewing files that changed from the base of the PR and between 4c01d04 and 9fa6d7f.

Files selected for processing: 2

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

@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-23T04:24:44.028839Z 9fa6d7f 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 merged commit 35047c7 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-da/10242-sidecar-snapshot branch November 23, 2026 04:23
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