Add fleet-diff: check which machines a change rebuilds against a declared expectation #135
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
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/tools#135
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?
Add
tools/flake/fleet-diff, which answers whether an unmerged change alters any machine's built system, and fails when the answer differs from what the change claimed it would be.Primary goals:
unchangedorCHANGESper machine.nix flake check, which peaks near 7 GiB on the composition root and gets OOM-killed on an 8 GiB VM.flake-statusintools/flake/, same bash shape and--helpconventions.Why an expectation and not just a report
The brainstorm
brainstorm/development-process.mdinallod/strategyspecifies this tool with "non-zero exit when anything changes so it composes with expectations" (line 69), and separately names the hole that design leaves open: "the gate names machines, it does not judge them — if the expectation is carelessly written asallod-dev changes, fine, the process has done its job and the human has not" (line 44).Exit-non-zero-on-any-change cannot express the case the gate exists for. An activation change is supposed to convert specific machines, so that rule would fail every time it mattered most and be routinely overridden — which is how a gate rots into ceremony. Comparing the computed set against a declared set makes both directions a failure: a machine that changed and was not expected, and a machine that was expected to change and did not. That turns "a human reads the
CHANGESlines" into an assertion a machine can hold, which isarchitecture.mdprinciple 14 applied — the rule moves out of prose and into a tool.Current state
Nothing in
tools/flake/does this; the directory holdsflake-status(490 lines) andflake-update-cascade. The evaluation loop exists today only as a shell snippet in the brainstorm (lines 25-34), already validated againstallod/deploy: the transitive-input override path syntax works, a warm eval runs about 6 seconds per machine, andallod-devcame out byte-identical across a branch substitution.nix.mddocuments the parts — transitive lock nodes, unmerged cross-repo validation, out-path pinning, and thenix flake checkmemory ceiling.Interface sketch
Shape, not a settled contract:
--overrideis repeatable. Transitive inputs override by path (archetypes/vm), direct ones by name. URLs must be quoted; an unquoted&backgrounds the command.--expectnames the machines expected to change, comma-separated and repeatable percli-design.md, following theforge --labelshape.--expect-noneis the land-inert case and the one most runs will use.Exit status: 0 when the computed set equals the declared set, or when no expectation was declared; a distinct non-zero code on mismatch, naming the unexpected and the missing machines separately rather than printing one merged list.
Validation
Fixtures covering: no machine changes, one machine changes, expectation matches, expectation misses a machine that changed, and expectation names a machine that did not. The last two are the point of the tool, so per
architecture.mdprinciple 11 they must be shown to fail on sabotaged input — an expectation check that cannot be demonstrated failing does not count as a check.Scope
In scope: the tool, its fixtures, and its usage text.
Out of scope here:
git-workflow.mdlanding section, the dev-plan template line, the canary identity — are memory and strategy edits, not tool work.agent/*branches would be an agent-triggered execution path into the private compartment.One caveat worth carrying into the tool's own output: a public run over
allod/deploycovers the example fleet only. The authoritative run needs the private fleet, so a green public result is not fleet-wide proof and should not read like one.