Move the check suite and the registry validators out of flake.nix #38
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!38
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/secrets-checks-out-of-flake"
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?
The seven checks move out of
flake.nixintochecks/and the registry validators intolib/, and nothing any check asserts or any validator accepts changes: six of the seven check derivation paths and 26 of the 28 exportedlibvalues are byte-identical before and after, and the remaining three differ only by this repository's own source-tree hash, which every commit shifts.flake.nixgoes from 1465 lines to 165 and is the composition of data files and exports again. What proves it is the derivation-path comparison, the hash-normalized comparison for the three, all seven checks building, and allod/archetypes evaluating identically against this branch and against master. If it is wrong, revert the one commit.What changed
checks/<name>.nixfor each of the seven checks, each declaring exactly the arguments it reads (discovered from parse-time undefined-variable errors), withchecks/default.nixas the index in the shape allod/archetypes#96 established.lib/credential-registry.nix,lib/credential-store-url.nix,lib/local-auth-refresh.nix: the validators that were bindings in the flake's top-level scope, now beside the fourlib/files that already had that role.flake.niximports them and exports the same names with the same values.../rotation-registry.json,../lib/pi-credential-recipients.nix); a string"../escape"that is a deliberately malicious fixture key was left alone.Risk
R2. Test apparatus and pure library code move; no ciphertext, recipient, identity or deployed path changes. The derivation-path witness covers every check and every exported value, and archetypes, the consumer of
lib, was evaluated against the branch. Residual risk is prose describing the old layout. Rollback is a straight revert.Validation
libvalues captured onenixprocess per item on master and on the branch. Identical: 6 checks and 26libattributes. Differ:credential-inventory,lib.devIdentities,lib.vmHostKeySecretFiles. Each of the three referencesselfor a flake path as a string, so the flake's own source store path is part of its value; with that one hash normalized the twolibvalues are identical and the check's derivation differs only in its source input and, consequently, its output path. The worker also reproduced the same three-line diff by adding one unrelated tracked file to an unchanged tree.nix build .#checks.x86_64-linux.<name>, one at a time).vmFactsand thecredential-profilesandcredential-store-url-paritycheck derivations, evaluated with--override-input secretspointing at secrets master and at this branch:vmFactsidentical with the source hash normalized;credential-profilesderivation path identical outright;credential-store-url-paritydiffers only in its secrets source input, because it reads${secrets}/credential-store-url.jsonthrough the whole secrets tree, so its derivation shifts on every secrets commit (confirmed by diffing the two derivations with store hashes normalized: only the source input and the output path differ).nix-instantiate --parse).gpt-5.6-terraon codex, high effort): no findings, after reading the index, the three lib files, the new check files and the README (transcript of 335 KB; an empty review was ruled out before it was read as approval).Closes allod/secrets#37