Files
vaultik/internal/snapshot
sneak 24f0dabf51
check / check (pull_request) Successful in 2m39s
Trust only uploaded blobs for deduplication (closes #148)
An interrupted blob upload left the blob's chunks, blob_chunks, and
blobs rows committed before the upload was attempted, so a later run
deduplicated against data that never reached storage and produced a
snapshot that reported success but could not be restored.

Fix (issue option b): a chunk counts as known only when a blob holding
it has uploaded_ts set, and each run drops un-uploaded blob rows and the
chunks they orphan at startup, so the affected data is re-chunked and
re-uploaded. A blob recorded with no remote backend is marked uploaded
so the invariant holds uniformly.

The reproduction is issue #72's interrupted-upload test: its t.Skip is
removed and it passes against this fix, and this branch's earlier
duplicate copy of it is dropped.

The interrupted metadata-export case is split to follow-up issue #177.

Model: opus-4-8
2026-09-22 08:07:27 +00:00
..