Skip to content

feat(computers): Chromium on the desktop goes out through the egress proxy by policy, and X never blanks (FD-5481) - #673

Merged
earakely-scale merged 9 commits into
mainfrom
edgararakelyan/fd-5481-hb110-chromium-and-the-desktop-on-the
Nov 13, 2026
Merged

earakely-scale merged 9 commits into
mainfrom
edgararakelyan/fd-5481-hb110-chromium-and-the-desktop-on-the

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Chromium is the agent's main window onto sites, and it has to keep working when the computer's clock jumps (FD-5481, HB1.10). Three parts:

  • Proxy policy. The ubuntu-24.04 base gives every Chromium build an app brings a managed policy, agentenv-egress.json:

    • ProxySettings is fixed_servers at the egress proxy (http://127.0.0.1:3128), bypassing what the session's NO_PROXY does: localhost, loopback and host.docker.internal.
    • WebRtcIPHandling is disable_non_proxied_udp, as the browser computer's flags already set.
    • It goes into the folders where Chrome for Testing, Chromium, a snap's Chromium and Chrome each read policies: the folders site routing writes its own policy to.

    Before this, the desktop's Chromium went through the proxy only because it read the session's environment under XFCE. The policy makes it so however the browser is launched. It lives in the base, not the chromium app, because the same app runs on the browser computer, which goes out through its site proxy by its own flags. Routed sites need no bypass, since the egress proxy hands them to the site proxy.

  • Network time off. It already was (BrowserNetworkTimeQueriesEnabled: false in the app's QUIET_POLICIES).

  • No screensaver. Xvfb runs with -s 0 -dpms. Its screensaver's 600 s timeout and its DPMS ran on real time.

FD-5481 also asked for a relaunch after a crash. It's left out: a crash is an infrastructure failure, better failed and retried than continued with a fresh browser that has lost its tabs and page state, and it was most of this change's complexity. As on main, the browser computer fails for good when its browser crashes, saying why; on the desktop the browser stays gone until its launcher opens it again. The crash the prototype found, a browser context disposed while it holds a hidden page, is FD-5842.

Behaviour to know about

  • The tests' browser probe (website_browser_test.BROWSER_PROCESS) found a browser by pgrep -f -- --remote-debugging-pipe, which matched the probe's own command line when no browser ran. Its pattern is now [-]-remote-debugging-pipe.
  • A flaky test fixed on the way: test_browser_recording's nudge test checked that the second capture came at least NUDGE_S (0.5 s) after the first, and failed on this PR's unit (2/2) with 0.49966 s. The control starts its first capture with ensure_future and then arms its NUDGE_S wait, so the first capture is sent a moment after the wait starts. The control is right; the test now times the second capture from before the frame call.

Testing

Test What it shows Result
test_computer_egress_base.py the policy's proxy is the session's HTTPS_PROXY, its bypass list the session's NO_PROXY, and the Dockerfile installs it in each folder site routing writes to; Xvfb runs with -s 0 -dpms passed
shipped_computers_test.py the base's build context lists the policy passed
test_browser_recording.py the nudge test, timed from before the frame 18 passed, five runs
chromium_universe_test.py (new), the chromium desktop on local Docker its boot browser, never launched again, loads example.com at −182 days, example.org at +730 days, example.net at +6 years, and www.wikipedia.org right after jumping back to −182 days, each through the egress proxy; xset q shows no screensaver or DPMS; the policy is installed passed on an x86 host (5 min 57 s)

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no outstanding findings.

Summary

The PR makes desktop Chromium use the egress proxy through a managed policy and disables Xvfb screen blanking.

  • Chromium on the Ubuntu 24.04 desktop uses the egress proxy by policy.
  • The desktop screen stays on while its clock is shifted.
  • Browser test probes avoid false matches and measure capture delay from the request.

Reviews (12) · Last reviewed commit: "test(browser): the nudge test times the ..." · Reviewed by Greptile

…proxy by policy, comes back after a crash, and X never blanks (FD-5481)

- The ubuntu-24.04 base gives every Chromium build an app brings a managed policy (agentenv-egress.json in Chrome for
  Testing's, Chromium's, the snap's and Chrome's folders): ProxySettings fixed_servers at the egress proxy, bypassing
  what the session's NO_PROXY does, and WebRtcIPHandling disable_non_proxied_udp. It's the base's, not the chromium
  app's, since the same app runs on the browser computer, whose site proxy its own flags name.
- A website browser that a signal or a failing code ends is launched again by its server (AppRuntime
  relaunch_on_crash, cause "crash"), up to CRASH_RELAUNCHES (5) times a boot; one that exits cleanly was closed and
  stays so, and one its server stopped is its server's to start.
- Xvfb runs with no screensaver and no DPMS (-s 0 -dpms), whose timeouts run on real time.
- Chromium's network time queries were off already (QUIET_POLICIES).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 13, 2026 20:27
earakely-scale and others added 7 commits November 13, 2026 12:45
… launched again, so it starts afresh

On the host, a SIGKILLed Chromium was never launched again: its helpers outlived it for a moment, so its session still
counted as the app running, and the relaunch reached for a window over its closed pipe instead of starting a browser.
What's left of the crashed session is now stopped first. The integration test waits for the crash's launch in the app's
log, and the browser probe's pgrep pattern no longer matches the probe's own command line, which had passed it off as
a browser when none ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o data call changes its profile as it starts

The relaunch after a crash ran beside the data plane's calls (Greptile): a data/reset or load arriving as it started
found the dead pid, counted the app stopped and replaced the profile while the new browser read it. The app's turn,
the lock those calls and launches take, moves from AppDataPlane to AppRuntime, and the relaunch holds it, skipping
when anything launched the app since the crash (by the launch log: a data call that found it gone clears the pid file
without launching it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… again for the crash

chromium_app_test's launch-cause test and the browser computer's two chaos tests killed the browser and expected it to
stay down, to be launched from the menu or to fail every call after. It now comes back by itself, so the launch-cause
test reads boot, the kill's exit, then a launch for the crash; and the chaos tests hold that calls with the browser
killed answer at once, failing while it's gone, and work again once it's launched again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one to readiness

An exit the app's server launches it again after is logged relaunching, and apps.ended_on_its_own reads only the
latest launch's exit, so the page driver's final readiness check waits for the relaunch instead of failing at the
crash; a relaunch that fails is logged relaunch_failed and fails it at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r restarts comes back with it

A website browser's relaunches after a crash wait 1 s, doubling with each crash, instead of following at once: killing
the X server took the browser with it, and its five relaunches, each failing without X, could be spent before
supervisord had X back or not, so the computer came back or failed for good by a race. The browser computer's kill
tests now expect a killed browser and a killed X server to come back, and one killed past its relaunches to fail it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th its X server for good

Chromium exits with code 0 when its X server goes, a close, so its server never relaunched it there and the X server
kill test was never a race: the backoff fixed nothing. The kill test keeps its fix: a killed browser comes back, and
one killed past its relaunches fails the computer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rowser computer as before

The relaunch after a crash, and the readiness and tests it changed, come out: a crash is an infrastructure failure,
better failed and retried than run on with a fresh browser, and it was most of this change's complexity. The browser
computer fails for good when its browser crashes, saying why, as on main; on the desktop the browser stays gone until
its launcher opens it again. The proxy policy, network time off and the screensaver off stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(computers): Chromium on the desktop goes out through the egress proxy by policy, comes back after a crash, and X never blanks (FD-5481) feat(computers): Chromium on the desktop goes out through the egress proxy by policy, and X never blanks (FD-5481) Nov 13, 2026
…e frame, not from the first capture

The control arms its NUDGE_S wait before its first capture's task sends it, so the first capture is sent a moment
after the wait starts and the second can follow it by a hair under NUDGE_S (0.49966 s on a loaded runner). Timing the
second from before the frame call is what the control promises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit f1a1bb0 into main Nov 13, 2026
39 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-5481-hb110-chromium-and-the-desktop-on-the branch November 13, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant