Repository navigation
[SDK Sentinel] Synchronize alternate ordering test with history - #1981
Open
sdk-sentinel-bot wants to merge 1 commit into
Conversation
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.
Caution
This PR contains untrusted AI-generated code. Do not approve or run CI until a maintainer has reviewed the diff. SDK Sentinel verified that GitHub Actions remained approval-gated with zero executable jobs when this PR was opened.
Summary
Prevent the alternate async-loop ordering test from intermittently ending with an activity ScheduleToStart timeout. The failure occurred in the [first failing main Windows job](https://github.com/temporalio/sdk-python/actions/runs/38939898149/job/117104613026) and was corroborated by Linux and Windows PR jobs. The [preceding same-matrix normal suite](https://github.com/temporalio/sdk-python/actions/runs/38772365734/job/116551198300) passed.
Root cause
The test used fixed sleeps as proof that its workflow task and separate-queue activity had progressed. Worker startup and polling are asynchronous, so loaded runners could advance the test before those milestones.
Fix
Wait for activity-scheduled history before stopping the first workflow worker, then wait for activity-completed history before sending signals and restarting workflow processing. This preserves the intended history ordering without elapsed-time assumptions.
Validation
The unchanged test passed 20/20 locally, so the flake did not naturally reproduce. The candidate passed 20/20, passed once with time-skipping V2, and passed the repository validator. Windows Python 3.14 CI remains required because that environment produced the primary failure.
Validation status:
ci-validation-requiredhighhighhighstandard— 1 changed file; 1.4 KiBnot-reproduced— The unchanged focused test passed 20/20 on Linux Python 3.14.pass-after-only— The existing test now uses deterministic history milestones and passed 20 stress iterations plus time-skipping V2.Poe lint, bridge lint, and editable build) — passedPoe lint, bridge lint, and editable build) — passedInvestigator-run checks
poe test -s -k test_alternate_async_loop_ordering --flake-finder --flake-runs=20— passed; 1 attempt(s). Unchanged checkout passed 20/20; natural reproduction did not occur.poe test -s -k test_alternate_async_loop_ordering --flake-finder --flake-runs=20— passed; 1 attempt(s). Candidate passed 20/20.poe test -s --workflow-environment time-skipping-v2 -k test_alternate_async_loop_ordering— passed; 1 attempt(s). Candidate passed in time-skipping V2 mode..ci-flake-runtime/input/validate.sh— passed; 1 attempt(s). Trusted unchanged baseline validation passed..ci-flake-runtime/input/validate.sh— passed; 1 attempt(s). Candidate lint, bridge lint, and editable bridge build passed.Required target CI
Residual risks
Automation provenance
da794611dbfc746ca27c65385d00d9089de5c57bIf this finding should not be fixed, apply the
sdk-sentinel:false-positivelabel and close the PR. Sentinel will suppress the finding until its affected source changes.SDK Sentinel recurrence history
2026-10-16 17:44 UTC2026-10-16 17:44 UTC