remote info counts a live snapshot's blobs as orphaned when a manifest cannot be read, and prints store names unescaped #228

Open
opened 2026-10-06 01:49:46 +02:00 by clawbot · 1 comment
Collaborator

Two defects in internal/vaultik/info.go, both measured on next at 0700901:

  • When a manifest cannot be read, remote info logs it and skips it (:332-337). It then counts that snapshot's blobs as orphaned (:409-414), and the report advises running vaultik prune (:472-474). One transient read failure gave "Orphaned (unreferenced): 1 (5 B)" for a live snapshot's blob. prune itself already refuses to act in this case (#157), but the report should not advise it.
  • The directory names under metadata/ are used unchecked (:293) and printed raw (:445-446). A name containing control characters, such as ESC[31m, reaches the terminal. Other listings already validate or escape names taken from the destination (#155, #164).

Definition of done

  1. When any manifest could not be read, the orphan figures are shown as unknown, with the reason, and no prune advice is printed. The --json output carries the same information.
  2. Names listed from metadata/ go through the same validation as the other destination listings, and a non-conforming name is skipped with a warning.
  3. Tests cover an unreadable manifest and a control-character name.
  4. make check passes.

Model: fable-5-1 (audit); opus-5-5 (issue)

Two defects in `internal/vaultik/info.go`, both measured on `next` at `0700901`: - When a manifest cannot be read, `remote info` logs it and skips it (`:332-337`). It then counts that snapshot's blobs as orphaned (`:409-414`), and the report advises running `vaultik prune` (`:472-474`). One transient read failure gave "Orphaned (unreferenced): 1 (5 B)" for a live snapshot's blob. `prune` itself already refuses to act in this case (https://git.eeqj.de/sneak/vaultik/issues/157), but the report should not advise it. - The directory names under `metadata/` are used unchecked (`:293`) and printed raw (`:445-446`). A name containing control characters, such as `ESC[31m`, reaches the terminal. Other listings already validate or escape names taken from the destination (https://git.eeqj.de/sneak/vaultik/issues/155, https://git.eeqj.de/sneak/vaultik/issues/164). ## Definition of done 1. When any manifest could not be read, the orphan figures are shown as unknown, with the reason, and no prune advice is printed. The `--json` output carries the same information. 2. Names listed from `metadata/` go through the same validation as the other destination listings, and a non-conforming name is skipped with a warning. 3. Tests cover an unreadable manifest and a control-character name. 4. `make check` passes. Model: fable-5-1 (audit); opus-5-5 (issue)
clawbot self-assigned this 2026-10-06 01:49:46 +02:00
Author
Collaborator

Fixed in #259.

When any manifest cannot be read, remote info now reports the orphan figures as unknown, with the number of unreadable manifests and no prune advice. Under --json, orphaned_blob_count and orphaned_blob_size are null and unreadable_manifests lists the remote keys. A name under metadata/ that is not a remote key is skipped with the same warning the snapshot listing uses.

Judgement call: the "Referenced by snapshots" figures and the unreadable snapshot's own row still count only what could be read.

Model: opus-5-5

Fixed in https://git.eeqj.de/sneak/vaultik/pulls/259. When any manifest cannot be read, `remote info` now reports the orphan figures as unknown, with the number of unreadable manifests and no prune advice. Under `--json`, `orphaned_blob_count` and `orphaned_blob_size` are `null` and `unreadable_manifests` lists the remote keys. A name under `metadata/` that is not a remote key is skipped with the same warning the snapshot listing uses. Judgement call: the "Referenced by snapshots" figures and the unreadable snapshot's own row still count only what could be read. 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#228