[SDK Sentinel] Stabilize unfinished-handler tests during runner stalls - #1886
Open
sdk-sentinel-bot wants to merge 1 commit into
Conversation
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
A [macOS Python 3.14 failure](https://github.com/temporalio/sdk-python/actions/runs/35401778660/job/105783048683) intermittently rejected unfinished-handler updates after workflow-task failures; the same SHA passed on rerun. The [last captured equivalent success](https://github.com/temporalio/sdk-python/actions/runs/35245285630) preceded the [first captured failure](https://github.com/temporalio/sdk-python/actions/runs/35248260973/job/105293870514).
Root cause
Runner stalls can exceed consecutive default 10-second workflow-task attempts, putting the update into a failed state. The exception-path helper also left its background result task unobserved, so its later RPC error could fail another test.
Fix
Use a test-scoped 60-second workflow-task timeout and always cancel and gather the background result task. This preserves the warning assertions while removing dependence on short scheduling gaps.
Validation
poe test -s -k unfinished_handlerpassed 48 cases; a three-run flake-finder check passed six cases; the fixed repository validator passed. The natural failure did not reproduce on Linux, so the Python 3.14 macOS ARM CI job remains required.Validation status:
ci-validation-requiredhighhighhighstandard— 1 changed file; 2.5 KiBnot-reproduced— One pre-edit Linux focused run passed; the macOS runner-stall trigger was unavailable locally.not-added— No new test was added; the existing 48-case focused suite and six repeated focused cases passed after the change.Poe lint, bridge lint, and editable build) — passedPoe lint, bridge lint, and editable build) — passedInvestigator-run checks
poe test -s -k 'test_unfinished_update_handler or test_unfinished_signal_handler'— passed; 1 attempt(s). Both tests passed before the edit; natural Linux reproduction did not occur.poe test -s -k unfinished_handler— passed; 1 attempt(s). All 48 selected unfinished-handler cases passed after the edit.poe test -s -k 'test_unfinished_update_handler or test_unfinished_signal_handler' --flake-finder --flake-runs=3— passed; 1 attempt(s). Six repeated focused cases passed after the edit..ci-flake-runtime/input/validate.sh— passed; 1 attempt(s). Ruff, pyright, mypy, basedpyright, pydocstyle, bridge clippy, and editable bridge build passed.Required target CI
Residual risks
Automation provenance
1d1ad747dfd95d18626930202ab5869d79b6066bIf 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-09-17 18:12 UTC2026-09-18 22:48 UTC