snapshot verify and remote info print status lines without internal/ui #410

Closed
opened 2026-11-10 20:49:43 +01:00 by clawbot · 1 comment
Collaborator

Listed under "Code bugs seen, not fixed" in #399.

Bug. The README's "output style" section on next says status and progress lines go through the internal/ui message methods, with a marker and, on a terminal, color. snapshot verify and remote info write theirs with stdoutf, so they have no marker and no color. Their reports stay plain, as the same section says.

Change exactly these lines. Keep each line's text apart from the trailing newline. Keep every existing if guard around them as it is.

  • internal/vaultik/info.go, remote info: "Scanning snapshot metadata...", "Downloading %d manifest(s)..." and "Scanning blobs..." use Beginf.
  • internal/vaultik/snapshot.go, shallow snapshot verify: "Checking blob presence and sizes..." uses Beginf.
  • internal/vaultik/verify.go, snapshot verify --deep:
    • Beginf: "Downloading manifest...", "Downloading and decrypting database...", "Verifying manifest against database...", "Checking blob existence in remote storage..." and "Downloading and verifying blob contents (%d blobs, %s)...".
    • Completef: "Manifest loaded: %d blobs (%s)", "Database loaded: %d blobs (%s)", "Manifest verified." and "All blobs exist.".
    • Progressf: "Verified %d/%d blobs ...", without its two leading spaces, since Progressf indents.

Everything else these commands print is the report and stays on stdoutf, including the headers ("Verifying snapshot", "Snapshot time", "Snapshot information", "Deep verification of snapshot", the === sections), the per-blob result lines and the closing summaries.

Definition of done

  • The lines above are written through v.UI as listed. Nothing else changes.
  • A test that fails on current next checks that one remote info line and one deep-verify line carry the internal/ui marker, and that neither is printed under --quiet.
  • make check passes.

Package. internal/vaultik, the three files named. No README change: the README already describes this behaviour.

Model: opus-5-5

Listed under "Code bugs seen, not fixed" in https://git.eeqj.de/sneak/vaultik/pulls/399. **Bug.** The README's "output style" section on `next` says status and progress lines go through the `internal/ui` message methods, with a marker and, on a terminal, color. `snapshot verify` and `remote info` write theirs with `stdoutf`, so they have no marker and no color. Their reports stay plain, as the same section says. **Change exactly these lines.** Keep each line's text apart from the trailing newline. Keep every existing `if` guard around them as it is. - `internal/vaultik/info.go`, `remote info`: "Scanning snapshot metadata...", "Downloading %d manifest(s)..." and "Scanning blobs..." use `Beginf`. - `internal/vaultik/snapshot.go`, shallow `snapshot verify`: "Checking blob presence and sizes..." uses `Beginf`. - `internal/vaultik/verify.go`, `snapshot verify --deep`: - `Beginf`: "Downloading manifest...", "Downloading and decrypting database...", "Verifying manifest against database...", "Checking blob existence in remote storage..." and "Downloading and verifying blob contents (%d blobs, %s)...". - `Completef`: "Manifest loaded: %d blobs (%s)", "Database loaded: %d blobs (%s)", "Manifest verified." and "All blobs exist.". - `Progressf`: "Verified %d/%d blobs ...", without its two leading spaces, since `Progressf` indents. Everything else these commands print is the report and stays on `stdoutf`, including the headers ("Verifying snapshot", "Snapshot time", "Snapshot information", "Deep verification of snapshot", the `===` sections), the per-blob result lines and the closing summaries. **Definition of done** - The lines above are written through `v.UI` as listed. Nothing else changes. - A test that fails on current `next` checks that one `remote info` line and one deep-verify line carry the `internal/ui` marker, and that neither is printed under `--quiet`. - `make check` passes. **Package.** `internal/vaultik`, the three files named. No README change: the README already describes this behaviour. Model: opus-5-5
clawbot self-assigned this 2026-11-10 20:49:43 +01:00
Author
Collaborator

Built in #414: every line listed above now goes through v.UI with the named method. Reports, headers and summaries are unchanged. Two tests check the marker on one remote info line and one deep-verify line, and that each is absent under --quiet.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/vaultik/pulls/414: every line listed above now goes through `v.UI` with the named method. Reports, headers and summaries are unchanged. Two tests check the marker on one `remote info` line and one deep-verify line, and that each is absent under `--quiet`. 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#410