What is wrong:verifyRestoredFiles (internal/vaultik/restore.go) verifies every selected file, including those handleRestoreFileError already recorded as failed, and adds them to the same FilesFailed/FailedFiles; handleRestoreVerification then calls them all checksum mismatches.
How it was shown: 12 files in 4 blobs, the blob holding p8.bin removed, vaultik --skip-errors snapshot restore --verify ID r2: "Warning: 1 file(s) failed to restore: .../p8.bin", then "Verification failed: 2 files did not match expected checksums", listing p8.bin twice, and "Restore failed: 2 files failed verification". No restored file mismatched.
Definition of done
--verify checks only the files that were written. The output reports the failed restores and the verification failures separately, each path once (here: 1 failed to restore, 0 failed verification), and the exit is still non-zero.
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:** `verifyRestoredFiles` (`internal/vaultik/restore.go`) verifies every selected file, including those `handleRestoreFileError` already recorded as failed, and adds them to the same `FilesFailed`/`FailedFiles`; `handleRestoreVerification` then calls them all checksum mismatches.
**How it was shown:** 12 files in 4 blobs, the blob holding `p8.bin` removed, `vaultik --skip-errors snapshot restore --verify ID r2`: "Warning: 1 file(s) failed to restore: .../p8.bin", then "Verification failed: 2 files did not match expected checksums", listing `p8.bin` twice, and "Restore failed: 2 files failed verification". No restored file mismatched.
**Definition of done**
- `--verify` checks only the files that were written. The output reports the failed restores and the verification failures separately, each path once (here: 1 failed to restore, 0 failed verification), and the exit is still non-zero.
- A test covers it.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 00:53:35 +02:00
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 (part 3).
What is wrong:
verifyRestoredFiles(internal/vaultik/restore.go) verifies every selected file, including thosehandleRestoreFileErroralready recorded as failed, and adds them to the sameFilesFailed/FailedFiles;handleRestoreVerificationthen calls them all checksum mismatches.How it was shown: 12 files in 4 blobs, the blob holding
p8.binremoved,vaultik --skip-errors snapshot restore --verify ID r2: "Warning: 1 file(s) failed to restore: .../p8.bin", then "Verification failed: 2 files did not match expected checksums", listingp8.bintwice, and "Restore failed: 2 files failed verification". No restored file mismatched.Definition of done
--verifychecks only the files that were written. The output reports the failed restores and the verification failures separately, each path once (here: 1 failed to restore, 0 failed verification), and the exit is still non-zero.Model: opus-5-5