-
Notifications
You must be signed in to change notification settings - Fork 26
init --decrypt without talm.key: error needs recovery-path hint #177
Copy link
Copy link
Open
Labels
area/ageIssues or PRs related to pkg/age (key generation, encrypt/decrypt, rotation)Issues or PRs related to pkg/age (key generation, encrypt/decrypt, rotation)area/initIssues or PRs related to talm init (project bootstrap, encrypt/decrypt, --update flow)Issues or PRs related to talm init (project bootstrap, encrypt/decrypt, --update flow)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtCategorizes issue or PR as related to cleanup of code, process, or technical debtpriority/backlogGeneral backlog priority. Lower than priority/important-longtermGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Metadata
Metadata
Assignees
Labels
area/ageIssues or PRs related to pkg/age (key generation, encrypt/decrypt, rotation)Issues or PRs related to pkg/age (key generation, encrypt/decrypt, rotation)area/initIssues or PRs related to talm init (project bootstrap, encrypt/decrypt, --update flow)Issues or PRs related to talm init (project bootstrap, encrypt/decrypt, --update flow)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtCategorizes issue or PR as related to cleanup of code, process, or technical debtpriority/backlogGeneral backlog priority. Lower than priority/important-longtermGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Problem
talm init --decryptagainst a project wheretalm.keyis missing emits a raw stack-style error with no hint about the recovery path:Operators don't always know that
talm.keyis required to decrypt — the message reads like a bug in talm rather than "you need to restore your key".Reproduction
Error path:
pkg/age/age.go:32(theload keywrapper inDecryptString) bubbles up throughpkg/commands/init.godecrypt entrypoint without adding a hint.Expected
A hint pointing at the recovery options:
Trivially achievable by adding
errors.WithHintin eitherpkg/age/age.goat the load-key site or inpkg/commands/init.goat the decrypt entrypoint.Why this matters
talm.keyloss is a real operational scenario (laptop swap, lost backup, fresh checkout). The current error suggests an internal bug; the fixed version points at recovery.Surfaced during the dev17 manual test plan exercise.