Skip to content

add durable task scheduler support and runtime parity - #158

Merged
Tomer Rosenthal (torosent) merged 28 commits into
microsoft:mainfrom
torosent:torosent-pr-commit-cleanup
Sep 14, 2026
Merged

Tomer Rosenthal (torosent) merged 28 commits into
microsoft:mainfrom
torosent:torosent-pr-commit-cleanup

Conversation

@torosent

@torosent Tomer Rosenthal (torosent) commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Enable Go applications to run orchestrations, activities, and durable entities on Azure Durable Task Scheduler without hosting a task-hub engine. Includes resilient DTS client/worker connections, deterministic runtime improvements, and supporting tooling and samples. #156

Compatibility

Breaking: DTS becomes the only supported runtime. Embedded SQLite/PostgreSQL backends and the standalone gRPC host are removed; consumers must migrate to durabletaskscheduler.NewClient and durabletaskscheduler.NewWorker.

Testing

SDK, analyzer, and distributed-tracing module tests pass locally. Emulator-backed integration coverage remains required in CI.

Consolidate the fork's DTS SDK work onto canonical upstream history, excluding rewritten copies of upstream commits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@torosent
Tomer Rosenthal (torosent) marked this pull request as ready for review September 9, 2026 16:57
Copilot AI balanced review requested due to automatic review settings September 9, 2026 16:57
@torosent Tomer Rosenthal (torosent) added the go Pull requests that update go code label Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Durable selection can cross orchestration boundaries, and the new analyzer and external-event sample contain behavior-affecting defects.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

New issues introduced by this change (4)
Severity Finding
High severity task/​select.go — Select never verifies that a task/event case belongs to this orchestration. A case retained from…
Medium severity cmd/​orchestratorvet/​analysis/​orchestratorgo/​reach.go — This walk descends into every function literal, including closures that are only defined and never…
Medium severity samples/​externalevents/​externalevents.go — Errors in this goroutine are only logged, after which the main path keeps waiting for an event that…
Low severity task/​eventchannel.go — For EventChannel[any], the zero value has no dynamic type, so reflect.TypeOf(value) is nil and…
What changed in this PR

Adds Durable Task Scheduler as the sole runtime, expands deterministic orchestration capabilities, and introduces supporting observability, payload, history-export, analyzer, test, and sample infrastructure.

Changes:

  • Adds DTS client/worker integration and removes embedded backends.
  • Expands orchestration runtime features, entities, retries, tracing, payloads, and history handling.
  • Adds analyzer tooling, tests, and DTS-based samples.
