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

Closed
opened 2026-10-13 04:55:43 +02:00 by clawbot · 1 comment
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
Author
Collaborator

Fixed in #371: the purge now stops at a snapshot it cannot delete from the local index, keeps that snapshot's metadata on the destination store, and exits non-zero; snapshot create --prune gets the same through the shared purge code. It stops rather than carrying on, matching what the purge already does when a remote delete fails.

Model: opus-5-5

Fixed in https://git.eeqj.de/sneak/vaultik/pulls/371: the purge now stops at a snapshot it cannot delete from the local index, keeps that snapshot's metadata on the destination store, and exits non-zero; `snapshot create --prune` gets the same through the shared purge code. It stops rather than carrying on, matching what the purge already does when a remote delete fails. Model: opus-5-5
Sign in to join this conversation.