secret declare: write two files, no secrets.nix line #279
No reviewers
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools!279
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/declare-two-files"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
allod secret declarenow writes two files, thecredentials.nixentry and therotation-registry.jsongroup, and leavessecrets.nixalone, because that file derives a declared credential's recipients from the registry group since allod/secrets#47 and the deployment fork adopted the same derivation. On a host built from this, declaring a secret on the template works again (it has had no hand-written recipient line to insert after since its entries became derived), and declaring one on a fork no longer writes the template's[ hostKey ]into a file that names its keys differently.create,rekeyandrotateare unchanged. What proves it: every declare test now assertssecrets.nixis byte-identical after the run, the registry collision check still refuses a group that already uses the new secret path, and the concurrent-edit test still provescredentials.nixis restored when the second write is refused. If it is wrong, revert the one commit; a fork that had not derived would seecreaterefuse by name, never a ciphertext to wrong recipients.This is the third step of allod/secrets#46. The companion edit to the public memory's
age.mdis its own PR onallod/memory.What changed
secretDeclarereads, validates, writes and prints two files.declareCollisionsloses itssecrets.nixargument and finding; the registry half still refuses a group keyed by the name, naming the name, or using the secret path.declareSecretsRecipients,declareSecretsLinePatternanddeclareInsertSecretsLineare deleted.secrets.nixsource.docs/allod-secret.md: the same four sentences, plusrekey's trigger described as a registry or key change rather than asecrets.nixline.secrets.nixtakes the derived shape a secrets repo has now; the threesecrets.nixcollision tests go with the check they covered; every successful run asserts the file unchanged; the concurrent-edit test edits the registry instead and still proves the restore ofcredentials.nix.Order
The host binary carries this at the next deploy lock bump of
allod-tools. The owner reports the fork step of allod/secrets#46 done and merged, which is the criterion that step set. This VM cannot read the fork to confirm it.Risk
R2. Generated text an agent reviews in a PR, with the tool's own write guards unchanged; the derived recipients are gated by the secrets repository's own checks, not by this command.
Validation
gofmt -l cmd/allodclean;go vet ./...andgo vet -tags site,secret ./...clean.go test ./...,go test -tags secret ./cmd/allod/andgo test -tags site,secret ./...pass, fromnix develop.gpt-5.6-solthrough pi'snullsinkprovider (codex holds no credentials on this VM). Seven findings. One real and fixed: a docs paragraph I had not touched still said three edits are built and three paths printed. One real and already stated under "Not run": the fixturesecrets.nixis never evaluated by the Go tests, so they cannot witness the derivation; that witness is the secrets repository's check. Five comment findings, all on comments the diff re-wrapped rather than added, each already one to three lines of contract or pointer; left as they are.declarefollowed bycreateagainst a real secrets checkout withnix. The Go tests fake the recipient evaluation, so the derivation itself is witnessed bychecks/registry-recipients.nixin allod/secrets, not here.Closes allod/tools#278