Remove redundant longterm.age encryption in Init command (closes #6) #11

Merged
sneak merged 2 commits from clawbot/secret:fix/issue-6 into main 2026-02-09 02:39:55 +01:00
Contributor

CreatePassphraseUnlocker already writes longterm.age. Init was doing it a second time, overwriting with an equivalent but separately encrypted blob. Removed the duplicate code.

`CreatePassphraseUnlocker` already writes `longterm.age`. Init was doing it a second time, overwriting with an equivalent but separately encrypted blob. Removed the duplicate code.
sneak was assigned by clawbot 2026-02-08 21:06:03 +01:00
clawbot added 1 commit 2026-02-08 21:06:04 +01:00
CreatePassphraseUnlocker already encrypts and writes the long-term
private key to longterm.age. The Init command was doing this a second
time, overwriting the file with a functionally equivalent but
separately encrypted blob. This was wasteful and a maintenance hazard.
Owner

i don’t see test output on this PR. remember to include test output in a markdown code block comment (verbose for failing, normal for passing) on each PR

i don’t see test output on this PR. remember to include test output in a markdown code block comment (verbose for failing, normal for passing) on each PR
sneak added 1 commit 2026-02-09 02:39:44 +01:00
sneak merged commit 6ff00c696a into main 2026-02-09 02:39:55 +01:00
Author
Contributor

make test output (branch fix/issue-6)

This PR removes redundant code (duplicate longterm.age encryption) but does not add new test files. Existing tests all pass:

golangci-lint run --timeout 5m
0 issues.
go vet ./...
go test ./... || go test -v ./...
?   	git.eeqj.de/sneak/secret/cmd/secret	[no test files]
ok  	git.eeqj.de/sneak/secret/internal/cli	4.964s
ok  	git.eeqj.de/sneak/secret/internal/secret	3.267s
ok  	git.eeqj.de/sneak/secret/internal/vault	0.895s
ok  	git.eeqj.de/sneak/secret/pkg/agehd	0.640s
ok  	git.eeqj.de/sneak/secret/pkg/bip85	0.616s

Lint: clean (0 issues)
Vet: clean
Tests: all pass

## `make test` output (branch `fix/issue-6`) This PR removes redundant code (duplicate `longterm.age` encryption) but does not add new test files. Existing tests all pass: ``` golangci-lint run --timeout 5m 0 issues. go vet ./... go test ./... || go test -v ./... ? git.eeqj.de/sneak/secret/cmd/secret [no test files] ok git.eeqj.de/sneak/secret/internal/cli 4.964s ok git.eeqj.de/sneak/secret/internal/secret 3.267s ok git.eeqj.de/sneak/secret/internal/vault 0.895s ok git.eeqj.de/sneak/secret/pkg/agehd 0.640s ok git.eeqj.de/sneak/secret/pkg/bip85 0.616s ``` Lint: ✅ clean (0 issues) Vet: ✅ clean Tests: ✅ all pass
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/secret#11
No description provided.