Repository navigation
test(computers): the session clock test compares each read with the universe's fixed offset, not the time after the last read - #704
Merged
earakely-scale merged 1 commit intoNov 16, 2026
Conversation
…niverse's fixed offset, not the time after the last read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/session-clock-test-waits-for-the-follower
branch
November 16, 2026 03:59
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 changes
base_computer_test::test_only_the_sessions_programs_read_universe_time_and_a_marked_one_real_time_but_not_what_it_startsarms the clock page from a known real instant, so the universe is exactly 182 days behind real time. It then compares each read's offset from real time, taken as that read returns, with those 182 days.Why
The test flaked on
main's slow tier (shard 10/12 on 11-14 twice and 11-15) and failed the CI that v0.9.1537's publish waits on, so that release never reached PyPI. Each time, the two universe reads (session,started by a marked one) read as real time while the three real-time reads passed.The clock was fine; the test's arithmetic was off. It took
back = universe - time.time()once, after all fivedocker execreads, so a universe read was off by the time from the page's write to the end of the last read: sixdocker execs in all. On a busy runner (the slow tier runs under xdist) that passes the test's 5 s tolerance. Now a read is off only by the time its owndocker exectook to return afterdateran.Testing
On an x86 host with local Docker, with a
dockeronPATHthat sleeps 1 s before and after eachdocker exec, as a busy runner's are slow:mainfails as CI did:{'session': False} != {'session': True}and{'started by a marked one': False} != {'started by a marked one': True}.ruff checkis clean.🤖 Generated with Claude Code


Confidence Score: 5/5
This test-only change appears safe to merge.Summary
The test now sets the universe clock from an explicit real-time anchor and compares each read against the fixed 182-day offset.
Reviews (1) · Last reviewed commit: "test(computers): the session clock test ..." · Reviewed by Greptile