Add allod check: the check gate as a tools command, with input overrides #241
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/tools!241
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/check-command"
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?
Owner summary
allod check, that runs a repository's checks one step at a time. Nothing calls it yet and nothing else changes.nix flake check, which is killed for running out of memory on an 8 GiB dev VM with a real fleet. It is the gate fromallod/archetypescheck.sh, moved into the tools so every repository and fork shares one copy.check.sh: it takes--override-input, so an unmerged branch of a data repository can be run through the whole gate. A repository lists its own extra allowed outputs inallod-check.toml.allod/archetypesthe step list is the same 31 steps in the same order ascheck.sh, and the same 6 onallod/deploy.nix flake checkover 13 small flakes; they agree on all 13. Breaking the gate so it ignores a failed step turns 20 of those assertions red.check.shis still inallod/archetypesuntil the next PR in this series removes it.Refs allod/tools#239
What was decided
builtins.getFlake, which cannot take one. Every step reads the flake through its reference:nix eval '<ref>#.' --apply <expr>, where.names the root of the outputsnixprocesspassive-outputs = [...]inallod-check.tomlat the flake root.libandvmFactsare built in. The file is read from the source Nix sees, so an uncommitted one has no effect, and it is decoded by Nix's ownbuiltins.fromTOML--no-write-lock-fileon every invocation, so the gate never writes to the checkouttests/allod-check-selftest.sh, run by hand. It needs a workingnix, which the sandboxed flake checks do not haveRisk
R2. A new command that nothing depends on yet. The failure that matters is a false green: the gate exits 0 over something it should have caught.
Known limits:
packagesinpassive-outputsgets no check that its entries are derivations, which stock Nix would do. This follows from making the list the repository's own setting, as the issue asks. The documentation says so.allod/archetypeswhere the first draft of this PR took 27 s on a repeat. The first run after any edit costs the same either way, and that is when a gate runs.allod/toolsitself the dev shell is not checked.allod-check.tomlhere allowspackagesanddevShells. Every package is also a check, so all of them are built;devShells.defaultis forced and nothing more, where stock Nix checks it is a derivation.Validation
Run by the integrator on
135af09(the last row on745c78b, which adds onlyallod-check.toml), on an 8 GiB dev VM with Nix 2.34.8, one gate at a time:gofmt -l ./cmd ./internalgo vet ./...,go vet -tags site,secret ./...go test -count=1 ./..., and-tags site,secretforcmd/allodnix build .#checks.x86_64-linux.go-checkstests/allod-check-selftest.shagainst a binary built from this branchallod checkinallod/deployflake.lockunchanged, tree cleanallod checkinallod/archetypesas it isallod-check.tomlforallod checkin a scratch copy ofallod/archetypeswithallod-check.toml./check.shin the same scratch copydiffof the two step listsallod checkinallod/toolsitself, on745c78bflake.lockunchangedThe comparison with stock Nix, from the self-test:
nix flake checkallod checkReported by the implementing agent and not repeated by the integrator: the red runs before each fix below; a second sabotage, counting an evaluated check as built, which turned six assertions red; the measurement of which characters break a command-line attribute path, which is why names are now never written there.
Not run: the gate on a deployment fork with a real fleet; the measurements for that are in allod/tools#239 and were made with
check.sh.Review
One cold review by
gpt-5.6-solathigheffort, of1fc4983, followed by one fix round in135af09. The reviewer was also asked what in the change should not exist. Three high, two medium and two low defect findings; five findings of things to delete; a list of comments.nix buildof a flake attribute already refuses it on Nix 2.34.8. The gate now checks the type itself and both cases are fixturespassive-outputscan allowpackagesand weaken its checkingallod-check.tomlread from the working tree, so an uncommitted file takes effect--override-inputtakes an option as its valueOwner request recorded before it is carried out: make
allod checkrun onallod/toolsitself, in this PR.The change is one file,
allod-check.toml, listingpackagesanddevShellsas passive outputs. The gate is then run on this repository and the result posted here.Done in
745c78b:allod-check.tomlwithpassive-outputs = ["packages", "devShells"].Run by the integrator in this branch's checkout:
devShellsandpackagesflake.lockunchangedThe nine checks built are
allod,allod-parity,cascade-suites,credential-store-url-parity,flake-status-suite,flake-update-cascade,forge,git-hook-suitesandgo-checks. The three packages are among them, so allowingpackagescosts no coverage here.devShells.defaultis forced and not otherwise checked.The PR body is updated to match: the known limit about this repository is reworded, and the run is added to the validation table.