durabletask-mssql
Copilot instructions106 starsChanged 3 years agoMITView on GitHub
This repository implements the Microsoft SQL Server and Azure SQL storage provider for the Durable Task Framework and Durable Functions. It contains: The provider persists orchestration and entity state, coordinates distributed workers, and supports multiple independently deployed applications sharing one database. Correctness, rolling-upgrade compatibility, and predictable SQL performance take priority over convenience. Published table-valued parameters are wire contracts for independently deployed apps sharing a database schema. Never change or recreate a published TVP in a minor or patch release, even…
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Run the core suite with dotnet test --no-build --filter Category!=Stress …
- Very specific: line 19
Run the Functions suite with dotnet test --no-build …
- Distinctive: line 21
Prefer the smallest targeted test first, then run the affected suite.
- Distinctive: line 22
Add regression tests for customer-reported failures and schema compatibility changes.
- Distinctive: line 26
Follow the existing C# style, nullable annotations, naming, and file organization.
- Distinctive: line 28
Keep changes focused and avoid unrelated refactoring.
- Distinctive: line 29
Use existing logging and retry helpers rather than adding broad catches or silent fallbacks.
- Distinctive: line 30
Keep synchronous data-reader loops where comments identify them as deliberate performance optimizations.
- Distinctive: line 31
Avoid adding database round trips, metadata queries, dynamic SQL, or per-operation schema checks to hot paths.
- Very specific: line 36
Never edit a published schema-x.y.z.sql migration.
- Distinctive: line 38
Use explicit column lists for inserts and projections.
- Distinctive: line 45
Follow the canonical database schema development rules for the rationale and maintenance procedure.
- Very specific: line 49
Update src/DurableTask.SqlServer/Scripts/README.md for schema-development rules and docs for deployment-visible behavior.
≈ “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
Repository scope and purpose
This repository implements the Microsoft SQL Server and Azure SQL storage provider for the Durable Task Framework and Durable Functions. It contains:
src/DurableTask.SqlServer: the core orchestration service, SQL client mappings, and embedded database scripts.src/DurableTask.SqlServer.AzureFunctions: the in-process Azure Functions provider integration.src/Functions.Worker.Extensions.DurableTask.SqlServer: the isolated-worker extension.test: integration, Azure Functions, and performance tests.docs: user-facing architecture, deployment, scaling, and multitenancy documentation.
The provider persists orchestration and entity state, coordinates distributed workers, and supports multiple independently deployed applications sharing one database. Correctness, rolling-upgrade compatibility, and predictable SQL performance take priority over convenience.
Build and test conventions
- Build with
dotnet build. - Run the core suite with
dotnet test --no-build --filter Category!=Stress test/DurableTask.SqlServer.Tests/DurableTask.SqlServer.Tests.csproj. - Run the Functions suite with
dotnet test --no-build test/DurableTask.SqlServer.AzureFunctions.Tests/DurableTask.SqlServer.AzureFunctions.Tests.csproj. - Integration tests require SQL Server. Locally they use
localhost; CI starts the container withtest/setup.ps1. - Prefer the smallest targeted test first, then run the affected suite.
- Add regression tests for customer-reported failures and schema compatibility changes.
Code conventions
- Follow the existing C# style, nullable annotations, naming, and file organization.
- Preserve
netstandard2.0compatibility in the core provider. - Keep changes focused and avoid unrelated refactoring.
- Use existing logging and retry helpers rather than adding broad catches or silent fallbacks.
- Keep synchronous data-reader loops where comments identify them as deliberate performance optimizations.
- Avoid adding database round trips, metadata queries, dynamic SQL, or per-operation schema checks to hot paths.
SQL schema conventions
- SQL scripts under
src/DurableTask.SqlServer/Scriptsare embedded in the provider assembly. - Never edit a published
schema-x.y.z.sqlmigration. Add a new idempotent migration for persistent schema changes. logic.sqlandpermissions.sqlare reapplied during schema initialization and upgrades.- Use explicit column lists for inserts and projections. New physical table columns must be nullable or have safe defaults so older clients continue to work.
- Preserve established transaction table-access order, locking hints, and indexes unless a measured and tested change requires otherwise.
Published TVPs are immutable compatibility contracts
Published table-valued parameters are wire contracts for independently deployed apps sharing a database schema. Never change or recreate a published TVP in a minor or patch release, even to add a nullable column. Prefer scalar parameters or a versioned TVP and procedure, retain old contracts during rolling upgrades, and keep version-specific compatibility test baselines frozen.
Follow the canonical database schema development rules for the rationale and maintenance procedure.
Documentation
Update src/DurableTask.SqlServer/Scripts/README.md for schema-development rules and docs for deployment-visible behavior. Call out rolling-upgrade or multitenancy implications whenever a database contract changes.
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.

