Skip to content

[SDK Sentinel] Stabilize legacy query integration test ordering - #1511

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/rust/32315888053-1-59265753f90a
Open

[SDK Sentinel] Stabilize legacy query integration test ordering#1511
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/rust/32315888053-1-59265753f90a

Conversation

@sdk-sentinel-bot

Copy link
Copy Markdown

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

Stabilize simple_query_legacy after Windows CI observed a query activation before the timer activation the test expected. The [preceding main run](https://github.com/temporalio/sdk-rust/actions/runs/32294857783) passed; the [next main run](https://github.com/temporalio/sdk-rust/actions/runs/32311849105) exposed the latent race.

Root cause

The test started its query before polling the outstanding timer workflow task. Depending on scheduling, the server could deliver the query activation first, contradicting the test's assumed order.

Fix

Poll and verify the timer activation before the query exists, retain it, and complete it after the query begins. This establishes the required order without retries, weaker assertions, or additional sleeps.

Validation

The canonical formatting, lint, test-lint, and check script passes. The focused integration test could not compile locally because the sandbox denied the native zstd build, so the Windows integration job remains required.

Validation status: validation-incomplete

  • Flake confidence: high
  • Fix confidence: medium
  • Value: medium
  • Patch scope: standard — 1 changed file; 1.9 KiB
  • Local reproduction: unavailable — The Linux integration harness could not compile zstd-sys under the investigation sandbox, so natural reproduction was unavailable.
  • Regression coverage: not-run — The existing failing integration test was made deterministic but could not be executed locally; repository compilation and lint checks passed.
  • Unchanged baseline (Cargo formatting, linting, and checks) — passed
  • Independent candidate (Cargo formatting, linting, and checks) — passed

Investigator-run checks

  • CARGO_BUILD_JOBS=2 timeout 180 cargo integ-test simple_query_legacy — failed; 2 attempt(s). Neither attempt reached the test: one was stopped when rustup attempted external synchronization, and the offline installed-toolchain attempt failed compiling zstd-sys with Operation not permitted.
  • .ci-flake-runtime/input/validate.sh — passed; 3 attempt(s). The first launch was stopped before checks when rustup attempted synchronization; two executions using installed toolchains passed, including the final patch.

Required target CI

  • Per merge CI / Integ tests (windows-latest), including simple_query_legacy

Residual risks

  • The changed integration-test flow was not executed locally.
  • The test retains its existing 400 ms delay for query attachment; the patch addresses only the observed query-versus-timer ordering race.

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-08-19 23:26 UTC
  • Latest occurrence: 2026-08-19 23:26 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner August 20, 2026 01:03
@Sushisource

Copy link
Copy Markdown
Member

@sdk-sentinel-bot The comment that mentions the activation doesn't have a query is very confusing now, because it obviously won't have the query now that it was completed before the query was issued. We need to fix / move the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants