Add managed Pi provider reconciliation #44
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
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/archetypes!44
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/pi-provider-lifecycle"
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?
Every dev VM now reconciles declared custom Pi providers, including retirement to an empty desired set.
Libvirt VMs receive user-owned
0600Age secrets in volatile storage; microVM credential projections fail closed.Pi auth stores only a command-backed helper reference, never bearer bytes.
An ownership manifest limits removal to previously managed provider IDs and unchanged managed links.
Unrelated Pi configuration and operator-replaced stale links remain intact.
The empty public catalogs create no Pi credential/provider artifacts on a never-configured VM.
A generated lifecycle check exercises both OpenAI adapters, rotation caching, removal, locking, rollback, and leak boundaries.
If this is wrong, leave the PR unmerged; the public empty state has no deployment migration to undo.
Dependencies
lib.piProviders).pi-provideroperator lifecycle command).Risk
R3 High. This changes Home Manager activation, Age projection, auth configuration, removal behavior, and the Nexus operator-tool pin. Review should focus on ownership boundaries, proper-lockfile interoperability, partial-failure restoration, empty desired state, the shared-credential join, and realized cross-repo packages.
Validation
./check.sh— all 25 current machine/check/passive-output steps passed after the master refresh../check-selftest.sh— gate negative fixtures passed.nix build .#checks.x86_64-linux.pi-provider-lifecycle --no-link -Lnix build .#checks.x86_64-linux.pi-integration .#checks.x86_64-linux.composed-layer-smoke --no-link -Lnix build .#nixosConfigurations.allod-dev.config.system.build.toplevel --no-link -Lnix build .#nixosConfigurations.nexus.config.system.build.toplevel .#checks.x86_64-linux.composed-layer-smoke --no-link -L18c64d059688928694e8ff71c25cd17656efd230; the realizednexus-provisioning-scriptshas executablebin/pi-providerwith add/retarget/rotate/retire/recover help.validateComposedLayerSourcestryEval: matching graph succeeds; a changed observed profiles source fails.git diff --checkRefs allod/strategy#34
Independent R3 cross-review found one concrete rollback safety defect:
modules/pi-provider-reconcile.sh: failure cleanup unconditionally ranrm -rfon every recorded credential-link path. A non-cooperating writer could replace a checked link with a directory before a later activation failure, causing rollback to recursively delete operator data. Rollback must never recursively remove these paths; it should unlink a newly created link only while it still has the exact desired target, restore a preexisting managed link only from absence, and otherwise warn and preserve the concurrent replacement. The lifecycle check also needs a changed/non-link rollback sabotage witness.Independent
gpt-5.5/xhighR3 review found four additional actionable defects:flake.nixlets productionprofileData/ inventory profile settings overridepiProviders,piCredentials,piCatalog, andpiCredentialMapafter the secrets join. Production composition must force the secrets/profile-derived values while retaining directmkDevVminjection only for generated checks.modules/pi-provider-reconcile.shcreates a temporary symlink and force-moves it over the managed path after the pre-mutation recheck. A non-cooperating writer can create a file/link in that gap and be overwritten. Initially absent links need an atomic no-clobber create; changed existing paths must fail and be preserved.model.name = "", including in its positive fixture, while the pinned Pi schema requires a non-empty model name and rejects the resultingmodels.json. This belongs in the profiles catalog validator and archetypes must refresh its pin after that dependency fix.jq delremoved a key from its own output; it never feeds the damaged artifact to a real expected-state comparator. The witness must require the generated lifecycle assertion to fail.The reviewer also confirmed the earlier rollback fix’s conditional removal/restoration design and hostile non-link preservation witness. It could not run Nix builds in its read-only sandbox; the owner-side post-fix lifecycle build and full 23-step gate are separate validation evidence.
Resolved in follow-up commit
f7f37dae04607cc2c736df050b9d6d04ec78547f.mkDevVm.symlink(2)create; successful and failed activation paths preserve concurrent files, directories, and changed links.Post-fix validation passed: full 23-step
./check.sh, self-test, focused lifecycle/integration/composed builds, theallod-devtoplevel build, and diff-check. A second scoped read-only review of all five repaired areas reported no remaining actionable regressions.Deploy PR 4’s independent review found a cross-repo dependency blocker: this branch still pins the Nexus input at stale master
a66ea960, so the realizednixosConfigurations.nexuspackage set does not containbin/pi-providereven though deploy composes the new public interface.Cross-link: allod/deploy#4 (comment)
Resolution belongs here: repin only the Nexus input to reviewed PR 26 head
dc503fa27374711bb8d0321140e328f48e503a49, then verify the exact lock revision and inspect the realized Nexus package forbin/pi-providerbefore rerunning the affected and full gates.Resolved the stale Nexus pin finding in follow-up commit
3811b3e.flake.locknow pins only the Nexus input to reviewed PR 26 headdc503fa27374711bb8d0321140e328f48e503a49; profiles and secrets remain on their reviewed feature heads./nix/store/lhrx16j85z6qv75nyiamvlx0dny686a9-nexus-provisioning-scripts, and executablebin/pi-provider --helpexposes add, retarget, rotate, retire, and recover../check.shgate passed all 23 steps after the repin.git diff --checkpassed.PR 44’s dependency and validation sections now name Nexus PR 26 and the realized-package witness.
The owner requested that this PR be rebased after a batch of changes landed on
master. This branch is ten base commits behind. I will rebase it after Nexus PR 26, refresh the exact Nexus feature pin to that rebased head, and rerun the full archetypes gate before deploy is updated.The branch is refreshed against current
masterwithout rewriting its public history. Merge head:ddfccf0a0b0bffa7294a44dcada76de2911d5cfb; exact Nexus pin:18c64d059688928694e8ff71c25cd17656efd230.The only merge conflict was the expected Nexus lock node. It was resolved by retaining the new upstream lock graph and advancing the feature pin. The expanded full gate now passes all 25 steps,
check-selftest.shpasses, the Pi lifecycle/integration checks are included, and diff/status checks are clean. The PR validation text has been updated from 23 to 25 steps and to the refreshed Nexus head.