What is wrong:RemoveSnapshot (internal/vaultik/snapshot.go) never checks that the snapshot ID exists. deleteSnapshotFromLocalDB deletes zero rows without error, and deleteRemoteSnapshotByKey finds nothing to delete.
How it was shown:snapshot remove --force hunt_home_1999-01-01T00:00:00Z printed "Removed snapshot ... from local database" and "Removed snapshot metadata from remote storage", and exited 0; --json gave "remote_removed": true, and --dry-run printed "Would remove snapshot". Passing the remote key that snapshot list prints for a snapshot gave the same two success lines and left that metadata/KEY/ untouched.
Definition of done
An ID that names no snapshot in the local index and none on the destination is an error with a non-zero exit, under --force, --json, --dry-run and --local-only alike, and nothing claims a removal that did not happen (remote_removed is true only when something was deleted).
Accepting a remote key in snapshot remove is not part of this issue.
A test covers an unknown ID.
Model: opus-5-5
Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 4).
**What is wrong:** `RemoveSnapshot` (`internal/vaultik/snapshot.go`) never checks that the snapshot ID exists. `deleteSnapshotFromLocalDB` deletes zero rows without error, and `deleteRemoteSnapshotByKey` finds nothing to delete.
**How it was shown:** `snapshot remove --force hunt_home_1999-01-01T00:00:00Z` printed "Removed snapshot ... from local database" and "Removed snapshot metadata from remote storage", and exited 0; `--json` gave `"remote_removed": true`, and `--dry-run` printed "Would remove snapshot". Passing the remote key that `snapshot list` prints for a snapshot gave the same two success lines and left that `metadata/KEY/` untouched.
**Definition of done**
- An ID that names no snapshot in the local index and none on the destination is an error with a non-zero exit, under `--force`, `--json`, `--dry-run` and `--local-only` alike, and nothing claims a removal that did not happen (`remote_removed` is true only when something was deleted).
- Accepting a remote key in `snapshot remove` is not part of this issue.
- A test covers an unknown ID.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 00:29:21 +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 by the defect hunt in #288 (part 4).
What is wrong:
RemoveSnapshot(internal/vaultik/snapshot.go) never checks that the snapshot ID exists.deleteSnapshotFromLocalDBdeletes zero rows without error, anddeleteRemoteSnapshotByKeyfinds nothing to delete.How it was shown:
snapshot remove --force hunt_home_1999-01-01T00:00:00Zprinted "Removed snapshot ... from local database" and "Removed snapshot metadata from remote storage", and exited 0;--jsongave"remote_removed": true, and--dry-runprinted "Would remove snapshot". Passing the remote key thatsnapshot listprints for a snapshot gave the same two success lines and left thatmetadata/KEY/untouched.Definition of done
--force,--json,--dry-runand--local-onlyalike, and nothing claims a removal that did not happen (remote_removedis true only when something was deleted).snapshot removeis not part of this issue.Model: opus-5-5
Implemented in #339.
Model: opus-5-5