Skip to content

feat: Nexus samples with end-to-end Feature suite - #75

Open
xepozz wants to merge 4 commits into
masterfrom
nexus
Open

feat: Nexus samples with end-to-end Feature suite#75
xepozz wants to merge 4 commits into
masterfrom
nexus

Conversation

@xepozz

@xepozz xepozz commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Five samples covering every Nexus handler form:

  • sync #[Operation]
  • async #[AsyncOperation] returning WorkflowHandle (SDK-managed start+cancel)
  • manual #[AsyncOperation] returning an OperationHandlerInterface object (custom token, runtime sync/async choice, own cancel) plus cancellation, context-propagation and multiple-arguments variants.

Feature test harness: endpoint-per-test via the gRPC OperatorService, one task queue per scenario, real handlers alongside mocked service/client doubles.

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Five samples covering every Nexus handler form:
- sync #[Operation]
- async #[AsyncOperation] returning WorkflowHandle (SDK-managed start+cancel)
- manual #[AsyncOperation] returning an OperationHandlerInterface object
  (custom token, runtime sync/async choice, own cancel)
plus cancellation, context-propagation and multiple-arguments variants.

Feature test harness: endpoint-per-test via the gRPC OperatorService, one
task queue per scenario, real handlers alongside mocked service/client
doubles.
@Sushisource

Copy link
Copy Markdown
Member

FYI link to impl PR temporalio/sdk-php#768

# Conflicts:
#	app/composer.json
#	app/composer.lock
@xepozz
xepozz marked this pull request as ready for review August 18, 2026 07:34
@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners August 18, 2026 07:34

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

ℹ️ 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 thread app/src/Nexus/handler-worker.php Outdated
ini_set('display_errors', 'stderr');
include "../../vendor/autoload.php";

$address = \getenv('TEMPORAL_ADDRESS') ?: '127.0.0.1:7233';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align the handler client with RoadRunner's server address

When Temporal is not running on localhost, the RoadRunner config reads TEMPORAL_HOST/TEMPORAL_PORT, while this workflow client reads only TEMPORAL_ADDRESS; setting either advertised representation alone therefore makes the worker poll one cluster while async Nexus operations try to start their backing workflows on another. This causes hello operations to fail or time out unless users discover that both forms must be set consistently. Use the same address variable in both places; the copied handler workers in NexusCancellation, NexusContextPropagation, and NexusMultipleArguments have the same mismatch.

Useful? React with 👍 / 👎.

xepozz added 2 commits August 18, 2026 11:47
- share the base Service and handler contracts instead of copying them per sample
- fold the operation-token observation back into HelloCallerWorkflow and drop the
  extra HelloWithToken workflow, command block and test
- resolve the handler address like app.php does, mark UNSUPPORTED_LANGUAGE
  non-retryable, and give every sample its own endpoint, task queues and RR ports
- surface a failed async start instead of deadlocking the manual-operation caller
- make the cancellation assertions fail when cancellation stops working
- create the test endpoint per class and wait until it resolves
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