Repository navigation
[Async stack 0/6] Async orchestrator contract - #356
andystaples wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The documentation incorrectly implies synchronous commands are awaitable, which can cause a TypeError after scheduling an action; it should explicitly state that these commands must be called without await.
1 open issue
What changed in this PR
This documentation-only PR defines the async orchestrator contract for the core SDK, Azure Managed, and Azure Functions. It establishes behavior that later layers of the review-only stack will implement.
Changes:
- Describe coroutine authoring, cold operations, reusable handles, and Functions compatibility.
- Specify deterministic asyncio composition, cancellation, timeouts, and dispatch cleanup.
- Document replay migration constraints and Python-runtime compatibility limits.
| File | Description |
|---|---|
docs/supported-patterns.md |
Connects durable patterns to async authoring and clarifies root cancellation behavior. |
docs/features.md |
Introduces coroutine orchestrators alongside generator orchestrators. |
docs/async-orchestrators.md |
Defines the cross-package async contract and replay constraints. |
Review effort: Balanced
b420f99 to
73cac11
Compare
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…rnings Add motivation, goals, non-goals, and alternatives considered; document the orchestrator classification rule and that operation inputs are not copied; promote the unsupported asyncio.wait/as_completed, dispatch-teardown, and Python minor-version replay notes to callouts. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
bea1c8e to
54eb8f1
Compare
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Approved as the contract layer, not as a standalone merge. The distinction between starting work and waiting for it, and between dispatch cleanup and workflow cancellation, is useful. I'd ship the documented subset as preview across core, Managed, and Functions, and use representative history replay and a native Pydantic adapter sample as the bar for full support. The rollout note should make clear that versioning only protects existing histories when workers route them to a compatible runtime.
…ssification guidance Co-authored-by: Copilot App <[email protected]>
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Approved as the contract layer. The preview scope is clear across all three packages, and the upgrade guidance now explains how to keep in-flight histories on a compatible runtime.

Warning
Neither this PR nor any other PR in this stack should be merged on its own. The whole stack will be squash-merged once every PR in it is approved.
This is the contract-documentation layer (0/6) of a review-only stack that splits the closed #293. The APIs documented here are implemented in later layers; this PR changes documentation only. Later layers extend
docs/async-orchestrators.mdas they implement each area, and the final version of the contract is in #364.defthat copies an async function'sfunctools.wrapsmetadata stays synchronous).asyncio.wait/asyncio.as_completedare documented as unsupported), and migration and Python-runtime compatibility limits, including draining in-flight instances, or keeping them on workers pinned to the original Python minor version and dependencies, before upgrading (Document Python runtime compatibility and safe upgrade guidance for durable orchestrations #337). A version bump alone does not protect existing histories.Differences from #293
The stack adds 6,348 lines and removes 128, compared with 4,669 added and 99 removed in #293, so it adds roughly 1,650 more lines. Most of the difference is hardening:
durabletask/internal/asyncio_loop.py).Any-typed overload for async sub-orchestration calls withoutreturn_type.