Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
bdeb0c6
feat: add bounded payload storage contracts and processing
YunchuWang Oct 16, 2026
b6c27b1
feat: integrate payload transport with SDK clients and workers
YunchuWang Oct 16, 2026
807367b
feat: add interoperable Azure Blob payload provider
YunchuWang Oct 16, 2026
7ce147d
feat: add payload purge protocol and management client
YunchuWang Oct 16, 2026
8040795
feat: add reserved payload cleanup worker tasks
YunchuWang Oct 16, 2026
72c7498
feat: finish large payload release usage and consumer validation
YunchuWang Oct 16, 2026
d5c9df7
fix: externalize continue-as-new carryover payloads
YunchuWang Oct 19, 2026
55dfcf3
fix: preflight payload sizes before uploads
YunchuWang Oct 19, 2026
1e7f3d8
Merge repaired payload core into SDK phase
YunchuWang Oct 19, 2026
bee61f1
Merge repaired SDK phase into Blob provider phase
YunchuWang Oct 19, 2026
847d0f8
docs: clarify payload preflight and orphan limitations
YunchuWang Oct 19, 2026
5b7baf4
Merge repaired Blob phase into purge client phase
YunchuWang Oct 19, 2026
e9940fb
Merge repaired purge client phase into cleanup worker phase
YunchuWang Oct 19, 2026
9708ff8
Merge repaired cleanup worker phase into final payload phase
YunchuWang Oct 19, 2026
3fab3aa
fix: abandon queued work on payload processing failure
YunchuWang Oct 20, 2026
dcb09f4
fix: isolate completion wait RPC deadline retries
YunchuWang Oct 20, 2026
1f82ee5
Merge reviewed SDK release and wait repairs into Blob phase
YunchuWang Oct 20, 2026
bccd9ca
Merge repaired SDK ancestry into purge client phase
YunchuWang Oct 20, 2026
aa425b7
Merge approved SDK failure handling into cleanup worker phase
YunchuWang Oct 20, 2026
39cebd7
Merge approved SDK repairs into final payload phase
YunchuWang Oct 20, 2026
aeb598f
fix: skip recognized payload tokens during externalization
YunchuWang Oct 20, 2026
bee1313
fix: preserve cancellation during payload externalization
YunchuWang Oct 20, 2026
b33c264
Merge reviewed token and cancellation guards into payload phase 2
YunchuWang Oct 20, 2026
932306c
Merge reviewed token and cancellation guards into payload phase 3
YunchuWang Oct 20, 2026
14edd91
Merge reviewed token and cancellation guards into payload phase 4
YunchuWang Oct 20, 2026
c2080ef
Merge reviewed token and cancellation guards into payload phase 5
YunchuWang Oct 20, 2026
0759a3e
Merge reviewed token and cancellation guards into payload phase 6
YunchuWang Oct 21, 2026
137bb54
fix: process rewind history input payloads
YunchuWang Oct 22, 2026
bf9a7ef
fix(client): isolate scheduling RPC error translation
YunchuWang Oct 22, 2026
b4ddad9
Merge reviewed rewind mapping into payload phase 2
YunchuWang Oct 22, 2026
535bfcb
Merge reviewed rewind and scheduling fixes into payload phase 3
YunchuWang Oct 22, 2026
08de2e0
Merge reviewed rewind and scheduling fixes into payload phase 4
YunchuWang Oct 22, 2026
6bd14ca
Merge reviewed rewind and scheduling fixes into payload phase 5
YunchuWang Oct 22, 2026
901eb85
Merge reviewed rewind and scheduling fixes into payload phase 6
YunchuWang Oct 22, 2026
f3ea69f
fix(client): centralize unary RPC error boundaries
YunchuWang Oct 22, 2026
71633cd
Merge reviewed shared unary pipeline into payload phase 3
YunchuWang Oct 22, 2026
7715b7a
Merge reviewed shared unary pipeline into payload phase 4
YunchuWang Oct 22, 2026
70a3b03
Merge reviewed shared unary pipeline into payload phase 5
YunchuWang Oct 22, 2026
7c9d67f
fix(client): isolate auto-purge runner deduplication
YunchuWang Oct 22, 2026
20ee1eb
Merge reviewed runner RPC boundary into payload phase 5
YunchuWang Oct 22, 2026
ae63cab
Merge reviewed unary pipeline and runner boundaries into payload phase 6
YunchuWang Oct 22, 2026
437a92f
fix(azureblob): enforce network deadlines and aligned HTTP retries
YunchuWang Oct 27, 2026
e7f1535
Merge main ancestry after payload prerequisite squash merges
YunchuWang Oct 27, 2026
518adab
Merge reviewed Blob resilience into payload phase 4
YunchuWang Oct 27, 2026
af191ce
Merge reviewed Blob resilience into payload phase 5
YunchuWang Oct 27, 2026
cd3675e
Merge reviewed Blob resilience into payload phase 6
YunchuWang Oct 27, 2026
5c150d4
fix(azureblob): preserve secondary retry integrity and isolate HTTP f…
YunchuWang Oct 27, 2026
65793ae
Merge reviewed Blob secondary integrity into payload phase 4
YunchuWang Oct 27, 2026
804296c
Merge reviewed Blob secondary integrity into payload phase 5
YunchuWang Oct 27, 2026
191ab13
Merge reviewed Blob secondary integrity into payload phase 6
YunchuWang Oct 27, 2026
2f90339
fix(azureblob): cap fixed retry jitter at configured delay
YunchuWang Oct 27, 2026
6d0f688
Merge reviewed fixed retry cap into payload phase 4
YunchuWang Oct 27, 2026
f88101f
Merge reviewed fixed retry cap into payload phase 5
YunchuWang Oct 27, 2026
7e5d607
Merge reviewed fixed retry cap into payload phase 6
YunchuWang Oct 27, 2026
9ad6550
fix(azureblob): eagerly release response I/O and validate local test …
YunchuWang Oct 27, 2026
86288fe
test(azureblob): accept padded endpoints and await response closure
YunchuWang Oct 27, 2026
bc249ab
Merge reviewed provider teardown fixes into payload phase 4
YunchuWang Oct 27, 2026
140fe48
Merge reviewed provider teardown fixes into payload phase 5
YunchuWang Oct 27, 2026
1038005
Merge reviewed provider teardown fixes into payload phase 6
YunchuWang Oct 27, 2026
fcdc5a7
refactor(azureblob): delegate HTTP retries to Azure SDK
YunchuWang Oct 28, 2026
cdc440b
Merge approved native SDK retries into payload phase 4
YunchuWang Oct 28, 2026
1f5f52e
Merge approved native SDK retries into payload phase 5
YunchuWang Oct 28, 2026
6484749
Merge approved native SDK retries into payload phase 6
YunchuWang Oct 28, 2026
d6190ee
fix: cancel pending gRPC metadata waits before dispatch
YunchuWang Oct 28, 2026
27e6072
Merge reviewed metadata cancellation into payload phase 5
YunchuWang Oct 28, 2026
68107e3
Merge reviewed metadata cancellation into payload phase 6
YunchuWang Oct 28, 2026
ce561b6
refactor(azureblob): use native SDK transport and cancellation
YunchuWang Oct 29, 2026
40aee55
Merge SDK-only payload transport into phase 4
YunchuWang Oct 29, 2026
2548ab9
Merge SDK-only payload transport into phase 5
YunchuWang Oct 29, 2026
3aedd2c
Merge SDK-only payload transport into phase 6
YunchuWang Oct 29, 2026
e5844ee
test(azureblob): resolve child fixture workspace source imports
YunchuWang Oct 29, 2026
b856238
Merge clean-checkout payload fixture fix into phase 4
YunchuWang Oct 29, 2026
7e7bd8d
Merge clean-checkout payload fixture fix into phase 5
YunchuWang Oct 29, 2026
970da36
Merge clean-checkout payload fixture fix into phase 6
YunchuWang Oct 29, 2026
ebe2d8e
Merge merged provider main ancestry into payload phase 4
YunchuWang Oct 30, 2026
e445b3e
Merge payload phase 4 ancestry sync into phase 5
YunchuWang Oct 30, 2026
6ee5eae
Merge payload phase 5 ancestry sync into phase 6
YunchuWang Oct 30, 2026
24af4a1
fix: preserve cleanup failure and cancellation boundaries
YunchuWang Nov 4, 2026
34f0bcc
Merge cleanup boundary repairs into payload phase 6
YunchuWang Nov 4, 2026
8079635
fix: scope payload purge exemptions to task kind
YunchuWang Nov 4, 2026
1e6e580
Merge kind-scoped cleanup repair into payload phase 6
YunchuWang Nov 4, 2026
185d061
Merge current main access-scope hardening into payload cleanup worker
YunchuWang Nov 5, 2026
99c2d0e
Merge phase 5 main integration into payload phase 6
YunchuWang Nov 5, 2026
4179037
Fix malformed payload token URI decoding
YunchuWang Nov 5, 2026
8c89a23
Merge URI token classification repair into payload phase 6
YunchuWang Nov 5, 2026
c11f702
Merge main into payload phase 6 to resolve squash ancestry
YunchuWang Nov 5, 2026
e62f62c
docs: clarify payload cleanup prerequisites
YunchuWang Nov 10, 2026
ea18c9d
Update README with details on step handling and tombstones
YunchuWang Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 1. Bumps the selected package's version in its own package.json
# 2. Generates a changelog from git history since the package's last release tag
# 3. Updates the package's changelog file and creates a release branch + package-scoped tag
# Packages are versioned and tagged independently (tag prefixes: v, azuremanaged-v, durable-functions-v).
# Packages are versioned and tagged independently (tag prefixes: v, azureblob-v, azuremanaged-v, durable-functions-v).
# After the workflow completes, manually open a PR from the release branch to main, then publish
# from the package directory using the npm command shown in the run summary (mind the dist-tag).

