Move the check suite out of flake.nix #93
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/archetypes#93
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?
Move the check suite out of
flake.nixintochecks/, so the framework flake is the composition and each check is a function of what it reads.Primary goals:
flake.nixis composition again — it is 3751 lines today and thechecksoutput starts at line 822, so roughly three quarters of the file is test apparatus sitting in the file that builds every machine.machineConfigurations, the builders,pkgsandsystemas arguments, which is newly possible because no check reads a data input by name any more.Current state and specifics
All nineteen checks are declared inline in the
checksoutput (flake.nix:822onward). Six of them delegate part of their body to a file underchecks/—public-host.nix(flake.nix:3002),static-site.nix(:3014),pi-integration.nix(:3110),pi-provider-lifecycle.nix(:3232),memory-traces.nix(:3281),ssh-settings.nix(:3575) — but the part that stayed behind in each case is the fixture construction and the input wiring, which is the part that makes the region hard to read and hard to review.allod/archetypes#88 is what makes this cheap now. Before it, a check reached into
machines,devIdentitiesandmergedProfileDefinitionsthrough closure over the flake's top-levellet, so a check could not be moved without dragging that scope with it. Every check now names what it reads: the composed machines, or fixture values it builds itself. The six existing helper files show the shape the other thirteen should take.Two constraints to carry across.
testing.mdrecords that two checks with the same derivation name shadow each other silently when check sets are merged, so names must stay unique and unchanged — a fork that excluded a check by name should not have to track a rename. And the suite's peak evaluation memory is the reasoncheck.shruns onenixprocess per check; moving declarations between files does not change that, but a refactor that accidentally forces more fixtures in one process would.Scope
In scope: the thirteen checks with no helper file yet, the fixture construction that stayed behind in the six that have one, and whatever shared helpers the move makes worth extracting.
Explicitly not in scope: changing what any check asserts. This is a move, and the gate is that
./check.sh,./fork-safety.shand every machine's derivation path are unchanged by it.Tracked elsewhere: the builder signatures (allod/archetypes#92), and whether the fork witness becomes a second composition (allod/archetypes#94), which this unblocks.
Refs allod/archetypes#88