Expand description
Deployment manifest — record of what krypt has written to disk.
The manifest is a versioned JSON document persisted at
${XDG_STATE}/krypt/manifest.json. It records, for every file the
engine has deployed, the source path, destination path, and a
SHA-256 hash of both. The hash of the destination at deploy time is
later used to detect drift — edits made to a deployed file
outside the repo.
§Schema
{
"version": 1,
"krypt_version": "0.0.2",
"deployed_at": 1715896800,
"repo_path": "/home/x/.config/krypt/repo",
"repo_commit": null,
"entries": [
{ "src": ".gitconfig", "dst": "/home/x/.gitconfig",
"kind": "link", "hash_src": "sha256:...", "hash_dst": "sha256:...",
"deployed_at": 1715896800 }
]
}§Versioning
The top-level version field is checked on load. A future bump (say,
v2 adding new fields) will land alongside a migration step here.
§Atomicity
Manifest::save writes to a sibling tmp file and renames, mirroring
crate::copy’s deploy strategy. A torn write can’t corrupt the
existing manifest on disk.
Structs§
- Drift
Record - One row in a drift report.
- Manifest
- A complete deploy record.
- Manifest
Entry - Per-file deploy record.
Enums§
- Drift
Status - Why a manifest entry looks different from disk.
- Manifest
Error - Errors loading, saving, or comparing a manifest.
Constants§
- SCHEMA_
VERSION - Current manifest schema version.
Functions§
- detect_
drift - Walk every entry in the manifest, hashing the current destination and
classifying drift. Read errors (e.g. permission denied) are treated
as
Driftedwithcurrent_hash = None— better to surface than swallow. - hash_
file - Compute the SHA-256 of a file as
sha256:<hex>.