Expand All @@ -19,6 +19,7 @@ on:
type: choice
options:
- durabletask-js
- durabletask-js-azureblob
- durabletask-js-azuremanaged
- azure-functions-durable
version:
Expand Down Expand Up @@ -60,14 +61,20 @@ jobs:
TAG_PREFIX="azuremanaged-v"
CHANGELOG_PATH="packages/durabletask-js-azuremanaged/CHANGELOG.md"
;;
durabletask-js-azureblob)
PKG_DIR="packages/durabletask-js-azureblob"
NPM_NAME="@microsoft/durabletask-js-azureblob"
TAG_PREFIX="azureblob-v"
CHANGELOG_PATH="packages/durabletask-js-azureblob/CHANGELOG.md"
;;
azure-functions-durable)
PKG_DIR="packages/azure-functions-durable"
NPM_NAME="durable-functions"
TAG_PREFIX="durable-functions-v"
CHANGELOG_PATH="packages/azure-functions-durable/CHANGELOG.md"
;;
*)
echo "::error::Unknown package '$PACKAGE'. Expected one of: durabletask-js, durabletask-js-azuremanaged, azure-functions-durable."
echo "::error::Unknown package '$PACKAGE'. Expected one of: durabletask-js, durabletask-js-azureblob, durabletask-js-azuremanaged, azure-functions-durable."
exit 1
;;
esac
Expand Down
22 changes: 10 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

