--cron flag help text misstates what it suppresses #87

Open
opened 2026-08-09 07:44:02 +02:00 by clawbot · 0 comments
Collaborator

Last remaining place in the tree that misdescribes --cron. Split out of
#84, which corrected the Vaultik.UI doc comment and the README but
deliberately left this one alone: a cobra flag help string is program
output
, so changing it is a user-visible change and did not belong in a
docs-only PR.

internal/cli/snapshot.go:138:

"Run in cron mode (silent unless error)"

--cron is not silent unless error. internal/cli/app.go:58-60 calls
UI.SetQuiet(true), and in internal/ui/ui.go exactly seven methods
check quiet (Beginf, Completef, Infof, Noticef, Detailf,
Progressf, Bannerf). Warningf (ui.go:158) and Errorf
(ui.go:167) have no check — warnings are still printed.

This is not pedantry: internal/vaultik/snapshot.go:116-124 routes the
end-of-run summary through UI.Warningf specifically so that cron
delivers something
. A user who trusts the help text would expect silence
on a successful run and may treat any cron output as a failure signal,
which is backwards.

Definition of done

  1. internal/cli/snapshot.go:138 reads
    "Run in cron mode (silent unless warning or error)", matching the
    README wording corrected in #84.
  2. Grep confirms no other user-facing string — help text, error message,
    or log line — still claims --cron is silent except on error. #84
    covered the comments and the README; this covers program output.
  3. No behavior change beyond the string itself.
  4. script/cibuild exits 0, verified as a genuine run rather than a
    cached replay (see #85 — a bare exit code is not evidence until that
    lands). State the wall time or show the check layers were not
    CACHED.

Small enough to fold into another PR touching internal/cli if one comes
along before this is picked up.

Last remaining place in the tree that misdescribes `--cron`. Split out of #84, which corrected the `Vaultik.UI` doc comment and the README but deliberately left this one alone: a cobra flag help string is **program output**, so changing it is a user-visible change and did not belong in a docs-only PR. `internal/cli/snapshot.go:138`: ```go "Run in cron mode (silent unless error)" ``` `--cron` is not silent unless error. `internal/cli/app.go:58-60` calls `UI.SetQuiet(true)`, and in `internal/ui/ui.go` exactly seven methods check `quiet` (`Beginf`, `Completef`, `Infof`, `Noticef`, `Detailf`, `Progressf`, `Bannerf`). `Warningf` (`ui.go:158`) and `Errorf` (`ui.go:167`) have no check — **warnings are still printed**. This is not pedantry: `internal/vaultik/snapshot.go:116-124` routes the end-of-run summary through `UI.Warningf` *specifically so that cron delivers something*. A user who trusts the help text would expect silence on a successful run and may treat any cron output as a failure signal, which is backwards. ## Definition of done 1. `internal/cli/snapshot.go:138` reads `"Run in cron mode (silent unless warning or error)"`, matching the README wording corrected in #84. 2. Grep confirms no other user-facing string — help text, error message, or log line — still claims `--cron` is silent except on error. #84 covered the comments and the README; this covers program output. 3. No behavior change beyond the string itself. 4. `script/cibuild` exits 0, verified as a genuine run rather than a cached replay (see #85 — a bare exit code is not evidence until that lands). State the wall time or show the check layers were not `CACHED`. Small enough to fold into another PR touching `internal/cli` if one comes along before this is picked up.
clawbot added this to the 1.0.0 milestone 2026-08-09 07:44:02 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#87