File Description
vendored/​durabletask-protobuf/​update-proto.sh Updates proto retrieval headers.
vendored/​durabletask-protobuf/​PROTO_SOURCE_COMMIT_HASH Updates proto provenance.
tests/​tracingtree/​tracingtree.go Adds tracing test utilities.
tests/​taskhub_test.go Removes legacy worker tests.
tests/​task_executor_test.go Updates executor calls.
tests/​shared_test.go Documents shared tests.
tests/​mocks/​TaskWorker.go Removes legacy mock.
tests/​mocks/​task.go Removes backend test helper.
tests/​metadata_test.go Tests public failure details.
tests/​failurechain/​failurechain.go Adds failure-chain assertions.
task/​waitgroup.go Adds deterministic wait groups.
task/​task_completion_test.go Tests terminal task behavior.
task/​select.go Adds durable selection primitives.
task/​retry.go Adds retry metrics reporting.
task/​retry_observability_test.go Tests retry observability.
task/​registry_test.go Tests versioned registration.
task/​orchestrator_test.go Updates retry tests.
task/​metrics.go Defines runtime metric hooks.
task/​history.go Adds history and timer policies.
task/​executor_contract.go Defines worker executor contracts.
task/​eventchannel.go Adds durable event channels.
task/​entity_parameters_test.go Tests entity capability gating.
task/​doc.go Documents the task package.
task/​coroutine.go Adds deterministic coroutines.
task/​context.go Adds task context and logging support.
task/​cancel.go Adds cancellation scopes.
samples/​sequence/​sequence.go Removes SQLite sequence sample.
samples/​retries/​retries.go Migrates retries sample to DTS.
samples/​internal/​dtssample/​dtssample.go Centralizes DTS sample setup.
samples/​externalevents/​externalevents.go Migrates external-events sample.
samples/​distributedtracing/​go.mod Adds tracing sample module.
samples/​azurefunctions/​SayHello/​function.json Removes legacy function binding.
samples/​azurefunctions/​main.go Removes Azure Functions sample.
samples/​azurefunctions/​local.settings.json Removes legacy settings.
samples/​azurefunctions/​host.json Removes legacy host configuration.
samples/​azurefunctions/​HelloCities/​function.json Removes orchestration binding.
samples/​azurefunctions/​extensions.csproj Removes extension project.
samples/​azurefunctions/​demo.http Removes legacy request sample.
samples/​azurefunctions/​.gitignore Removes obsolete ignores.
payload/​testdata/​blob_tokens.json Adds blob-token fixtures.
payload/​store_test.go Tests payload stores.
payload/​memory.go Adds in-memory payload storage.
payload/​doc.go Documents payload storage.
main.go Removes standalone host.
internal/​tagcodec/​tags.go Adds context/tag encoding.
internal/​historyconv/​query.go Adds history query normalization.
internal/​helpers/​worker.go Adds reject-all filter sentinel.
internal/​helpers/​tracing_test.go Tests trace-context generation.
internal/​helpers/​entity.go Adds entity wire helpers.
internal/​helpers/​entity_ids.go Adds entity ID validation.
internal/​helpers/​casing.go Adds invariant casing.
internal/​helpers/​casing_test.go Tests invariant casing.
internal/​grpcerrors/​reasons.go Adds structured gRPC reasons.
internal/​contextprop/​tags.go Adds context propagation encoding.
internal/​contextprop/​tags_test.go Tests propagated tags.
go.mod Updates Go and dependencies.
exporthistory/​registration.go Registers export system tasks.
exporthistory/​doc.go Documents preview history export.
durabletaskscheduler/​worker.go Adds DTS worker construction.
durabletaskscheduler/​client.go Adds resilient DTS client.
Dockerfile Removes standalone-host image.
cmd/​orchestratorvet/​main.go Adds analyzer command.
cmd/​orchestratorvet/​go.sum Locks analyzer dependencies.
cmd/​orchestratorvet/​go.mod Defines analyzer module.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​wallclock/​wallclock.go Adds wall-clock fixtures.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesunresolved/​tasknamesunresolved.go Adds unresolved-registry fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamestuplefactory/​tasknamestuplefactory.go Adds tuple-factory fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesparameter/​tasknamesparameter.go Adds registry-parameter fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesmethodvalue/​tasknamesmethodvalue.go Adds method-value fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesinterface/​tasknamesinterface.go Adds interface-escape fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesglobal/​tasknamesglobal.go Adds global-registry fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesexternal/​tasknamesexternal.go Adds external-registration fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesdynamic/​tasknamesdynamic.go Adds dynamic-registration fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknamesalias/​tasknamesalias.go Adds registry-alias fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​tasknames/​tasknames.go Adds task-name diagnostics.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​loops/​loops.go Adds loop-analysis fixtures.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​logging/​logging.go Adds logging diagnostics.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​github.com/​google/​uuid/​uuid.go Adds UUID test stub.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​github.com/​example/​registrationhelpers/​registrationhelpers.go Adds registration helper stub.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesstandalonealias/​fixesstandalonealias.go.golden Adds alias-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesstandalonealias/​fixesstandalonealias.go Adds alias-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesstandalone/​fixesstandalone.go.golden Adds standalone-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesstandalone/​fixesstandalone.go Adds standalone-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixespartial/​fixespartial.go.golden Adds partial-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixespartial/​fixespartial.go Adds partial-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesinline/​fixesinline.go.golden Adds inline-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesinline/​fixesinline.go Adds inline-import fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesimport/​fixesimport.go.golden Adds import-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesimport/​fixesimport.go Adds import-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesbatchstandalone/​fixesbatchstandalone.go.golden Adds batched-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesbatchstandalone/​fixesbatchstandalone.go Adds batched-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesbatchalias/​fixesbatchalias.go.golden Adds aliased batch expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesbatchalias/​fixesbatchalias.go Adds aliased batch input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesbatch/​fixesbatch.go.golden Adds batch-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixesbatch/​fixesbatch.go Adds batch-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixes/​fixes.go.golden Adds general fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixes/​fixes.go Adds general fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixbindings/​fixbindings.go.golden Adds binding-fix expectation.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixbindings/​fixbindings.go Adds binding-fix input.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​fixbindings/​fixbindings_test.go Tests binding safety.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​externalio/​externalio.go Adds external-I/O diagnostics.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​crosspackage/​crosspackage.go Adds cross-package fixture.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​testdata/​src/​callgraph/​callgraph.go Adds call-graph fixtures.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​reach.go Implements analyzer reachability.
cmd/​orchestratorvet/​analysis/​orchestratorgo/​analyzer.go Defines analyzer behavior.
client/​workitem.go Adds delayed-abandon contract.
client/​grpc_worker_compat.go Preserves listener compatibility APIs.
client/​grpc_errors.go Maps structured gRPC errors.
client/​grpc_errors_test.go Tests gRPC error mapping.
client/​errors.go Adds client sentinel errors.
client/​entity_batch.go Converts DTS entity requests.
client/​doc.go Documents client package.
client/​client_grpc_wait_test.go Tests missing-instance waits.
client/​client_grpc_test.go Tests version and reuse behavior.
backend/​workitem.go Removes backend work items.
backend/​taskhub.go Removes embedded task-hub worker.
backend/​sqlite/​schema.sql Removes SQLite schema.
backend/​postgres/​schema.sql Removes PostgreSQL schema.
backend/​postgres/​README.md Removes PostgreSQL instructions.
backend/​activity.go Removes backend activity worker.
api/​management_test.go Tests tags and payload options.
api/​logger.go Moves logging API into api.
api/​logger_test.go Tests logger implementations.
api/​history_test.go Tests history APIs.
api/​failure_test.go Tests failure helpers.
api/​entity_test.go Tests entity IDs and metadata.
api/​doc.go Documents public API package.
api/​converter.go Adds configurable data conversion.
api/​converter_test.go Tests converter integration.
api/​context.go Adds propagated context metadata.
api/​context_test.go Tests reserved context fields.
.vscode/​settings.json Updates coverage packages.
.vscode/​launch.json Removes standalone launch target.
.golangci.yml Removes deleted mocks exclusion.
.gitignore Updates generated-output ignores.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread task/select.go
Comment thread cmd/orchestratorvet/analysis/orchestratorgo/reach.go Outdated
Comment thread samples/externalevents/externalevents.go Outdated
Comment thread task/eventchannel.go Outdated
Apply the 14 approved complexity cuts while preserving replay, wire formats, credential errors, and export retry behavior. Add focused equivalence coverage for failure properties and schedule JSON.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 9, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Payload integrity validation, analyzer reachability, and external-event sample failure handling have unresolved correctness issues.

