Let prune delete old .partial uploads and remote info count them (closes #466)
check / check (push) Waiting to run

A killed upload leaves a `.partial` object that only remote nuke
removed, and that remote info never showed.

The storage interface's DeletePartialUploads becomes ListPartialUploads,
which returns each such object's key, size and time; Delete removes it.
prune deletes those under metadata/ and blobs/ once older than
prune_grace_period, and reports kept, deleted and failed counts. remote
info counts them on their own line and in --json. remote nuke lists and
deletes them like any other object, and now names any it could not
delete.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-19 07:31:08 +00:00
1 parent d747ddef3a
commit 52fada5236
19 files changed
+570 -205

No files matched your search

+5 -3
View File
@@ -329,7 +329,8 @@ The prune operation is safe because:
1. It keeps every blob listed in any snapshot's manifest and deletes only blobs
that no manifest references. Under `metadata/` it deletes only a directory
that has no `manifest.json.zst`, whose name is a remote key, and that no
local snapshot record claims
local snapshot record claims. It also deletes the `.partial` objects that
uploads cut off part-way leave, which no backup or restore reads
2. Manifests are unencrypted and can be read without keys
3. If any manifest cannot be downloaded or decoded, prune deletes nothing and
exits with an error, rather than treating that snapshot's blobs as
@@ -343,8 +344,9 @@ The prune operation is safe because:
a backup reuses from an earlier run that stopped before its manifest: the
backup skips the upload of a blob already on the destination, so that blob
keeps the time of its first upload, and a prune before the backup's manifest
is written can delete it; the new snapshot then cannot be restored.
`remote nuke` has no such check
is written can delete it; the new snapshot then cannot be restored. It
deletes a `.partial` object only once it is older than `prune_grace_period`,
so an upload still running keeps its object. `remote nuke` has no such check
## Restoration Requirements