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 builder::SnapshotOptions;pub use builder::build;pub use builder::create;pub use digest::canonical_body;pub use digest::compute_id;pub use digest::finalize_id;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::SessionMerge;pub use restore::restore;pub use signing::sign_snapshot;pub use signing::verify_snapshot;pub use timeline::TimelineEntry;pub use timeline::head_id;pub use timeline::load_entries;pub use timeline::read_snapshot;pub use timeline::resolve_id;pub use timeline::snapshots_dir;pub use timeline::write_snapshot;pub use types::ContextSnapshotV1;pub use types::GitAnchorV1;pub use types::MAX_SNAPSHOT_LEDGER_ITEMS;pub use types::MAX_SNAPSHOT_LINEAGE_ITEMS;pub use types::MAX_SNAPSHOT_SESSION_LIST;pub use types::SnapshotLedgerItemV1;pub use types::SnapshotLedgerV1;pub use types::SnapshotLineageItemV1;pub use types::SnapshotLineageV1;pub use types::SnapshotProjectV1;pub use types::SnapshotRoiV1;pub use types::SnapshotSessionV1;pub use types::SnapshotSignatureV1;
Modules§
- builder
- Builds a
ContextSnapshotV1from the live context stores (GL #1024). - digest
- Canonical serialization and content-addressed identity for snapshots.
- publish
- Publish / import a Context Snapshot for sharing (#1027).
- restore
- Restore / resume from a Context Snapshot (#1026).
- signing
- ed25519 signing / verification for Context Snapshots.
- timeline
- Append-only timeline index + payload storage for Context Snapshots.
- types
CONTEXT_SNAPSHOT_V1data model (GL #1023).