Review tier: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Pre-existing issues (4)
Severity Finding
High severity task/​select.go — Select never verifies that a task/event case belongs to this orchestration. A case retained from… View comment
Medium severity samples/​externalevents/​externalevents.go — Errors in this goroutine are only logged, after which the main path keeps waiting for an event that… View comment
Medium severity cmd/​orchestratorvet/​analysis/​orchestratorgo/​reach.go — This walk descends into every function literal, including closures that are only defined and never… View comment
Low severity task/​eventchannel.go — For EventChannel[any], the zero value has no dynamic type, so reflect.TypeOf(value) is nil and… View comment
Suppressed comments (1)

cmd/orchestratorvet/analysis/orchestratorgo/reach.go:69

  • This walk descends into every nested function literal, even when the literal is only assigned and never invoked. That makes the analyzer report replay hazards in unreachable closure bodies, contradicting its proof-only contract; skip nested literals during the enclosing walk and add them only when call resolution (including known ctx.Go callbacks) proves they execute.

Reject foreign Select cases before observing their state, preserve generic event type names, skip uninvoked closures during replay analysis, and propagate asynchronous sample failures without changing its timeouts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 9, 2026 19:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

History export can multiply large buffered payloads in memory across concurrent activities and exhaust the worker process.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity

New issues introduced by this change (1)
Severity Finding
High severity exporthistory/​activities.go — This path buffers each history as event objects, an uncompressed JSONL string, and a compressed…
Issues resolved since last review (4)
Severity Finding
Low severity task/​eventchannel.go — For EventChannel[any], the zero value has no dynamic type, so reflect.TypeOf(value) is nil and… View resolved comment
Medium severity samples/​externalevents/​externalevents.go — Errors in this goroutine are only logged, after which the main path keeps waiting for an event that… View resolved comment
Medium severity cmd/​orchestratorvet/​analysis/​orchestratorgo/​reach.go — This walk descends into every function literal, including closures that are only defined and never… View resolved comment
High severity task/​select.go — Select never verifies that a task/event case belongs to this orchestration. A case retained from… View resolved comment

Comment thread exporthistory/activities.go Outdated

@halspang halspang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Six findings from the SDK rewrite review: four P1 issues affecting entity locking, replay correctness, and large-payload carryover, plus two P2 issues affecting versioned routing and history exports. Details and suggested fixes are attached inline.

Comment thread task/orchestrator.go
Comment thread task/orchestrator.go Outdated
Comment thread task/orchestrator.go
Comment thread internal/largepayload/codec.go Outdated
Comment thread client/grpc_worker.go
Comment thread exporthistory/activities.go
Remove rewind, skip-graceful termination, and SDK task-hub create/delete operations and their options, dead tests, and documentation claims. Preserve restart, purge, entity maintenance, connection errors, and the vendored protocol contract.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 10, 2026 00:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The filesystem payload resolver does not verify that resolved bytes match their SHA-256 reference, allowing corrupted data to be returned silently.

Review tier: Balanced
Findings: 1 High severity

Pre-existing issues (1)
Severity Finding
High severity exporthistory/​activities.go — This path buffers each history as event objects, an uncompressed JSONL string, and a compressed… View comment

Preserve DTS-provided W3C trace parents on ActivityContext without emitting duplicate durable spans. The real OTLP sample exposed this missing context boundary; add regression coverage for remote IDs, tracestate, values, and deadlines.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 10, 2026 02:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

File payload integrity is not verified, and continuous exports repeatedly inflate progress counters for an unchanged terminal page.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 2 High severity

New issues introduced by this change (1)
Severity Finding
High severity exporthistory/​orchestrations.go — For a continuous job, the terminal page has no NextCheckpoint, so the preserved cursor causes…
Pre-existing issues (1)
Severity Finding
High severity exporthistory/​activities.go — This path buffers each history as event objects, an uncompressed JSONL string, and a compressed… View comment

Comment thread exporthistory/orchestrations.go
Demonstrate typed activity sequences, aggregation, durable coroutines, timers, and external events with owned-resource cleanup and observable outcomes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add executable scenarios for child workflows, continuation and turn budgets, lifecycle management, schedules, versions, entities, conversion, history, observability, and worker drain/restart.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cover real blob storage, continuous history export, correlated OTLP traces, replay analysis, Azure identity, and isolated maintenance. Add a 22-family catalogue and a process-level runner with explicit service requirements and CI groups.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Check blob properties for the storage compression setting while accepting transport-decompressed downloads. Cover both compressed response forms and reject incorrect stored encoding.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove execution groups and special Azure/admin connection routing. Run examples with their normal environment and select E2E subtests with Go flags; keep per-sample prerequisite and safety checks. Simplify CI to one isolated service setup and update the sample index.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve history limits and execution identity while encoding incrementally, commit bounded Azure blocks only after clean source completion, encode identifier metadata reversibly, and update export consumers. Document Python-compatible processing counters rather than promising distinct-execution totals.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 10, 2026 22:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Current-or-older workers advertise versions they subsequently reject, which can misroute newer work.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 4 High severity

New issues introduced by this change (1)
Severity Finding
High severity client/​grpc_worker.go — Make CurrentOrOlder filters match executor acceptance
Pre-existing issues (3)
Severity Finding
High severity task/​coroutine.go — Do not run a coroutine after its scope was canceled View comment
High severity task/​rewind.go — Validate the required orchestrator-started rewind event View comment
High severity durabletaskscheduler/​client.go — Do not retry non-idempotent management RPCs globally View comment
Issues resolved since last review (2)
Severity Finding
High severity exporthistory/​orchestrations.go — For a continuous job, the terminal page has no NextCheckpoint, so the preserved cursor causes… View resolved comment
High severity exporthistory/​activities.go — This path buffers each history as event objects, an uncompressed JSONL string, and a compressed… View resolved comment

