allod secret: remove the legacy credential shape and the migrate command #213
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!213
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/secret-legacy-removal"
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?
Summary
allod secret migrateis gone, andcreateandrotateno longer carry a legacy path: theformatfield, the structuredverifyobject, the per-format refusal messages, and the coexistence section of the documentation are removed, so the value-template shape is the only one these commands know. What stays identical for a running machine:declare,create,rekey, androtatebehave exactly as before on a registry with noformatentry, which is what every registry now holds, and no ciphertext, deployed file, or host command changes. One refusal remains, at registry decode time: an entry that still carriesformatis refused by name, because the JSON decoder would otherwise ignore the field and treat the entry as new-shape. Proved by all four tag combinations ofgo vetandgo test, including a new unit test for that refusal. If it is wrong, revert the two commits;migrateand the legacy refusals return unchanged.Closes allod/secrets#27. The other two slices are allod/secrets#28 (the public check) and allod/archetypes#77 (the local-auth predicate); the private validator is under its own handoff issue.
Change
cmd/allod/secret_migrate.goand its test file deleted;migrateunregistered; README,flake.nix, anddocs/allod-secret.mdlist three tagged commands.isLegacyCredential,legacyCredentialContainers,legacyRefusalReason, the mixed-shape check, andregistryTarget.Userremoved;isCredentialStoreURLSourceaccepts only a template.verifyis refused as "not one command string"; the threerotatesites that namedmigratenow say to write the target's command into the registry by hand.registryCredential.Formatstays decode-only, read byfirstCredentialCarryingFormatinnixEvalTokenGroupsfor the one refusal above, pinned byTestFirstCredentialCarryingFormat.declaretest fixtures drop their lastformatand structuredverifyfields.declareitself gets no refusal: it reads the registry only for name collisions, and the secrets flake check is what refuses a bad registry shape.migrate's tests owned that survivingrotatetests need moved intosecret_rotate_test.go.Note for merging: this branch and #212 both edit the "Where things are found" paragraph of
docs/allod-secret.md; whichever lands second needs a merge from master before it can be rebase-merged.Risk
R2. Code removal plus one new decode-time refusal, with the main paths covered by caller-level tests in every tag combination; rollback is a straight revert. No secret material, host command, or deployed state is touched.
Validation
In the worktree under
nix develop:gofmt -l ./cmdprinted nothing;go vetandgo testpassed for./...,-tags secret,-tags site, and-tags site,secret(every packageok);grep -rni 'legacy\|migrate'overcmd/allod,docs,README.md, andflake.nixfinds onlynixpkgs.legacyPackagesand an unrelated site-config comment. Cold cross-family review by gpt-5.6-terra (codex, read-only sandbox) on the first commit found two stale "four commands" comments, fixed in the second commit, and flagged thedeclarefixtures still carryingformat, cleaned in the same commit.Rebased onto master after #212 landed: the one conflict was the "Where things are found" paragraph of
docs/allod-secret.md, resolved to keep the new deploy-checkout sentence while counting four commands and droppingmigrate. The forge refuses force-pushes on agent branches, so this landed as merge commit071dcc3whose tree is byte-identical to the rebased commits (git diffbetween them is empty). All four tag combinations ofgo vetandgo testpass on the merged tree.