Skip to content

[SDK Sentinel] Synchronize alternate ordering test with history - #1981

Merged
tconley1428 merged 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/python/38984834090-1-31953503a0ac
Oct 19, 2026
Merged

tconley1428 merged 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/python/38984834090-1-31953503a0ac

Conversation

@sdk-sentinel-bot

@sdk-sentinel-bot sdk-sentinel-bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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-required

  • Flake confidence: high
  • Fix confidence: high
  • Value: high
  • Patch scope: standard — 1 changed file; 1.4 KiB
  • Local reproduction: not-reproduced — The unchanged focused test passed 20/20 on Linux Python 3.14.
  • Regression coverage: pass-after-only — The existing test now uses deterministic history milestones and passed 20 stress iterations plus time-skipping V2.
  • Unchanged baseline (Poe lint, bridge lint, and editable build) — passed
  • Independent candidate (Poe lint, bridge lint, and editable build) — passed

Investigator-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

  • build-lint-test (3.14, windows-latest), normal workflow environment

Residual risks

  • The exact Windows runner failure was not reproduced locally.
  • The candidate has not yet been exercised under Windows CI load.

Automation provenance

If this finding should not be fixed, apply the sdk-sentinel:false-positive label and close the PR. Sentinel will suppress the finding until its affected source changes.

SDK Sentinel recurrence history

  • Unique failed CI run attempts: 3
  • First occurrence: 2026-10-16 17:44 UTC
  • Latest occurrence: 2026-10-16 23:19 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner October 17, 2026 01:03
@tconley1428 tconley1428 added the skip-changelog PR changes do not require changelog updates label Oct 19, 2026
@tconley1428
tconley1428 merged commit 524de9b into temporalio:main Oct 19, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog PR changes do not require changelog updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants