Skip to content

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

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/python/38984834090-1-31953503a0ac
Open

sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/python/38984834090-1-31953503a0ac

Conversation

@sdk-sentinel-bot

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: 1
  • First occurrence: 2026-10-16 17:44 UTC
  • Latest occurrence: 2026-10-16 17:44 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner October 17, 2026 01:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant