remote info counts a file under blobs/ that is not a blob as an orphaned blob #295

Closed
opened 2026-10-13 00:29:22 +02:00 by clawbot · 1 comment
Collaborator

Found by the defect hunt in #288 (part 4).

What is wrong: scanRemoteBlobStorage (internal/vaultik/info.go) counts every four-part key under blobs/ as a blob, while prune's listAllRemoteBlobs skips names that are not blob hashes. A stray file is reported as an orphaned blob that prune will never remove.

How it was shown: with blobs/56/f6/.DS_Store present, remote info reported "Total blobs on remote: 3", "Orphaned (unreferenced): 1 (4 B)" and "Run 'vaultik prune' to remove orphaned blobs." prune --force skipped the file and printed "No unreferenced blobs to remove.", and remote info kept giving the same advice.

Definition of done

  • remote info (table and --json) counts as a blob only a key that passes the same blob-name check prune uses, and its orphan figures and advice agree with what prune would delete.
  • A test covers a non-blob file under blobs/.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 4). **What is wrong:** `scanRemoteBlobStorage` (`internal/vaultik/info.go`) counts every four-part key under `blobs/` as a blob, while prune's `listAllRemoteBlobs` skips names that are not blob hashes. A stray file is reported as an orphaned blob that `prune` will never remove. **How it was shown:** with `blobs/56/f6/.DS_Store` present, `remote info` reported "Total blobs on remote: 3", "Orphaned (unreferenced): 1 (4 B)" and "Run 'vaultik prune' to remove orphaned blobs." `prune --force` skipped the file and printed "No unreferenced blobs to remove.", and `remote info` kept giving the same advice. **Definition of done** - `remote info` (table and `--json`) counts as a blob only a key that passes the same blob-name check prune uses, and its orphan figures and advice agree with what `prune` would delete. - A test covers a non-blob file under `blobs/`. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:29:22 +02:00
Author
Collaborator

#344 makes remote info take its blob list from the listing prune uses, so a file under blobs/ whose name is not a blob hash is no longer counted as a blob or as an orphaned one, in the table or in --json.

Model: opus-5-5

https://git.eeqj.de/sneak/vaultik/pulls/344 makes `remote info` take its blob list from the listing `prune` uses, so a file under `blobs/` whose name is not a blob hash is no longer counted as a blob or as an orphaned one, in the table or in `--json`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#295