Make the runtime-selection, vm-facts drift, and dev-forge-opt-out checks fork-safe #36
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/archetypes#36
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?
Bring
runtime-module-selection,vm-facts-negative, anddev-forge-opt-outup to the same fork-safety standard allod/archetypes#11 asks ofpi-integration: all three fail against a deployment fork that supplies its ownprofiles/secrets/inventoryinputs through the documented follows redirects, so a fork consuming the check suite has to exclude them and loses their coverage.Primary goals:
masterdata breaks on any fork whose identities, profile data, or inventory legitimately differ.Per-check evidence, measured against a fork at archetypes
8aa0fceruntime-module-selectionbuilds its selection fixtures from whichever dev machine inventory declares first, drivingmkDevVmwithout theprofileDatalayer thatmachineConfigurationscomposes. On a fork whose secrets identity assigns that machine a different username than the public secrets do, the fixture merges twohome.usernamedefinitions and dies before asserting anything:It also hard-requires the inventory input to expose
checks.<system>.runtime-fact-mutations, which only the public inventory carries.vm-facts-negative(as of the runtime-axis extension) requires a valid runtime literal that differs from every runtime in the composedvmFacts. With a two-valuelibvirt/microvmenum and a fleet that has machines on both, no such literal exists and the check refuses by its own design:dev-forge-opt-outasserts the composed dev machine generates exactly the two age secrets captured from publicmaster, byte-for-byte in file/path/owner/group/mode. A fork that uses the framework's own token-registry opt-out (the mechanism allod/archetypes#17 added) to withhold one credential fails the capture comparison:Scope
In scope: making these three checks pass, or self-skip with a named reason, against a fork supplying divergent
profiles/secrets/inventorydata. Out of scope: the fork's own exclusion list (each fork carries that until this lands) and pi-integration, which allod/archetypes#11 already tracks.Found during the microvm runtime adoption arc (allod/strategy#20), where a fork excluding these checks is what makes its composed check set green.
A fourth check now has the same defect:
pi-provider-lifecycle, added with the managed Pi provider arc.Its fixture hard-codes
machineName = "allod-dev"and drivesmkDevVmdirectly, without theprofileDatalayermachineConfigurationscomposes. That is the same shape asruntime-module-selection: on a fork whoseprofileDatasupplies that machine a different runtime identity, the fixture merges twohome.usernamedefinitions and dies before asserting anything.Measured against archetypes
c41a294with a fork consuming the check suite through the documentedprofiles/secrets/inventoryfollows redirects. Every other framework check in that fork's re-exported suite passes at this pin except the ones already listed here andmicrovm-host-join, which is the same fixture class again.The cost is higher for this one than for the three above, because the fork has no fork-safe sibling and no real machine to fall back on: a deployment that manages no Pi provider yet has nothing that exercises the reconciler, so excluding the check drops the coverage entirely rather than relocating it. The fixture builds a machine only to reach a home-activation script and an age secret, so composing the fixture identity through the same layer production uses — or building a synthetic dev machine rather than reusing a real machine name — would keep the witness and cost nothing.
Subsumed by allod/archetypes#88, which states the general rule (a check reads composed machines or its own fixtures, never data-input contents by name), widens the
mkDevVmseam so fixtures need no real machine name, and adds a standing fork-safety witness. Thevm-facts-negativeenum point in this issue is a separate defect and stays here.The fork-safety half is done by allod/archetypes#91, which closed allod/archetypes#88. Leaving this open for the residual named below.
What landed for the three checks this issue names:
runtime-module-selection— the dependency oninventory.checks.<system>.runtime-fact-mutationsis gone. Enum validation for theruntimefact stays inventory's to own; the framework no longer reaches for another repo's check output to prove it.vm-facts-coherence— the same dependency oninventory.checks.<system>.vm-specs-jsonis gone, and the freshness property it was buying is now derived in-check frominventory.lib.vmSpecsJson, a data surface rather than a check name. Its drift fixture selects its machine dynamically instead of namingallod-dev.dev-forge-opt-out— all four fixtures build through the widened builder seam with a synthetic name, identity, definition, platform and runtime, and committed ciphertext underchecks/fixtures/. The hand-copied literal snapshot ofallod-dev's generated secrets is replaced by shape assertions keyed off the fixture's own username, plus a sweep over the composed dev machines pinning that nothing merged in after the builder changes the path, owner, group or mode of a framework-owned credential.All three are green under
./fork-safety.sh, which runs the suite against a synthetic data trio underchecks/fork-fixture/sharing no name with the template's.Residual, still open here: the enum problem this issue also records for
vm-facts-negative. That is a separate defect from the fork-safety class and allod/archetypes#88 explicitly left it here rather than subsuming it.Verified complete, including the residual enum defect this issue's own 2026-09-21 comment left open. The fork-safety half for the three named checks was already confirmed landed via allod/archetypes#91 (closing allod/archetypes#88), per that comment. The remaining vm-facts-negative enum problem (a sabotage literal needing to differ from every runtime in vmFacts becomes unsatisfiable once a fleet uses every enum member) is independently resolved by commit
f6aba2d('Remove the microvm guest runtime from the framework', 2026-09-08, part of allod/strategy#46 which permanently withdrew the microvm runtime: 'If the runtime is revisited, it will be redesigned rather than resumed'). That commit rewrote vm-facts-negative's and vm-facts-coherence's fixtures to sabotage with a literal outside inventory's runtime enum ('fixture-runtime') instead of an enum member, so the fixture no longer depends on an unused enum member at all, satisfying this issue's own stated goal verbatim; inventory's runtime enum itself was also reduced to one member (libvirt). This is still the design on current master (checks/vm-facts-negative.nix). Verified today by building both checks against the real composed fleet: 'nix build .#checks.x86_64-linux.vm-facts-negative' and '.#checks.x86_64-linux.vm-facts-coherence' both succeed (exit 0). No other open issue references this defect.