rebuild-vm never runs the guest bootstrap, so repos added after provisioning are never cloned #71
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/nexus#71
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?
rebuild-vmnever runs the guest bootstrap, so a repo added to a machine's definition after provisioning is never cloned on that machine.Evidence (allod-dev, 2026-10-01): the private memory fork
agent-memorywas wired into the machine's config, and arebuild-vmswitch re-pointed the Claude memory symlink to~/work/agent-memory— but no clone happened, leaving a dangling link and failing memory reads on every agent session.scripts/bootstrap-vm-guest.shalready rendersclone_or_pull/git_clone_or_pull(clone if missing, pull if present), but its only caller isscripts/provision-vm;scripts/rebuild-vmis a barenixos-rebuild switchwith no bootstrap step, so the clone-if-missing capability is unreachable outside first provisioning.Primary goals:
rebuild-vm, every repo in the machine'sreposlist exists at its declared checkout path, cloned if it was missing.Current state and specifics
rebuild-vmresolves the machine's facts and runsnixos-rebuild switchagainst the target host; it never invokes the guest bootstrap, and nothing else re-runs the clone calls after provisioning. The gap is invisible at eval time because the activation asserts inallod/archetypesmodules/ai-agents.nixcheck registry andreposconsistency, not on-disk state.Scope
In scope: teaching
rebuild-vm(or a step it invokes) to run the same clone calls the bootstrap renders, for repos missing on the target. Out of scope: changing what the bootstrap clones, provisioning flow, and any eval-time behavior. Related but separate: the activation-level loud failure on a missing memory checkout is filed in allod/archetypes; this issue is the provisioning-side fix that removes the cause.Issue: allod/archetypes#127.
Two corrections from checking this against the scripts, and one scoping note.
Clone-if-missing is already reachable after provisioning.
verify-vm <vm>runslib/vm-health-check.sh, which fails when any checkout the machine declares is missing on disk, andverify-vm --repair <vm>reruns the idempotentbootstrap-vmand verifies again (docs/vm-provisioning-test-plan.md). So the gap is narrower than stated:rebuild-vmdoes not run the verifier after its switch, and nothing prompted a hand run after today's rebuild.verify-vm allod-devwould have reported the missing checkout.There is a second cause on this machine, and
--repairwould not have fixed it.bootstrap-vm-guest.shresolves a registry remote that carries no owner against the VM's own forge user (repo_path="${FORGE_USER}/${repo}"). allod-dev's forge user is not the owner of the memory fork, so the fork's owner-less registry entry clones from the wrong owner, the clone fails, and underset -ethe bootstrap stops there. A fresh provision of allod-dev fails the same way today. The fix is deployment-side, in the private registry: an owner-qualified remote, the shape this machine's traces repo entry already uses. It is being prepared there now.Scope. Having
rebuild-vmrun the clone calls works against the issue's second goal: the bootstrap'sclone_or_pullrunsgit pullon every checkout that exists, and on a dev VM where several agents work a pull into a dirty tree or a non-default branch fails or merges under an agent, after whichset -eabandons the rest of the list. The smaller change that meets the need:rebuild-vmrunsverify-vmafter the switch, so the rebuild that advertises a new repo also reports it missing, and repair stays the explicitverify-vm --repair. If a rebuild should also clone, the bootstrap needs a clone-only-missing mode first.Correction to my comment above: the owner-qualified remote does not fix allod-dev, and neither would
verify-vm --repair. This machine's forge identity is denied read access to the private memory fork by design, so no clone that runs on the guest with the guest's key can succeed, and with the repo in itsreposlist the bootstrap dies at that clone underset -e, which also makes the machine unprovisionable today. The fix is host-side injection and refresh from the hypervisor's own checkout: allod/strategy#62, with thebootstrap-vmwork filed as its nexus child. The scoping point stands: this issue's smaller change isrebuild-vmrunningverify-vmafter the switch.