Export lib.mkLocalAuthRefreshSources beside its applied result #36
No reviewers
Labels
No labels
blocked
bug
decision
duplicate
enhancement
handoff
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/secrets!36
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/local-auth-refresh-constructor"
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?
Nothing changes for a running machine:
lib.localAuthRefreshSources, the attributerefresh-local-authevaluates at preflight, has the same value as before, byte for byte. What is new islib.mkLocalAuthRefreshSources, the same validated projection as a function of a caller-supplied registry, so a deployment's fork applies it to its own registry instead of copying the field mapping and gating it with the diagnostics itself. This is the shapelib.mkPiCredentialContractalready has besidelib.piCredentials. The public registry, its diagnostics, and every other export stay identical. Proof:nix flake checkpasses, thelocal-auth-refreshcheck runs the public registry and every sabotage fixture through the exported binding, and the refresh script's exactnix evalline answers the same JSON on this branch as on master. If it is wrong, revert this one commit; no consumer has switched to the new name.Closes allod/secrets#35. Refs allod/secrets#29.
What changed
flake.nix:validateLocalAuthRefreshis renamedmkLocalAuthRefreshSourcesand exported aslib.mkLocalAuthRefreshSources;lib.localAuthRefreshSourcesis now defined as that constructor applied torotationRegistry. Thelocal-auth-refreshcheck references the renamed binding; its assertions are unchanged.README.md: one row in the export table forlib.mkLocalAuthRefreshSources, besidelib.localAuthRefreshSources.Risk
R1. A rename plus one added export in a single repository. The only observable behaviour for existing consumers is the value of
lib.localAuthRefreshSources, which is measured identical below. Rollback is a straight revert. No secrets, host commands, provisioning, or cross-repo ordering:allod/nexusandallod/archetypeskeep reading the applied export and need no change.Validation
Run on this branch at its head commit:
nix flake checkin the worktree: all six checks pass, includinglocal-auth-refresh, which forces the public projection and runs every sabotage fixture throughmkLocalAuthRefreshSources.nix eval .#lib.mkLocalAuthRefreshSources --apply 'f: f {}'evaluates to{ }.nix eval .#lib --apply 'l: l.mkLocalAuthRefreshSources l.rotationRegistry == l.localAuthRefreshSources'evaluates totrue.{ g = { credentials = []; local_auth_refresh = [ 1 ]; }; }) passed to the exported constructor fails undertryEval, so the gate travels with the export.nix eval --json "path:<checkout>#lib.localAuthRefreshSources", produces byte-identical JSON on this branch and on master (cmpclean).tests/refresh-local-auth.shinallod/nexus: 21 tests pass. Note this suite stubsnixand never reads a real secrets checkout, so it witnesses only that the consumer's contract is unchanged, not this flake; thecmpabove is the witness for the real read.