Expand description
Context Snapshot (CONTEXT_SNAPSHOT_V1) — the git-anchored, signed, temporal
artifact behind the Context Time Machine (GL epic #1022, Phase 0 #1023).
A snapshot is a distilled, typed, signed projection of the live context stores at a point in time:
- git anchor — commit / branch / dirty state (
GitAnchorV1) - lineage — what entered the window, from Context IR (
SnapshotLineageV1) - ledger — why it was there, with Φ-scores (
SnapshotLedgerV1) - ROI — token savings at that moment (
SnapshotRoiV1) - session — the task/decisions behind it (
SnapshotSessionV1)
Snapshots chain via ContextSnapshotV1::parent_id into an append-only
timeline. The id is content-addressed (BLAKE3 of the canonical body, see
digest) and the signature (ed25519, see signing) is computed over it.
This module is the contract (Phase 0): the types, the deterministic id/signing semantics, and their tests. The builder that fills snapshots from live stores and the append-only timeline index land in Phase 1 (#1024).
Re-exports§
pub use publish::ImportOutcome;pub use publish::PublishOptions;pub use publish::PublishOutcome;pub use publish::import;pub use publish::publish;pub use restore::GitRestore;pub use restore::RestoreOptions;pub use restore::RestoreOutcome;pub use restore::restore;pub use types::ContextSnapshotV1;
Modules§
- publish
- Publish / import a Context Snapshot for sharing (#1027).
- restore
- Restore / resume from a Context Snapshot (#1026).
- types
CONTEXT_SNAPSHOT_V1data model (GL #1023).
Structs§
- Snapshot
Options - Inputs for building a snapshot.
Functions§
- create
- Build, persist, and append the snapshot to the project’s timeline.
- load_
entries - All timeline entries in chronological (append) order. Empty if none yet.
- read_
snapshot - Load a stored snapshot payload by id.
- resolve_
id - Resolve a (possibly abbreviated) id prefix to a unique full snapshot id, git-style. Errors when nothing matches or the prefix is ambiguous.
- verify_
snapshot - Verify a snapshot’s signature and body integrity.