### New

- Add reserved cleanup worker tasks with bounded deletion chunks, retry/quarantine handling,
configuration-preserving continue-as-new, authenticated current-channel RPCs and filter/version isolation.
This completes the cleanup runtime; aggregate release/consumer validation follows in phase 6.
- Add the DTS payload-purge protocol and `setLargePayloadAutoPurge()` client lifecycle,
including setting-first enable/disable and reserved-instance identity verification.
A compatible .NET worker or the later cleanup-worker phase is required; do not publish partial phases.
- Add payload storage contracts and bounded protobuf payload processing, with inclusive UTF-8
thresholds, explicit storage/size failures, and non-retriable worker upload-failure conversion.
This is phase 1 of the external-payload feature; transport, providers, and cleanup follow separately.
Reserve core `0.4.1` for the new APIs; do not publish partial feature phases.
- Add opt-in `payloads` storage to gRPC clients/workers, with transparent UTF-8-size-based
externalization and awaited query/history/work-item hydration across orchestration, activity,
and entity V1/V2 payloads. Add the optional `@microsoft/durabletask-js-azureblob` storage package.
- Add .NET-aligned `setLargePayloadAutoPurge()`, reserved replay-safe cleanup tasks, and DTS
lifecycle transport. Storage configuration alone does not enable deletion; cleanup checks
blob ownership and ETags, preserves uncertain outcomes, and leaves legacy v1 blobs untouched.
- Expose readonly `OrchestrationContext.sourceInstanceId` from the existing protobuf
request properties on initial execution and replay, independently of parent identity.
Strings are preserved verbatim; null or missing metadata returns `undefined`.
Expand Down Expand Up @@ -65,10 +61,12 @@
- Cancel metadata acquisition waits before dispatch and preserve the original cancellation reason,
including auto-purge setting and runner lifecycle calls. Cancellation detaches the SDK wait;
third-party metadata generation may finish later, but cannot dispatch a canceled RPC.
- Determine single-instance purge routing from ordinary/entity IDs regardless of payload storage,
matching .NET management clients without changing purge timeout/completion semantics.
- Keep `PayloadStorageException` cause options structural so its public declarations remain
usable by ES2020 consumers without the global ES2022 `ErrorOptions` type.
- Deduplicate auto-purge runner startup only after an actual scheduler RPC duplicate response.
Preserve upload/metadata error identity, including matching semantic error types, and cancellation.
- Determine single-instance purge routing from the instance ID regardless of payload configuration,
matching .NET management clients: ordinary IDs are orchestrations and `@name@key` IDs are entities.
- Share the unary client payload/metadata/RPC/hydration pipeline across scheduling, waits, rewind,
and restart. Only actual RPC failures enter operation-specific error translation or retry;
storage and metadata failures keep their original identity, and cancellation prevents retries.
Expand Down
42 changes: 12 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ const entityResponseBytes = await worker.processEntityBatchRequest(entityBatchRe

`TaskHubGrpcClient` already exposes orchestration start/query/event/terminate/suspend/resume/purge APIs and entity signal/read/query/clean APIs through its existing `hostAddress` and `metadataGenerator` options. Host integrations that need task-hub routing metadata should provide it through `metadataGenerator`, keeping host-specific metadata policy outside the core client. Azure-managed scheduler connection strings remain in `@microsoft/durabletask-js-azuremanaged`.

## External payload transport
## Large payloads

Core clients and workers accept opt-in `payloads: { store }` options, where `store` implements
the exported `PayloadStore` contract. The same store must be configured on every participant.
The default threshold is 256 KiB of serialized UTF-8 bytes (inclusive), with a 10 MiB maximum.
Requests are externalized before sending; queries, history chunks and work items are hydrated
before conversion or execution. Empty payloads remain inline, and disabling the option preserves
the existing transport behavior.
Clients and workers can opt into transparent external payload storage with the `payloads`
option. The optional [`@microsoft/durabletask-js-azureblob`](./packages/durabletask-js-azureblob)
package implements .NET-compatible Azure Blob tokens and UTF-8/gzip storage. The default
externalization threshold is 256 KiB (inclusive); the maximum payload size is 10 MiB.
Core users do not acquire Azure Storage dependencies; payload transport remains opt-in.

Configure all participating clients and workers before storing externalized payloads.
Azure-managed builders expose `.useExternalizedPayloads({ store })`. Cleanup is separately
opt-in through `client.setLargePayloadAutoPurge(true)` and requires a supporting DTS backend.
Single-instance purges now route ordinary/entity IDs correctly even without payload storage.
See the package's [configuration, interoperability, and cleanup contract](./packages/durabletask-js-azureblob/README.md).

Workers abandon acquired queue work items when payload downloads or unconverted output storage/size
checks fail. Release is awaited with bounded gRPC retries and the original work item's cancellation
Expand All @@ -44,29 +49,6 @@ RPC failures enter operation-specific error translation or retry; storage and me
propagate unchanged. Completion waits retry scheduler deadlines with fresh metadata, without
re-uploading the request or retrying response hydration. Cancellation stops RPCs and retry backoff.

Azure-managed builders expose `.useExternalizedPayloads({ store })` and require core `>=0.4.1`
for the public payload types. A custom/in-memory store or the optional Azure Blob provider can
implement storage independently of the transport. Complete the six-phase feature stack before release.

### Payload cleanup client protocol

`client.setLargePayloadAutoPurge(enabled, batchSize?, signal?)` manages the authenticated DTS
task-hub cleanup setting. Enabling writes the setting first, starts/deduplicates and verifies
the reserved Running orchestration, then signals its batch size. Disabling only writes the
backend setting. These steps are not transactional; earlier successful steps are not rolled back.

This client operation does not require blob credentials. It requires a backend implementing
the DTS `LargePayloadPurge` service and a compatible worker. Payload-enabled JavaScript workers
now register the reserved cleanup orchestrator and activities automatically, preserve their
wildcard filters and bypass business version policy without changing customer filters.
Deletion verifies ownership and ETags, batches 50 tokens per activity and limits concurrency;
the runner backs off empty/retry-only batches and preserves configuration through continue-as-new.
Do not publish the feature until all six phases are complete.

Single-instance purges now identify the instance kind even on management-only clients without
payload storage: ordinary IDs set `isOrchestration=true`, while `@name@key` entity IDs set it false.
The existing timeout and completion-status behavior is unchanged.

## Long durable timers

`createTimer(Date | seconds)` has no SDK-imposed total-duration cap. Like the Python SDK,
Expand Down
Loading
Loading