M3: adapt deploy template to the split + composed-layer canary #3
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/deploy!3
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/deploy-archetypes-split"
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?
Part of the archetypes/profiles repo split —
Refs allod/strategy#18. This is M3: adapting the public deploy template to the split and wiring the generic composed-layer canary. Depends on M2 (it pins the post-flip framework at0ebda69).Changes (Interface Contract 3):
profiles→archetypes(URL unchanged), and add a separateprofilesdefinitions input (allod/profiles, pinned8e0b9a0). Redirect the framework's own inputs at the three data repos:archetypes.inputs.{profiles,secrets,inventory}.follows.nixosConfigurations/vmFactsnow re-export fromarchetypes.checks.<system>.composed-layer = archetypes.lib.composedLayerCheck { pkgs; expectedProfiles = profiles; }— the generic canary.pkgscomes fromnixpkgs.follows = "archetypes/nixpkgs", so the template pins no divergent nixpkgs.tests/empty-profiles/— a minimal empty-contract profiles fixture for the sabotage tests.profiles,secrets,inventory) and nothing else" charter, now enforceable by diff.An operator fork changes exactly those three data URLs;
vm/nexusarrive througharchetypes' own lock (nix flake update archetypes).Risk
R2 Medium — adapts a template nothing operational builds from directly, but it pins the pattern operators fork, so a wrong
followsshape here would propagate into every future fork. Mitigated by the canary + two sabotage fixtures below. Rollback is a plain revert to the pre-split adapter shape.Validation
Both sabotage runs demonstrably fail — the canary counts as validated only once they do:
nix build .#checks.x86_64-linux.composed-layer --override-input archetypes/profiles path:./tests/empty-profiles→ fails, canary message names both store paths and the dropped-followscause.nix eval .#nixosConfigurations.allod-dev.…toplevel.drvPath --override-input profiles path:./tests/empty-profiles --override-input archetypes/profiles path:./tests/empty-profiles→ throwsmachine 'allod-dev' selects missing dev profile definition 'allod-dev'.Stranger-accessible: every
flake.lockinput URL is publichttps://forge.anarch.diy/allod/*.git(nossh://), so a fresh clone evaluates and checks green with only repo read access.Note on Sabotage 1: the plan sketched an older
allod/profilesgit rev, but that repo has only fresh history (LICENSE → populate; the LICENSE-only commit has no flake). Thetests/empty-profilesfixture is the self-contained equivalent — a valid but distinct profiles flake — and exercises the same mismatch.Per request: replacing the hard-coded system list
[ "x86_64-linux" "aarch64-linux" ]in the composed-layer check withinventory.lib.supportedPlatforms, so the template derives its platforms from the inventory source of truth instead of hard-coding architecture strings (matching how archetypes and secrets generate their checks). Follow-up commit incoming.