Repository navigation
feat(computers): a ubuntu-24.04 computer in a multi env follows its gateway's clock (FD-5476) - #649
Merged
earakely-scale merged 13 commits intoNov 12, 2026
Conversation
…teway clock (FD-5476) The base starts as root: root's supervisord runs the clock follower as agentenv-clock and the session's supervisord as the session user. Every process preloads agent-env's libfaketime and the TLS shim, built in a stage of the base's Dockerfile from clock/, now in the base's folder. The driver serves clock/v1 sync_time where the follower is; core writes the follower's config through the root channel when a multi env deploys the computer and after a reset; the composer marks agent-env's own servers real time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xfwm4, and the clock test arms without a zone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tainer is gone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…process it is Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o follow the gateway, through its sync_time Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…6-hb16-computer-base-the-clock-follower
…'s current version, a composed computer keeps start_as sync_time read only that the follower was connected, so right after an arm it could answer before the follower showed the new version; it now reads the gateway's version from its watch, naming no follower, as any reader may. The composed computer copies the base's whole container form, so a computer composed onto it starts as root too. The follower's retry settings are named; the restart is timed inside the container; the base's build context is pinned with clock/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@greptileai review |
… warning at deploy and reset, refused at arming Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and message, not its body Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ere, and the base's files are checked against them Core reads a sync_time refusal through the protocol client's ExtensionCallError instead of parsing the body itself. The integration tests take the follower's path, config, status and user from agentenv_protocol.computer.clock, and a unit test checks the ubuntu-24.04 base's Dockerfile, init, root's supervisord and the library's settings name them as the protocol does, and that the disk recipe writes the file the driver takes for a disk guest. The computer tests' items env, multi env helper and container params live in their conftest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rd's next wake and a busy runner take Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-5476-hb16-computer-base-the-clock-follower
branch
November 12, 2026 22:39
This was referenced Nov 12, 2026
feat(computers): the clock app and its follower put a computer on its gateway's clock (FD-5476)
#645
Closed
This was referenced Nov 13, 2026
Merged
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.
Part of FD-5420: a computer's own clock follows the gateway's universe clock. This is FD-5476, the computer's side: the follower, the clock page, the real-time marker and the zone in ubuntu-24.04, and
clock/v1sync_timeon every driver.With this, a ubuntu-24.04 computer in a multi env follows its gateway's clock from the moment it's deployed. Every session program reads universe time; agent-env's own servers and the follower stay on real time.
What changes
/etc/localtimeto the computer's zone, makes the clock page and file for the follower's useragentenv-clock, then starts root's supervisord (root.conf).agentenv-clockand the session's supervisord as the session user, which runs every session program as before.start_as = "root"tells the composer to end the composed image as root. It's stored only when it'sroot, so every other computer is stored as before (the golden wire test holds)./etc/ld.so.preload), built in a stage of the base's Dockerfile so no compiler is left in the image.clock.confgets the session user's and the page owner's uids, so only the session user's programs are faked.src/agent_env/computers/artifacts/ubuntu-24.04/clock/), since an image builds only from its own folder. The clock tier, its workflow and the docs follow it. FD-5700 makes it an image of its own later, so another base needs no copy.clock/clock-follower, standard library only):/clock/watchunder the computer's name and read token, and acknowledges each version with its next watch;clockpage.py;clock/v1sync_timewhere the follower is, with the parameters every server'ssync_timetakes andsync_env_clockalready sends (env_get_time_url,timezone), and no new one.sync_timeas a follower, with its control token as its read token (feat(gateway): computers follow the clock through a watch, and clock writes wait for them (FD-5471) #614).root:agentenv-clock, 0640), written beside its place and renamed into it.sync_time, so a deploy or reset returns with the computer on the universe's clock. One that can't follow is a warning naming why, and the deploy or reset goes on: a task that never arms the clock needn't care, and arming it refuses such a computer, assync_env_clockcalls the samesync_time.metadata.computer.clock), never the token.AGENTENV_REAL_TIME=1on agent-env's own servers only, the driver's (whose recorder runs in it) and an app's. What they start, the agent's commands included, is on universe time.sync_time, and it stays on real time (FD-5488).Behaviour to know about
docker execinto a computer now runs as root by default. The tests that assumed the session user now say so.Testing
On EC2 hosts with local sandboxes, x86_64 and Graviton arm64. On arm64,
base_computer_test.py(11/11),computer_clock_test.pyandclock_desktop_test.py(2/2) pass, the first two again on the head with Greptile's fixes. The table is the x86_64 run.sync_time. The multi env has only following computers follow. The composer puts the marker on agent-env's servers only and ends a root-starting base's image as root. The driver servessync_timeonly where the follower is and not on a disk guest; its zone check and its reasons. The base's Dockerfile, init, root's supervisord and the library's settings name the follower, its config, status and user asagentenv_protocol.computer.clockdoes, and the disk recipe writes the file the driver takes for a disk guest.base_computer_test.pyagentenv-clockonly the follower, the session user everything else. The zone at boot. As the session user, 10 ways at the clock refused: writing or replacing the page, writing the clock file or adding beside it, reading or listing the follower's config, killing the follower, stopping it through root's supervisord, changing what's preloaded or the library's settings. Only session programs read universe time; a marked program reads real time and what it starts universe time; root and the follower's user read real time. A follower killed withkill -9is back within 3 s (about 1 s on the hosts; 2.03 s once on a busy CI runner).computer_clock_test.py(new)sync_env_clockarms the clock 182 days back, calling the computer'ssync_time. An advance waiting for the computer (wait_followers_s) is acknowledged. A follower killed withkill -9is back within 3 s and acknowledges the next advance. A reset brings the page and the follower back on the current version. The session'sdatematches the universe within 5 s each time (within 0.1 s in the run before the reset fix).clock_desktop_test.pycomputer_env_test.pyfull, and runs only the processes above.multi_env_computers_test.pytst/clockOn Modal (
modal_vm), at the head with the warning change. The bundle was registered into throwaway S3 and ECR stores, composed on a Modal VM, and deployed in a multi env onmodal_vm:sync_env_clocksync_timesynced; the session within 0.21 s of the universekill -9of the followerThe first run found one real problem, now fixed: a reset returned before the fresh computer's follower had taken its config, so for a fraction of a second the session read real time. Core now waits on the computer's
sync_timeafter writing the config, at deploy and after a reset.Follow-up
FD-5709: gate 1 warns when a driver's server would run on universe time. The composer marks a driver's server for real time only when its service runs
-m agentenv_protocol.computer.serve, as every shipped driver's does.Docs
The computer clock page should cover: the base starting as root, who runs what, the follower and its config,
sync_timeon a computer, the real-time marker, and that a disk computer stays on real time for now.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no blocking issues remain.Summary
Ubuntu computers follow their gateway's clock while agent-env's own servers stay on real time.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Core["Core"] -->|"Writes protected config"| Follower["Clock follower"] Gateway["Gateway clock"] -->|"Watch replies"| Follower Follower -->|"Writes"| Page["Clock page"] Page -->|"Universe time"| Session["Session programs"] Driver["Driver sync_time"] -->|"Checks current version"| Gateway Driver -->|"Checks applied version"| FollowerReviews (10) · Last reviewed commit: "style(computers): wrap the base test's c..." · Reviewed by Greptile