Comment thread client/grpc_worker.go
Restrict UNAVAILABLE retries to read-only RPCs and Hello, reject malformed rewind envelopes, and skip callbacks canceled before their first resume. Cover accepted-event acknowledgement loss with real gRPC and canceled coroutine replay through DTS.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 10, 2026 22:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The broad runtime replacement and remaining emulator-backed CI requirement warrant final human validation.

Review tier: Balanced
Findings: 1 High severity

Pre-existing issues (1)
Severity Finding
High severity client/​grpc_worker.go — Make CurrentOrOlder filters match executor acceptance View comment
Issues resolved since last review (3)
Severity Finding
High severity task/​coroutine.go — Do not run a coroutine after its scope was canceled View resolved comment
High severity task/​rewind.go — Validate the required orchestrator-started rewind event View resolved comment
High severity durabletaskscheduler/​client.go — Do not retry non-idempotent management RPCs globally View resolved comment

Share runtime version comparison with route generation, exclude future versions without wildcard fallthrough, and preserve compatible current/default legacy fallback. Reject unrepresentable automatic wildcard routes and verify older workers never abandon newer work on DTS.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 10, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Numeric version overflow can misroute incompatible work under CurrentOrOlder.

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
Severity Finding
High severity client/​grpc_worker.go — Make CurrentOrOlder filters match executor acceptance View resolved comment

@halspang halspang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review of the SDK changes and expanded sample catalogue. Five of the six earlier findings are fixed; cross-SDK lock ordering remains an explicitly documented limitation. All 21 emulator-compatible sample programs passed locally against isolated DTS, Azurite, and an OTLP collector. The six remaining P2 findings below concern rewind correctness and sample delay/failure/cleanup paths.

Comment thread task/rewind.go
Comment thread samples/scheduledtasks/scheduledtasks.go
Comment thread samples/entity/entity.go
Comment thread samples/largepayloads/largepayloads.go Outdated
Comment thread samples/worker/worker.go
Comment thread samples/timers/timers.go Outdated
Reject additional durable events after an operation failure instead of removing handled failures required by retained work. Preserve the existing protocol for supported histories, surface worker rejection, and cover rewrite-to-replay plus unchanged rejected history on DTS.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retain and confirm schedule creation before deletion, preserve worker lifetime for entity cleanup, drain before deleting payload storage, and bound Run cleanup while preserving errors. Validate logical timer deadlines rather than a fixed physical chunk count; add focused protocol failure and delay regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 14, 2026 16:22
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Numeric version comparison currently varies by target architecture and can misroute CurrentOrOlder work.

Review tier: Balanced
Findings: None

Copilot AI review requested due to automatic review settings September 14, 2026 16:33
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Entity response routing and public context validation contain unresolved correctness issues.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced
Findings: 1 High severity

Open findings (1)
Previously missed findings (1)

In code that hasn't changed since last review

Medium severity Reject empty root context-field keys

api/​orchestration.go:184

This root option accepts an empty key and serializes it as __durabletask.context.field., while sub-orchestration context fields reject empty keys via task/orchestrator.go:203-219 and schedule fields use the same restriction. Reject the empty key here as well so the public context-field APIs have one wire contract.

Comment thread client/entity_batch.go
Copilot AI review requested due to automatic review settings September 14, 2026 16:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The analyzer misses replay-unsafe code inside retry policy handlers, allowing nondeterministic retry decisions to pass validation.

Review tier: Balanced
Findings: None

Resolved findings (1)
Previously missed findings (1)

In code that hasn't changed since last review

Medium severity Analyze retry policy callbacks as reachable orchestration code

cmd/​orchestratorvet/​analysis/​orchestratorgo/​reach.go:47

The reachability model only adds ordinary callees and OrchestrationContext.Go callbacks. A function literal assigned to RetryPolicy.Handle inside a registered orchestrator is therefore skipped, even though the runtime invokes that handler from computeNextDelay during replay. Replay-unsafe code such as time.Now() in the handler receives no diagnostic and can change the retry decision across replays. Model this known callback path and add a regression fixture.

@torosent
Tomer Rosenthal (torosent) merged commit 0ab6dff into microsoft:main Sep 14, 2026
4 checks passed
@torosent
Tomer Rosenthal (torosent) deleted the torosent-pr-commit-cleanup branch September 14, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants