Skip to content

Add Workflow random streams and read-only detection - #3049

Open
patbeqo wants to merge 2 commits into
mainfrom
patbeqo/otel-v2-workflow-prerequisites
Open

patbeqo wants to merge 2 commits into
mainfrom
patbeqo/otel-v2-workflow-prerequisites

Conversation

@patbeqo

@patbeqo patbeqo commented Aug 28, 2026

Copy link
Copy Markdown

What changed?

  • Added experimental named deterministic Random streams through Workflow.getRandomStream(String).
  • Streams are independent by name and from existing Workflow randomness.
  • Streams replay deterministically, reseed after a Workflow Reset boundary, and use a new sequence for each Run.
  • Added experimental WorkflowUnsafe.isReadOnly().
  • Added coverage for seed stability, named-stream independence, replay, Reset, Continue-As-New, run and child isolation, and read-only Workflow contexts.

Why?

OpenTelemetry and other integrations need replay-stable entropy without perturbing a Workflow's application random sequence, plus a way to avoid draws where Workflow state cannot be mutated. This is the prerequisite slice for #3046.

Breaking changes?

None. The public APIs are additive and experimental.

Server PR

None.

Test plan

  • mise exec -- ./gradlew :temporal-sdk:test --offline
  • mise exec -- ./gradlew test --offline
  • mise exec -- ./gradlew spotlessCheck
  • mise exec -- ./gradlew :temporal-sdk:javadoc --offline

@patbeqo

patbeqo commented Aug 28, 2026

Copy link
Copy Markdown
Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33197ee281

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@patbeqo
patbeqo force-pushed the patbeqo/otel-v2-workflow-prerequisites branch from bfaf813 to cd21e5b Compare September 15, 2026 23:00
@patbeqo

patbeqo commented Sep 15, 2026

Copy link
Copy Markdown
Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@patbeqo

patbeqo commented Sep 16, 2026

Copy link
Copy Markdown
Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T14:28:37.654563Z 5193120 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 519312060f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@patbeqo
patbeqo marked this pull request as ready for review September 16, 2026 14:24
@patbeqo
patbeqo requested a review from a team as a code owner September 16, 2026 14:24
@patbeqo
patbeqo requested a review from a team September 16, 2026 14:24
@patbeqo
patbeqo added this pull request to stack #3083 September 16, 2026 22:06
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