Skip to content

💥 Use context-sensitive randomness for workflow views - #1558

Merged
eamsden merged 3 commits into
mainfrom
eamsden/workflow-read-only-context
Sep 2, 2026
Merged

💥 Use context-sensitive randomness for workflow views#1558
eamsden merged 3 commits into
mainfrom
eamsden/workflow-read-only-context

Conversation

@eamsden

@eamsden eamsden commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What was changed

Track privately whether a workflow context view requires replay-safe randomness. All replayable execution uses workflow randomness. Queries, update validators, and patch activation callbacks use system randomness.

Breaking change

WorkflowContextView and the containing PatchActivationInput are no longer Send or Sync.

Why?

Allow telemetry and tracing to safely generate identifiers with replayable randomness where appropriate, while using system randomness when history cannot be recorded and thus advancing workflow random streams would likely cause non-deterministic execution.

Checklist

  1. Closes N/A — no linked issue.

  2. How was this tested:

    • cargo +nightly fmt
    • cargo test -p temporalio-workflow --lib
    • cargo check -p temporalio-workflow --target wasm32-unknown-unknown
    • cargo integ-test -t wasm_workflow_tests -- --test-threads 1
    • cargo lint
    • cargo test-lint
    • git diff --check
  3. Any docs updates needed?

    • The root CHANGELOG.md documents the breaking auto-trait change.
    • No docs.temporal.io update is needed.

@eamsden
eamsden force-pushed the eamsden/workflow-read-only-context branch from 341f8c9 to 5342554 Compare September 1, 2026 21:38
@eamsden
eamsden force-pushed the eamsden/workflow-read-only-context branch from 5342554 to 992e0cf Compare September 1, 2026 21:43
@eamsden
eamsden marked this pull request as ready for review September 1, 2026 21:43
@eamsden
eamsden requested a review from a team as a code owner September 1, 2026 21:43
@eamsden
eamsden enabled auto-merge (squash) September 1, 2026 21:44
@eamsden eamsden changed the title Expose workflow read-only execution state 💥 Use context-sensitive randomness for workflow views Sep 2, 2026
@eamsden
eamsden merged commit 85bf431 into main Sep 2, 2026
22 of 23 checks passed
@eamsden
eamsden deleted the eamsden/workflow-read-only-context branch September 2, 2026 02:03
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.

2 participants