fix: track and report file restore failures #22
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/vaultik#22
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/restore-error-handling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Restore previously logged errors for individual files but returned success even if files failed. Now tracks failed files in RestoreResult, reports them in the summary output, and returns an error if any files failed to restore.
Fixes #21
Ran tests via nix-shell. All packages pass except
internal/vaultikwhich has a pre-existing build failure onmain—FetchBlobandFetchAndDecryptBlobmethods are referenced inrestore.goandverify.gobut not defined anywhere. This is unrelated to this PR. My changes introduce no new test failures.036eaf9f97tocafb3d45b8Code Review: LGTM ✅
Clean, minimal change that correctly tracks and reports file restore failures.
result.FilesFailedand appends toresult.FailedFileswhenrestoreFileerrorsRestoreResultfields, usesv.Stdoutcorrectlymake testpasses cleanly (lint ✅, fmt ✅, all tests ✅)Rebased on main and force-pushed. Ready to merge. Assigning to @sneak.
Code Review: Track and report file restore failures
Overall: Clean ✅
This PR adds failure tracking to the restore operation — counting failed files, collecting their paths, reporting them, and returning a non-nil error when failures occur.
Changes
restoreFileerror: incrementsresult.FilesFailed++and appends path toresult.FailedFiles. Correctly continues with remaining files.Observations
FailedFilesis a string slice that could grow large for massive restores with many failures, but that would be an exceptional situation.No issues found. Ready for
make checkverification.make testpasses cleanly (no rebase needed):