Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

Snapshots for reversibility (“nothing is unrecoverable”).

Before an allowed destructive command runs, Kintsugi copies the paths it is likely to touch into a content-addressed store; kintsugi undo restores them. Copies use reflink CoW where the filesystem supports it (APFS/btrfs/ReFS) and fall back to a plain copy everywhere else.

Scope (stated plainly): this covers files that existed before the command — restoring overwrites and recreating deletions. It does not remove newly-created files, and it cannot undo network calls, external APIs, or already-pushed commits.

Structs§

Entry
One captured path within a snapshot.
Manifest
A snapshot manifest: enough to restore every captured path.

Functions§

capture
Capture a snapshot of the existing predicted paths into store_root.
is_fully_reversible
Whether a snapshot can faithfully cover this command — i.e. whether kintsugi undo is an honest promise for it.
predict_paths
Predict the filesystem paths a command is likely to touch.
restore
Restore every captured path back to its original location.