Repository navigation
feat(multi): load, snapshot and reset reach a multi env's computers (FD-4935) - #542
Merged
earakely-scale merged 7 commits intoNov 9, 2026
Merged
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>
Merged
3 tasks done
… 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>
…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>
…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>
…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>
…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>
earakely-scale
deleted the
edgararakelyan/fd-4935-multi-env-computer-lifecycle
branch
November 9, 2026 03:40
earakely-scale
added a commit
that referenced
this pull request
Nov 9, 2026
…ting branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
5 tasks done
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 4a of the FD-4930 + FD-4935 design note:
load_artifact,snapshot_envandreset_envreach a multi env's computers, finishing FD-4935's done-when apart from routing sites, which is PR 4b (FD-4936). The decisions are 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.Loads. An environment artifact named for a computer, or for one of its apps, loads into that computer. In a universe load, the services load as before and each computer's environments then load into it in its own order, its own first and then its apps', after a snapshot restore too. They aren't skipped when an interrupted load resumes, since the resume check reads the services' changelog, which doesn't see a computer's files change.
Reset.
reset_envon a multi env resets every child env at once, each as it resets alone (decided Nov 8, revising the Nov 6 decision that servers keep their data). A computer reboots and gets itstoolsagain. An MCP server and a website now have 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. So a task loads again after a reset, as after a computer's reboot. One serving no reset (its card leavesdata/resetout, as the website browser's does, or an older server answers 404 and offers no<name>_resettool) takes no load either and is left as it is; an older server whose only reset is that tool is reset through it with no seed, which puts back the data it boots with, as/api/resetwith no seed does. A child whose reset fails fails the reset, each one named, once the others have reset. Before any server is emptied, the instance's record of which services its loads put in is cleared, so the next load reloads every one rather than resuming; a reset that can't clear it empties nothing. No task in prod has areset_envstep, so no existing task changes.A computer's data plane.
legacy_protocol.backing_serverslists each computer of a multi env, and its apps, from the computer's own record inDeployedGatewayEnv.child_envs: at its own address, with its record on the server (BackingServer.record). Sosnapshot_env,sync_env_clockandapply_server_configreach it with its own control token. Through the gateway's/svc/<computer>/they couldn't: the gateway carries no token of the computer's, and the card's child guess takes that route for a website's (FD-5227).Upkeep.
BackingServer.owner(deployed)picks the record whose control token a call to a server takes, for every step that calls one._multi_computers.eachawaits a multi env's child envs at once and names each that failed, for loads into computers and for reset.multi_envreaches the instance store through one module import.Names. A computer's apps' names are no other child env's, at save and in the bundle plan, since loads and snapshots find an environment by its name. The bundle plan also lets a load into a multi env name its computers and their apps.
Test plan
data/reset,/api/reset, a 404, a card withoutdata/reset, a plugin's with no data plane), app names,backing_serverslisting a computer from its record, andapply_server_configandsync_env_clocksending the computer's own token. The bundle plan: a universe loaded into a multi env seeds its computer and the computer's apps, and two computers sharing an app's name are refused.multi_env_computers_test.pydeployment so the tier's time barely moves: a universe loads the items server's data and a file into the desktop through the multi env,snapshot_envkeeps both, andreset_envreboots the computer and empties the server, its file and the items gone and its screenshot answering through the gateway; the same universe loaded again brings both back.multi_env_local_test.py: a multi env without computers resets its servers throughreset_env, the items server throughdata/resetand the older slack server, which serves no card, through/api/reset, both emptied.server_env_local_test.py: a server deployed alone is emptied byreset_envtoo.computer_env_test.py(a computer snapshotted alone, its framework-only routes),website_browser_test.py,tool_prefix_test.py,multi_env_local_test.pyandmulti_env_child_envs_local_test.py. The unit tier passed but for the 5 tests that fail on a VM from an archive, as before.missing=['desktop']).reset_envthrough the multi env with the desktop killed beforehand: both computers back at boot state, their files gone, screenshots and items answering through the gateway; loaded again after.sync_env_clockthrough the multi env: the server synced; each computer, which advertises no clock, skipped asnot_advertised.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge, with the dependent callers verified at PR #543’s supplied head.Summary
Extends multi-environment loads, snapshots, and resets to computers and their apps.
The earlier deployment-mixing, load-progress, and legacy-reset findings are addressed. PR #543’s supplied head also uses
resetsandeach, resolving both dependent-caller findings. Those stack checks depend on PR #543; the website-routing caller lives there, not in this PR.No new actionable issues were found. This review checked code and tests without running them. All supplied previous threads were unnumbered, so
previousFindingsis empty.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD U[Load universe] --> S[Load or restore services] S --> C[Load each computer] C --> A[Computer files first, then apps] R[Reset multi environment] --> F[Clear saved service progress] F --> P[Reset children together] P --> B[Reboot computers] P --> E[Reset supported services] P --> N[Name failed children]Reviews (11) · Last reviewed commit: "fix(multi): an older server's reset tool..." · Reviewed by Greptile