Skip to content

[SDK Sentinel] Stabilize sticky cache metric assertions - #3069

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/java/34660502150-1-3a3e2611effe
Open

[SDK Sentinel] Stabilize sticky cache metric assertions#3069
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/java/34660502150-1-3a3e2611effe

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 a test-only assertion after the Linux Java 23 Edge suite intermittently observed an active-thread gauge of zero. The test passed in the [last known good job](https://github.com/temporalio/sdk-java/actions/runs/34508568447/job/102976712372) and failed in the [first known bad job](https://github.com/temporalio/sdk-java/actions/runs/34634340353/job/103378476256). No public API, breaking, or server changes.

Root cause

The test slept for a fixed 600 ms before sampling asynchronously published gauges once. Runner scheduling could leave the reporter's latest value at zero when sampled.

Fix

Use the existing bounded eventual-assertion helper around both original active-state gauge expectations. This preserves the asserted values while removing dependence on one wall-clock sample.

Validation

Five patched focused stress attempts and formatting passed. Six unchanged attempts did not naturally reproduce the low-rate failure. The unchanged baseline validator passed, but candidate validation stopped at submodule setup because this investigation sandbox makes git submodule metadata read-only. The Linux Java 23 Edge job and canonical validator remain required.

Validation status: validation-incomplete

  • Flake confidence: high
  • Fix confidence: medium
  • Value: medium
  • Patch scope: standard — 1 changed file; 1.6 KiB
  • Local reproduction: not-reproduced — The unchanged focused test passed six local attempts; the captured same-dimension CI pass/failure establishes the low-rate flake.
  • Regression coverage: pass-after-only — The existing focused test is the regression coverage and passed five post-change stress attempts.
  • 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=.ci-flake-runtime/tmp/gradle-agent ./gradlew --offline --no-daemon --init-script .ci-flake-runtime/tmp/redirect-build.gradle :temporal-sdk:test --tests "io.temporal.workflow.MetricsTest.testStickyCacheSize" -x :temporal-serviceclient:initSubmodules -x :temporal-serviceclient:updateSubmodules -x :temporal-sdk:compileJava17Java -x :temporal-sdk:compileJava21Java — passed; 5 attempt(s). All five patched focused stress attempts passed; six unchanged attempts had also passed.
  • .ci-flake-runtime/input/validate.sh — failed; 1 attempt(s). Formatting checks reached the submodule tasks, then validation was blocked because the sandbox made .git/modules submodule configuration read-only. The trusted unchanged baseline had passed.
  • GRADLE_USER_HOME=.ci-flake-runtime/tmp/gradle-agent ./gradlew --offline --no-daemon --init-script .ci-flake-runtime/tmp/redirect-build.gradle spotlessApply -x :temporal-serviceclient:initSubmodules -x :temporal-serviceclient:updateSubmodules — passed; 1 attempt(s). Repository formatting completed successfully.

Required target CI

  • Continuous Integration / Unit test with in-memory test service [Edge] on Linux with Java 23
  • Canonical spotlessCheck and testClasses validation in an environment with writable git submodule metadata

Residual risks

  • The natural failure was not reproduced locally, so CI must confirm the timing fix under Edge-suite load.
  • The fixed repository validator could not complete because of the investigation sandbox's read-only submodule metadata.

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-09-11 18:46 UTC
  • Latest occurrence: 2026-09-11 18:46 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner September 12, 2026 00:43
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