Repository navigation
Expose orchestration clone source instance ID - #385
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new abstract getter breaks existing external OrchestrationContext subclasses.
1 open finding
What changed in this PR
Exposes clone-source lineage in core and classic orchestration contexts, preparing the SDK for related backend and Durable Functions support.
Changes:
- Decodes and propagates
sourceInstanceIdthrough worker execution and replay. - Exposes read-only core and classic context getters.
- Adds documentation, changelogs, and regression coverage.
| File | Description |
|---|---|
CHANGELOG.md |
Documents the core API. |
packages/durabletask-js/src/client/client.ts |
Clarifies restart lineage behavior. |
packages/durabletask-js/src/task/context/orchestration-context.ts |
Adds the public core getter. |
packages/durabletask-js/src/worker/orchestration-executor.ts |
Passes lineage into runtime context. |
packages/durabletask-js/src/worker/runtime-orchestration-context.ts |
Stores and exposes lineage. |
packages/durabletask-js/src/worker/task-hub-grpc-worker.ts |
Decodes request metadata. |
packages/durabletask-js/test/orchestration_executor.spec.ts |
Tests execution and replay. |
packages/durabletask-js/test/worker-response-delivery.spec.ts |
Tests streamed dispatch. |
packages/azure-functions-durable/CHANGELOG.md |
Documents the classic API. |
packages/azure-functions-durable/src/orchestration-context.ts |
Adds the classic facade getter. |
packages/azure-functions-durable/test/unit/orchestration-context.spec.ts |
Tests facade forwarding. |
packages/azure-functions-durable/test/unit/worker.spec.ts |
Tests protobuf handling and failures. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wangbill (YunchuWang)
left a comment
There was a problem hiding this comment.
Re-reviewed commit 29b869f. The concrete sourceInstanceId default getter preserves existing context subclasses, while the runtime override retains authoritative backend metadata. The subclass compatibility regression addresses the earlier finding. No blocking code findings. Nonblocking: please update the PR description to remove the outdated claim that the getter is abstract and requires existing subclasses to change.

Summary
What changed?
sourceInstanceId: string | undefinedto core orchestration contexts and the classiccontext.dffacade.undefined. Malformed values use existing error logging and Failed completion.Why is this change needed?
Issues / work items
Project checklist
CHANGELOG.mdsourceInstanceId, returningundefinedwhen metadata is unavailable.AI-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
npm run build:core- passed.npm run build -w durable-functions- passed.npm run build:azuremanaged- passed.npm run test:unit -w @microsoft/durabletask-js -- --runTestsByPath test\orchestration_executor.spec.ts test\parent-orchestration-instance.spec.ts test\worker-response-delivery.spec.ts test\client-error-cause.spec.ts- passed, 163 tests.npm run test:unit -w durable-functions -- --runTestsByPath test\unit\worker.spec.ts test\unit\orchestration-context.spec.ts test\unit\client.spec.ts- passed, 80 tests.npm run test:unit -w @microsoft/durabletask-js -- --runTestsByPath test\sub-orchestration-instance-id.spec.ts- passed, 5 tests.$files = git diff --name-only -- '*.ts'; & .\node_modules\.bin\eslint.cmd $files- passed on all changed TypeScript files before commit.Manual validation (only if runtime/behavior changed)
undefined. Positive end-to-end lineage remains blocked on backend emission, not claimed as validated.Notes for reviewers