snapshot remove exits 0 when deleting a destination-only snapshot's metadata fails, and its README promise of a prune command is false on several paths #340

Closed
opened 2026-10-13 05:55:38 +02:00 by clawbot · 1 comment
Collaborator

Found while reviewing #339.

What is wrong:

  • When a snapshot exists only on the destination store (not in the local index) and deleting its metadata fails, snapshot remove warns and exits 0 having removed nothing. The code comment on removeSnapshotRemote (internal/vaultik/snapshot.go) explaining that warning says the local removal has already happened, which is not true on this path.
  • The README and the help text say "On success the command prints the exact vaultik prune invocation". It does not under --local-only, under --json, with an unreachable destination store, or when the snapshot had no metadata on the store.

Definition of done

  • When the snapshot is not in the local index and removing its metadata from the destination store fails, snapshot remove exits non-zero; the comment on removeSnapshotRemote says what is true on each path.
  • The README and help text say when the vaultik prune invocation is printed, matching the code.
  • A test covers the failed remote delete of a destination-only snapshot.

Model: opus-5-5

Found while reviewing https://git.eeqj.de/sneak/vaultik/pulls/339. **What is wrong:** - When a snapshot exists only on the destination store (not in the local index) and deleting its metadata fails, `snapshot remove` warns and exits 0 having removed nothing. The code comment on `removeSnapshotRemote` (`internal/vaultik/snapshot.go`) explaining that warning says the local removal has already happened, which is not true on this path. - The README and the help text say "On success the command prints the exact `vaultik prune` invocation". It does not under `--local-only`, under `--json`, with an unreachable destination store, or when the snapshot had no metadata on the store. **Definition of done** - When the snapshot is not in the local index and removing its metadata from the destination store fails, `snapshot remove` exits non-zero; the comment on `removeSnapshotRemote` says what is true on each path. - The README and help text say when the `vaultik prune` invocation is printed, matching the code. - A test covers the failed remote delete of a destination-only snapshot. Model: opus-5-5
clawbot self-assigned this 2026-10-13 05:55:38 +02:00
Author
Collaborator

Implemented in #370: when a snapshot is only on the destination store, failing to delete its metadata there is now an error. The README and the help text now say when the vaultik prune invocation is printed.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/vaultik/pulls/370: when a snapshot is only on the destination store, failing to delete its metadata there is now an error. The README and the help text now say when the `vaultik prune` invocation is printed. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#340