Found while fixing #224 and filed separately: that issue covers commands that fail, and this one exits 0.
With a destination directory that does not exist, vaultik snapshot remove host_2026-01-01T00:00:00Z --json --force exits 0 and writes this to stdout:
⚠️ Warning: Could not remove snapshot metadata from remote: listing objects: checking destination directory: stat ...: no such file or directory. Run 'vaultik prune' once the remote is reachable to finish cleanup.
{
"snapshot_id": "host_2026-01-01T00:00:00Z"
}
so | jq fails. removeSnapshotRemote in internal/vaultik/snapshot.go writes the warning through v.UI as well as the logger. v.UI writes to stdout, and --json quiets it, but warnings and errors always emit. The README says that under --json stdout holds the document and nothing else.
As far as traced, the other v.UI warnings either run only in table mode or belong to commands without --json.
Definition of done
Under --json, snapshot remove against an unreachable destination writes only the document to stdout, and the warning still reaches stderr.
A test runs it and decodes stdout as exactly one JSON document.
make check passes.
Model: opus-5-5
Found while fixing https://git.eeqj.de/sneak/vaultik/issues/224 and filed separately: that issue covers commands that fail, and this one exits 0.
With a destination directory that does not exist, `vaultik snapshot remove host_2026-01-01T00:00:00Z --json --force` exits 0 and writes this to stdout:
```
⚠️ Warning: Could not remove snapshot metadata from remote: listing objects: checking destination directory: stat ...: no such file or directory. Run 'vaultik prune' once the remote is reachable to finish cleanup.
{
"snapshot_id": "host_2026-01-01T00:00:00Z"
}
```
so `| jq` fails. `removeSnapshotRemote` in `internal/vaultik/snapshot.go` writes the warning through `v.UI` as well as the logger. `v.UI` writes to stdout, and `--json` quiets it, but warnings and errors always emit. The README says that under `--json` stdout holds the document and nothing else.
As far as traced, the other `v.UI` warnings either run only in table mode or belong to commands without `--json`.
## Definition of done
1. Under `--json`, `snapshot remove` against an unreachable destination writes only the document to stdout, and the warning still reaches stderr.
2. A test runs it and decodes stdout as exactly one JSON document.
3. `make check` passes.
Model: opus-5-5
Reproduced on next at 85d4ef1. Fixed in #256: under --json, snapshot remove no longer prints the stdout warning, and the logger's warning on stderr remains. That stderr record names the error but not the vaultik prune follow-up.
Model: opus-5-5
Reproduced on `next` at `85d4ef1`. Fixed in https://git.eeqj.de/sneak/vaultik/pulls/256: under `--json`, `snapshot remove` no longer prints the stdout warning, and the logger's warning on stderr remains. That stderr record names the error but not the `vaultik prune` follow-up.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found while fixing #224 and filed separately: that issue covers commands that fail, and this one exits 0.
With a destination directory that does not exist,
vaultik snapshot remove host_2026-01-01T00:00:00Z --json --forceexits 0 and writes this to stdout:so
| jqfails.removeSnapshotRemoteininternal/vaultik/snapshot.gowrites the warning throughv.UIas well as the logger.v.UIwrites to stdout, and--jsonquiets it, but warnings and errors always emit. The README says that under--jsonstdout holds the document and nothing else.As far as traced, the other
v.UIwarnings either run only in table mode or belong to commands without--json.Definition of done
--json,snapshot removeagainst an unreachable destination writes only the document to stdout, and the warning still reaches stderr.make checkpasses.Model: opus-5-5
Reproduced on
nextat85d4ef1. Fixed in #256: under--json,snapshot removeno longer prints the stdout warning, and the logger's warning on stderr remains. That stderr record names the error but not thevaultik prunefollow-up.Model: opus-5-5