Skip to content

[SDK Sentinel] Wait for workflow stream handlers before testing - #3129

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

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

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

A [main-branch Java 11 CLI failure](https://github.com/temporalio/sdk-java/actions/runs/37372105441/job/111971552149) rejected the workflow-stream update because no update handlers were registered. No preceding same-SHA successful run was captured.

Root cause

The test started the workflow and immediately invoked its dynamically registered handlers. Update validation could run before the initial workflow task executed Workflow.registerListener, leaving the handler registry empty.

Fix

Wait for the initial workflow task through SDKTestWorkflowRule before sending signals, updates, or queries. This removes the scheduling-dependent window without sleeps or retries. There are no breaking changes and no server PR is required.

Validation

The focused class passed before and after the change, although the failure did not reproduce locally. Formatting and git diff --check passed. The unchanged baseline validator passed; candidate validation could not start because Gradle lacked permission to chmod its shared daemon registry. The Java 11 CLI job and trusted canonical validator remain required.

Validation status: validation-incomplete

  • Flake confidence: high
  • Fix confidence: high
  • Value: medium
  • Patch scope: standard — 1 changed file; 934 B
  • Local reproduction: not-reproduced — The unchanged focused class passed once locally; CI evidence and source ordering directly expose the race.
  • Regression coverage: pass-after-only — The existing focused test now uses the SDK test-rule workflow-task barrier and passes after the change; no separate test was added.
  • Unchanged baseline (Gradle formatting and test-source compilation) — passed
  • Independent candidate (Gradle formatting and test-source compilation) — did not pass (failure)

Investigator-run checks

  • GRADLE_USER_HOME="$PWD/.ci-flake-runtime/tmp/gradle-home" ./gradlew --offline :temporal-sdk:test --tests "io.temporal.workflow.WorkflowStreamReservedNameTest" -x :temporal-serviceclient:updateSubmodules -x :temporal-sdk:compileJava17Java — passed; 2 attempt(s). The focused class passed once before and once after the change; natural reproduction did not occur.
  • ./gradlew --offline :temporal-sdk:test --tests "io.temporal.workflow.WorkflowStreamReservedNameTest" — failed; 1 attempt(s). The prescribed command could not start because Gradle could not write its shared daemon registry.
  • Focused-test harness setup probes using the writable temporary Gradle home — failed; 3 attempt(s). Initial probes were blocked respectively by read-only submodule metadata, an uncached optional Java 17 dependency, and one invalid excluded-task name; the final scoped command avoided those unrelated paths.
  • GRADLE_USER_HOME="$PWD/.ci-flake-runtime/tmp/gradle-home" ./gradlew --offline spotlessApply -x :temporal-serviceclient:updateSubmodules -x :temporal-sdk:compileJava17Java — passed; 1 attempt(s). Formatting completed successfully.
  • git diff --check — passed; 1 attempt(s). The candidate has no whitespace errors.
  • .ci-flake-runtime/input/validate.sh (trusted unchanged baseline) — passed; 1 attempt(s). The unchanged baseline completed successfully in 28 seconds.
  • .ci-flake-runtime/input/validate.sh — failed; 1 attempt(s). Candidate validation could not start Gradle because chmod on the shared daemon registry directory was not permitted; no repository task executed.

Required target CI

  • Continuous Integration / Unit test with CLI (Linux, JDK 11)
  • Canonical repository validation in the trusted packaging environment

Residual risks

  • The target Java 11 CLI mode was not exercised locally.
  • Post-change canonical validation was blocked by Gradle cache directory permissions.
  • The distinct sticky-worker shutdown flake remains unresolved by this candidate.

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-05 21:00 UTC
  • Latest occurrence: 2026-10-05 21:00 UTC
  • Recent occurrences:

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

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