Skip to content

[SDK Sentinel] Stabilize Nexus abandon cancellation test - #3043

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/java/33136278189-1-811bae0416b0
Open

[SDK Sentinel] Stabilize Nexus abandon cancellation test#3043
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/java/33136278189-1-811bae0416b0

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

Stabilize the Nexus ABANDON cancellation test after a [captured Java 23 in-memory failure](https://github.com/temporalio/sdk-java/actions/runs/33014790590). The bounded window contains no preceding equivalent target-branch success.

Root cause

The test runs immediate-cancel and after-start scenarios sequentially using shared static signals. Clearing those signals between phases is racy because the first handler can publish after the clear, making the second phase appear complete.

Fix

Give the immediate-cancel path a zero-delay handler that cannot publish the completion signal, and publish the operation-started signal only from the after-start path. This removes cross-phase writers without sleeps, retries, or weakened assertions.

Validation

The pre-change test did not fail in one local execution. After the change, the focused method passed five times and the full cancellation class passed. The fixed repository validator passed in a writable mirror; its target-checkout attempt was blocked by read-only Git submodule metadata. Java 23 in-memory and Java 11 CLI CI remain required.

Validation status: validation-incomplete

  • Flake confidence: high
  • Fix confidence: medium
  • Value: medium
  • Patch scope: standard — 1 changed file; 1.9 KiB
  • Local reproduction: not-reproduced — One pre-change focused execution passed; earlier setup attempts were blocked before test execution by preloaded-output permissions and an unavailable optional offline dependency.
  • Regression coverage: pass-after-only — The existing ABANDON regression test was made deterministic and passed five focused repetitions; the full cancellation class also passed.
  • Unchanged baseline (Gradle formatting and test-source compilation) — passed
  • Independent candidate (Gradle formatting and test-source compilation) — did not pass (failure)

Investigator-run checks

  • ./gradlew --offline --no-daemon :temporal-sdk:cleanTest :temporal-sdk:test --tests 'io.temporal.workflow.nexus.CancelWorkflowAsyncOperationTest.cancelAsyncOperationAbandon' -x :temporal-sdk:compileJava17Java — passed; 5 attempt(s). All five post-change repetitions passed in the writable /tmp mirror.
  • ./gradlew --offline --no-daemon :temporal-sdk:cleanTest :temporal-sdk:test --tests 'io.temporal.workflow.nexus.CancelWorkflowAsyncOperationTest' -x :temporal-sdk:compileJava17Java — passed; 1 attempt(s). The complete cancellation test class passed.
  • .ci-flake-runtime/input/validate.sh — failed; 1 attempt(s). The target-checkout attempt passed formatting through temporal-sdk, then the submodule update task could not write read-only .git metadata.
  • GRADLE_USER_HOME=/tmp/sdk-sentinel-gradle-home /home/runner/work/sdk-sentinel/sdk-sentinel/target/.ci-flake-runtime/input/validate.sh — passed; 1 attempt(s). The fixed validator passed in 1m24s against the candidate's writable /tmp mirror.

Required target CI

  • Continuous Integration / Unit test with in-memory test service [Edge] (Java 23, Linux)
  • Continuous Integration / Unit test with CLI (Java 11, Linux)

Residual risks

  • The rare pre-change interleaving was not reproduced locally.
  • The target checkout's canonical candidate validation could not complete under the read-only Git metadata mount, although the same validator passed in a writable mirror.
  • Server scheduling differences between in-memory and CLI modes still require CI confirmation.

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

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner August 28, 2026 03:09
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