snapshot list and the snapshot purge listing print 1024-based sizes labelled MB, unlike every other command #312

Open
opened 2026-10-13 00:47:15 +02:00 by clawbot · 0 comments
Collaborator

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

What is wrong: formatBytes (internal/vaultik/helpers.go) divides by 1024 and prints "KB"/"MB"; it is used by snapshot_list.go and the purge listing in snapshot.go. Everything else uses humanize.Bytes (powers of 1000). The same 6,329,198 bytes show as "6.0 MB" in snapshot list, and as "6.3 MB" in the snapshot create summary, snapshot verify and remote info.

Definition of done

  • Every command prints a byte count the same way, with the units its label names.
  • A test checks snapshot list and the purge listing against the other commands for one size.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 1). **What is wrong:** `formatBytes` (`internal/vaultik/helpers.go`) divides by 1024 and prints "KB"/"MB"; it is used by `snapshot_list.go` and the purge listing in `snapshot.go`. Everything else uses `humanize.Bytes` (powers of 1000). The same 6,329,198 bytes show as "6.0 MB" in `snapshot list`, and as "6.3 MB" in the `snapshot create` summary, `snapshot verify` and `remote info`. **Definition of done** - Every command prints a byte count the same way, with the units its label names. - A test checks `snapshot list` and the purge listing against the other commands for one size. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:47:15 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#312