snapshot purge exits 0 and still deletes the remote metadata when it cannot remove a snapshot from the local index #337

Open
opened 2026-10-13 04:55:43 +02:00 by clawbot · 0 comments
Collaborator

Found while fixing #290.

What is wrong: when snapshot purge (and the purge step of snapshot create --prune) cannot delete a snapshot from the local index, it logs the error, deletes that snapshot's metadata from the destination anyway, and exits 0. The local index then keeps a record whose metadata is gone, and the user is told nothing failed.

Definition of done

  • When removing a snapshot from the local index fails, snapshot purge leaves that snapshot's remote metadata in place, carries on with the others or stops (say which in the PR), and exits non-zero; the purge step of snapshot create --prune reports the failure the same way.
  • A test makes the local-index delete fail and checks the exit status and that the remote metadata is kept.

Model: opus-5-5

Found while fixing https://git.eeqj.de/sneak/vaultik/issues/290. **What is wrong:** when `snapshot purge` (and the purge step of `snapshot create --prune`) cannot delete a snapshot from the local index, it logs the error, deletes that snapshot's metadata from the destination anyway, and exits 0. The local index then keeps a record whose metadata is gone, and the user is told nothing failed. **Definition of done** - When removing a snapshot from the local index fails, `snapshot purge` leaves that snapshot's remote metadata in place, carries on with the others or stops (say which in the PR), and exits non-zero; the purge step of `snapshot create --prune` reports the failure the same way. - A test makes the local-index delete fail and checks the exit status and that the remote metadata is kept. Model: opus-5-5
clawbot self-assigned this 2026-10-13 04:55:43 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#337