Skip to content

[SDK Sentinel] Deflake Dataflow workflow scheduler test - #854

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/dotnet/32431317264-1-564011959562
Open

[SDK Sentinel] Deflake Dataflow workflow scheduler test#854
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/dotnet/32431317264-1-564011959562

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

Deflakes the standard-library workflow test after a [Windows test failure](https://github.com/temporalio/sdk-dotnet/actions/runs/32283704948/job/96168122371). The [last known good run](https://github.com/temporalio/sdk-dotnet/actions/runs/32283537962) immediately preceded the [first known bad run](https://github.com/temporalio/sdk-dotnet/actions/runs/32283704948), and the following run passed.

Root cause

The Dataflow case sent to an empty BufferBlock before registering its receive. The send could buffer while the Default-scheduler offer was deferred, allowing the workflow deadlock detector to become the last failure before the expected scheduler violation.

Fix

Register ReceiveAsync before SendAsync. This makes the send immediately exercise the prohibited off-workflow scheduling and removes the ordering race.

Validation

The focused test passed 10/10 after the change; five pre-change Linux attempts did not reproduce. The trusted baseline passed. Candidate validation reached build but was blocked by inherited obj timestamp permissions, so clean validation and the Windows x64 CI job remain required.

Validation status: validation-incomplete

  • Flake confidence: high
  • Fix confidence: medium
  • Value: medium
  • Patch scope: standard — 1 changed file; 1002 B
  • Local reproduction: not-reproduced — Five focused pre-change Linux attempts passed; bounded Windows CI remains the natural occurrence.
  • Regression coverage: pass-after-only — The existing focused test passed 10 times after the ordering change and consistently exercised the intended Dataflow scheduler violation.
  • Unchanged baseline (dotnet format and build) — passed
  • Independent candidate (dotnet format and build) — did not pass (failure)

Investigator-run checks

  • dotnet run --project tests/Temporalio.Tests -- -verbose -method "*.ExecuteWorkflowAsync_StandardLibraryCalls_FailsTaskWhenInvalid" — passed; 5 attempt(s). Five pre-change Linux attempts passed; the natural Windows occurrence did not reproduce.
  • dotnet run --project tests/Temporalio.Tests -- -verbose -method "*.ExecuteWorkflowAsync_StandardLibraryCalls_FailsTaskWhenInvalid" — passed; 10 attempt(s). All 10 post-change Linux attempts passed and logged the expected Dataflow invalid-scheduler failure.
  • .ci-flake-runtime/input/validate.sh — failed; 1 attempt(s). Formatting completed, but build failed with MSB3374 access-denied errors while touching inherited obj/*.Up2Date files; no source or analyzer failure was reported.
  • Trusted unchanged-checkout baseline validation — passed; 1 attempt(s). The workflow-recorded baseline build passed with zero warnings and errors.

Required target CI

  • Continuous Integration / build-lint-test (windows-latest)
  • Canonical repository validation in a clean checkout

Residual risks

  • The candidate was not exercised on Windows x64.
  • The candidate repository check was blocked by inherited build-output permissions.

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

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