Repository navigation
test(computers): a by-hand check of a computer's clock on a remote sandbox provider, which passes on Modal (FD-5487) - #736
Merged
earakely-scale merged 9 commits intoNov 18, 2026
Conversation
… can't follow it A computer whose card offers no clock/v1, one booted from a disk or a VM bundle or on a base without agent-env's clock, was skipped as a server without a clock: arming succeeded and its session stayed on real time. sync_env_clock now refuses it, naming the computer and what to deploy instead. Its apps, which run on the computer's clock, are still skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndbox provider It takes the local clock test's steps, plus a minute and a half idle and the disk form's refusal, on modal_vm and modal, for the desktop and a browser computer, reading the gateway's universe and the session's time inside the computer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ake narrowly, instead of using it Ten readings each slower than the bracket allows used to leave the last one to be measured, so a slow request could fail a healthy clock. The reading now says whether one was narrow enough, and the check fails naming the widths when none was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ty of its own reading At a rate of 10, each 0.1 s of the computer's round trip to the gateway is a second of universe, more than the skew allowed; a slow link failed a healthy clock. Each reading keeps the narrowest of its ten tries and reports how far it may be off, the skew passes when it's within the limit give or take that, and the rate is read from the session's own readings alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tarts The waits, timeouts, attempt counts, tolerances and the arming offset its helpers held inline are named constants beside the others, and the reading script inside the computer takes its attempts and gateway timeout as arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uter too A computer that offers no clock/v1 is skipped when the step tolerates servers without sync_time, as it is by default, and stays on real time; a strict arm refuses it, naming it and what to deploy instead, rather than refusing it whatever the step says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… computer, and the clock check reads as core does - BackingServer.is_computer names the rule sync_env_clock used inline (a server on a computer's own sandbox whose card offers computer-exec/v1), beside the code that lists those servers, with a test of its own. - sync_env_clock's tests share one helper for a multi env with a computer, and the module's imports are at its top. - The remote clock check expects a reset to be refused where core refuses it, on a sandbox that isn't a VM, rather than by the refusal's wording, and its docstring says how to write the envs it needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an in-place reset as the reset's outcome On a sandbox that isn't a VM, any RuntimeError from the reset passed as the refusal, though the multi env wraps every child's failure in one. The check now also requires core's refusal for that provider, which names it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as any server does With tolerate_missing_sync_time covering computers, the computer-specific branch only reworded a strict arm's refusal. A computer whose card offers no clock/v1 is skipped when tolerated and refused, as not advertising clock/v1, when not, from its card like any server; sync_env_clock, legacy_protocol and their tests are as on main again. The remote check's disk case expects that refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-5487-hb1-follow-up-the-computers-clock-on
branch
November 18, 2026 05:46
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
FD-5487 (part of FD-5420): the computer's universe clock on remote sandbox providers, starting with Modal.
The local clock test's steps, run on Modal for the desktop and the browser computer, all hold with no change to the clock path. This PR adds them as a by-hand check,
tst/manual/remote_computer_clock_check.py; it changes nothing else.A multi env's computer that can't follow the clock, such as a desktop booted from its disk form, is handled from its card like any server, with no special case:
tolerate_missing_sync_time = false): the arm refuses it as not advertising clock/v1.Results on Modal
The multi env's gateway runs on
modal_vm, and its computer on the provider in each row. Every reading is taken inside the computer: the gateway's universe, read where the computer reaches the gateway as its follower does, and the session's time, each between two readings of real time. Each skew is recorded with how far its reading may be off: half its brackets, at the clock's rate.modal_vm(container in a VM)modal(container sandbox)modal_vmDate.now()within 0.4 s, before and aftermodalmodal_vmWhat each row covers:
docker exec -u 0onmodal_vm, and the sandbox's own exec onmodal;How
tst/manual/remote_computer_clock_check.pyis a by-hand check, run withpytest -s, against multi envs written to stores the provider reaches. Its docstring says what it needs and how to write them. Its three tests:modal_vm,modal(two of the rows above);No behavior changes.
Found along the way, not changed here
modal, freezing after rate 10 left the desktop 0.81 s ahead: about 80 ms of delay at rate 10.modal_vmgateway VM died in 3 of 9 deploys. Each exited 137 about 95 to 140 s after it was created, just as it finished building its images from their contexts; the next exec said "Sandbox is shutting down".dmesghad no OOM, and the disk is a real block device, not RAM.bundle registerbuilds every image on the registering machine for amd64 and pushes it. I wrote the bases as build contexts instead, which the Modal builder VM builds (VmBuilder._base).EcrImageStorestill can't take a region through config without keys.Verification
modal_vmdesktop run lost its gateway VM once and passed on its rerun). Gate 3 also probed each computer ready onmodal_vmwhen it was composed there: the desktop's container and disk, and the browser computer.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Adds an opt-in manual check of computer clocks on remote sandbox providers, without changing production behavior.
No new actionable issues found. The three earlier findings are addressed. Remote checks were not run during this review.
Reviews (15) · Last reviewed commit: "revert(task_step): a multi env's compute..." · Reviewed by Greptile