Skip to content

[SDK Sentinel] Isolate unfinished-handler test task queues - #1969

Merged
tconley1428 merged 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/python/38658107674-1-01583429180c
Oct 15, 2026
Merged

tconley1428 merged 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/python/38658107674-1-01583429180c

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

Isolate each unfinished-handler termination case after a target-branch Windows Python 3.10 time-skipping job intermittently returned update-not-found. The [last known good run](https://github.com/temporalio/sdk-python/actions/runs/38435933764) preceded the [first captured bad run](https://github.com/temporalio/sdk-python/actions/runs/38600397692).

Root cause

All parameter cases reused task queue tq. A server-side poll from a prior worker could outlive teardown and receive a later case's first workflow task, preventing the intended worker from handling its admitted update.

Fix

Generate a UUID task queue per parameter case, eliminating cross-case task delivery without retries or weaker assertions.

Validation

The 48-case focused matrix passed before and after the change; natural reproduction did not occur. The patched matrix also passed with the time-skipping environment. The fixed repository validator passed lint, type checks, bridge lint, and bridge build. Windows Python 3.10 time-skipping CI remains required.

Validation status: ci-validation-required

  • Flake confidence: high
  • Fix confidence: high
  • Value: medium
  • Patch scope: standard — 1 changed file; 721 B
  • Local reproduction: not-reproduced — The unchanged 48-case focused matrix passed once on Linux; the intermittent stale-poll race did not occur naturally.
  • Regression coverage: not-added — No new test was added because the existing parameter matrix exercises the behavior; it passed in normal and time-skipping modes after isolation.
  • 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_unfinished_handler_on_workflow_termination — passed; 2 attempt(s). All 48 cases passed before and after the change; natural reproduction did not occur.
  • poe test -s --workflow-environment time-skipping -k test_unfinished_handler_on_workflow_termination — passed; 1 attempt(s). All 48 time-skipping cases passed after the change.
  • .ci-flake-runtime/input/validate.sh — passed; 1 attempt(s). Candidate passed lint, type checks, docstyle, bridge clippy, and editable bridge build; the trusted unchanged baseline also passed.
  • git diff --check — passed; 1 attempt(s). The one-line patch has no whitespace errors.

Required target CI

  • Continuous Integration / build-lint-test (3.10, windows-latest), time-skipping phase

Residual risks

  • The exact Windows failure environment was not exercised locally.
  • There is no same-SHA fail-then-pass rerun for the source failure.
  • The captured fix branch contains the same isolation change alongside broader changes, so its success is corroborating rather than an isolated A/B result.

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-14 17:01 UTC
  • Latest occurrence: 2026-10-14 17:01 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner October 15, 2026 00:43
@tconley1428 tconley1428 added the skip-changelog PR changes do not require changelog updates label Oct 15, 2026
@tconley1428
tconley1428 merged commit 4364fd3 into temporalio:main Oct 15, 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