Skip to content

feat: expose workflow cancellation reason (#567) - #863

Open
xepozz wants to merge 4 commits into
masterfrom
feature/workflow-cancel-reason
Open

xepozz wants to merge 4 commits into
masterfrom
feature/workflow-cancel-reason

Conversation

@xepozz

@xepozz xepozz commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

What was changed

  • WorkflowStubInterface::cancel() and ExternalWorkflowStubInterface::cancel() accept ?string $reason.
  • The workflow receives the reason as the message of CanceledFailure. getOriginalMessage() now returns the message, not ''.

Why?

Users cannot send or read a cancellation reason now. The RoadRunner part is temporalio/roadrunner-temporal#881.

Checklist

  1. Closes Expose Workflow cancel cause/reason #567
  2. How was this tested?
  3. Any docs updates needed?
    • No.

@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners November 29, 2026 05:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T05:51:49.792458Z 397e8c4 PR opened
ℹ️ 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.

@xepozz
xepozz force-pushed the feature/workflow-cancel-reason branch from 397e8c4 to 273f86c Compare November 29, 2026 05:57
Client and external-workflow cancel take an optional reason.
The workflow sees the history cause as the CanceledFailure message.
@xepozz
xepozz force-pushed the feature/workflow-cancel-reason branch from 273f86c to f67c526 Compare November 29, 2026 12:37
The tests read the canceller history to see if rr sent the reason, so they pass with rr before and after roadrunner-temporal#881.
@xepozz

xepozz commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

…ncel-reason

# Conflicts:
#	psalm-baseline.xml

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 29, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Resolved in dd1de6a. PHP syntax and baseline XML checks pass; PHPUnit could not run because Composer dependency downloads require GitHub authentication.

This branch has not been deployed

No deployments
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.

Expose Workflow cancel cause/reason

3 participants