snapshot create --skip-errors exits 0 and prints "Finished successfully." after skipping files #310

Open
opened 2026-10-13 00:47:14 +02:00 by clawbot · 0 comments
Collaborator

Found by the defect hunt in #288 (part 1).

What is wrong: with one unreadable file and one unreadable directory, the run prints the skip errors, "Files: 140 examined, 4 backed up, 135 unchanged, 1 failed", then "Finished successfully.", and exits 0, also under --cron. The skipped directory is not counted as failed. A script or cron wrapper cannot tell a complete backup from one missing files, while snapshot restore under the same flag exits non-zero when files failed (#218). In internal/vaultik/snapshot.go, totalFilesFailed feeds the summary only; the run returns success.

Definition of done

  • When any file or directory was skipped, snapshot create --skip-errors still completes and keeps the snapshot, does not print "Finished successfully.", and exits non-zero, as restore does under the flag.
  • A skipped directory is counted as failed in the summary, and files under it that the previous snapshot of the same name had are not counted as deleted (noticed while fixing #304).
  • The README's --skip-errors text says what the exit status is.
  • A test covers a skipped file and a skipped directory.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 1). **What is wrong:** with one unreadable file and one unreadable directory, the run prints the skip errors, "Files: 140 examined, 4 backed up, 135 unchanged, 1 failed", then "Finished successfully.", and exits 0, also under `--cron`. The skipped directory is not counted as failed. A script or cron wrapper cannot tell a complete backup from one missing files, while `snapshot restore` under the same flag exits non-zero when files failed (https://git.eeqj.de/sneak/vaultik/issues/218). In `internal/vaultik/snapshot.go`, `totalFilesFailed` feeds the summary only; the run returns success. **Definition of done** - When any file or directory was skipped, `snapshot create --skip-errors` still completes and keeps the snapshot, does not print "Finished successfully.", and exits non-zero, as restore does under the flag. - A skipped directory is counted as failed in the summary, and files under it that the previous snapshot of the same name had are not counted as deleted (noticed while fixing https://git.eeqj.de/sneak/vaultik/issues/304). - The README's `--skip-errors` text says what the exit status is. - A test covers a skipped file and a skipped directory. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:47:14 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#310