A chunk is registered as pending (known set, scanner-pending set, packer
pending-row list) before it is packed. Under --skip-errors the scanner
skipped a file on any processing error, including a failure inside addChunkToPacker (packing, database, encryption, upload). The pending
chunk then stayed queued, and a later blob's finalize inserted it into the chunks table with no blob_chunks row. The snapshot completed holding a
file whose chunk is in no blob; restore fails with "chunk not found in any
blob", and because loadKnownChunks reads the chunks table, later runs
treat the chunk as already stored.
Errors from addChunkToPacker are now wrapped in a marker type and abort
the run regardless of --skip-errors; only open and read errors are
skipped. The bookkeeping order is deliberately unchanged, since a finalize
triggered inside addChunkToPacker un-pends its own chunk. Flag help,
struct comments, and the README now say only unreadable files are skipped.
Tests: a one-time temp-file creation failure under --skip-errors now
aborts the run and leaves no chunk row without a blob (fails without this
change); a file read error under --skip-errors is still skipped and the
run completes, and aborts without the flag.
Disclosure (judgement call): I left the optional readability tweak in packer.go (nil the current blob after cleanup on the handler-failure
path) out. Doing so would defeat the final Flush that fails an
interrupted-upload run, which is a separate safety net.
Model: opus-4-8
Fixes https://git.eeqj.de/sneak/vaultik/issues/161.
A chunk is registered as pending (known set, scanner-pending set, packer
pending-row list) before it is packed. Under `--skip-errors` the scanner
skipped a file on any processing error, including a failure inside
`addChunkToPacker` (packing, database, encryption, upload). The pending
chunk then stayed queued, and a later blob's finalize inserted it into the
`chunks` table with no `blob_chunks` row. The snapshot completed holding a
file whose chunk is in no blob; restore fails with "chunk not found in any
blob", and because `loadKnownChunks` reads the `chunks` table, later runs
treat the chunk as already stored.
Errors from `addChunkToPacker` are now wrapped in a marker type and abort
the run regardless of `--skip-errors`; only open and read errors are
skipped. The bookkeeping order is deliberately unchanged, since a finalize
triggered inside `addChunkToPacker` un-pends its own chunk. Flag help,
struct comments, and the README now say only unreadable files are skipped.
Tests: a one-time temp-file creation failure under `--skip-errors` now
aborts the run and leaves no chunk row without a blob (fails without this
change); a file read error under `--skip-errors` is still skipped and the
run completes, and aborts without the flag.
Disclosure (judgement call): I left the optional readability tweak in
`packer.go` (nil the current blob after cleanup on the handler-failure
path) out. Doing so would defeat the final `Flush` that fails an
interrupted-upload run, which is a separate safety net.
Model: opus-4-8
A chunk is registered as pending (known, scanner-pending, packer
pending-row) before it is packed. Under --skip-errors the scanner
skipped a file on any processing error, including a failure inside
addChunkToPacker (packing, database, encryption, upload). The pending
chunk then stayed queued and a later blob's finalize inserted it into
the chunks table with no blob_chunks row, so a snapshot could complete
holding a file whose chunk is in no blob and cannot be restored.
Errors from addChunkToPacker are now marked and abort the run
regardless of --skip-errors; only open and read errors are skipped.
The bookkeeping order is unchanged (a finalize triggered inside
addChunkToPacker still un-pends its own chunk). Flag help and comments
now say only unreadable files are skipped.
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.
Fixes #161.
A chunk is registered as pending (known set, scanner-pending set, packer
pending-row list) before it is packed. Under
--skip-errorsthe scannerskipped a file on any processing error, including a failure inside
addChunkToPacker(packing, database, encryption, upload). The pendingchunk then stayed queued, and a later blob's finalize inserted it into the
chunkstable with noblob_chunksrow. The snapshot completed holding afile whose chunk is in no blob; restore fails with "chunk not found in any
blob", and because
loadKnownChunksreads thechunkstable, later runstreat the chunk as already stored.
Errors from
addChunkToPackerare now wrapped in a marker type and abortthe run regardless of
--skip-errors; only open and read errors areskipped. The bookkeeping order is deliberately unchanged, since a finalize
triggered inside
addChunkToPackerun-pends its own chunk. Flag help,struct comments, and the README now say only unreadable files are skipped.
Tests: a one-time temp-file creation failure under
--skip-errorsnowaborts the run and leaves no chunk row without a blob (fails without this
change); a file read error under
--skip-errorsis still skipped and therun completes, and aborts without the flag.
Disclosure (judgement call): I left the optional readability tweak in
packer.go(nil the current blob after cleanup on the handler-failurepath) out. Doing so would defeat the final
Flushthat fails aninterrupted-upload run, which is a separate safety net.
Model: opus-4-8
PASS
Model: opus-4-8