[SDK Sentinel] Fix replay failure result race - #1502
Closed
sdk-sentinel-bot wants to merge 1 commit into
Closed
Conversation
|
|
1 similar comment
|
|
Member
|
This one causes existing tests to hang |
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 draft 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 multi-history
WorkflowReplayercalls from occasionally omitting a nondeterminism result. A [successful equivalent run](https://github.com/temporalio/sdk-rust/actions/runs/31765593305) preceded the [captured assertion failure](https://github.com/temporalio/sdk-rust/actions/runs/31803647780/job/94777252814).Root cause
Workflow-task failure handling released the next replay history immediately. That could exhaust the input stream and shut down the worker before the failed history's eviction activation reached the result observer.
Fix
Advance through the existing post-activation hook only after the eviction completes. This preserves the eviction reason before another history is dispatched or shutdown begins.
Validation
The unchanged baseline passed, and the trusted formatting, lint, test-lint, and check command passed twice on the candidate. The focused integration command was attempted but zstd-sys hit a sandbox
PermissionDeniedbefore the test ran. The Per merge CI integration matrix is required. Remaining risk is a failure path that does not emit an eviction activation, which could stall rather than advance.Validation status:
validation-incompletehighmediummediumstandard— 3 changed files; 3.4 KiBunavailable— The focused integration command was attempted once but could not build because zstd-sys encountered a sandbox PermissionDenied.not-added— The existing workflow_replayer_returns_ordered_results_for_multiple_histories integration test directly covers the regression; it failed in captured CI but could not be executed locally.Cargo formatting, linting, and checks) — passedCargo formatting, linting, and checks) — passedInvestigator-run checks
trusted unchanged-checkout baseline validation— passed; 1 attempt(s). The supplied baseline conclusion was success.CARGO_BUILD_JOBS=2 timeout 180 cargo integ-test workflow_replayer_returns_ordered_results_for_multiple_histories— not run; 1 attempt(s). The test did not run: zstd-sys failed during compilation with sandbox PermissionDenied..ci-flake-runtime/input/validate.sh— passed; 2 attempt(s). Both final validation runs passed nightly formatting, cargo lint, cargo test-lint, and cargo check.Required target CI
Residual risks
Automation provenance
4a97144030ca447ae1e1ebf70a2ccaa9887ab30eIf 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-08-14 13:22 UTC2026-08-14 13:22 UTC