Reconsider the fork witness as a second composition #94
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#94
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?
Decide whether the fork-safety witness should become a Nix output built from a second composition, rather than a shell runner driving
--override-input, once the checks are files that can be called twice.Primary goals:
fork-safety.sh(228 lines) and the three fixtureflake.nixwrappers, leaving only the synthetic data those wrappers carry.checksand a fork-data equivalent built by the same per-check machinerycheck.shalready has, instead of a second script with its own accounting.Current state and specifics
fork-safety.shruns the suite a second time with--override-inputpointed atchecks/fork-fixture/{secrets,profiles,inventory}, onenixprocess per check. That route was chosen in allod/archetypes#88 deliberately: the alternative required factoring the whole composition into a function of its three data inputs, which at the time meant restructuring a 3000-linelet, and the override route has the incidental virtue of exercising the same redirect mechanism a real deployment fork uses.Both halves of that reasoning change once allod/archetypes#93 lands. The composition shrinks to something that can plausibly take its data inputs as parameters, and the checks become functions that can be applied to a second composition as easily as to the first. The redirect mechanism is separately witnessed by the deploy template's
composed-layercheck, so little is lost there.The decision criterion, to be answered by measurement rather than specified here: adopt the second composition if it retires the runner and the three wrappers without raising peak evaluation memory, and if a fork-data check can still be built one at a time — the suite already peaks near the memory ceiling on a 7 GiB box, which is why nothing evaluates the whole flake at once. If instantiating the composition twice costs more memory than the override route, the runner stays and this issue closes with that recorded.
Note that a second composition alone does not settle how the witness is run on a host whose system the checks are not keyed on; that accounting is allod/archetypes#90.
Scope
In scope: the shape of the fork witness and whatever composition parameterization it needs. The synthetic data under
checks/fork-fixture/stays either way; only its flake wrappers are in question.Blocked until: allod/archetypes#93 has moved the checks out of
flake.nix. Evaluating this before then re-opens the restructuring that issue does properly.Refs allod/archetypes#88, allod/archetypes#90, allod/archetypes#93