Neither check wrapper can tell an all-evaluated run from a real one #90
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#90
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?
Make both check wrappers refuse to report success when they built nothing, and give the fork-safety witness the same standing proof-of-redness that
check.shalready has.Primary goals:
check.shreports success on a host whose system does not match the checks' system, having evaluated every check and built none of them.fork-safety.shhas no equivalent ofcheck-selftest.sh, so nothing in the tree proves it can go red.Current state and specifics
fork-safety.shgained built-versus-evaluated accounting in the work for allod/archetypes#88: a run that built nothing now says why evaluation alone is not the witness, names the system to run on, and exits non-zero.check.shhas the same branch in its check loop — build when the check's system equalsbuiltins.currentSystem, otherwisenix evalthedrvPath— and itscovered_stepsguard, like the oldstepsguard next door, cannot tell a run that built nothing from one that built everything.This is reachable rather than theoretical:
inventory.lib.supportedPlatformsholds exactly one system (asserted atflake.nix:95-97), so every check is keyed on that one system and any host of another system takes the evaluate-only branch for all of them. Evaluation catches an input read in a check's Nix expression, which is most of them; it does not catch one in a check's builder shell, such astest -e ${secrets}/secrets/<name>, which evaluates fine and fails only on a build.check-selftest.shprovescheck.shgoes red, with one fixture per way it can, by running the wrapper against throwaway flakes. The equivalent forfork-safety.shdoes not exist. Its built-nothing refusal was demonstrated once, by hand, against exactly such throwaway flakes; nothing keeps that true.A related question this raises, worth settling rather than leaving implicit:
machineConfigurationsmergesprofileDatainto builder arguments, so a profiles repo can name a machine'stokenFile/httpsTokenFile— the ciphertext a machine deploys.secrets,platformandhardwareare pinned against that after the merge; these two are not, and whether they should be is a boundary question (architecture.mdprinciple 5) rather than a bug. The composed-machine credential sweeps added in allod/archetypes#88 deliberately do not comparefilebecause of it.Scope
In scope: the accounting and refusal in
check.sh, a newcheck-selftest.shcase for it, and afork-safety-selftest.shin the shapecheck-selftest.shalready establishes.Tracked here as a question, not a change: whether
tokenFile/httpsTokenFileshould join the pinned production facts.Refs allod/archetypes#88