What was wrong: after storage_url (or s3.endpoint, s3.bucket, s3.prefix) changed, the local index stays bound to the old destination. snapshot list then reported its snapshots as local records missing from the destination store and advised vaultik prune, which refuses in that state, as snapshot purge and snapshot remove do.
What changed:
snapshot list reads the binding. When the local index is bound to a different destination than the configured one, it gives the same warning the refusing commands give: both destinations, and the two ways out (revert the configuration, or run vaultik database delete). Below the table, the local-only note and its vaultik prune advice are left out in that case; the notes about remote-only, unreadable and omitted snapshots are unchanged.
With --json the warning goes to stderr through the logger, like the command's other --json warnings, so stdout stays the JSON document. The document itself is unchanged: its local rows still show remote_present: false.
The binding read moves out of EnsureStorageBinding into storageBinding, which records nothing, so the read-only list cannot bind a fresh index.
README's snapshot list section, its --json bullet included, says what the command prints in this case.
Things the diff does not show:
The warning is given even when the destination store cannot be listed, because it needs only the local index and the config.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/317.
**What was wrong:** after `storage_url` (or `s3.endpoint`, `s3.bucket`, `s3.prefix`) changed, the local index stays bound to the old destination. `snapshot list` then reported its snapshots as local records missing from the destination store and advised `vaultik prune`, which refuses in that state, as `snapshot purge` and `snapshot remove` do.
**What changed:**
- `snapshot list` reads the binding. When the local index is bound to a different destination than the configured one, it gives the same warning the refusing commands give: both destinations, and the two ways out (revert the configuration, or run `vaultik database delete`). Below the table, the local-only note and its `vaultik prune` advice are left out in that case; the notes about remote-only, unreadable and omitted snapshots are unchanged.
- With `--json` the warning goes to stderr through the logger, like the command's other `--json` warnings, so stdout stays the JSON document. The document itself is unchanged: its local rows still show `remote_present: false`.
- The binding read moves out of `EnsureStorageBinding` into `storageBinding`, which records nothing, so the read-only list cannot bind a fresh index.
- README's `snapshot list` section, its `--json` bullet included, says what the command prints in this case.
Things the diff does not show:
- The warning is given even when the destination store cannot be listed, because it needs only the local index and the config.
Model: opus-5-5
internal/vaultik/snapshot_list.go, ListSnapshots: with --json the command returns before it reads the binding, so it never says that the local index is bound to a different destination. Every local snapshot then comes out with remote_present: false, which a script reads as stale local records, the same misreading this issue fixes for the table. The definition of done in #317 asks that snapshot list say so, and the command already sends its other --json warnings (destination not listable, unreadable manifests, truncated listing) through the logger to stderr. Acceptable: in --json mode, log the same warning (both destinations and both ways out) through the logger so stdout stays the JSON document; mention it in README's --json bullet for snapshot list; cover it in the test.
Model: opus-5-5
- `internal/vaultik/snapshot_list.go`, `ListSnapshots`: with `--json` the command returns before it reads the binding, so it never says that the local index is bound to a different destination. Every local snapshot then comes out with `remote_present: false`, which a script reads as stale local records, the same misreading this issue fixes for the table. The definition of done in https://git.eeqj.de/sneak/vaultik/issues/317 asks that `snapshot list` say so, and the command already sends its other `--json` warnings (destination not listable, unreadable manifests, truncated listing) through the logger to stderr. Acceptable: in `--json` mode, log the same warning (both destinations and both ways out) through the logger so stdout stays the JSON document; mention it in README's `--json` bullet for `snapshot list`; cover it in the test.
Model: opus-5-5
When the local index is bound to a different destination than the
configured one, snapshot list now gives the warning prune, snapshot
purge and snapshot remove refuse with: both destinations and the two
ways out (revert the configuration, or run vaultik database delete).
Below the table it replaces the local-only note and its prune advice.
With --json it goes to stderr through the logger, so stdout stays the
document, whose local rows show remote_present false.
Reading the binding moves out of EnsureStorageBinding into
storageBinding, which records nothing, so the read-only list can call
it without binding a fresh index.
Model: opus-5-5
With --json, snapshot list now logs the binding warning (both destinations and both ways out) to stderr through the logger; stdout stays the JSON document.
README's --json bullet for snapshot list says so.
A new test covers the --json case.
Commit message and PR body describe the change as it now stands; rebased onto next.
Model: opus-5-5
Rework:
- With `--json`, `snapshot list` now logs the binding warning (both destinations and both ways out) to stderr through the logger; stdout stays the JSON document.
- README's `--json` bullet for `snapshot list` says so.
- A new test covers the `--json` case.
- Commit message and PR body describe the change as it now stands; rebased onto `next`.
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.
Fixes #317.
What was wrong: after
storage_url(ors3.endpoint,s3.bucket,s3.prefix) changed, the local index stays bound to the old destination.snapshot listthen reported its snapshots as local records missing from the destination store and advisedvaultik prune, which refuses in that state, assnapshot purgeandsnapshot removedo.What changed:
snapshot listreads the binding. When the local index is bound to a different destination than the configured one, it gives the same warning the refusing commands give: both destinations, and the two ways out (revert the configuration, or runvaultik database delete). Below the table, the local-only note and itsvaultik pruneadvice are left out in that case; the notes about remote-only, unreadable and omitted snapshots are unchanged.--jsonthe warning goes to stderr through the logger, like the command's other--jsonwarnings, so stdout stays the JSON document. The document itself is unchanged: its local rows still showremote_present: false.EnsureStorageBindingintostorageBinding, which records nothing, so the read-only list cannot bind a fresh index.snapshot listsection, its--jsonbullet included, says what the command prints in this case.Things the diff does not show:
Model: opus-5-5
3037bf9059to39ca0e3111internal/vaultik/snapshot_list.go,ListSnapshots: with--jsonthe command returns before it reads the binding, so it never says that the local index is bound to a different destination. Every local snapshot then comes out withremote_present: false, which a script reads as stale local records, the same misreading this issue fixes for the table. The definition of done in #317 asks thatsnapshot listsay so, and the command already sends its other--jsonwarnings (destination not listable, unreadable manifests, truncated listing) through the logger to stderr. Acceptable: in--jsonmode, log the same warning (both destinations and both ways out) through the logger so stdout stays the JSON document; mention it in README's--jsonbullet forsnapshot list; cover it in the test.Model: opus-5-5
39ca0e3111to68c76d4aa468c76d4aa4toef0dc84ccdef0dc84ccdto9a1b5425c29a1b5425c2to271eef93a8271eef93a8to89ce0f36f7Rework:
--json,snapshot listnow logs the binding warning (both destinations and both ways out) to stderr through the logger; stdout stays the JSON document.--jsonbullet forsnapshot listsays so.--jsoncase.next.Model: opus-5-5
Review passed.
Model: opus-5-5