Repository navigation
feat(multi): a computer in a multi env routes its websites through the gateway (FD-4936) - #543
Merged
earakely-scale merged 17 commits intoNov 9, 2026
Conversation
…FD-4935) An environment artifact named for a computer, or for one of its apps, loads into that computer; a universe load loads each computer's environments after the services, in the computer's own order, after a snapshot restore too. reset_env resets each computer as it resets alone. snapshot_env, sync_env_clock and apply_server_config reach a computer and its apps at the computer's own address with its control token, from the multi env's record (legacy_protocol.backing_servers), rather than through the gateway's /svc route. A computer's apps' names are no other child env's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
backing_servers read another gateway's live card but still listed the record's computers, so a snapshot through an override gateway could mix two deployments. A record's child envs now count only when the gateway asked is the record's own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e gateway (FD-4936) With site_routing in its child_envs entry, a computer boots with its boot apps held (the computer provider's sites_later), and once the gateway is up it routes the multi env's websites through it, those site_routing names or all, and launches its held apps; the deploy ends after that. Its record keeps the sites, so reset_env routes them again. A site_routing naming none of the multi env's websites is refused at preflight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck, and the site probe's timeouts are named Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… too A multi env's reset now resets every child env at once, each as it resets alone. An MCP server and a website gain a reset of their own: data/reset, or an older server's /api/reset, empties what loads put in, as each load already does before it adds, and its changelog starts afresh. A task loads again after, as after a computer's reboot. One serving no reset (its card leaves data/reset out, as the website browser's does, or an older server answers 404) takes no load either and is left as it is. A child whose reset fails fails the reset, each one named, once the others have reset. The instance's record of which services its loads put in is cleared, so the next load reloads every one rather than resuming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-computer-lifecycle' into edgararakelyan/fd-4936-multi-env-computer-sites # Conflicts: # tst/integration/computer/multi_env_computers_test.py # tst/unit/env/envs/test_multi_env_computers.py
3 tasks done
…ildren, one store import - BackingServer.owner(deployed) is the record whose control token a call to the server takes; apply_server_config, snapshot_env and sync_env_clock use it rather than each spelling the choice. - _multi_computers.each awaits a multi env's child envs at once and names each that failed; a load into several computers now does as a reset does, rather than raising the first failure and logging the rest. - multi_env reaches the instance store through one module import, so a test patching agent_env.env.store reaches every path, and a snapshot restore forgets the loaded services through the same helper a reset does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outing names each computer that fails too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d an older tool-only server isn't skipped - MultiEnv.reset forgets which services the instance's loads put in before any server is emptied, and empties nothing when it can't: a reset also clears the changelog, so a resumed load would otherwise skip a service it had emptied. - An older MCP server answering 404 at /api/reset that offers a <name>_reset tool resets only to a seed that tool loads, so its reset fails, naming it, rather than being left as a server that takes no load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-computer-lifecycle' into edgararakelyan/fd-4936-multi-env-computer-sites # Conflicts: # tst/unit/env/envs/test_multi_env_computers.py
…a restore without computers none A universe load read the universe's environments again at its end to load the computers', even into a multi env with none, and on a snapshot restore, which never read them before. A re-ingest now reads them once for the services and the computers alike, a restore reads them only for computers to load, and a multi env without computers loads none: as before computers, a restore no longer fails on an environment it never needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-computer-lifecycle' into edgararakelyan/fd-4936-multi-env-computer-sites
…ps launch with the trust, a bad selection is refused - A computer's site_routing selection names websites by env id, which the multi env maps to environment_names, while deployed_sites names each site by its card; a card named apart from its environment_name was silently left out. deployed_sites takes the names sites are served as (services), and each routing computer reads those it selects. - A computer routing sites later boots with the trust variables, as one knowing its sites does: its held apps launch through the app server, which only has the environment the computer booted with, and the bases hold the trust files from boot, the public roots and no CA until routing adds one. - A site_routing list of other than ids is left to the computer's own params check to refuse, rather than raising TypeError in the multi env's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nv covered for servers alone and in a multi env - An older MCP server answering 404 at /api/reset that offers its <name>_reset tool is reset through it with no seed, which puts back the data it boots with, as /api/reset with no body does; only a tool that fails fails the reset. reset_via_mcp_tool takes no seed and returns the tool's answer. - Integration: a multi env without computers resets its servers through the reset_env step, the items server through data/reset and the older slack server, which serves no card, through /api/reset; a server deployed alone is emptied too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-computer-lifecycle' into edgararakelyan/fd-4936-multi-env-computer-sites
Base automatically changed from
edgararakelyan/fd-4935-multi-env-computer-lifecycle
to
main
November 9, 2026 03:40
…ting branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… named as they're served deployed_sites named each website by its card, and only told apart sites of different envs that share a name, so two websites of one env whose cards name them alike (two of one image, say) were both named the same, and a computer routing them refused "two sites are named ...", failing a multi env's deploy after its computers and gateway were up. An env's sites are now named by their cards unless two of its cards share a name; then each is named as it's served, its environment_name, which the gateway routes each by. A website built on the agentenv SDK serves its environment_name as its card's name, so it never did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-4936-multi-env-computer-sites
branch
November 9, 2026 06:00
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.
Summary
PR 4b of the FD-4930 + FD-4935 design note, stacked on #542: a computer in a multi env reaches the multi env's websites by their names over HTTPS, through its gateway (FD-4936). The decisions are 5 to 7 in the note's section "PR 4a and 4b", proposed on Nov 8 and built on their recommendations; they are settled once you review them.
When it routes. A computer with
site_routingin itschild_envsentry boots with its boot apps held, through a newsites_lateroption of the computer provider, since its sites come up with the gateway, which starts after it. Once the gateway is up, before the multi env's record is registered, it routes the multi env's websites through the gateway, once they say they're ready, and launches its held apps; the deploy ends after that, as decision 5 ordered.ComputerEnv.route_sitesdoes the routing, through the provider that booted it. Its record keeps the routed sites, soreset_envroutes them again, as it does for a computer alone.Which sites.
site_routing = trueroutes every website of the multi env; a list names website env ids among them, and any other id is refused at preflight, as issite_routingin a multi env with no websites. A computer's ownsitesroute at boot, as they do alone.No credentials refusal. The site proxy already holds the provider's request headers as a root-only secret, as for a computer alone that routes a website behind credentials, so a gateway on a Scale sandbox needs no refusal. FD-5334 still covers the gateway reaching a computer.
Tools. A computer's forwarded tools come from its driver's own manifest, not from its apps, so its apps launching after the gateway's start doesn't change the tools the gateway discovered.
Test plan
sites_later, routes nothing untilroute_sites, then routes the sites given and keeps them in its record; a site its params can't hold is refused. The multi env deploys each computer routing sites withsites_later, reads the sites from its own record once the gateway is up, waits until they're ready, routes all or the named ones per computer, then records; a routing failure fails the deploy and closes everything; thesite_routingrefusals.multi_env_computers_test.pydeployment: a small website (theagentenv_websitefixture) joins the multi env, and the desktop, withsite_routing, loadshttps://shop.test/api/healthinside the computer with the deploy's CA trusted, and again afterreset_env. A small MCP server stands in for the website browser a gateway runs beside websites, since only the routing is under test.ca_trust_test.py, a computer alone routing a site, passed. The unit tier passed but for the 5 tests that fail on a VM from an archive, as before.site_routingnames, a kiosk none. After each step, whether each computer loadshttps://shop.test/api/health:shop.test; the kiosk can't resolve it.reset_envthrough the multi env: both answer 200, the kiosk still not.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the previous shared-name deployment failure is fixed.Summary
Computers in a multi env can route its websites through the gateway and keep those routes after reset.
Diagram
Reviews (14) · Last reviewed commit: "fix(sites): two websites of one env whos..." · Reviewed by Greptile