You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: Make the mocked run status sequence independent of poll timing - #1028
test_actor_call_redirect_logs_to_default_logger_sync and its three siblings flake in CI, dropping ('Status: RUNNING, Message: Initial message', 20) (example).
StatusResponseGenerator advanced the status every 5 requests, counted across every caller of the run endpoint — the two setup GETs, the watcher's 1-per-second polls, and wait_for_finish's 4-per-second polling loop. wait_for_finish burned the "Initial message" window in roughly half a second, so the watcher's first poll had a ~0.5s margin to land inside it.
Plain requests and waitForFinish requests are now answered separately: plain requests walk the status sequence, and waitForFinish reports the run finished only once they have walked all of it. The first status covers three plain requests, which is call's two setup GETs plus the watcher's own first poll in any order. With nothing watching there are no plain requests and the run reads as finished immediately, so call(logger=None) still returns at once.
Verified by injecting a delay before the watcher's first poll: on master the tests fail from 0.6s upward; with this change the two call()-based tests pass at 0.6s, 2s, 5s and 10s. (test_redirect_status_message_sync still fails past ~5s, but that is bounded by its own 1s sleep, not by the mock.)
vdusek
added
adhoc
Ad-hoc unplanned task added during the sprint.
t-tooling
Issues with this label are in the ownership of the tooling team.
labels
Aug 21, 2026
Closing - the flake this targeted was in the client, not the mock. In the CI run cited above, Status: RUNNING, Message: Initial message appears in captured stderr but not in caplog, so the watcher's poll did land inside the first-status window; the record was dropped by the logger rebuild that #1036 fixed.
The mock's timing coupling is real but latent, and the trade here isn't worth it: holding the run open until the plain sequence is walked means a stalled watcher hangs wait_for_finish indefinitely instead of failing fast, and _requests_for_first_status = 3 hardcodes how many setup GETs call() happens to make.
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
adhocAd-hoc unplanned task added during the sprint.t-toolingIssues with this label are in the ownership of the tooling team.testedTemporary label used only programatically for some analytics.
1 participant
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.
test_actor_call_redirect_logs_to_default_logger_syncand its three siblings flake in CI, dropping('Status: RUNNING, Message: Initial message', 20)(example).StatusResponseGeneratoradvanced the status every 5 requests, counted across every caller of the run endpoint — the two setup GETs, the watcher's 1-per-second polls, andwait_for_finish's 4-per-second polling loop.wait_for_finishburned the "Initial message" window in roughly half a second, so the watcher's first poll had a ~0.5s margin to land inside it.Plain requests and
waitForFinishrequests are now answered separately: plain requests walk the status sequence, andwaitForFinishreports the run finished only once they have walked all of it. The first status covers three plain requests, which iscall's two setup GETs plus the watcher's own first poll in any order. With nothing watching there are no plain requests and the run reads as finished immediately, socall(logger=None)still returns at once.Verified by injecting a delay before the watcher's first poll: on master the tests fail from 0.6s upward; with this change the two
call()-based tests pass at 0.6s, 2s, 5s and 10s. (test_redirect_status_message_syncstill fails past ~5s, but that is bounded by its own 1ssleep, not by the mock.)✍️ Drafted by Claude Code