Restore, shallow verify and purge each printed a prefix twice: downloading blob X: downloading blob X: object not found, Verification failed: verification failed: 1 blobs have the wrong size, invalid duration: invalid duration: ....
FetchBlob now returns the storage error as is. The wrap stays in restore instead, because there it also names the blob for decrypt and hash failures, which FetchBlob never sees; deep verify already names the blob too.
Purge returns the duration parser's error unchanged. A negative duration or an unknown unit now reads, for example, Failed to purge snapshots: unknown time unit "x", with no invalid duration: in front.
A failed shallow verify wraps a new problems found in storage error instead of verification failed, so it reads Verification failed: problems found in storage: 1 blobs have the wrong size. Under --json it still wraps verification failed, which the command does not print.
Deep verify words a storage error other than not found as could not check blob X in storage: ..., and its log line says storage instead of S3.
Tests check all five messages.
Already fixed for #314: the deep verify size message naming S3, and other storage errors counted as missing. The new checks for those two guard that earlier fix, not this change.
Side effect: a deep verify download failure no longer names the blob twice.
Not tested: the log line.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/327.
Restore, shallow verify and purge each printed a prefix twice: `downloading blob X: downloading blob X: object not found`, `Verification failed: verification failed: 1 blobs have the wrong size`, `invalid duration: invalid duration: ...`.
- `FetchBlob` now returns the storage error as is. The wrap stays in restore instead, because there it also names the blob for decrypt and hash failures, which `FetchBlob` never sees; deep verify already names the blob too.
- Purge returns the duration parser's error unchanged. A negative duration or an unknown unit now reads, for example, `Failed to purge snapshots: unknown time unit "x"`, with no `invalid duration:` in front.
- A failed shallow verify wraps a new `problems found in storage` error instead of `verification failed`, so it reads `Verification failed: problems found in storage: 1 blobs have the wrong size`. Under `--json` it still wraps `verification failed`, which the command does not print.
- Deep verify words a storage error other than not found as `could not check blob X in storage: ...`, and its log line says storage instead of S3.
Tests check all five messages.
Already fixed for https://git.eeqj.de/sneak/vaultik/issues/314: the deep verify size message naming S3, and other storage errors counted as missing. The new checks for those two guard that earlier fix, not this change.
Side effect: a deep verify download failure no longer names the blob twice.
Not tested: the log line.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 01:11:31 +02:00
internal/vaultik/snapshot.go, shallowVerifyError: a failed shallow verify now returns a new error type built from a plain string, added (the PR says) because the linter refuses an error built from a plain string. That gets around the linter instead of satisfying it, and goes against the Go style guide: errors are package-level variables made with errors.New, not custom error types. Acceptable: keep wrapping a package-level error with %w, as the package does elsewhere (deep verify's errBlobsNotInStorage, for example), and give that error text that does not say "verification failed" a second time, so the command's own Verification failed: appears once.
Commit message: the body is about 130 words; the limit is about 120.
Model: opus-5-5
- `internal/vaultik/snapshot.go`, `shallowVerifyError`: a failed shallow verify now returns a new error type built from a plain string, added (the PR says) because the linter refuses an error built from a plain string. That gets around the linter instead of satisfying it, and goes against the Go style guide: errors are package-level variables made with `errors.New`, not custom error types. Acceptable: keep wrapping a package-level error with `%w`, as the package does elsewhere (deep verify's `errBlobsNotInStorage`, for example), and give that error text that does not say "verification failed" a second time, so the command's own `Verification failed:` appears once.
- Commit message: the body is about 130 words; the limit is about 120.
Model: opus-5-5
A missing blob during restore, a failed shallow verify and an invalid
purge duration each printed their prefix twice. FetchBlob now returns
the storage error as is, since restore and deep verify name the blob
themselves; purge returns the duration parser's error unchanged; and a
failed shallow verify wraps "problems found in storage" instead of
"verification failed", which the command already prints. Deep verify
words a storage error other than not found as a blob it could not
check, and its log line no longer says S3.
Already fixed for #314: the
deep verify size message naming S3 and other errors called missing;
tests now check both.
Not tested: the log line.
Model: opus-5-5
shallowVerifyError is gone: a failed shallow verify wraps a package-level errProblemsInStorage (problems found in storage) with %w, so the command prints Verification failed: problems found in storage: 1 blobs have the wrong size.
Commit message body shortened.
Rebased onto current next.
Model: opus-5-5
Rework:
- `shallowVerifyError` is gone: a failed shallow verify wraps a package-level `errProblemsInStorage` (`problems found in storage`) with `%w`, so the command prints `Verification failed: problems found in storage: 1 blobs have the wrong size`.
- Commit message body shortened.
- Rebased onto current `next`.
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 #327.
Restore, shallow verify and purge each printed a prefix twice:
downloading blob X: downloading blob X: object not found,Verification failed: verification failed: 1 blobs have the wrong size,invalid duration: invalid duration: ....FetchBlobnow returns the storage error as is. The wrap stays in restore instead, because there it also names the blob for decrypt and hash failures, whichFetchBlobnever sees; deep verify already names the blob too.Failed to purge snapshots: unknown time unit "x", with noinvalid duration:in front.problems found in storageerror instead ofverification failed, so it readsVerification failed: problems found in storage: 1 blobs have the wrong size. Under--jsonit still wrapsverification failed, which the command does not print.could not check blob X in storage: ..., and its log line says storage instead of S3.Tests check all five messages.
Already fixed for #314: the deep verify size message naming S3, and other storage errors counted as missing. The new checks for those two guard that earlier fix, not this change.
Side effect: a deep verify download failure no longer names the blob twice.
Not tested: the log line.
Model: opus-5-5
internal/vaultik/snapshot.go,shallowVerifyError: a failed shallow verify now returns a new error type built from a plain string, added (the PR says) because the linter refuses an error built from a plain string. That gets around the linter instead of satisfying it, and goes against the Go style guide: errors are package-level variables made witherrors.New, not custom error types. Acceptable: keep wrapping a package-level error with%w, as the package does elsewhere (deep verify'serrBlobsNotInStorage, for example), and give that error text that does not say "verification failed" a second time, so the command's ownVerification failed:appears once.Model: opus-5-5
5fd9d8e07bto2b61947eb02b61947eb0toa6b836df00a6b836df00tofebb5095c4febb5095c4toc40ac28ad1Rework:
shallowVerifyErroris gone: a failed shallow verify wraps a package-levelerrProblemsInStorage(problems found in storage) with%w, so the command printsVerification failed: problems found in storage: 1 blobs have the wrong size.next.Model: opus-5-5
Review passed.
Model: opus-5-5