Skip to content

[SDK Sentinel] Wait for visibility in list-executions interceptor test - #3131

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/java/37550303630-1-6f261ea42cab
Open

sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/java/37550303630-1-6f261ea42cab

Conversation

@sdk-sentinel-bot

Copy link
Copy Markdown
Contributor

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

Fix the cloud-only flake where the list-executions interceptor test can query before a newly started workflow reaches visibility. A [preceding cloud run](https://github.com/temporalio/sdk-java/actions/runs/37379248153) passed, while the [first captured target-branch failure](https://github.com/temporalio/sdk-java/actions/runs/37406583095/job/112085384943) observed an empty result.

Root cause

Temporal visibility is eventually consistent, but the test used a fixed two-second sleep before asserting that the query returned a workflow. Indexing occasionally takes longer.

Fix

Poll visibility through the base client with the existing bounded eventual-assertion helper. Once the workflow is visible, query once through the intercepted client so the exact interceptor-count assertion remains intact.

Validation

The focused test passed on JDK 23 against the preloaded loopback Temporal dev server. The original test also passed locally, so natural reproduction was not obtained. Formatting passed. Canonical validation was blocked by read-only submodule Git metadata after formatting checks passed. The JDK 23 cloud lane and canonical validation remain required.

Validation status: validation-incomplete

  • Flake confidence: high
  • Fix confidence: high
  • Value: medium
  • Patch scope: standard — 1 changed file; 2.6 KiB
  • Local reproduction: not-reproduced — The original fixed-delay test passed once against the local JDK 23 loopback dev server; the captured cloud job supplies the reproduction evidence.
  • Regression coverage: pass-after-only — The modified existing test passed locally, but the original also passed locally, so fail-before/pass-after was not obtained.
  • Unchanged baseline (Gradle formatting and test-source compilation) — passed
  • Independent candidate (Gradle formatting and test-source compilation) — did not pass (failure)

Investigator-run checks

  • USE_EXTERNAL_SERVICE=true TEMPORAL_SERVICE_ADDRESS=127.0.0.1:7233 ./gradlew --offline --no-daemon :temporal-sdk:test --tests "io.temporal.client.ListWorkflowExecutionsInterceptorTest" with unavailable-task exclusions — passed; 1 attempt(s). The candidate passed on JDK 23 against the preloaded loopback Temporal dev server.
  • Same focused command against the original fixed-delay test — passed; 1 attempt(s). The original test passed locally, so the cloud failure was not naturally reproduced.
  • ./gradlew --offline --no-daemon :temporal-sdk:spotlessApply — passed; 1 attempt(s). Formatting completed successfully.
  • .ci-flake-runtime/input/validate.sh — failed; 1 attempt(s). Candidate validation reached and passed formatting checks, then the submodule update task failed because .git/modules metadata is read-only in the isolated environment.
  • .ci-flake-runtime/input/validate.sh (trusted unchanged baseline) — passed; 1 attempt(s). The trusted unchanged baseline completed successfully before investigation.

Required target CI

  • Continuous Integration / Unit test with cloud on Linux and JDK 23
  • Canonical spotlessCheck and testClasses validation in an environment with writable submodule Git metadata

Residual risks

  • Temporal Cloud visibility latency could exceed the new ten-second bound.
  • The local dev server does not exactly reproduce Temporal Cloud visibility behavior.

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-10-06 03:08 UTC
  • Latest occurrence: 2026-10-06 03:08 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner October 7, 2026 00:51

This branch has not been deployed

No deployments
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.

1 participant