What is wrong:snapshot create (internal/cli/snapshot.go) does not check --keep-newer-than; it is first parsed by the post-backup prune (runPostBackupPrune in internal/vaultik/snapshot.go). With a value the parser rejects, the backup completes and uploads its snapshot, then the command prints "Snapshot creation failed: post-backup prune: purging old snapshots: invalid duration ..." and exits 1. Retention never runs, so such a cron line adds a snapshot every night, reports each as failed, and never deletes any. Without --prune, --keep-newer-than garbage is ignored and the run exits 0.
How it was shown:snapshot create ex --prune --keep-newer-than 1.5d (and 4x) exited 1 with that message, and snapshot list --json then showed the new snapshot with remote_present: true.
Definition of done
An invalid --keep-newer-than, and --keep-newer-than without --prune, are rejected before the backup starts: non-zero exit, nothing created.
A failure in the post-backup prune after a good backup is reported as a prune failure, not as a failed snapshot creation.
Tests cover both.
Model: opus-5-5
Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (parts 1 and 5).
**What is wrong:** `snapshot create` (`internal/cli/snapshot.go`) does not check `--keep-newer-than`; it is first parsed by the post-backup prune (`runPostBackupPrune` in `internal/vaultik/snapshot.go`). With a value the parser rejects, the backup completes and uploads its snapshot, then the command prints "Snapshot creation failed: post-backup prune: purging old snapshots: invalid duration ..." and exits 1. Retention never runs, so such a cron line adds a snapshot every night, reports each as failed, and never deletes any. Without `--prune`, `--keep-newer-than garbage` is ignored and the run exits 0.
**How it was shown:** `snapshot create ex --prune --keep-newer-than 1.5d` (and `4x`) exited 1 with that message, and `snapshot list --json` then showed the new snapshot with `remote_present: true`.
**Definition of done**
- An invalid `--keep-newer-than`, and `--keep-newer-than` without `--prune`, are rejected before the backup starts: non-zero exit, nothing created.
- A failure in the post-backup prune after a good backup is reported as a prune failure, not as a failed snapshot creation.
- Tests cover both.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 00:47:12 +02:00
Fixed in #346: snapshot create now rejects an invalid --keep-newer-than, or one given without --prune, before it starts, and a failed post-backup prune is reported as the prune's failure rather than as a failed snapshot creation.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/vaultik/pulls/346: `snapshot create` now rejects an invalid `--keep-newer-than`, or one given without `--prune`, before it starts, and a failed post-backup prune is reported as the prune's failure rather than as a failed snapshot creation.
Model: opus-5-5
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 (parts 1 and 5).
What is wrong:
snapshot create(internal/cli/snapshot.go) does not check--keep-newer-than; it is first parsed by the post-backup prune (runPostBackupPruneininternal/vaultik/snapshot.go). With a value the parser rejects, the backup completes and uploads its snapshot, then the command prints "Snapshot creation failed: post-backup prune: purging old snapshots: invalid duration ..." and exits 1. Retention never runs, so such a cron line adds a snapshot every night, reports each as failed, and never deletes any. Without--prune,--keep-newer-than garbageis ignored and the run exits 0.How it was shown:
snapshot create ex --prune --keep-newer-than 1.5d(and4x) exited 1 with that message, andsnapshot list --jsonthen showed the new snapshot withremote_present: true.Definition of done
--keep-newer-than, and--keep-newer-thanwithout--prune, are rejected before the backup starts: non-zero exit, nothing created.Model: opus-5-5
Fixed in #346:
snapshot createnow rejects an invalid--keep-newer-than, or one given without--prune, before it starts, and a failed post-backup prune is reported as the prune's failure rather than as a failed snapshot creation.Model: opus-5-5