durabletask-python
Copilot instructions40 starsChanged 4 months agoMITView on GitHub
This repository provides the Durable Task Python SDK and Azure Functions provider implementations for building durable orchestrations. It contains three packages: - durabletask — core SDK (in durabletask/) - durabletask.azuremanaged — Azure Durable Task Scheduler provider (in durabletask-azuremanaged/) - azure-functions-durable — Azure Durable Functions provider (in azure-functions-durable/) - ALWAYS document user-facing changes in the applicable changelog under ## Unreleased. Create that section if the changelog does not yet have one. - Update CHANGELOG.md for core SDK changes, durabletask-azuremanaged/CHANGELOG.md for Durable…
- Installs packages
In this repository2 other files it gives its agents.
- release-prepSkill
- update-protobufSkill
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
25 rules. About 0 are common, 11 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
ALWAYS document user-facing changes in the applicable changelog under ## Unreleased.
- Very specific: line 18
Update CHANGELOG.md for core SDK changes, durabletask-azuremanaged/CHANGELOG.md for Durable Task Scheduler provider changes, and …
- Distinctive: line 22
If a change affects multiple packages, update each affected package's changelog.
- Distinctive: line 27
Do NOT document internal-only changes in changelogs, including CI/workflow updates, test-only changes, refactors with no user-visible …
- Distinctive: line 30
When in doubt, write the changelog entry in terms of user impact (what users can now do or what behavior changed), not implementation …
- Very specific: line 35
Use the current unindented changelog style: category labels such as ADDED, CHANGED, and FIXED are plain, unindented lines, and wrapped …
- Distinctive: line 47
Use type hints for all public API signatures.
- Very specific: line 49
Use autopep8 for Python formatting.
- Distinctive: line 53
Treat adding an abstract method or property to a public ABC as a breaking change because existing third-party subclasses will fail at …
- Very specific: line 55
Do not add new abstract members outside a major release.
- Very specific: line 59
Add a regression test that confirms a new concrete API is absent from the public ABC's __abstractmethods__.
- Very specific: line 64
Every new Python (.py) source file MUST begin with the following copyright header as the first two lines, followed by a blank line before …
- Very specific: line 79
Before linting, check for and fix any Pylance errors in the files you changed.
- Distinctive: line 101
Use GitHub-style callouts for notes, warnings, and tips in Markdown files:
- Very specific: line 114
Do not use bold-text callouts like NOTE: or > Note:.
- Distinctive: line 116
When providing shell commands in Markdown, include both Bash and PowerShell examples if the syntax differs between them.
- Very specific: line 149
Use the repository-root .venv for core and Azure Managed development, and for Azure Functions Durable linting, type checking, and unit …
- Distinctive: line 159
Run the applicable unit tests with pytest.
- Distinctive: line 168
Run Azure Functions Durable E2E tests through Nox, not directly from the root virtual environment.
- Very specific: line 179
After the first successful run, use nox -R -s functions_e2e for E2E reruns.
- Distinctive: line 221
Check whether the azuremanaged worker, client, or tests override or depend on the code you changed.
- Distinctive: line 223
Run the azuremanaged unit tests if they exist for the affected area.
- Very specific: line 224
If a new public API is added to the core SDK (e.g.
- Very specific: line 233
When a core durabletask API is consumed by durabletask.azuremanaged or azure-functions-durable, do not update package versions or …
- Very specific: line 237
Create a dedicated release PR after the core package has been released.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions for durabletask-python
Project Overview
This repository provides the Durable Task Python SDK and Azure Functions provider implementations for building durable orchestrations. It contains three packages:
durabletask— core SDK (indurabletask/)durabletask.azuremanaged— Azure Durable Task Scheduler provider (indurabletask-azuremanaged/)azure-functions-durable— Azure Durable Functions provider (inazure-functions-durable/)
Changelog Requirements
- ALWAYS document user-facing changes in the applicable changelog under
## Unreleased. Create that section if the changelog does not yet have one. - Update
CHANGELOG.mdfor core SDK changes,durabletask-azuremanaged/CHANGELOG.mdfor Durable Task Scheduler provider changes, andazure-functions-durable/CHANGELOG.mdfor Azure Functions provider changes. - If a change affects multiple packages, update each affected package's changelog.
- Include changelog entries for externally observable outcomes only, such as new public APIs, behavior changes, bug fixes users can notice, breaking changes, and new configuration capabilities.
- Do NOT document internal-only changes in changelogs, including CI/workflow updates, test-only changes, refactors with no user-visible behavior change, and implementation details that do not affect public behavior or API.
- When in doubt, write the changelog entry in terms of user impact (what users can now do or what behavior changed), not implementation mechanism (how it was implemented internally).
- Changelogs are not covered by the CI Markdown lint step. Review changes to them manually.
- Use the current unindented changelog style: category labels such as
ADDED,CHANGED, andFIXEDare plain, unindented lines, and wrapped entry text remains unindented rather than being aligned beneath the bullet.
Examples:
- Include: "Added
get_orchestration_history()to retrieve orchestration history from the client." - Exclude: "Added internal helper functions to aggregate streamed history chunks."
Language and Style
- Python 3.10+ is required.
- Use type hints for all public API signatures.
- Follow PEP 8 conventions.
- Use
autopep8for Python formatting.
Public API Compatibility
- Treat adding an abstract method or property to a public ABC as a breaking change because existing third-party subclasses will fail at instantiation.
- Do not add new abstract members outside a major release. For additive APIs in
non-major releases, provide a concrete default implementation that preserves
existing subclass instantiation and raises
NotImplementedErroronly when the new API is invoked. - Add a regression test that confirms a new concrete API is absent from the
public ABC's
__abstractmethods__.
Copyright Headers
Every new Python (.py) source file MUST begin with the following copyright
header as the first two lines, followed by a blank line before any code,
docstring, or imports:
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.This applies to all hand-written Python files, including __init__.py files,
tests, and examples. The only exceptions are auto-generated protobuf files
(*_pb2.py and *_pb2_grpc.py), which carry their own generated header.
Python Type Checking
Before linting, check for and fix any Pylance errors in the files you
changed. Use the editor's diagnostics (or the get_errors tool) to
identify type errors and resolve them first — type safety takes
priority over style.
Python Linting
This repository uses flake8 for Python linting. Run it after making changes to verify there are no issues. Lint package source and its tests separately, matching CI:
python -m flake8 durabletask
python -m flake8 tests/durabletask
python -m flake8 durabletask-azuremanaged
python -m flake8 tests/durabletask-azuremanaged
python -m flake8 azure-functions-durable
python -m flake8 tests/azure-functions-durableMarkdown Style
Use GitHub-style callouts for notes, warnings, and tips in Markdown files:
> [!NOTE]
> This is a note.
> [!WARNING]
> This is a warning.
> [!TIP]
> This is a tip.Do not use bold-text callouts like **NOTE:** or > **Note:**.
When providing shell commands in Markdown, include both Bash and
PowerShell examples if the syntax differs between them. Common cases
include multiline commands (Bash uses \ for line continuation while
PowerShell uses a backtick `), environment variable syntax, and
path separators. If a command is identical in both shells, a single
example is sufficient.
Markdown Linting
This repository uses pymarkdownlnt
for linting Markdown files. Configuration is in .pymarkdown.json at the
repository root.
To lint a single file:
python -m pymarkdown -c .pymarkdown.json scan path/to/file.mdTo lint all Markdown files in the repository:
python -m pymarkdown -c .pymarkdown.json scan **/*.mdInstall the linter via the dev dependencies:
python -m pip install -r dev-requirements.txtBuilding and Testing
Use the repository-root .venv for core and Azure Managed development, and
for Azure Functions Durable linting, type checking, and unit tests. The Azure
Functions Durable package requires Python 3.13+, so use a 3.13+ root virtual
environment for that work. Install packages locally in editable mode:
python -m pip install -e . -e ./durabletask-azuremanaged \
-e ./azure-functions-durableRun the applicable unit tests with pytest. Azure Functions Durable unit tests exclude tests that require an Azure Functions host or external services:
python -m pytest
python -m pytest tests/azure-functions-durable \
-m "not dts and not azurite and not functions_e2e"Run Azure Functions Durable E2E tests through Nox, not directly from the root
virtual environment. Nox creates an isolated Python 3.13 session environment,
installs the local packages editable, and links it into each sample Function
app so the Functions worker loads the app's grpc/protobuf dependencies. The
suite requires Azure Functions Core Tools (func) on PATH and a running
Azurite instance with blob storage on port 10000:
nox -s functions_e2eAfter the first successful run, use nox -R -s functions_e2e for E2E reruns.
-R reuses the Nox environment and skips reinstalls; because the packages are
editable, source changes are still picked up. Pass pytest selectors after --,
for example nox -R -s functions_e2e -- -k "dtask_client". Do not manually
activate or modify the per-app .venv directories created by Nox.
Project Structure
durabletask/— core SDK sourcepayload/— public payload externalization API (PayloadStoreABC,LargePayloadStorageOptions, helper functions)extensions/azure_blob_payloads/— Azure Blob Storage payload store (installed viapip install durabletask[azure-blob-payloads])entities/— durable entity supporttesting/— in-memory backend for testing without a sidecarinternal/— protobuf definitions, gRPC helpers, tracing (not public API)
durabletask-azuremanaged/— Azure managed provider sourceazure-functions-durable/— Azure Durable Functions provider sourceexamples/— example orchestrations (seeexamples/README.md)tests/— test suitedev-requirements.txt— development dependencies
External Dependencies
The Azure Functions Durable provider integrates with APIs and runtime behavior owned by these repositories. Consult their current source when changing decorators, bindings, converters, or worker integration behavior:
- Azure Functions Python library — application, decorator, and binding APIs.
- Azure Functions Python worker — function loading, binding conversion, dependency isolation, and invocation behavior.
Cross-Package Compatibility
The durabletask-azuremanaged package extends the core durabletask
package (e.g. DurableTaskSchedulerWorker subclasses
TaskHubGrpcWorker). When adding or changing features in
durabletask/, always verify that durabletask-azuremanaged still
works correctly:
- Check whether the azuremanaged worker, client, or tests override or depend on the code you changed.
- Run the azuremanaged unit tests if they exist for the affected area.
- If a new public API is added to the core SDK (e.g. a method on
OrchestrationContext), confirm it is accessible through the azuremanaged package and add a test or example if appropriate.
Release Coordination
- Package versions and inter-package minimum dependencies record the latest released compatibility contract. They are not an instruction to bump versions in a feature PR.
- When a core
durabletaskAPI is consumed bydurabletask.azuremanagedorazure-functions-durable, do not update package versions or dependency minimums in the feature PR. Document the affected package changelogs and release coordination instead. - Create a dedicated release PR after the core package has been released. The
pipeline will publish
durabletaskfirst, so bump all dependency minimums, package versions, and release notes together so resolvers cannot select a provider release with an incompatible older core package.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

