[SDK Sentinel] Make Nexus metrics test shutdown-aware - #1503
Draft
sdk-sentinel-bot wants to merge 1 commit into
Draft
Conversation
|
|
1 similar comment
|
|
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
Fix an intermittent
nexus_metricspanic seen in a [failing Windows integration attempt](https://github.com/temporalio/sdk-rust/actions/runs/31741132284/job/94584505811). The [preceding successful main CI](https://github.com/temporalio/sdk-rust/actions/runs/31741023941) and [same-SHA successful rerun](https://github.com/temporalio/sdk-rust/actions/runs/31741132284) passed.Root cause
The test starts four Nexus operations but polls exactly five tasks, assuming the timeout cancellation is always delivered before worker shutdown. Once the workflow completes, shutdown can win that race; the fifth poll then returns
ShutDownand the test unwraps it.Fix
Poll until shutdown, acknowledge cancellation tasks whenever they arrive, and assert that all four required start operations were observed. Existing metric assertions remain unchanged.
Validation
The canonical formatting, lint, test-lint, and check script passed. Focused execution was attempted twice, but the isolated sandbox blocked
zstd-syscompilation with EPERM before the test ran. Windows and Ubuntu integration CI are required.Validation status:
validation-incompletehighhighmediumstandard— 1 changed file; 1.6 KiBunavailable— The focused integration binary could not be built locally because the sandbox denied an operation in zstd-sys build.rs.not-run— The existing nexus_metrics test was corrected, but focused execution was blocked before the test ran.Cargo formatting, linting, and checks) — passedCargo formatting, linting, and checks) — passedInvestigator-run checks
CARGO_BUILD_JOBS=2 timeout 180 cargo integ-test nexus_metrics— failed; 2 attempt(s). Both attempts stopped before test execution because zstd-sys build.rs received EPERM from the isolated sandbox..ci-flake-runtime/input/validate.sh— passed; 1 attempt(s). Nightly formatting, cargo lint, cargo test-lint, and cargo check passed.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-13 20:52 UTC2026-08-18 23:03 UTC