Drop the allod pm tool tree from the dev home composition #73

Merged
vnprc merged 1 commit from agent/remove-pm into master 2026-09-09 23:27:40 +01:00
Member

This stops the dev-machine home composition from staging the allod pm tool tree into the Nix store, because allod pm is being removed from allod/tools as a failed experiment. For a running dev machine, allod pm keeps working with either PR merged alone; it is removed once both changes are deployed. The allod wrapper no longer carries check-jsonschema (which only the pm integrity checker used) or the ALLOD_TOOLS_DIR variable. Everything else stays identical: allod change, allod patch, and allod pr explain behave exactly as before, and non-dev machines (nexus, installer, privacy-1) do not change at all. The proof is fleet-diff over the deploy composition root, which shows only allod-dev changing, plus the archetypes per-machine gate ./check.sh. If this turns out to be wrong, revert the single commit and rebuild; the wrapper regains the variable and the pm tree.

On ALLOD_TOOLS_DIR and allod pr explain: I checked before dropping the variable. The allod pr namespace resolves pr-explain/explain by trying $ALLOD_TOOLS_DIR/pr-explain/explain, then the directory of the allod executable, then $WORK_DIR/allod/tools/pr-explain/explain. The pmTools derivation that ALLOD_TOOLS_DIR pointed at copied only pm/ into the store, so the first candidate has never existed on a dev machine and allod pr explain has always fallen through to the live ~/work/allod/tools checkout. Removing the variable therefore leaves allod pr explain with the same effective resolution it had; nothing pr-explain needs was pointed at by the variable, so nothing is kept.

On a deployed machine, with only this PR merged, the binary still registers pm and falls back to the live ~/work/allod/tools checkout. With only allod/tools#179 merged, the deployed binary is still built from the old tools revision with the staged tree, so allod pm keeps working in both partial states.

Merge this PR first, then allod/tools#179, then bump locks freely. This PR builds against the current tools revision (pm present, unused) and any later one, so no lock can point at a broken combination. The reverse order leaves a window where advancing the archetypes/allod-tools node in deploy or a flake-update-cascade allod-tools run makes the old pmTools derivation fail on the missing ${allod-tools}/pm.

Refs allod/tools#137

Risk

Low. One file changes, and the only removals are a derivation nothing else references, one wrapper environment variable shown above to be inert for the surviving commands, and one PATH entry only the removed tool used. The residual risk is a pr-explain caller that relied on the variable being set to some value; the code reads it only as a path prefix and treats an unset variable the same as a non-existent path.

Validation

  • ./check.sh in the branch worktree (this repository's per-machine gate, used in place of nix flake check because a whole-flake check is too memory-heavy for this VM): all 27 steps passed, covering the passive outputs, the three exported NixOS modules, all four machines (allod-dev, installer, nexus, privacy-1), and all 14 checks.
  • nix eval --raw .#nixosConfigurations.allod-dev.config.system.build.toplevel.drvPath on the branch: succeeds and prints a store derivation path.
  • nix-instantiate --parse modules/dev-home-shared.nix: exit 0.
  • grep -n "pm\|ALLOD_TOOLS_DIR\|check-jsonschema" modules/dev-home-shared.nix: no matches.
  • fleet-diff --override archetypes=62efcfa64c8eb952af497daf1caf90160ec0434d from ~/work/allod/deploy, report-only, with the stderr receipt confirming the override moved archetypes from 5ebd521 to 62efcfa:
fleet-diff: 4 machines in /home/allod/work/allod/deploy
  allod-dev              CHANGES
  installer              unchanged
  nexus                  unchanged
  privacy-1              unchanged
1 of 4 machines change.

allod-dev is the only dev machine in this composition root and is the only one expected to change (its home composition loses the pm tree, the wrapper variable, and check-jsonschema). The three others are unchanged, as expected.

This stops the dev-machine home composition from staging the `allod pm` tool tree into the Nix store, because `allod pm` is being removed from allod/tools as a failed experiment. For a running dev machine, `allod pm` keeps working with either PR merged alone; it is removed once both changes are deployed. The `allod` wrapper no longer carries `check-jsonschema` (which only the pm integrity checker used) or the `ALLOD_TOOLS_DIR` variable. Everything else stays identical: `allod change`, `allod patch`, and `allod pr explain` behave exactly as before, and non-dev machines (nexus, installer, privacy-1) do not change at all. The proof is fleet-diff over the deploy composition root, which shows only allod-dev changing, plus the archetypes per-machine gate `./check.sh`. If this turns out to be wrong, revert the single commit and rebuild; the wrapper regains the variable and the pm tree. On `ALLOD_TOOLS_DIR` and `allod pr explain`: I checked before dropping the variable. The `allod pr` namespace resolves `pr-explain/explain` by trying `$ALLOD_TOOLS_DIR/pr-explain/explain`, then the directory of the `allod` executable, then `$WORK_DIR/allod/tools/pr-explain/explain`. The `pmTools` derivation that `ALLOD_TOOLS_DIR` pointed at copied only `pm/` into the store, so the first candidate has never existed on a dev machine and `allod pr explain` has always fallen through to the live `~/work/allod/tools` checkout. Removing the variable therefore leaves `allod pr explain` with the same effective resolution it had; nothing pr-explain needs was pointed at by the variable, so nothing is kept. On a deployed machine, with only this PR merged, the binary still registers `pm` and falls back to the live `~/work/allod/tools` checkout. With only allod/tools#179 merged, the deployed binary is still built from the old tools revision with the staged tree, so `allod pm` keeps working in both partial states. Merge this PR first, then allod/tools#179, then bump locks freely. This PR builds against the current tools revision (`pm` present, unused) and any later one, so no lock can point at a broken combination. The reverse order leaves a window where advancing the `archetypes/allod-tools` node in deploy or a `flake-update-cascade allod-tools` run makes the old `pmTools` derivation fail on the missing `${allod-tools}/pm`. Refs allod/tools#137 ## Risk Low. One file changes, and the only removals are a derivation nothing else references, one wrapper environment variable shown above to be inert for the surviving commands, and one PATH entry only the removed tool used. The residual risk is a pr-explain caller that relied on the variable being set to some value; the code reads it only as a path prefix and treats an unset variable the same as a non-existent path. ## Validation - `./check.sh` in the branch worktree (this repository's per-machine gate, used in place of `nix flake check` because a whole-flake check is too memory-heavy for this VM): all 27 steps passed, covering the passive outputs, the three exported NixOS modules, all four machines (allod-dev, installer, nexus, privacy-1), and all 14 checks. - `nix eval --raw .#nixosConfigurations.allod-dev.config.system.build.toplevel.drvPath` on the branch: succeeds and prints a store derivation path. - `nix-instantiate --parse modules/dev-home-shared.nix`: exit 0. - `grep -n "pm\|ALLOD_TOOLS_DIR\|check-jsonschema" modules/dev-home-shared.nix`: no matches. - `fleet-diff --override archetypes=62efcfa64c8eb952af497daf1caf90160ec0434d` from `~/work/allod/deploy`, report-only, with the stderr receipt confirming the override moved `archetypes` from `5ebd521` to `62efcfa`: ``` fleet-diff: 4 machines in /home/allod/work/allod/deploy allod-dev CHANGES installer unchanged nexus unchanged privacy-1 unchanged 1 of 4 machines change. ``` allod-dev is the only dev machine in this composition root and is the only one expected to change (its home composition loses the pm tree, the wrapper variable, and check-jsonschema). The three others are unchanged, as expected.
vnprc approved these changes 2026-09-09 23:27:05 +01:00
vnprc merged commit 62efcfa64c into master 2026-09-09 23:27:40 +01:00
vnprc deleted branch agent/remove-pm 2026-09-09 23:27:40 +01:00
Sign in to join this conversation.
No description provided.