Repository navigation
[SDK Sentinel] Wait for workflow stream handlers before testing - #3129
Open
sdk-sentinel-bot wants to merge 1 commit into
Conversation
This branch has not been deployed
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 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
SDKTestWorkflowRulebefore 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 --checkpassed. 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-incompletehighhighmediumstandard— 1 changed file; 934 Bnot-reproduced— The unchanged focused class passed once locally; CI evidence and source ordering directly expose the race.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.Gradle formatting and test-source compilation) — passedGradle 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
Residual risks
Automation provenance
8fa83a1b8600bfb1e4f5a6c2c1cdac6a6aeda5dfIf 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-10-05 21:00 UTC2026-10-05 21:00 UTC