Skip to content

feat(sync_env_clock): a multi env's computers follow its clock through their followers, and the arm waits for them (FD-5477) - #646

Closed
williamloo-scale wants to merge 1 commit into
wloo/computer-clock-followerfrom
wloo/computer-clock-sync
Closed

williamloo-scale wants to merge 1 commit into
wloo/computer-clock-followerfrom
wloo/computer-clock-sync

Conversation

@williamloo-scale

Copy link
Copy Markdown
Contributor

What and why

sync_env_clock puts a multi env's computers on its clock (FD-5477). Before the arm, it configures and starts the clock follower of each computer that composes the clock app. It does this as root through the sandbox's root channel (computer/utils/clock.py), never through the driver, which runs as the session user.

  • The config (watch URL as the sandbox reaches the gateway, token, follower name, config id) is written into a folder only agentenv-clock can open. The clock page is made as root, owned by the follower from its first byte. Then the follower is started detached.
  • The arm sets wait_followers_s, so set_time returns only once the computers show it. The step then calls the clock app's sync_time with the config id.
  • A computer whose follower can't start fails the step. Under tolerate_missing_sync_time it is skipped and named, and the arm doesn't wait for computers.
  • _clock_read_token becomes public clock_read_token, and a computer now follows when its card or one of its apps' cards offers clock/v1 sync_time.

How it was tested

  • Unit tests in test_computer_clock_core.py, sync_env_clock_test.py and test_multi_env_computers.py.
  • End to end in the stacked test PR.

Notes

  • Docs to cover: sync_env_clock starting followers and waiting for computers, and what tolerate does to a computer that can't start.

Stack: follower → this → e2e → reset.

🤖 Generated with Claude Code

…h their followers, and the arm waits for them (FD-5477)

A computer that composes the clock app is a clock follower: its app's card offers clock/v1 sync_time, which now counts
for the gateway (clock_read_token looks at the computer's app cards too), so the gateway gives it a read token.

sync_env_clock configures and starts each such computer's follower before the arm, as root through the sandbox's root
channel (computer.utils.clock.start_follower), never through the driver: the gateway's /clock/watch as the computer's
sandbox reaches it, its read token, its follower name and a config id, in a config only the follower's user can read;
the clock page made for that user; and root's follow loop started. The arm then waits for the followers
(wait_followers_s), so a computer still behind fails the step naming it, and each clock app's sync_time gets its config
id and reports what its follower showed. A follower that can't start fails the step, or under
tolerate_missing_sync_time is reported (follower_not_started) and not waited for.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale deleted the branch wloo/computer-clock-follower November 12, 2026 23:38
@williamloo-scale

Copy link
Copy Markdown
Contributor Author

Closing: superseded by #649, which puts ubuntu-24.04 computers on the gateway's clock from the base image, with core configuring the follower at deploy and after a reset. FD-5477's remaining arm-time work (wait_followers_s and the refusals) stays with its assignee.

@williamloo-scale
williamloo-scale deleted the wloo/computer-clock-sync branch November 12, 2026 23:38
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