Skip to content

feat(php): serialization context conformance tests - #916

Open
xepozz wants to merge 6 commits into
temporalio:mainfrom
xepozz:feature/serialization-context-php
Open

xepozz wants to merge 6 commits into
temporalio:mainfrom
xepozz:feature/serialization-context-php

Conversation

@xepozz

@xepozz xepozz commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@xepozz
xepozz requested review from a team as code owners October 10, 2026 09:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-10-10T09:43:17.978152Z a4a8a12 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.

@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: a4a8a12c68

ℹ️ 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".

Comment on lines +120 to +123
$completion->recordHeartbeat(
$execution->getID(),
$execution->getRunID(),
$scheduled->getActivityId(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use by-ID APIs for activity completion

When this async-completion feature reaches this block, recordHeartbeat() and the later complete() are the task-token forms of the PHP activity completion client, but the arguments supplied here are workflow, run, and activity IDs. The workflow ID is therefore sent as an invalid task token (and complete() is invoked with the same wrong shape), so the feature fails before checking any serialization context; call the client's by-ID variants or publish and use the actual task token.

Useful? React with 👍 / 👎.

): void {
$firstExecution = $stub->getExecution();
Assert::same($stub->getResult()->value, FINAL_RESULT);
$lastExecution = $stub->getExecution();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fetch the final continue-as-new execution explicitly

For this workflow's one continue-as-new, getResult() follows the run chain to obtain the result but does not replace the execution associated with the stub, so this returns the same first-run execution captured on line 66. The history request on line 79 consequently reads the first run again and cannot find WorkflowExecutionCompleted; construct an execution with the workflow ID and no run ID, or use the new run ID from the continued-as-new event.

Useful? React with 👍 / 👎.

Comment on lines +51 to +54
return yield Workflow::executeActivity(
ACTIVITY_NAME,
[$input],
LocalActivityOptions::new()->withStartToCloseTimeout(10),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Execute this through the local-activity API

When the PHP local-activity feature runs, Workflow::executeActivity() is the remote-activity entry point and does not turn into a local activity when passed LocalActivityOptions (the SDK rejects that option type). The workflow therefore fails before producing a LocalActivity marker, so this conformance case can never inspect an isLocal=true context; use Workflow::executeLocalActivity() here.

Useful? React with 👍 / 👎.

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