Move pi-provider-lifecycle's embedded programs out of Nix strings #100
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!100
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/pi-lifecycle-scripts"
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?
The pi-provider-lifecycle check's three Python programs and its thousand-line bash body move out of Nix strings into real files under
checks/pi-provider-lifecycle/, so they get syntax highlighting, shellcheck and a Python syntax check, and lose the''${escaping. What the check asserts is unchanged; the derivation changes by design because its script is now a file, so the witness is the check building green and a sabotaged assertion making it fail, both run, plus./check.shgreen on this branch. If it is wrong, revert the one commit; nothing outside this check is touched.What changed
checks/pi-provider-lifecycle/server.py,proc-leak-sampler.py,rpc-driver.py: the three programs, verbatim; none held Nix interpolation.checks/pi-provider-lifecycle/run.sh: the bash body. The 41 Nix values it used to interpolate (each fixture scenario's reconciler, selector, extension installer and catalogue files, the runtime root, the three programs, the generated activation text and closure) arrive as environment variables set on the invoking line in the.nixfile, the waysite-content.nixhandsSITE_ROOTtosite-content.sh; arequireloop at the top names any the caller forgot. Three''${sites became${; one single-quoted line that used to hold Nix-expanded text is double-quoted so bash expands it.$VARto"$VAR"), all of them Nix store paths. The remaining shellcheck notices are the intentional per-scenarioHOMEsubshells, functions called throughexport -fby the reconciler, and$out, which are listed in the worker's report and left alone.checks/pi-provider-lifecycle.nixkeeps the fixture construction and theletthat names each value;nativeBuildInputsis unchanged because the old bash already reached every tool through PATH.Risk
R2. One check's test script moves; no module, builder or production script changes. The failure modes are a value that was substituted by Nix and is now expanded by bash differently, or a quoting change at a site that relied on word splitting; the review below was asked to enumerate both, and the build plus sabotage is the executable witness. Rollback is a straight revert.
Validation
nix build .#checks.x86_64-linux.pi-provider-lifecycle: green; the log ends with the check's own "lifecycle, selection, retirement, crash, concurrency, adapter, and leak witnesses passed" line. Rebuilt by the integrator from the committed tree: cache hit at the same output path.statmode assertion inrun.shchanged from 600 to 601, the build fails with exit 1; restored, it rebuilds to the same output path.nix-instantiate --parseon the.nixfile,bash -nonrun.sh,py_compileon the three programs: clean../check.shon this branch, run by the integrator:All 32 steps passed (checks: 19 built).gpt-5.6-terraon codex, high effort): no findings, after comparing every environment variable on the invoking line against its uses inrun.sh, the 74 quoting sites, therequireguard and the three programs (transcript of 321 KB; an empty review was ruled out before it was read as approval).Closes allod/archetypes#97
390ceb48acto95b3a96296