NewGuid, SetCustomStatus, sendevent between orchestrations api support#86
Merged
YunchuWang merged 16 commits intomainfrom Feb 3, 2026
Merged
NewGuid, SetCustomStatus, sendevent between orchestrations api support#86YunchuWang merged 16 commits intomainfrom
YunchuWang merged 16 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements three new orchestration context API methods to improve feature parity between the JavaScript/TypeScript SDK and the .NET SDK: newGuid(), setCustomStatus(), and sendEvent().
Changes:
- Added
newGuid()method for generating deterministic UUIDs (v5) during orchestration replay - Added
setCustomStatus()method for setting custom status values on orchestration instances - Added
sendEvent()method for sending events from one orchestration to another - Modified
OrchestrationExecutorto return a result object containing both actions and custom status - Added comprehensive unit and E2E tests for all three new methods
- Created feature parity documentation tracking differences with the .NET SDK
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/durabletask-js/src/task/context/orchestration-context.ts | Added abstract method declarations for newGuid(), setCustomStatus(), and sendEvent() |
| packages/durabletask-js/src/worker/runtime-orchestration-context.ts | Implemented the three new methods with UUID v5 generation algorithm and custom status management |
| packages/durabletask-js/src/worker/orchestration-executor.ts | Changed return type to OrchestrationExecutionResult to include custom status alongside actions |
| packages/durabletask-js/src/worker/task-hub-grpc-worker.ts | Updated to extract and set custom status from execution result in orchestrator response |
| packages/durabletask-js/src/utils/pb-helper.util.ts | Added newSendEventAction() helper for creating send event actions |
| packages/durabletask-js/test/orchestration_context_methods.spec.ts | New unit test file with comprehensive tests for all three new methods |
| packages/durabletask-js/test/orchestration_executor.spec.ts | Updated all existing tests to use new OrchestrationExecutionResult return type |
| test/e2e-azuremanaged/orchestration.spec.ts | Added E2E tests for the new methods and support for connection string configuration |
| docs/FEATURE_PARITY.md | New documentation tracking feature parity between JS and .NET SDKs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/durabletask-js/test/orchestration_context_methods.spec.ts
Outdated
Show resolved
Hide resolved
Member
Author
|
@copilot update pr description to follow .github/PULL_REQUEST_TEMPLATE.md |
Contributor
|
@YunchuWang I've opened a new pull request, #87, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kaibocai
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed?
-Added newGuid() API to OrchestrationContext that generates deterministic UUIDs using UUID v5 (RFC 4122 §4.3)
-Added setCustomStatus() API to set/retrieve custom orchestration status
-Added sendEvent() API for orchestration-to-orchestration communication (fire-and-forget)
-Fixed setComplete() and setFailed() to preserve fire-and-forget actions (sendEvent) instead of clearing all pending actions
Why is this change needed?
These APIs are required for parity with the .NET and Python Durable Task SDKs
newGuid() allows orchestrations to generate deterministic GUIDs that are consistent across replays
setCustomStatus() enables orchestrations to report progress/state that can be queried externally
sendEvent() enables orchestration-to-orchestration communication patterns
Issues / work items
Project checklist
CHANGELOG.mdAI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
AI verification (required if AI was used):
Testing
Automated tests
Manual validation (only if runtime/behavior changed)
1.
2.
3.
Notes for reviewers