Repository navigation
feat(bundle): a run or registration composes only the computer envs its tasks deploy - #792
Merged
earakely-scale merged 3 commits intoNov 19, 2026
Conversation
…ts tasks deploy An app that names the computer and driver it deploys on alone is a computer too, so a run or registration of a desktop of N such apps composed N + 1 computers, though its task deploys only the desktop: about an hour of Modal VM composes on dev for the 19-app PSI desktop. Now each composes only the envs its tasks deploy: each env a task's steps name, and each env those hold, but not a computer env's own apps and driver, which run inside it. Any other computer env is written uncomposed and composes at its first deploy (compose_unstarted), or with agent-env env build. A plan with no tasks composes every computer env, each deployable alone, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bundle still composes The shared store's one write of an installed bundle's env, such as chromium, is the one every bundle reads, and a local run can't compose a store's env at its first deploy, so the registration that writes it leaves it deployable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion-composes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-6256-hb519-a-run-or-registration-composes
branch
November 19, 2026 17:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
agent-env runandbundle registernow compose only the computer envs a bundle's tasks deploy.Before this, they composed every computer env a bundle wrote. A computer app that names a
computeranddrivercan be deployed alone, so it is a computer env too. A desktop of N such apps therefore composed N + 1 computers, though its task deploys only the desktop. For the full PSI desktop (19 apps) that was about an hour of Modal VM composes on dev, most of it for composes no deploy used.This PR:
_composed_envsinbundle/materialize.py):chromium. Every bundle shares that env's one write, and a local run can't compose a stored env at its first deploy (below), so the registration that writes it leaves it deployable.AuthoringContext.compose, passed toComputerEnv.put(compose=...)byComputerEnvandComputerAppEnv). Its first deploy composes it (compose_unstarted), as it already does for a form no compose started, andagent-env env buildstill composes it on demand._compose_reused), and fix(bundle): register fails when a computer env it writes has no build a deploy can boot #758's check that a computer env has a build a deploy can boot. An app no task deploys has no build, and that's expected now.bundle registerstill leaves each one deployable alone.FD-6256, under FD-6188.
A trade-off to know: a local
agent-env rundoesn't compose a registered env at its first deploy, since the run's fence refuses its record (computers/README.mdsays so, and the deploy namesagent-env env build). So a local bundle run that names, by its registry id, an app registered only as part of a desktop now refuses at that deploy:On main that registration composed the app, so the run deployed it. A stored task run (
agent-env task run) and the hub's workers compose it at that first deploy, as the issue asks. This is the rule #759 already follows for the forms a registration leaves to other providers.For the docs: where the docs describe what
bundle registerandagent-env runcompose, they can say that each composes only the computer envs its tasks deploy, and that any other one composes at its first deploy.Proof
tst/unit/bundle/computer_env_folder_test.py, writing a bundle throughmaterialize, asagent-env rundoes):desktopcomposes. When the task deploys one app alone, only that app composes.tst/unit/bundle/register_test.py):desk-desktopalone. On main it composesdesk-mail,desk-notesanddesk-desktop.chromiumas an app composeschromiumtoo. Without the installed-bundle clause, onlydesk-desktopcomposes.tst/unit/bundle,env,cliandtaskgave 4,706 passed. One test fails on macOS before and after this change (test_disk_recipe.py::test_a_windows_install_...). Ruff is clean.computeranddriver.bundle register --prefix psi-6256b- --sandbox local --no-emulate: exit 0 in 13.7 min, with one compose,envs/desktop(container/amd64: ready (13 min 18 s)). sp#2212's proof, with the workaround on, composed the same one; main without it composes 20.psi-6256b-gatelark-apphas nocomposedrecords.deploy_envofpsi-6256b-shelfway-app, registered with no composes, thenagent-env task run): it composed the app on that first deploy (container/amd64ready at 23:04:04, after the registration) and deployed it. Exit 0 in 97 s, torn down.agent-env env build --id psi-6256b-shelfway-app. Once composed, the same run deployed it in 4.2 s, composing nothing.envs/desktopalone too.Not here: a compose at deploy on a local sandbox tries every arch, without
--no-emulate. On this amd64 VM, the app'scontainer/arm64was recordedfailed(this machine can't build linux/arm64: its Docker has no emulation for it), where a registration with--no-emulaterecordsskipped. That'scompose_unstartedas it is on main; this change only makes it the path for more envs.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge with the documented limit on local runs of unbuilt registered apps.Summary
This PR avoids building standalone computers for apps that only run inside a desktop.
No new actionable issues found. earakely-scale explicitly accepts that a local run of an unbuilt registered app needs
agent-env env build, because local runs cannot write that registered env's build records.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD P[Planned bundle] --> T{Has tasks?} T -->|No| A[Compose every computer env] T -->|Yes| R[Follow task env references] R --> C[Include computers held by non-computer envs] C --> S[Stop at each computer's apps and driver] S --> I[Also include pulled installed envs] I --> B[Compose selected computers] I --> U[Save other computers uncomposed] U --> D[Compose on first deploy where writes are allowed]Reviews (2) · Last reviewed commit: "Merge origin/main into edgararakelyan/fd..." · Reviewed by Greptile