Rename the -from-host nexus scripts: drop the suffix #66
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/nexus#66
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?
Drop the
-from-hostsuffix from every nexus provisioning script. Every script in this repo only ever exists on the host, so the suffix says nothing and makes the commands the operator types most often the longest ones:rebuild-vm <vm>,provision-vm <vm>,verify-vm <vm>,bootstrap-vm <vm>.Primary goals:
packages.provisioning-scriptsandhomeModules.hostunder the new names only; no old name is kept as an alias.bootstrap-vm.shis not a host command:bootstrap-vm-from-host.shstreams it over SSH to run inside the VM (scripts/bootstrap-vm-from-host.sh:131). It is renamedbootstrap-vm-guest.shso the only script that does not run on the host is the one whose name says where it runs, and so the host command can take the plainbootstrap-vmname.DEPLOY_FLAKE,INVENTORY_CHECKOUT,KNOWN_HOSTS_VMS,NIXOS_REBUILD, ...) are untouched apart from names.Rename table
scripts/rebuild-vm-from-hostscripts/rebuild-vmscripts/provision-vm-from-hostscripts/provision-vmscripts/verify-vm-from-hostscripts/verify-vmscripts/bootstrap-vm-from-host.shscripts/bootstrap-vm--repairscripts/bootstrap-vm.shscripts/bootstrap-vm-guest.shtests/rebuild-vm-from-host.shtests/rebuild-vm.shtests/provision-vm-from-host.shtests/provision-vm.shBOOTSTRAP_VM_FROM_HOSTBOOTSTRAP_VMscripts/provision-vm-from-host:13, test attests/provision-vm-from-host.sh:250VERIFY_VM_FROM_HOSTVERIFY_VMscripts/provision-vm-from-host:14, test attests/provision-vm-from-host.sh:251nix/provisioning-scripts.nixcopiesscripts/intobin/verbatim, so file names are command names; its own assertion at line 9 namesverify-vm-from-host.Current state and specifics
The first rename,
rebuild-vm-from-hosttorebuild-vm, is committed on the branch for this issue and covers: the flake check's script list, test invocation and installed-binary assertion; the usage line; hints invm-ssh-host-key,bootstrap-vm.sh,bootstrap-vm-from-host.sh; thedeployFlakeoption description;docs/provisioning-scripts.md. The remaining renames touch the same kinds of places:scripts/provision-vm-from-host:60,scripts/verify-vm-from-host:16and:66(the--repairhint),scripts/bootstrap-vm-from-host.sh:18(self-identification on stderr).scripts/provision-vm-from-host:13-14and:122-124(env seams),scripts/verify-vm-from-host:71(calls the host bootstrap),scripts/bootstrap-vm-from-host.sh:131(streams the guest payload).scripts/vm-ssh-host-key:191(provision-vm-from-host),:368(verify-vm-from-host).flake.nix:108-113,:124,:139,:150,:153;nix/provisioning-scripts.nix:9.tests/bootstrap-orchestration.sh:5-7,:27,:48,:60-62(pattern strings that assert the call sites),tests/forge-ssh-key.sh:6,tests/registry-resolver.sh:156and:174,tests/provision-vm-from-host.sh:5,:250-251,:385.nix/configuration.nix:29,:45,:48;docs/provisioning-scripts.md:31,:38,:70-73,:98,:116-140;docs/integration.md:63;docs/vm-provisioning-test-plan.md:9,:13,:37-38.Validation is the existing flake check:
nix build .#checks.x86_64-linux.provisioning-contractruns shellcheck over the script list, every test suite, and thetest -x bin/<name>assertions, so a missed rename fails there. A finalgrep -rn from-hostover the repo must return nothing.Scope
In scope: the renames in the table, within this repo, on one branch. The
rebuild-vmcommit already on the branch is part of this issue, not a separate one.Tracked separately, to land after this reaches the host through the deploy pin: the rebuild hint printed by
allod secret rotateinallod/tools(cmd/allod/secret_rotate.go:671, test atcmd/allod/secret_rotate_test.go:613); the provisioning commands inallod/vm(README.md:112,docs/adding-a-new-vm-type.md:111,:119,:125,:161-162); and theprovision-vm-from-hostmention inallod/memoryvm-provisioning.md:45. Deployments' private notes and skills that quote the old names update on their own schedule. Archived plans and review prompts inallod/strategykeep the names they were written with.Draft PR body for the rename, prepared on a dev VM and relayed by patch; the branch is
agent/rename-rebuild-vm(one commit,Rename rebuild-vm-from-host to rebuild-vm). Open the PR from a checkout that can push, with this body:The host-side rebuild command
rebuild-vm-from-hostbecomesrebuild-vm. On a running nexus, after the deploy pin picks this up, the operator typesrebuild-vm <vm>; the old name is gone, not aliased. The script body, its arguments, and its environment pointers stay identical. The flake check proves it: the renamed test suite passes and the check asserts the installedbin/rebuild-vm. If it is wrong, revert this commit; nothing outside this repo changes.Closes allod/nexus#66
Risk
R1. Refactor-only rename of one script and its test; behavior untouched; rollback is a straight revert. The only cross-repo effect is that hints in
allod/tools(secret rotate) and a doc inallod/vmstill print the old name until their follow-ups land; those are listed in the issue's Scope.Validation
bash -nandshellcheck -x --source-path=SCRIPTDIRover the five touched scripts: clean.bash tests/rebuild-vm.sh: 10 tests passed.nix build .#checks.x86_64-linux.provisioning-contract: passed, includingtest -x .../bin/rebuild-vm.grep -rn rebuild-vm-from-hostover the worktree: no matches.Rename rebuild-vm-from-host to rebuild-vmto Rename the -from-host nexus scripts: drop the suffixScope widened from the rebuild command alone to every
-from-hostscript; the body above is rewritten with the full rename table. The commit already prepared (Rename rebuild-vm-from-host to rebuild-vm) is the first step on the branch for this issue, so a PR that carries only that commit should sayRefs allod/nexus#66, notCloses; the draft PR body in the earlier comment predates the widening and itsClosesline is superseded.