Shallow snapshot verify (without --deep) only checked that each blob
object existed, discarded the size that Stat returned, and then printed
"OK - All blobs verified" — overstating what it had done, and reporting a
pass for a manifest listing no blobs.
Changes:
Each blob's stored size is now compared against the manifest's compressed_size, using the same comparison as the deep path. A blob
present but the wrong size fails verification and is not counted as
verified.
The snapshot's encrypted database (metadata/<key>/db.zst.age) must be
present; its absence fails verification. A snapshot without it is not
restorable regardless of the blobs.
The success line now states only what was checked: "all N blobs listed
in the manifest are present with the listed size; contents not checked
(use --deep)". The README verify description and the CLI short/long
text are corrected to match.
Removed the now-unused resolveAndDownloadManifest helper and the errBlobsMissing sentinel.
Tests (internal/vaultik/shallow_verify_test.go): a real snapshot is
backed up, then one stored blob is grown so its size no longer matches
the manifest — shallow verify must fail, count it as a mismatch, and drop
it from the verified count; separately, deleting db.zst.age must fail
shallow verify. Both fail without this change. make check is green.
TODO.md is intentionally not updated: the last eight issue PRs to next
did not touch it.
Model: opus-4-8
Closes https://git.eeqj.de/sneak/vaultik/issues/169.
Shallow `snapshot verify` (without `--deep`) only checked that each blob
object existed, discarded the size that `Stat` returned, and then printed
"OK - All blobs verified" — overstating what it had done, and reporting a
pass for a manifest listing no blobs.
Changes:
- Each blob's stored size is now compared against the manifest's
`compressed_size`, using the same comparison as the deep path. A blob
present but the wrong size fails verification and is not counted as
verified.
- The snapshot's encrypted database (`metadata/<key>/db.zst.age`) must be
present; its absence fails verification. A snapshot without it is not
restorable regardless of the blobs.
- The success line now states only what was checked: "all N blobs listed
in the manifest are present with the listed size; contents not checked
(use `--deep`)". The README verify description and the CLI short/long
text are corrected to match.
Removed the now-unused `resolveAndDownloadManifest` helper and the
`errBlobsMissing` sentinel.
Tests (`internal/vaultik/shallow_verify_test.go`): a real snapshot is
backed up, then one stored blob is grown so its size no longer matches
the manifest — shallow verify must fail, count it as a mismatch, and drop
it from the verified count; separately, deleting `db.zst.age` must fail
shallow verify. Both fail without this change. `make check` is green.
TODO.md is intentionally not updated: the last eight issue PRs to `next`
did not touch it.
Model: opus-4-8
Shallow `snapshot verify` only checked that each blob object existed and
then reported "All blobs verified", overstating what it did.
It now compares each blob's stored size against the manifest's
compressed_size, using the same comparison as the deep path, and checks
that the snapshot's encrypted database (db.zst.age) is present. A blob of
the wrong size no longer counts as verified. The final line reports only
what was checked: presence and size, not contents.
The README verify description and the CLI short/long text are corrected
to match. Removed the now-unused resolveAndDownloadManifest helper and
errBlobsMissing sentinel.
Model: opus-4-8
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.
Closes #169.
Shallow
snapshot verify(without--deep) only checked that each blobobject existed, discarded the size that
Statreturned, and then printed"OK - All blobs verified" — overstating what it had done, and reporting a
pass for a manifest listing no blobs.
Changes:
compressed_size, using the same comparison as the deep path. A blobpresent but the wrong size fails verification and is not counted as
verified.
metadata/<key>/db.zst.age) must bepresent; its absence fails verification. A snapshot without it is not
restorable regardless of the blobs.
in the manifest are present with the listed size; contents not checked
(use
--deep)". The README verify description and the CLI short/longtext are corrected to match.
Removed the now-unused
resolveAndDownloadManifesthelper and theerrBlobsMissingsentinel.Tests (
internal/vaultik/shallow_verify_test.go): a real snapshot isbacked up, then one stored blob is grown so its size no longer matches
the manifest — shallow verify must fail, count it as a mismatch, and drop
it from the verified count; separately, deleting
db.zst.agemust failshallow verify. Both fail without this change.
make checkis green.TODO.md is intentionally not updated: the last eight issue PRs to
nextdid not touch it.
Model: opus-4-8
PASS
Model: opus-4-8