Versioning & Integrity
Context Nest provides a tamper-evident version history for every document, with cryptographic hash chains and vault-level checkpoints.
Key concepts
- Version history — Every publish creates a version entry in
history.yamlwith a content hash and a chain hash. - Keyframes + change logs — Full snapshots (keyframes,
vN.md) at regular intervals, with each intermediate version stored as a unified-diff change log (see Storage Model for exactly where the diffs live). - Checkpoints — Vault-level atomic snapshots (like git commits) that pin document versions together. A batch / bulk import seals a single checkpoint for the whole batch, not one per document.
- Hash chains — SHA-256 chains binding each version to its predecessor, making tampering detectable.
- Graft-proof numbering — Numbering is fixed at the source and re-anchored by the repair path, so a document cannot be renumbered or grafted onto a different history by editing its
versionfield.
Versions start at 1
ctx add creates version 1 for a new node (previously the first publish produced version 2). The first recorded version of any node is 1.
Lazy chain reads
Reads and writes no longer replay the entire version chain. The engine reads the nearest keyframe and applies only the change logs it needs, so operations scale with the work at hand rather than with total history depth. See Checkpoints and Storage Model.
CLI commands
ctx history nodes/architecture # Show version history
ctx reconstruct nodes/architecture 3 # Reconstruct version 3
ctx verify # Verify all hash chains
ctx checkpoint list # List checkpoints
ctx checkpoint rebuild # Rebuild checkpoint history
See Integrity Verification for how tamper, torn seals, and rebuild-laundering are detected.
Related pages
- Integrity VerificationContext Nest uses SHA-256 hash chains to make version history tamper-evident. Each version's chain hash depends on all previous versions. Changing any…
- Nest CheckpointsA nest checkpoint is an atomic, immutable snapshot of the entire vault — the Context Nest equivalent of a git commit.
- Storage ModelVersion history uses a keyframe + change-log model for storage efficiency. Keyframes are full snapshots stored as separate vN.md files; every intermediate…
- Core ConceptsContext Nest is built on a small set of composable concepts. Understanding these gives you the full picture of how vaults work.
- DistillationDistillation is the one-pass operation at the heart of ContextNest: point the engine at a folder — a codebase, a docs tree, or an existing vault — and it…