Move pi-provider-lifecycle's embedded programs out of Nix strings #97
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#97
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?
Bring
checks/pi-provider-lifecycle.nixup to the standardchecks/site-content.nixalready sets: its three Python programs and its bash test become real files underchecks/pi-provider-lifecycle/, referenced by path, so they get syntax highlighting, shellcheck and a Python linter, and lose the''${escaping.Primary goals:
site-content.nixhandsSITE_ROOTand the two helper scripts tosite-content.sh, not interpolated into its text.check-selftest.sh-style proof stays with the check's own sabotage section.Current state and specifics
Line numbers are for the tree after allod/archetypes#93 lands (PR allod/archetypes#96). The file is 1397 lines.
pkgs.writeText "pi-provider-fixture-server.py"holds an 81-line Python program (checks/pi-provider-lifecycle.nix:93-173), the process-leak sampler is 42 lines (:174-215), andpi-rpc-driver.pyis 114 lines (:216-329). Thepkgs.runCommand "pi-provider-lifecycle-check"body runs from:375to the end, about a thousand lines of bash inside a Nix indented string, interpolating${all.reconcile},${partial.reconcile},${empty.reconcile},${all.selectorCommand},${runtimeRoot}, the three Python files and the generated activation texts (:392-396,:330-332).checks/site-content.nixis the model: a smallrunCommandwhose script is${pkgs.bash}/bin/bash ${./site-content.sh}with its inputs as environment variables.This is not a pure move, so the derivation-path witness allod/archetypes#93 used does not apply; the check's derivation changes by design. The witness is the check itself: it must build green after the move, and its sabotage section (
:1342onward) must still fail when a fixture is sabotaged. Readnix.mdonpatchShebangsand tracked files before building: a new script that is not staged is invisible to the build.Scope
In scope: the four embedded programs, the environment-variable seam that replaces interpolation, and lint over the new files.
Explicitly not in scope: changing what the check asserts, or touching
modules/pi-provider-reconcile.shandmodules/pi-provider-lifecycle.nix, which are production.Refs allod/archetypes#93