snapshot create read --keep-newer-than only in the post-backup prune. A value the duration parser rejects therefore failed the run after the snapshot had been uploaded, reported as "Snapshot creation failed", and retention never ran. Without --prune the flag was ignored.
snapshot create now checks the flag before it starts, through SnapshotCreateOptions.Validate, as snapshot purge checks its flags: an invalid duration or a missing --prune fails the command before the lock is taken, the local index is opened or anything is backed up.
A failed post-backup prune is wrapped in ErrPostBackupPruneFailed, and snapshot create reports it as "Backup completed, but post-backup prune failed: ..." instead of "Snapshot creation failed".
README: the --keep-newer-than entry says when the command fails.
The tests run the real command against a file:// destination store: the three rejected forms leave the store empty, and a prune made to fail by an undecodable manifest is reported as the prune's failure, with the new snapshot left on the store.
Judgement call: a failed post-backup prune still exits 1, so cron still reports it; the issue asked only that it be reported as the prune's failure.
Judgement call: an explicitly empty --keep-newer-than "" still counts as not given, so the prune keeps only the latest snapshot.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/307.
`snapshot create` read `--keep-newer-than` only in the post-backup prune. A value the duration parser rejects therefore failed the run after the snapshot had been uploaded, reported as "Snapshot creation failed", and retention never ran. Without `--prune` the flag was ignored.
- `snapshot create` now checks the flag before it starts, through `SnapshotCreateOptions.Validate`, as `snapshot purge` checks its flags: an invalid duration or a missing `--prune` fails the command before the lock is taken, the local index is opened or anything is backed up.
- A failed post-backup prune is wrapped in `ErrPostBackupPruneFailed`, and `snapshot create` reports it as "Backup completed, but post-backup prune failed: ..." instead of "Snapshot creation failed".
- README: the `--keep-newer-than` entry says when the command fails.
- The tests run the real command against a `file://` destination store: the three rejected forms leave the store empty, and a prune made to fail by an undecodable manifest is reported as the prune's failure, with the new snapshot left on the store.
Judgement call: a failed post-backup prune still exits 1, so cron still reports it; the issue asked only that it be reported as the prune's failure.
Judgement call: an explicitly empty `--keep-newer-than ""` still counts as not given, so the prune keeps only the latest snapshot.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 08:24:03 +02:00
snapshot create read --keep-newer-than only in the post-backup prune,
so a value the duration parser rejects failed the run after the
snapshot was uploaded: a nightly cron line added a snapshot each night,
reported it as failed, and never deleted any. Without --prune the flag
was ignored. The command now checks the flag before it starts and fails
on an invalid duration or a missing --prune.
A failed post-backup prune is now wrapped in ErrPostBackupPruneFailed
and reported as "Backup completed, but post-backup prune failed: ..."
rather than as a failed snapshot creation. The exit status stays 1.
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.
Fixes #307.
snapshot createread--keep-newer-thanonly in the post-backup prune. A value the duration parser rejects therefore failed the run after the snapshot had been uploaded, reported as "Snapshot creation failed", and retention never ran. Without--prunethe flag was ignored.snapshot createnow checks the flag before it starts, throughSnapshotCreateOptions.Validate, assnapshot purgechecks its flags: an invalid duration or a missing--prunefails the command before the lock is taken, the local index is opened or anything is backed up.ErrPostBackupPruneFailed, andsnapshot createreports it as "Backup completed, but post-backup prune failed: ..." instead of "Snapshot creation failed".--keep-newer-thanentry says when the command fails.file://destination store: the three rejected forms leave the store empty, and a prune made to fail by an undecodable manifest is reported as the prune's failure, with the new snapshot left on the store.Judgement call: a failed post-backup prune still exits 1, so cron still reports it; the issue asked only that it be reported as the prune's failure.
Judgement call: an explicitly empty
--keep-newer-than ""still counts as not given, so the prune keeps only the latest snapshot.Model: opus-5-5
Review passed.
Model: opus-5-5