Repository navigation
fix(computers): the ubuntu-24.04 desktop's panel clock redraws when the universe clock is armed or jumps - #806
Open
earakely-scale wants to merge 12 commits into
Open
earakely-scale wants to merge 12 commits into
earakely-scale wants to merge 12 commits into
Conversation
…he universe clock is armed or jumps XFCE's clock plugin redraws on a minute timer of its own, on real time, so after the universe clock was armed or jumped the panel showed the old date and time for up to a minute, and its next minute late by as much again. The base's session now runs clock-panel, on real time: it reads the clock page and, when the universe moves by a second or more or its rate changes, has each panel clock redraw at once and again at the universe's next minute (every universe minute, at most once a second, while the rate isn't 1). A redraw sets the plugin's time zone to the local zone's name and resets it, which the plugin redraws on and which leaves the panel's config as it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
marked this pull request as ready for review
November 19, 2026 05:48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edraw is still redrawn A clock whose zone is unset or the local zone's name shows local time either way, so clock-panel moves it to the other and back: a redraw cut short between its two changes leaves it in one of the two, which the next redraw handles, rather than on a zone later redraws took for the user's own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and the desktop Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ipe's partition, with no base disk made A computer's disk keeps only its base disk's EFI system partition and size. With no published base disk, as on every run after the base's sources change until a release publishes them, the composer made a whole base disk first: the base's root filesystem written into a 16 GB disk and exported, then converted back to raw so the composed disk could cut out its 64 MiB partition. That took 4 to over 10 minutes on CI's runners, enough to time out the slow tier's composing fixtures. The composed disk now takes the recipe's own partition (its uki stage) at the base's size, which is what the made base disk held; the disk's key is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… does, its containers alone Each computer fixture composed every form of its base: the container and the disk of each arch, the native ones probed by gate 3, though only the launcher's tests boot a fixture's disk image. Building and booting a disk added about 2 minutes to each of the slow tier's fixtures. They now compose as `agent-env run` does for local Docker (Composing.for_run), so a test that deploys the disk form composes it first, as a run's deploy would; the launcher's tests (and the Modal disk tests) take desktop_with_disk, which composes the disk too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ach, and refresh the durations table Each slow-tier shard ran a file's tests together, so the three longest files, chromium_app_test (about 15 minutes on main), browser_multi_env_test (14) and browser_computer_test (14), each held a shard to at least that long whatever the rest weighed. The durations table can now name a file in split_in, which cuts it into that many runs of neighbouring tests, each charged the setup of the file's module fixtures that its runner does anew, and these three are cut in two. With main's latest green run's times, rewritten into the table by slow_test_durations.py from all of its JUnit reports, the slowest shard of twelve goes from 14.8 to 11.9 minutes of tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… boots it alone A computer app env that names a computer and a driver, as agentenv's chromium does, was composed alone whenever a bundle wrote it, though most runs deploy it only on a desktop, which composes it into its own image. A run's compose now leaves it to the first deploy that boots it alone (compose_unstarted), as it leaves a form no deploy boots; a register, with or without a --sandbox, still composes it, since others deploy what it writes. In CI, composing chromium alone took 2 to 10 minutes in each shard whose fixtures used it only as a desktop's app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pytest-xdist's loadfile hands a worker the next file as it frees, in collected order, so a shard whose longest file was collected last ran it last: shard 10 of a run held 20 minutes of tests, about 10 for each of its two workers, and took 13.4, its 7-minute run_bundle_claude_code_test starting late. The shard hook now orders a shard's files by the seconds the durations table gives them, heaviest first, each file's tests together in their collected order, which packs the two workers as evenly as the files allow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uns of the new fixtures The durations table was main's, whose fixtures composed disks and every app alone, and where a file that reused a computer another file on its shard had composed looked short: browser_clock_test weighed 2 minutes and took 8 on a shard where it composed chromium alone first. The table is now each unit's longer time over two runs of these changes (#812's 44504100677 and 44506657938), each written by slow_test_durations.py from all of a run's JUnit reports, so a file is weighed as it costs where it composes its own computers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A computer app that names a computer and a driver, as agentenv's chromium does, was composed alone by every fixture whose bundle put it on a desktop, though those fixtures deploy it only on the desktop, which composes it into its own image: 2 to 10 minutes of each such shard. While a fixture writes its bundle, composer.compose now composes no computer app alone but the fixture's own (env_id, as the browser computer fixture's is chromium), or every one with disks; a test that deploys another alone has its deploy compose it first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@greptileai review |
This branch has not been deployed
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.
Why
The ubuntu-24.04 desktop's panel clock showed the real date for up to a minute after the universe clock was armed. An agent's first screenshots could show Nov 2026 next to sites dated Feb 2027 (FD-6318, found in an audit of a PSI computer task's run).
XFCE's clock plugin redraws on a minute timer of its own. That timer runs on real time (GLib's timeouts are monotonic, which agent-env's libfaketime keeps real), so:
Measured on the base: after a jump to 23:59:35, the panel kept the old date for 35 s past the universe's midnight.
What
The base's session runs a new program,
clock-panel, on real time (the clock's real-time marker). It reads the clock page the follower writes. When the universe moves by a second or more, or its rate changes (arming,set_time,advance,set_rate,clear), it has each clock on the panel redraw:The follower re-anchoring on a new offset (sub-second) redraws nothing.
A redraw sets the clock plugin's
timezoneto the local zone's name, then resets it. The plugin redraws on each change, in any clock mode, and the panel's config ends as it was. A clock given a zone of its own is left alone.Why a session program rather than the follower: the follower runs as
agentenv-clockand can't reach the session's D-Bus (where xfconf lives), by design. The other hooks the plugin has were worse:PrepareForSleep: no system bus here, and a stand-in logind would answer for every app;How it was tested
Unit (
tst/unit/env/envs/test_computer_clock_panel.py): the program run as it runs on a computer, against a page written as the follower writes it and a recordingxfconf-query. It checks:Integration (
clock_desktop_test.py, new test): the clock desktop bundle gets a test app with AT-SPI's Python bindings. The test reads the panel's clock as an assistive technology does (its button is named by its date). After jumps a year on, years back and a week on, it must show the universe's date within 3 s, and it must turn at a universe midnight within 3 s. Without the program it's up to a minute.By hand on the published base, on an admin VM, with the program under the session's supervisord: each jump showed on the panel in 0.15–0.44 s, and each universe midnight after a jump in 0.08–0.31 s. A 2 ms re-anchor redrew nothing, rate 60 redrew once a second, and frozen stopped.
The integration test on an admin VM (16-core Linux, local Docker, the branch's sources): the clock desktop composed with
clock-panelin it, and both selected tests passed (-k "composed or panel", 9 minutes). The probe still passes at full, and the panel showed each jump's date and turned at the universe's midnight within the 3 s bound.Chaos, about 30 minutes, on that composed image:
clock-panelstopped, 3 s after a jump the panel still showed the old date. Started again, it caught up in 0.1 s.clock-panelkilled just before a jump: supervisord restarted it and the date showed in 1.33 s.xfce4-panel --restart) with a jump during the restart: 0.48 s, and 0.45 s for the next jump.xfconfdkilled, then a jump:xfconf-querystarted it again over D-Bus, 0.45 s.Asia/Tokyo) is left alone and lags, as before. Once its zone was reset, a jump showed in 0.45 s.Europe/Paristurned at Paris's midnight in 0.36 s.A clock given a zone of its own still lags as before. Redrawing it would need a value equivalent to its zone, which xfconf doesn't offer, and nothing in agent-env sets one.
Also: a composed disk no longer waits on a base disk
Changing the base means no published base or base disk matches its sources until a release publishes them, on this PR and on
mainafter it. For each disk a slow-tier shard composed, the composer first made a whole disk of the base:That partition and the disk's size are all a composed disk takes from its base disk. The partition is the boot recipe's own
ukistage, which doesn't depend on the base. On CI's runners the base-disk step took 4 to over 10 minutes and pushed the website-browser fixture past the 20-minute limit.The composer now builds the composed disk with the recipe's partition at the base's size (
SIZE_GB, noESP) and makes no base disk. The disk's key is unchanged (container key, base identity, recipe), and a base with a disk image or a published one still gives its partition as before.test_computer_disk.pynow checks that no base disk is built and that each disk getsSIZE_GBand noESP. 43 passed.disk_test.pyanddisk_boot_test.py, 4 passed.disk_boot_testcomposed the shipped desktop's disk this way (no base disk made), booted it under KVM, passed the probe at full, reset it and passed again.main's slow shards timed out at the same time.Also: a shorter slow tier
On
main's last green run the slow tier's shards took 7–17 minutes, and the longest set the run's time. Five changes, all in tests or CI but the disk one above:agent-env rundoes for local Docker (Composing.for_run). Every computer fixture used to compose every form of its base: the container and the disk, the native ones probed by gate 3. That's about 2 more minutes per fixture to build a disk and boot it under KVM, though only the launcher's tests boot a fixture's disk image. Now:chromium_app_test's[disk]case);desktop_with_disk, which composes the disk too.composer.composenow skips any computer app but the fixture's target. The browser computer fixture's target is chromium alone, so it still composes it.agent-env runitself. Greptile showed that loses a run's--no-emulateand its retry of a failed app build, so it's reverted and lives in the fixtures only. Nothing insrc/changes what a run or a register composes.split_insplits a long file across shards. A shard runs a file's tests together, andchromium_app_test(15 minutes onmain),browser_multi_env_test(14) andbrowser_computer_test(14) are each longer than the rest of a shard's load. The durations table can now name a file insplit_in, which cuts it into that many runs of neighbouring tests. Each run after the first is charged the setup of the file's module fixtures, which its runner does again. These three are cut in two.loadfilehands a worker the next file in collected order, so a long file collected last started last. One shard held 20 minutes of tests and took 13.4.browser_clock_testweighed 2 minutes onmainand took 8 where it composed chromium alone first.Measured on #812, a draft of
mainplus these changes alone, with no change to the base. Every run below was green; times are the Local backends run's wall time and its slow shards.main's last green, before thesemainagent-env run(since reverted)Shard times vary by a few minutes run to run with the network: a compose resolves packages from Ubuntu's archive, PyPI and Chrome for Testing's downloads. The same compose took 1m47 in one run and 8m03 in another. On 11-19 Ubuntu's archive was degraded for hours, which slowed
mainand these runs alike.This PR's own CI is slower than that until a release publishes the changed base. Every shard here builds the ubuntu-24.04 base cold, and every disk compose builds its boot partition from Ubuntu's archive, with no published base disk to take it from. Its runs took 16–27 minutes.
Linear: FD-6318 (under FD-6206).
🤖 Generated with Claude Code


Confidence Score: 5/5
The changes reviewed appear safe to merge.Summary
The PR makes the desktop panel clock follow universe-time changes promptly and reduces unnecessary disk builds and CI fixture work.
No new actionable issues found in the changes since the previous review.
Reviews (11) · Last reviewed commit: "test(computers): a fixture composes no c..." · Reviewed by Greptile