Repository navigation
[SDK Sentinel] Isolate unfinished-handler test task queues - #1969
Merged
Conversation
tconley1428
approved these changes
Oct 15, 2026
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
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-requiredhighhighmediumstandard— 1 changed file; 721 Bnot-reproduced— The unchanged 48-case focused matrix passed once on Linux; the intermittent stale-poll race did not occur naturally.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.Poe lint, bridge lint, and editable build) — passedPoe lint, bridge lint, and editable build) — passedInvestigator-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
Residual risks
Automation provenance
482e933f29fe670eec99e2a3b53418f68566c562If 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-14 17:01 UTC2026-10-14 17:01 UTC