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
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found while reviewing #339.
What is wrong:
snapshot removewarns and exits 0 having removed nothing. The code comment onremoveSnapshotRemote(internal/vaultik/snapshot.go) explaining that warning says the local removal has already happened, which is not true on this path.vaultik pruneinvocation". 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
snapshot removeexits non-zero; the comment onremoveSnapshotRemotesays what is true on each path.vaultik pruneinvocation is printed, matching the code.Model: opus-5-5