Under --skip-errors, one file whose chunk is in no blob aborts the whole restore before anything is restored #326

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

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

What is wrong: newRestorePlan (internal/vaultik/restore_plan.go) returns errPlanChunkMissing (or errPlanBlobIDMissing) for the first such file, and restoreAllFiles returns it; it never reaches handleRestoreFileError. Earlier backup defects such as #214 left exactly such snapshots, and --skip-errors is how a user gets the rest back. The README says that with --skip-errors every other file is restored.

How it was shown: a throwaway test with 20 single-chunk files in two blobs, one blob's snapshot_blobs and uploads rows removed and the metadata exported again, restored with SkipErrors: true: "building restore plan: planning .../file-00.bin: chunk missing from blob map", and no file restored.

Definition of done

  • Under --skip-errors, a file that needs a chunk held by no blob is reported as failed and every other file is restored, with a non-zero exit; without the flag the restore aborts as now.
  • A test covers it.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 3). **What is wrong:** `newRestorePlan` (`internal/vaultik/restore_plan.go`) returns `errPlanChunkMissing` (or `errPlanBlobIDMissing`) for the first such file, and `restoreAllFiles` returns it; it never reaches `handleRestoreFileError`. Earlier backup defects such as https://git.eeqj.de/sneak/vaultik/issues/214 left exactly such snapshots, and `--skip-errors` is how a user gets the rest back. The README says that with `--skip-errors` every other file is restored. **How it was shown:** a throwaway test with 20 single-chunk files in two blobs, one blob's `snapshot_blobs` and `uploads` rows removed and the metadata exported again, restored with `SkipErrors: true`: "building restore plan: planning .../file-00.bin: chunk missing from blob map", and no file restored. **Definition of done** - Under `--skip-errors`, a file that needs a chunk held by no blob is reported as failed and every other file is restored, with a non-zero exit; without the flag the restore aborts as now. - A test covers it. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:53:37 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#326