Skip to content

feat(bundle): register's --sandbox composes only the forms its tasks' deploys there boot - #759

Merged
earakely-scale merged 8 commits into
mainfrom
edgararakelyan/fd-6072-bundle-register-composes-only-the
Nov 18, 2026
Merged

earakely-scale merged 8 commits into
mainfrom
edgararakelyan/fd-6072-bundle-register-composes-only-the

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

What

agent-env bundle register --sandbox <provider> now means what agent-env run --sandbox means: the provider the tasks deploy on. Each computer env composes only the forms its deploys there boot (FD-5094's Composing.for_run). The compose stays on the env's provider, this machine's Docker unless the config names another. The provider may be a comma-separated chain.

--sandbox Forms composed, on this machine
local (Docker, with or without KVM) container
modal container
modal_vm disk
local,modal_vm container, disk
not given every form the base declares (as before)
  • Without --sandbox, nothing changes. That follows FD-5094: the same env needs disks on Modal and not locally, so a compose with no target builds every form.
  • Content keys don't change. A deploy that boots a form the registration didn't compose composes it first (compose_unstarted).
  • The no-bootable-build check from fix(bundle): register fails when a computer env it writes has no build a deploy can boot #758 (merged) judges only those forms. With --sandbox local, a failed container fails the registration even when an earlier one composed a disk.
  • Its message names env build --sandbox for building a skipped arch elsewhere, since register --sandbox no longer says where a build runs.
  • AGENTS.md is updated to match.

What changes for someone passing register --sandbox today: it used to say where the compose ran, and composed every form there. Now it says where the tasks deploy. Building on another machine is the config's default sandbox, as for run, or agent-env env build --sandbox. Nothing in this repository passes register --sandbox, and no caller in the hub's packages calls register_bundle.

This PR first added a separate --deploys-on. That was redundant next to run's --sandbox. Folding it into --sandbox with the compose moving there too, the second version, lost composing here for deploys on Modal: Greptile's P1. This version matches run exactly.

Why

A bundle whose deploys all boot containers composed, at registration, a disk form that no deploy boots. Registering PSI's whole-computer desktop on an agent-environments-admin VM without KVM:

  • The desktop and each app's one-app computer were composed as a container and as a disk. Each disk ended unverified: no link ... boots linux/amd64 disks natively to probe it.
  • The desktop's disk alone took 21 min 27 s and about 13 GB.
  • One registration took the builder from 176 GB free to 30 GB. An earlier one filled it.

synthetic-pipelines works around this by staging a copy of the base with its container form alone, and naming agent-env's published base image by digest. With this change, it passes --sandbox local and copies the base as it is.

FD-6072.

Not here: register still composes each computer app's own one-app computer, since each can be deployed alone, though a bundle's tasks may deploy only the desktop that holds them. Composing only the computers the tasks deploy needs the plan to tell an app inside a computer from a computer deployed alone. That's a follow-up.

Proof

  • Unit tests (register_test.py), through the CLI:
    • test_a_registration_composes_here_the_forms_its_deploys_on_its_sandbox_boot_else_every_form, over the forms composed for each sandbox:

      --sandbox Forms composed
      none container, disk
      a provider running containers container
      one booting disks disk
      a chain of both container, disk

      It also checks that the compose provider is the env's own (sandbox_provider is None) and that the named provider decides the forms (deploys_on). The container and disk cases fail against register before this PR. The chain case composes every form either way.

    • test_a_registration_for_deploys_that_boot_containers_fails_on_a_failed_container_whatever_disk_was_built fails without it too.

    • tst/unit/bundle, tst/unit/env and tst/unit/cli: 4,333 passed, 11 skipped in each of three runs. One test fails on main on this Mac too, test_disk_recipe.py::test_a_windows_install_boots_its_iso_first_.... One other test failed once in a fourth run and didn't recur, its name not captured.

    • ruff check src tst passes.

  • Live, on an agent-environments-admin VM (local stores, --no-emulate), registering a computer env of the shipped ubuntu-24.04 and reference, copied into a bundle:
    • --sandbox local: composed only container pairs (container/amd64 ready in 28 s, arm64 skipped) and no disk/ line; the task was written.
    • --sandbox modal_vm --dry-run, on the same env: would compose disk/amd64, disk/arm64.
    • --sandbox modal_vm: composed container/arm64, disk/amd64, disk/arm64 on LocalSandboxProvider, a disk's container joining it when not built. disk/amd64: making the disk with this machine's Docker, then unverified in 1 min 9 s, since this VM has no KVM to probe it. arm64 was skipped (--no-emulate). Exit 0, the task unchanged.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new blocking issues were found.

Summary

Registration now uses --sandbox to choose which computer forms to build, while keeping builds on the environment’s configured provider.

  • Bundle registration picks computer forms from where its tasks deploy.

The earlier issue where remote deployment targets forced remote builds is fixed. No new actionable issues found.

Reviews (13) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

earakely-scale and others added 3 commits November 17, 2026 17:12
…d a deploy can boot

A registration whose compose of a computer env failed, a builder's disk full say, wrote the env and the tasks that
deploy it and exited 0, though no deploy could boot it. With bootable, as a registration materializes, a computer env
written or reused whose compose recorded builds but none ready or unverified stops it once every entity is written,
before any task or eval, naming each build's status and reason. Registering again composes what it has left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a skipped arch builds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' deploys boot

bundle register composed every form a computer env's base declares, so a bundle whose deploys all boot containers
composed a disk form too, which no deploy boots: 21 minutes and about 13 GB for one desktop. With --deploys-on, the
provider or chain the registered tasks will deploy on, each computer env composes only the forms those deploys boot, as
agent-env run does (Composing forms_of=deploys); a deploy that boots another form composes it first. Without it,
register composes every form, as before. Whether a computer env has a build a deploy can boot is now judged on those
forms alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale and others added 2 commits November 17, 2026 17:35
…oblem quotes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thout-ready-build' into edgararakelyan/fd-6072-bundle-register-composes-only-the
Base automatically changed from edgararakelyan/register-fails-without-ready-build to main November 18, 2026 04:05
…omposes only what deploys there boot

--deploys-on asked for a second provider beside --sandbox, and agent-env run asks for one: the sandbox its deploys are
on. So --sandbox now says it for a registration too: each computer env composes on it only the forms its deploys there
boot, as a run does. Without it, every form its base declares, on the env's provider, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/agent_env/bundle/register.py Resolved
@earakely-scale earakely-scale changed the title feat(bundle): register --deploys-on composes only the forms the tasks' deploys boot feat(bundle): register's --sandbox composes only the forms its tasks' deploys there boot Nov 18, 2026
earakely-scale and others added 2 commits November 17, 2026 21:56
… the compose stays on this machine

register --sandbox X both moved the compose to X and picked X's forms, so composing here for deploys on Modal was gone:
--sandbox modal_vm sent the builds to Modal VMs, which refuse this machine's local stores. It now means what run's
--sandbox means (Composing.for_run): the forms deploys on X boot, composed on the env's provider, this machine's Docker
unless the config names another. Without it, every form, as before. env build keeps --sandbox for where it builds, so
the unbootable message names it there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2-bundle-register-composes-only-the

# Conflicts:
#	src/agent_env/bundle/materialize.py
#	src/agent_env/bundle/register.py
#	tst/unit/bundle/computer_env_folder_test.py
#	tst/unit/bundle/register_test.py
@earakely-scale
earakely-scale merged commit 7ddbc42 into main Nov 18, 2026
36 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-6072-bundle-register-composes-only-the branch November 18, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant