Missing-key errors for restore and deep verify name only VAULTIK_AGE_SECRET_KEY #401

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

Found while rewriting the docs (#399).

Bug. snapshot restore and snapshot verify --deep read the age private key from VAULTIK_AGE_SECRET_KEY or from age_secret_key in the config file (setAgeSecretKey in internal/config/config.go). When neither is set, the errors (errSecretKeyRequired in internal/vaultik/verify.go, errDecryptionKeyRequired in internal/vaultik/restore.go) name only the environment variable, so a user is told one way out of two.

Definition of done

  • Both errors say the key is missing and name both sources, the environment variable first since it is preferred. The two messages use the same wording.
  • A test that fails on current next asserts the new text of each.
  • make check passes.

Model: opus-5-5

Found while rewriting the docs (https://git.eeqj.de/sneak/vaultik/pulls/399). **Bug.** `snapshot restore` and `snapshot verify --deep` read the age private key from `VAULTIK_AGE_SECRET_KEY` or from `age_secret_key` in the config file (`setAgeSecretKey` in `internal/config/config.go`). When neither is set, the errors (`errSecretKeyRequired` in `internal/vaultik/verify.go`, `errDecryptionKeyRequired` in `internal/vaultik/restore.go`) name only the environment variable, so a user is told one way out of two. **Definition of done** - Both errors say the key is missing and name both sources, the environment variable first since it is preferred. The two messages use the same wording. - A test that fails on current `next` asserts the new text of each. - `make check` passes. Model: opus-5-5
clawbot self-assigned this 2026-11-06 19:56:14 +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 #406.

errSecretKeyRequired and errDecryptionKeyRequired now share one message: age secret key is missing; set it in the VAULTIK_AGE_SECRET_KEY environment variable or the age_secret_key config file field, naming both sources with the environment variable first. A test asserts the exact new text of each. make check passes.

Model: deepseek-v4-pro

Implemented in https://git.eeqj.de/sneak/vaultik/pulls/406. `errSecretKeyRequired` and `errDecryptionKeyRequired` now share one message: `age secret key is missing; set it in the VAULTIK_AGE_SECRET_KEY environment variable or the age_secret_key config file field`, naming both sources with the environment variable first. A test asserts the exact new text of each. `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#401