Export one credential-store URL predicate and its vector table #30
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!30
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/credential-url-predicate"
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: this adds exports and checks to the identity template and removes nothing, so every existing consumer reads exactly what it read before. What is new is one place that owns the
https://user:token@hosttemplate rule, which allod/archetypes, allod/nexus and allod/tools each spell out today and keep aligned by comment:credential-store-url.jsonholds the URL grammar, the blank-line class, and 26 accept and reject vectors, and the flake exports the predicate over it, plus a per-group projection of the local auth refresh metadata that is validated on the way out the same way the token registry already is. What proves it isnix flake check, which now runs the predicate over every vector and the projection over the real registry plus one sabotage registry per refresh rule, each check shown to go red when its input is broken. If this is wrong, the symptom is a consumer's evaluation refusing a registry it accepted before, or the new checks failing, and the fix is a straight revert of this one commit, because no consumer depends on the new exports until its own PR lands. A deployment's private fork of this template must merge this change before the allod/nexus and allod/tools follow-ups reach its machines, since those follow-ups refuse a secrets checkout without these exports and say so by name.Refs allod/secrets#29
What changed
credential-store-url.json: the grammar as data (line,blank_line) andvectors, each a registry credential object with a name and anacceptbit. The blank-line class is space and tab only, becausemodules/netrc.nixin allod/archetypes drops lines withawk 'NF { print }', whose default field splitting keeps a line holding only a carriage return; the vectors pin the carriage-return, vertical-tab and form-feed cases as refusals for that reason.flake.nix:lib.credentialStoreUrl(the parsed file);lib.isCredentialStoreUrlTemplate(the grammar test on one credential, noformatguard, so a downstream registry validator with its ownformatpolicy can compose it, as asked in the issue's comment) andlib.isCredentialStoreUrlSource(the guard composed with it, which is what archetypes checks today);lib.localAuthRefreshDiagnostics(the rulesrefresh-local-authapplies in jq today, as a function over a registry so checks can feed fixtures) andlib.localAuthRefreshSources(the projection, asserted on read). An explicitlocal_auth_refresh: nullcounts as no entries, as jq's//treats it;falseis refused because a boolean is not a list. New checkscredential-store-urlandlocal-auth-refresh.README.md: the new file, exports and checks in the lists that enumerate them.Risk
R2. Localized: new exports and checks, no consumer switched, nothing removed. The projection asserts on read, so a consumer that adopts it fails evaluation on a registry the jq path would also have refused; that is the intended fail-closed behaviour and it is exercised by the check's sabotage registries. Rollback is a straight revert.
Validation
Run by the overseer in the worktree at commit
66b873d:nix flake check path:.—all checks passed!(external-ssh-trust-targets, credential-registry, credential-store-url, local-auth-refresh, pi-credential-registry, credential-inventory).nix eval --json path:.#lib.localAuthRefreshSources— the public registry's one refresh entry, projected under its group alias.nix eval --json path:.#lib.credentialStoreUrl | jq '.vectors | length'— 26 (4 accept, 22 reject).lib.localAuthRefreshDiagnosticson a group withlocal_auth_refresh = null—[].lib.credentialStoreUrlin a rotate dry run. Both refuse a checkout at current master by name.Run by the worker, output read by the overseer:
credential-store-url: flipping thecarriage-return blank linevector to accept fails the check naming that vector; a template predicate that accepts everything fails it naming the 20 format-free reject vectors.local-auth-refresh: a positive fixture with a path-suffixed template fails withis not a credential-store URL source; treating null as a non-list fails the null assertion.Cold cross-family review: codex
gpt-5.6-sol, reasoning efforthigh, on the commit before the fix round (2fd1dfb). One major, fixed: an explicitlocal_auth_refresh: nullwas refused where jq accepted it; now null is no entries, with sabotage coverage. One minor, fixed: README and a flake comment claimed the consumers already read the table; reworded to intent. Findings after the fix round are settled by the checks above, not by another reading.