Repository navigation
[FD-5700] refactor(computers): the clock library and the egress proxy live once, in utils, and each image takes them - #763
Merged
earakely-scale merged 5 commits intoNov 18, 2026
Conversation
…, in image_kits, and each image takes them ubuntu-24.04 and ubuntu-24.04-browser each held a copy of clock/ and egress/ (and the browser base of root/ and root.conf), kept equal by drift tests, so a fix had to land in each. They now live once, in src/agent_env/image_kits/, and each base names what it takes in an image_kits.toml (clock = "image_kits/clock"); the browser base takes ubuntu-24.04's root/ and root.conf the same way. A build context holds what its image_kits.toml takes, each at the name it gives (utils/docker/context.py), so an image still builds from one self-contained context on every builder, and its source hash covers what it takes. A local docker build of such a folder builds that context, and release CI stages the same files (infra_build.py _staged). Links stay links; the files are real everywhere, in the repository, the sdist and the wheel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… image_kits, and ignore exceptions reach a kit - make egress-test read the Go image from ubuntu-24.04's Dockerfile, not from beside egress/, which moved. - tst/util/published_image.py builds a base it can't pull through build_image, so its context takes what its image_kits.toml names (the slow computer tiers built the bare folder and failed). - A kit the ignore file excludes is skipped only when no exception pattern brings something under it back, as a folder of the context's own is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…herever pytest starts Its entry names the base by the repository-relative path the release workflow runs from; CodeBuild starts pytest elsewhere, so it listed nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…faketime_clock and utils/egress_proxy image_kits/ didn't say what it held. Each image's image_kits.toml names the new paths; the build context names (clock, egress) and so the Dockerfiles are unchanged. AGENTS.md's computers entry no longer describes the per-base copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…toml takes changes The ledger hashed an image's own folder, so after the clock and egress proxy moved to utils/, editing them left a bundle reusing the image built from the old copy whenever no published image stood for either: a second local edit, a machine that can't reach GHCR, or a user's bundle that copies a base. It now hashes each file the toml takes, under its name in the build context, so a rerun says "files changed: clock/libfaketime.patch". image_kits.toml is renamed shared_sources.toml, which says what it lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-5700-hb1-follow-up-the-clock-library-as
branch
November 18, 2026 17:09
williamloo-scale
added a commit
that referenced
this pull request
Nov 18, 2026
…ls (shared_sources.toml), as Claude Code's does Drops the clock/ and egress/ copies now that #763 keeps one copy of each in utils; the Dockerfile still copies from clock/ and egress/, which the build context takes from there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale
added a commit
that referenced
this pull request
Nov 18, 2026
…ls (shared_sources.toml), as Claude Code's does Drops the clock/ and egress/ copies now that #763 keeps one copy of each in utils; the Dockerfile still copies from clock/ and egress/, which the build context takes from there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale
added a commit
that referenced
this pull request
Nov 18, 2026
…ls (shared_sources.toml), as Claude Code's does Drops the clock/ and egress/ copies now that #763 keeps one copy of each in utils; the Dockerfile still copies from clock/ and egress/, which the build context takes from there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale
added a commit
that referenced
this pull request
Nov 18, 2026
…ls (shared_sources.toml), as Claude Code's does Drops the clock/ and egress/ copies now that #763 keeps one copy of each in utils; the Dockerfile still copies from clock/ and egress/, which the build context takes from there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale
added a commit
that referenced
this pull request
Nov 18, 2026
…ls (shared_sources.toml), as Claude Code's does Drops the clock/ and egress/ copies now that #763 keeps one copy of each in utils; the Dockerfile still copies from clock/ and egress/, which the build context takes from there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale
added a commit
that referenced
this pull request
Nov 18, 2026
…ls (shared_sources.toml), as Claude Code's does Drops the clock/ and egress/ copies now that #763 keeps one copy of each in utils; the Dockerfile still copies from clock/ and egress/, which the build context takes from there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Nov 18, 2026
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 and why
FD-5700, and a prerequisite of #726.
ubuntu-24.04 and ubuntu-24.04-browser each held a copy of
clock/(agent-env's libfaketime, the TLS shim, the clock page and the clock follower) andegress/(the egress proxy). The browser base also copied ubuntu-24.04'sroot/androot.conf. Drift tests kept the copies equal, so a fix had to land in each. The clock follower fix on #726 landed in three places. #726 would add a third copy, for the Claude Code image.The copies existed because an image builds only from its own folder. This PR keeps one copy and lets each image's build context take it in.
What changes
clock/moves tosrc/agent_env/utils/faketime_clock/andegress/tosrc/agent_env/utils/egress_proxy/, the only copies.shared_sources.tomlbeside its Dockerfile, by the name its Dockerfile copies from:src/agent_env; the names on the left are the folders the Dockerfiles copy from, so Dockerfiles are unchanged. The browser base takes ubuntu-24.04'sroot/androot.confthe same way.BuildContext(utils/docker/context.py) holds what itsshared_sources.tomltakes, at those names. It refuses a name the folder already has, and a path outside agent-env's sources. The toml itself isn't sent, so a context written out and unpacked builds as it is.build_imagebuilds a folder that has ashared_sources.tomlas its context sends it.infra_build.py) stages the same files beforedocker build.shared_sources.tomltakes, under its name in the build context. So rerunning a bundle rebuilds the image when shared code changes ("files changed: clock/libfaketime.patch"), even when no published image exists for the new sources.Verification (Linux VM)
computer_clock_test.pyand bothbrowser_clock_test.pytests: pass, composing both bases through the real bundle and composer path.faketime_clock/README.md, and because the context now includes what it takes in place of the old copies. The next release rebuilds them, as for any base change.Release path (Linux VM, amd64)
infra_build.py build, as release CI runs it: both bases build from cold and passinfra_build.py smoke. ubuntu-24.04 took 77 s against 101 s on main; the browser base 61 s against 49 s.utils/and the rename toshared_sources.toml, which change only paths and names.Compose and run, and chaos (Linux VMs, amd64, at fe5c0de)
agent-env run desktop: composes the shipped desktop (ubuntu-24.04 with the reference driver) and passes the probe at full; a second run reuses everything. After an edit toutils/faketime_clock/clock.conf, the next run rewrites the base (files changed: clock/clock.conf), the computer and the env, and the newly composed image holds the edit. The files task passes too.desktop_example_test,computer_clock_test,browser_clock_test,clock_desktop_test,egress_testandbase_computer_test: 24 passed, 1 skipped (the agent test, no model endpoint).shared_sources.toml:egress, or a shared file deleted from agent-env, fails at the build naming the missing path; restored, it passes.bundle initof its stored task writes the base withclock/andegress/and no toml, and the exported folder composes and passes the probe.Notes
shared_sources.toml.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
The PR puts the clock and egress code in shared folders while keeping each image's build inputs self-contained.
No new actionable issues found in the changes since the previous review. Tests were not run during this review.
Reviews (7) · Last reviewed commit: "fix(bundle): a bundle rebuilds an image ..." · Reviewed by Greptile