Refuse an all-evaluated run in both check wrappers, and prove fork-safety.sh goes red #95
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!95
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/check-wrapper-accounting"
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?
Both check wrappers now refuse to call a run green when they evaluated checks and built none of them, and the fork-safety witness has a standing selftest proving it can go red. Nothing changes for any running machine: this touches only the developer-side scripts
check.sh,fork-safety.sh, and their selftests, and no other repo drives them. The gate's summary line now readsAll N steps passed (checks: B built, E evaluated only).; on a host whose system is not the one the checks are keyed on it exits non-zero saying so instead of printing that line. Proof is both selftests passing, each shown to go red when its wrapper's refusal is sabotaged, plus a real./check.shrun on this branch. If it is wrong, revert the commit; nothing else depends on it.What changed
check.shcounts checks built and checks only evaluated apart, asfork-safety.shalready did, prints both on the summary line in the same shape, and exits non-zero with aWitnessed nothing:refusal when it evaluated checks and built none. Machines are instantiated and never built on any host, so a flake with machines and no checks still passes on its machines alone; the existing no-steps guard is unchanged.check-selftest.shgains anall-evaluatedfixture: a machine and two checks keyed only on another system, one of which fails only in its builder shell. Every step passes as an evaluation, so the refusal is the only thing that can make it exit non-zero. The green, checks-only, and dotted-names assertions now pin the accounting on the summary line.fork-safety-selftest.shis new, in the shapecheck-selftest.shestablishes. Each throwaway repository has its own template data trio, named as inputs in its root flake, and its own fork trio underchecks/fork-fixture/, so--override-inputis exercised for real. Fixtures: green (fork inventory keys the checks on this system while the template keys them on another, so the check being built shows the enumeration read the fork data), dotted-names, tabbed-names, red (a by-name read from Nix and one from a builder shell, both first shown to build against the template so they go red for the right reason), all-evaluated, nothing-to-run, missing-fixture.fork-safety.shandREADME.mdpoint at the new selftest and describe the shared accounting.Not changed, tracked in the issue as a question: whether
tokenFile/httpsTokenFileshould join the pinned production facts.Risk
R2. Localized behavior change in two developer-side shell wrappers; no machine, module, secret, or provisioning path is touched. Worst credible failure after validation: the gate refuses a legitimate run on some flake shape the fixtures do not cover, which is loud and blocks a merge until reverted; or the refusal has a hole and a false green survives, which is the status quo. Rollback is a straight revert of one commit.
Validation
./check-selftest.sh: PASS, 56 assertions across twelve fixtures, including the newall-evaluatedone../fork-safety-selftest.sh: PASS, 38 assertions across seven fixtures.built -eq 0refusal disabled in a copy ofcheck.sh,check-selftest.shfails exactly the fourall-evaluatedassertions; the same sabotage offork-safety.shmakesfork-safety-selftest.shfail exactly the same four. Nothing else moves../check.shon this branch:All 32 steps passed (checks: 19 built).shellcheckclean on all four scripts.fork-safety.shagainst this repository's real suite. Its logic is unchanged apart from a header comment, and it is the lock-bump path witness rather than a per-commit one.gpt-5.6-terraon codex, high effort) returned two findings, both verified and fixed in the second commit: the fork-safety selftest had no foreign check that fails on evaluation, so a witness that skipped the foreignnix evalpassed every fixture (now a red-fixture check keyed on the other system, and a sabotage of that branch fails exactly its three assertions); and the gate deduplicated evaluated systems through a line-oriented sort, so a system name containing a newline was reported as two (now deduplicated by exact name, probed by hand with such a flake). Both selftests, shellcheck, and the sabotage runs were repeated after the fix.Closes allod/archetypes#90