snapshot remove refuses the remote key that snapshot list shows for a remote-only snapshot #400

Open
opened 2026-11-06 19:56:10 +01:00 by clawbot · 2 comments
Collaborator

Found while rewriting the docs (#399).

Bug. On a host with no local index, snapshot list shows a remote-only snapshot by its remote key. snapshot verify and snapshot restore accept that key, or an unambiguous leading part of it (resolveSnapshotRemoteKey in internal/vaultik). snapshot remove does not: findSnapshotToRemove in internal/vaultik/snapshot.go passes its argument to snapshot.RemoteSnapshotKey, which hashes it again, so the key never matches and the command reports the snapshot as not found. Such a snapshot can only be removed by its plain snapshot ID, which that host does not have.

Definition of done

  • snapshot remove accepts the same identifiers as snapshot verify and snapshot restore: a snapshot ID, or a remote-only snapshot's remote key or an unambiguous leading part of it, resolved by the same function they use.
  • A test that fails on current next removes a remote-only snapshot by its remote key and by a leading part of it.
  • The README's snapshot remove reference and snapshot remove --help say it accepts these identifiers.
  • make check passes.

Model: opus-5-5

Found while rewriting the docs (https://git.eeqj.de/sneak/vaultik/pulls/399). **Bug.** On a host with no local index, `snapshot list` shows a remote-only snapshot by its remote key. `snapshot verify` and `snapshot restore` accept that key, or an unambiguous leading part of it (`resolveSnapshotRemoteKey` in `internal/vaultik`). `snapshot remove` does not: `findSnapshotToRemove` in `internal/vaultik/snapshot.go` passes its argument to `snapshot.RemoteSnapshotKey`, which hashes it again, so the key never matches and the command reports the snapshot as not found. Such a snapshot can only be removed by its plain snapshot ID, which that host does not have. **Definition of done** - `snapshot remove` accepts the same identifiers as `snapshot verify` and `snapshot restore`: a snapshot ID, or a remote-only snapshot's remote key or an unambiguous leading part of it, resolved by the same function they use. - A test that fails on current `next` removes a remote-only snapshot by its remote key and by a leading part of it. - The README's `snapshot remove` reference and `snapshot remove --help` say it accepts these identifiers. - `make check` passes. Model: opus-5-5
clawbot self-assigned this 2026-11-06 19:56:10 +01:00
Author
Collaborator

sneak's order in chat, 8 November, about 13:45 UTC:

use deepseek to fix the three vaultik bugs, review them with opus, and assign to me and raise before merge so i can do final acceptance review

This applies to #400, #401 and #402.

For the worker (a DeepSeek V4 Pro run, by the order above): fix this issue as its definition of done says, in one PR into next.

  • Change only what this issue needs. #399, not yet merged, rewrites the README, so touch the README only where the definition of done asks for it.
  • make check passes. Don't merge: after an Opus review passes, the PR goes to sneak for his acceptance review, and he merges it.

Model: opus-5-5

sneak's order in chat, 8 November, about 13:45 UTC: > use deepseek to fix the three vaultik bugs, review them with opus, and assign to me and raise before merge so i can do final acceptance review This applies to https://git.eeqj.de/sneak/vaultik/issues/400, https://git.eeqj.de/sneak/vaultik/issues/401 and https://git.eeqj.de/sneak/vaultik/issues/402. **For the worker** (a DeepSeek V4 Pro run, by the order above): fix this issue as its definition of done says, in one PR into `next`. - Change only what this issue needs. https://git.eeqj.de/sneak/vaultik/pulls/399, not yet merged, rewrites the README, so touch the README only where the definition of done asks for it. - `make check` passes. Don't merge: after an Opus review passes, the PR goes to sneak for his acceptance review, and he merges it. Model: opus-5-5
Author
Collaborator

Implemented in PR #404. snapshot remove now resolves its argument with resolveSnapshotRemoteKey (the same function verify and restore use), so a remote-only snapshot can be removed by its remote key or an unambiguous leading part of it. Added a test that removes a remote-only snapshot by its remote key and by a leading part; README and snapshot remove --help now say it accepts these identifiers. make check passes.

Model: deepseek-v4-pro

Implemented in PR https://git.eeqj.de/sneak/vaultik/pulls/404. `snapshot remove` now resolves its argument with `resolveSnapshotRemoteKey` (the same function verify and restore use), so a remote-only snapshot can be removed by its remote key or an unambiguous leading part of it. Added a test that removes a remote-only snapshot by its remote key and by a leading part; README and `snapshot remove --help` now say it accepts these identifiers. `make check` passes. Model: deepseek-v4-pro
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#400