Mark a machine's host-provided repos and render them into vm-specs.json #21
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/inventory#21
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
A machine definition can name repos whose checkout the hypervisor supplies, so a dev VM whose forge identity may not read a remote keeps that repo in
repos(which the framework's memory assert requires) while the guest bootstrap no longer tries to clone it.Part of allod/strategy#62.
Primary goals:
host_provided_repos = [ "<registry id>" ... ], and every id named must also appear in that machine'srepos.vm-specs.json—mkVmSpecsJsonemitshost_provided_reposfor a machine that declares it and omits the key otherwise, so the consumer inallod/nexus(bootstrap-vm, allod/nexus#73) reads.host_provided_repos // []and sees no change on a machine without the marker.repos, and a marker on a hypervisor each fail evaluation with their own diagnostic, disjoint from every other, with a mutation check that pins each sabotage to its one diagnostic the wayhost-fact-mutationsdoes forhost.scripts/vm-specs.jsonstays byte-identical and thevm-specs-jsondrift check still passes.Current state and specifics
flake.nixmkVmSpecsJsonwhitelists the rendered fields (memory_mb vcpus disk_gb ip mac forge_key repos runtime, plusdata_diskandhostwhen declared), so an undeclared key never reaches the JSON.machineDiagnosticsclassifies a machine set into disjoint diagnostic sets, each guarded on the previous predicate, andmkVmSpecsasserts them in a stated order;host-fact-mutationsis the check shape to copy for the new marker. Therepository-registrycheck validates everyreposmember againstscripts/repositories.jsonand already readsmachineRepositoriesJson; the new marker's subset rule is a per-machine rule and belongs inmachineDiagnostics, not in that shell check.Scope
In scope: the marker's validation and rendering in
flake.nix, one mutation check, and a line inREADME.md. Tracked elsewhere: the host step that injects and refreshes the checkout (allod/nexus#73), the guest-side skip rule for checkout walkers (the allod/tools child of allod/strategy#62), and deployments mirroring the marker in their private inventory forks.