Move the check suite out of flake.nix into checks/ #96
No reviewers
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!96
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/checks-out-of-flake"
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?
The check suite moves out of
flake.nixinto one file per check underchecks/, and nothing a machine builds changes: every machine's toplevel derivation path and every check's derivation path, on the template data and on the fork fixtures, is byte-identical before and after.flake.nixgoes from 3751 lines to 777 and is the composition again; each check declares what it reads in its own argument list, andchecks/default.nixis the index that hands it those arguments. What proves it is the derivation-path comparison above plus./check.shand./fork-safety.shgreen on this branch. If it is wrong, revert the two commits; no other repo reads these files.What changed
flake.nixare nowchecks/<name>.nix, each a function of exactly what it reads. Header comments moved with them. Root-relative path literals shifted for the new location (./checks/fixtures/…to./fixtures/…,./modules/…to../modules/…), which resolves to the same source path and so the same store path.public-host,static-site,pi-integration,pi-provider-lifecycle,memory-traces,ssh-settings) take their fixture construction and input wiring into that file, so the file is the whole check. Forpublic-hostandstatic-sitethe wiring was only argument plumbing, which now lives in the index.sameCarvedValueandgithubTargetMatchesAgeSecret, which had no production caller, move tochecks/carved-values.nix; the static-site fixture and index-name list move tochecks/static-site-fixture.nixand the index.flake.nixkeeps only what production or the exportedlibuses.checks/agent-vm-status.nixkeeps its six-space indentation on purpose: its bash holds a line at column zero inside an indented string, so a dedent would change the script text and the derivation. Its header says so.check.shstill evaluates one check pernixprocess; each index attribute is a thunk, so peak memory is unchanged.Not in scope, as the issue says: what any check asserts. The builder signatures (allod/archetypes#92) and a second composition for the fork witness (allod/archetypes#94) stay separate.
Risk
R2. A refactor of test apparatus only; no module, builder, machine, secret or provisioning path is touched, and the derivation-path witness covers every machine and every check on both data sets. What that witness cannot see: a check that is passed an argument it does not declare, or vice versa, would be an evaluation error when that check is forced, and every check was forced by the comparison, so that is covered too. Residual risk is prose that still describes the old layout and a future author copying a pattern from the index wrongly. Rollback is a straight revert.
Validation
nixprocess per item before and after the move on the same commit's inputs: 4 machines, 19 checks on template data, 19 checks against the fork fixtures, plusvmFacts,libandnixosModulesattribute sets. All identical../check.shon this branch:All 32 steps passed (checks: 19 built)../fork-safety.shon this branch:All 19 checks are fork-safe (19 built).checks/andflake.nixparse cleanly; each check file's argument list was derived from parse-time undefined-variable errors, so no check closes over anything it does not declare.gpt-5.6-terraon codex, high effort): no findings, after reading the diffs of the four fused helper files, the index, the flake block and the README (the transcript shows the reads; an empty review was ruled out before it was read as approval).Closes allod/archetypes#93