Repository navigation
feat: [1/6] add core payload contracts and bounded processing - #388
Open
wangbill (YunchuWang) wants to merge 6 commits into
Open
wangbill (YunchuWang) wants to merge 6 commits into
wangbill (YunchuWang) wants to merge 6 commits into
Conversation
Phase 1 of 6: add provider-independent payload contracts, explicit protobuf mapping, UTF-8 size limits, bounded I/O and permanent worker upload failure conversion. Reserve the 0.4.1 core API version without enabling transport or cleanup yet. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 81e20512-d3a2-4f8e-a574-f396140ec9c7
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Continue-as-new carryover payloads bypass externalization and configured size limits.
1 open finding
What changed in this PR
Adds the core foundation for optional external payload storage, ahead of transport and provider integration.
Changes:
- Introduces storage contracts and explicit protobuf payload mapping.
- Adds bounded processing, size checks, failure conversion, and regression tests.
- Reserves core version
0.4.1and synchronizes dependency metadata.
| File | Description |
|---|---|
| packages/durabletask-js/test/payloads.spec.ts | Tests mapping, limits, failures, and concurrency. |
| packages/durabletask-js/src/payloads/run-bounded.ts | Bounds concurrency and drains started operations. |
| packages/durabletask-js/src/payloads/payload-store.ts | Defines storage contracts, options, and errors. |
| packages/durabletask-js/src/payloads/payload-processor.ts | Maps and processes protobuf payload fields. |
| packages/durabletask-js/src/index.ts | Exports payload contracts. |
| packages/durabletask-js/package.json | Reserves core 0.4.1. |
| packages/azure-functions-durable/package.json | Updates the exact core dependency. |
| package-lock.json | Synchronizes version metadata. |
| CHANGELOG.md | Documents the foundation and phased release. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 16, 2026
Traverse native carryover history through the existing payload field mapping and cover runtime generation, UTF-8 limits, wire size, and hydration. Co-authored-by: Copilot App <[email protected]> Copilot-Session: cb2196a6-5b17-4d7f-b59b-51017b21de0a
Snapshot eligible UTF-8 payloads and validate every size before bounded storage I/O. Preserve precancellation, worker failure conversion, and message-order I/O failure handling without adding rollback deletion. Co-authored-by: Copilot App <[email protected]> Copilot-Session: cb2196a6-5b17-4d7f-b59b-51017b21de0a
Preserve one-pass hydration across repeated and partial-success retries, excluding known references before size preflight while retaining raw payload validation. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 2e5a9c41-aa30-4a1e-b176-22049e28af91
Rethrow caught errors when the signal is aborted before permanent-failure conversion, preserving original cancellation and independent message-order I/O errors for both worker responses. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 2e5a9c41-aa30-4a1e-b176-22049e28af91
Include ExecutionRewoundEvent input in the shared history mapping so hydration, rewriting, carryover, and whole-message UTF-8 size preflight cover it without changing rewind metadata. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 2e5a9c41-aa30-4a1e-b176-22049e28af91
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?
Why is this change needed?
91739687. Native carryover traversal and whole-message size preflight are intentional targeted improvements beyond the reference interceptor's mapping and per-operation size checks, not a claim of exact unchanged .NET parity.c9b53fcb3ab8585c4b3b22f9c0500cc9dd122c5a, with the documented instance-kind routing correction. This phase includes reviewed carryover/preflight repair commits:d5c9df7e28b7d0bdc9ddaa01defa5f1a727aa880(carryover) and55dfcf37da0ed3a2791f778d75621cb7f91144a7(size preflight), followed byaeb598f68d0d4a47c89a762b516a5131af60d4c8(recognized-token skip) andbee13134d6ea2e317938b3e4eda450cf6b463bc1(aborted-signal precedence).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):
These human attestations are intentionally left unchecked.
Testing
Automated tests
137bb547e8781fd84c2738c3e13ae0f65cd66174.npm run test:unit -w @microsoft/durabletask-js -- --runTestsByPath test\payloads.spec.ts test\build-rewind-result.spec.ts test\history-event-converter.spec.ts --verbose=false— passed 162 tests in 3 suites, including all 114 payload tests.npm run build:coreandnpm run lint— passed on this phase1 head. Scoped Prettier checks of the processor, payload tests and changelog passed.git diff --check bee13134d6ea2e317938b3e4eda450cf6b463bc1..137bb547e8781fd84c2738c3e13ae0f65cd66174— passed. The reviewed repair is exactly 3 files / 117 added lines: one field mapping, 12 regressions and two changelog lines.rewind-input-green.log; red/build/lint/format receipts arerewind-input-red.log,rewind-input-build.log,rewind-input-lint.log,rewind-input-format.login the phase1 session artifacts.901eb85a3a8c615ca6dbea9c754bedb3ccbd74e0:npm run test:unit— passed 3,116 tests in 133 suites (core 1,964; Functions 226; Azure Blob 39; Azure-managed 821; export-history 66). The 10 opt-in service tests are skipped in this unit command.npm run build— passed all five workspaces;npm run lint— passed. These are one aggregate final-head run, not per-intermediate-head reruns.901eb85a3a8c615ca6dbea9c754bedb3ccbd74e0— PENDING (in_progress) at2026-10-22T17:36:27.5984515Z. The live link is authoritative for later completion; no early pass is claimed.137bb547e8781fd84c2738c3e13ae0f65cd66174: 30 hosted checks SUCCESS, one inapplicable check SKIPPED, no failed/pending checks at the recorded read. REVIEW_REQUIRED persists; resolved threads are not approvals.Manual validation (only if runtime/behavior changed)
carryover-red.log,carryover-green-focused.log,preflight-red.log,preflight-green.log, andpreflight-full-core.log.Notes for reviewers
Latest review repair
137bb547e8781fd84c2738c3e13ae0f65cd66174adds rewind-history input to the existing payload field traversal, so hydration, externalization and whole-message UTF-8 preflight cover rewound input without changing its reason/metadata. Twelve permanent regressions accompany the one-line mapping repair.mainyunchuwang-payload-phase-1-coreyunchuwang-payload-phase-2-sdkyunchuwang-payload-phase-3-blobyunchuwang-payload-phase-4-clientyunchuwang-payload-phase-5-workerMerge 1 → 2 → 3 → 4 → 5 → 6. Each PR targets its predecessor; retarget the next PR only after its prerequisite merges. Do not publish packages or describe a partial phase as the complete feature. All reviewed phase1 repairs are now ancestors of the dependent phases.