Skip to content

fix(workflow): a query handler, an update validator, an await condition and a side effect callback can no longer create a command - #810

Merged
xepozz merged 5 commits into
temporalio:masterfrom
xepozz:fix/readonly-callbacks
Sep 16, 2026
Merged

xepozz merged 5 commits into
temporalio:masterfrom
xepozz:fix/readonly-callbacks

Conversation

@xepozz

@xepozz xepozz commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

What was changed

Activation-wide guard for query handlers, update validators, await conditions and side effect
callbacks, behind FeatureFlags::$readOnlyWorkflowCallbacks.

Why?

All four could create commands that are not part of the workflow's sequence, breaking replay.

Checklist

  1. Closes —
  2. How was this tested: new ReadOnlyCallbackTestCase, six cases, four fail on master.
  3. Any docs updates needed? Release notes: such code now throws.

…on and a side effect callback can no longer create a command
@xepozz
xepozz marked this pull request as ready for review September 12, 2026 06:34
@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners September 12, 2026 06:34
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@xepozz
xepozz force-pushed the fix/readonly-callbacks branch 3 times, most recently from 79e0e44 to 7c2f5a3 Compare September 14, 2026 19:50
… call

An inbound interceptor could still create a command while unwinding
handleQuery or validateUpdate. The guard is a plain flag now and the
message names read-only callbacks, so the trace points at the caller.

Also drop a ReflectionMethod::setAccessible() call: on PHP 8.5 its
deprecation stopped the Unit suite at 965 of 1527 tests.
@xepozz
xepozz force-pushed the fix/readonly-callbacks branch from 7c2f5a3 to 7989ab1 Compare September 14, 2026 19:51
@xepozz
xepozz force-pushed the fix/readonly-callbacks branch from f3f3fe4 to d5747e6 Compare September 16, 2026 14:45
@xepozz
xepozz merged commit 5b1e4fc into temporalio:master Sep 16, 2026
179 of 181 checks passed
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