Declare bubblewrap on dev VMs for sandboxed workers #146

Closed
opened 2026-10-20 06:05:47 +01:00 by vnprc-agent · 6 comments

Dev VMs declare bubblewrap as a tool rather than inheriting it as a dependency of the agent CLIs, so allod change run (allod/strategy#69) has a sandbox binary the closure promises rather than one that disappears when an agent CLI drops the dependency.

Part of allod/strategy#69.

Primary goals:

  • One declared package — modules/dev-home-shared.nix adds pkgs.bubblewrap to the dev-VM home packages.
  • The hypervisor is untouched — nixosConfigurations.<hypervisor>.config.system.build.toplevel.drvPath is equal before and after; witnessed by fleet-diff --expect <dev machines> from a deploy checkout, naming exactly the dev VMs.
  • Cost recorded — the dev VM closure size delta in the PR body (architecture.md, record what each machine costs); bubblewrap is already in the closure as a transitive dependency, so the expected delta is zero bytes and the PR body says what was measured.

Scope

In: the one module line and the PR body's witnesses. Out: everything else in allod/strategy#69.

Dev VMs declare `bubblewrap` as a tool rather than inheriting it as a dependency of the agent CLIs, so `allod change run` (allod/strategy#69) has a sandbox binary the closure promises rather than one that disappears when an agent CLI drops the dependency. Part of allod/strategy#69. Primary goals: - **One declared package** — `modules/dev-home-shared.nix` adds `pkgs.bubblewrap` to the dev-VM home packages. - **The hypervisor is untouched** — `nixosConfigurations.<hypervisor>.config.system.build.toplevel.drvPath` is equal before and after; witnessed by `fleet-diff --expect <dev machines>` from a deploy checkout, naming exactly the dev VMs. - **Cost recorded** — the dev VM closure size delta in the PR body (`architecture.md`, record what each machine costs); bubblewrap is already in the closure as a transitive dependency, so the expected delta is zero bytes and the PR body says what was measured. ### Scope In: the one module line and the PR body's witnesses. Out: everything else in allod/strategy#69.
Author

Handoff: one commit on agent/declare-bubblewrap, verified; PR body:

Dev VMs now declare bubblewrap as a tool of their own, so the sandbox binary allod change run needs is promised by the closure rather than inherited from the agent CLIs. The only machine that rebuilds is the dev VM; the hypervisor and every other machine evaluate to the same derivation as before. The dev VM closure grows by 114 KiB, because the declared package is a different derivation from the copy the agent CLIs already carry, same bytes, two store paths. Proof: derivation paths compared per machine in both trees, fleet-diff --expect allod-dev from the deploy checkout, and allod check green. If it is wrong, revert the one commit; nothing else references the package yet.

Refs allod/strategy#69. Closes allod/archetypes#146.

Risk

R1. One home.packages entry on dev VMs. No secrets, host commands, provisioning, activation or persistent state. Rollback is a revert.

Validation

  • nix eval --raw .#nixosConfigurations.<m>.config.system.build.toplevel.drvPath for all six public machines in the shared checkout and in the branch: only allod-dev differs.
  • fleet-diff --override 'archetypes=git+file://…?rev=9604822…' --expect allod-dev from allod/deploy: 1 of 6 machines change. Expectation matches.
  • nix path-info -S on the allod-dev toplevel: 2902049320 before, 2902165672 after, delta 116352 bytes. nix why-depends shows two bubblewrap store paths, the declared one and the agent CLIs' transitive one, with byte-identical contents.
  • allod check in the branch: All 46 steps passed (checks: 30 built).
Handoff: one commit on `agent/declare-bubblewrap`, verified; PR body: Dev VMs now declare bubblewrap as a tool of their own, so the sandbox binary `allod change run` needs is promised by the closure rather than inherited from the agent CLIs. The only machine that rebuilds is the dev VM; the hypervisor and every other machine evaluate to the same derivation as before. The dev VM closure grows by 114 KiB, because the declared package is a different derivation from the copy the agent CLIs already carry, same bytes, two store paths. Proof: derivation paths compared per machine in both trees, `fleet-diff --expect allod-dev` from the deploy checkout, and `allod check` green. If it is wrong, revert the one commit; nothing else references the package yet. Refs allod/strategy#69. Closes allod/archetypes#146. ## Risk R1. One `home.packages` entry on dev VMs. No secrets, host commands, provisioning, activation or persistent state. Rollback is a revert. ## Validation - `nix eval --raw .#nixosConfigurations.<m>.config.system.build.toplevel.drvPath` for all six public machines in the shared checkout and in the branch: only `allod-dev` differs. - `fleet-diff --override 'archetypes=git+file://…?rev=9604822…' --expect allod-dev` from `allod/deploy`: `1 of 6 machines change. Expectation matches.` - `nix path-info -S` on the `allod-dev` toplevel: 2902049320 before, 2902165672 after, delta 116352 bytes. `nix why-depends` shows two `bubblewrap` store paths, the declared one and the agent CLIs' transitive one, with byte-identical contents. - `allod check` in the branch: `All 46 steps passed (checks: 30 built).`
Author

Handoff update: branch rebased onto current master, commit 098ed17; witnesses rerun. Revised PR body:

Dev VMs now declare bubblewrap as a tool of their own, so the sandbox binary allod change run needs is promised by the closure rather than inherited from the agent CLIs. The only machine that rebuilds is the dev VM; the hypervisor and every other machine evaluate to the same derivation as before. The dev VM closure grows by 114 KiB, because the declared package is a different derivation from the copy the agent CLIs already carry, same bytes, two store paths. Proof: derivation paths compared per machine between master and the branch, with only the dev VM differing, and allod check green; fleet-diff from the public deploy checkout also reports the hypervisor because its lock predates several nexus commits that the archetypes override drags forward, which the direct comparison rules out as this change. If it is wrong, revert the one commit; nothing else references the package yet.

Refs allod/strategy#69. Closes allod/archetypes#146.

Risk

R1. One home.packages entry on dev VMs. No secrets, host commands, provisioning, activation or persistent state. Rollback is a revert.

Validation

  • nix eval --raw .#nixosConfigurations.<m>.config.system.build.toplevel.drvPath for all six public machines in the shared checkout and in the branch: only allod-dev differs.
  • fleet-diff --override 'archetypes=…?rev=098ed17…' --expect allod-dev from allod/deploy: 2 of 6 machines change, naming nexus as well; the deploy lock pins an archetypes revision whose nexus input is older, so the override advances nexus too. The direct comparison above shows nexus byte-identical, which is the controlling witness for this change.
  • nix path-info -S on the allod-dev toplevel: 2902049320 before, 2902165672 after, delta 116352 bytes. nix why-depends shows two bubblewrap store paths, the declared one and the agent CLIs' transitive one, with byte-identical contents.
  • allod check in the branch: All 46 steps passed (checks: 30 built).
Handoff update: branch rebased onto current master, commit 098ed17; witnesses rerun. Revised PR body: Dev VMs now declare bubblewrap as a tool of their own, so the sandbox binary `allod change run` needs is promised by the closure rather than inherited from the agent CLIs. The only machine that rebuilds is the dev VM; the hypervisor and every other machine evaluate to the same derivation as before. The dev VM closure grows by 114 KiB, because the declared package is a different derivation from the copy the agent CLIs already carry, same bytes, two store paths. Proof: derivation paths compared per machine between master and the branch, with only the dev VM differing, and `allod check` green; `fleet-diff` from the public deploy checkout also reports the hypervisor because its lock predates several nexus commits that the archetypes override drags forward, which the direct comparison rules out as this change. If it is wrong, revert the one commit; nothing else references the package yet. Refs allod/strategy#69. Closes allod/archetypes#146. ## Risk R1. One `home.packages` entry on dev VMs. No secrets, host commands, provisioning, activation or persistent state. Rollback is a revert. ## Validation - `nix eval --raw .#nixosConfigurations.<m>.config.system.build.toplevel.drvPath` for all six public machines in the shared checkout and in the branch: only `allod-dev` differs. - `fleet-diff --override 'archetypes=…?rev=098ed17…' --expect allod-dev` from `allod/deploy`: `2 of 6 machines change`, naming `nexus` as well; the deploy lock pins an archetypes revision whose `nexus` input is older, so the override advances `nexus` too. The direct comparison above shows `nexus` byte-identical, which is the controlling witness for this change. - `nix path-info -S` on the `allod-dev` toplevel: 2902049320 before, 2902165672 after, delta 116352 bytes. `nix why-depends` shows two `bubblewrap` store paths, the declared one and the agent CLIs' transitive one, with byte-identical contents. - `allod check` in the branch: `All 46 steps passed (checks: 30 built).`
Author

Handoff update: rebased the unchanged one-line package addition onto current master. Local commit: 2e72733e0ac0d478459aa58b6d1d15c5ba4b1da9 on agent/declare-bubblewrap (one commit ahead, clean; still unpushed). Direct nix eval --raw .#nixosConfigurations.<machine>.config.system.build.toplevel.drvPath comparison against master for all six public machines: only allod-dev changes; bitcoin-node, forge, installer, nexus, and privacy-1 are identical. allod check: All 47 steps passed (checks: 31 built). The earlier cost measurement and PR summary remain applicable; this rebase added only master’s machine-coverage check.

Handoff update: rebased the unchanged one-line package addition onto current master. Local commit: `2e72733e0ac0d478459aa58b6d1d15c5ba4b1da9` on `agent/declare-bubblewrap` (one commit ahead, clean; still unpushed). Direct `nix eval --raw .#nixosConfigurations.<machine>.config.system.build.toplevel.drvPath` comparison against master for all six public machines: only `allod-dev` changes; `bitcoin-node`, `forge`, `installer`, `nexus`, and `privacy-1` are identical. `allod check`: `All 47 steps passed (checks: 31 built).` The earlier cost measurement and PR summary remain applicable; this rebase added only master’s machine-coverage check.
Author

Handoff, final: head 42481de on agent/declare-bubblewrap, rebased onto current master 844099d; allod check green on the rebased tree. PR body as in the previous comment.

Handoff, final: head `42481de` on `agent/declare-bubblewrap`, rebased onto current master `844099d`; `allod check` green on the rebased tree. PR body as in the previous comment.
Author

Shipped to relay: head e26022e, one commit, same tree as 42481de with a commit body added.

Shipped to relay: head `e26022e`, one commit, same tree as `42481de` with a commit body added.
Author

Landed; dev VMs declare bubblewrap, confirmed present on nix-dev after rebuild.

Landed; dev VMs declare bubblewrap, confirmed present on nix-dev after rebuild.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
allod/archetypes#146
No description provided.