Mark host-provided repos per machine and render them into vm-specs.json #22

Merged
vnprc merged 2 commits from agent/host-provided-marker into master 2026-10-01 20:57:49 +01:00
Member

A machine definition may now list repos the hypervisor supplies instead of the guest cloning them, as host_provided_repos. For a running machine nothing changes: no public machine declares the marker, scripts/vm-specs.json is byte-identical, and every consumer that does not read the new key sees the same JSON. What proves it: the existing vm-specs-json drift check still passes, and a new host-provided-repos-mutations check pins each malformed marker (not a list of strings, a member outside repos, declared on a hypervisor) to its own evaluation failure and shows a valid marker reaching the generated spec. If it is wrong, revert the commit; nothing on disk or in a deployment depends on it until allod/nexus reads the key.

Closes allod/inventory#21
Refs allod/strategy#62

Risk

R3 by the walk: this is a cross-repo interface (allod/nexus#73 reads the key), but the worst credible failure after validation is a fork declaring a malformed marker and getting a named evaluation failure, with no generated artifact or machine affected. Rollback is a straight revert.

Validation

  • nix eval --raw .#lib.vmSpecsJson | jq -S . | diff - <(jq -S . scripts/vm-specs.json): identical.
  • allod check: all 8 steps passed (6 checks built), including the new mutation check.
  • Sabotage: with the hostProvidedNotInRepos predicate disabled, the new check failed on its two member-outside-repos assertions; restored, green.
  • One cold cross-family review (codex gpt-5.6-sol); its one real defect (the README field list omitted the key) and two excess items were fixed in the second commit; its fork-name coupling finding matches the repo's existing checks and was not acted on.
A machine definition may now list repos the hypervisor supplies instead of the guest cloning them, as `host_provided_repos`. For a running machine nothing changes: no public machine declares the marker, `scripts/vm-specs.json` is byte-identical, and every consumer that does not read the new key sees the same JSON. What proves it: the existing `vm-specs-json` drift check still passes, and a new `host-provided-repos-mutations` check pins each malformed marker (not a list of strings, a member outside `repos`, declared on a hypervisor) to its own evaluation failure and shows a valid marker reaching the generated spec. If it is wrong, revert the commit; nothing on disk or in a deployment depends on it until `allod/nexus` reads the key. Closes allod/inventory#21 Refs allod/strategy#62 ## Risk R3 by the walk: this is a cross-repo interface (`allod/nexus#73` reads the key), but the worst credible failure after validation is a fork declaring a malformed marker and getting a named evaluation failure, with no generated artifact or machine affected. Rollback is a straight revert. ## Validation - `nix eval --raw .#lib.vmSpecsJson | jq -S . | diff - <(jq -S . scripts/vm-specs.json)`: identical. - `allod check`: all 8 steps passed (6 checks built), including the new mutation check. - Sabotage: with the `hostProvidedNotInRepos` predicate disabled, the new check failed on its two member-outside-repos assertions; restored, green. - One cold cross-family review (codex gpt-5.6-sol); its one real defect (the README field list omitted the key) and two excess items were fixed in the second commit; its fork-name coupling finding matches the repo's existing checks and was not acted on.
A guest machine can now declare host_provided_repos = [ "<alias>" ... ]
so the hypervisor-supplied checkout stays listed in repos (which the
framework's memory assert requires) without the guest bootstrap trying
to clone it itself. Three disjoint diagnostics guard it the way host
and data_disk are guarded: forbidden on a hypervisor, must be a list of
strings, and every member must also appear in repos. mkVmSpecsJson
renders the key only when a machine declares it, so the committed
scripts/vm-specs.json needs no change.

Refs allod/inventory#21
Cold review fix round: name host_provided_repos beside data_disk and
host in the derived-spec field list, cut the assertions section to a
short field description instead of narrating tracking issues and the
check mechanics the output-table row already covers, and drop a check
line that only restated what the two reads just below it already force.

Refs allod/inventory#21
vnprc approved these changes 2026-10-01 20:57:44 +01:00
vnprc merged commit 3506389b1e into master 2026-10-01 20:57:49 +01:00
vnprc deleted branch agent/host-provided-marker 2026-10-01 20:57:49 +01:00
Sign in to join this conversation.
No description provided.