Skip to content

.NET: Fix issue with resuming checkpoint after package version upgrade#6670

Open
peibekwe wants to merge 2 commits into
mainfrom
peibekwe/durable-task-version-resume
Open

.NET: Fix issue with resuming checkpoint after package version upgrade#6670
peibekwe wants to merge 2 commits into
mainfrom
peibekwe/durable-task-version-resume

Conversation

@peibekwe

Copy link
Copy Markdown
Contributor

Motivation & Context

When you upgrade the Microsoft.Agents.AI.DurableTask package and redeploy, any saved workflow checkpoint from the previous version becomes unusable. The framework refuses to load it, even though nothing about the workflow actually changed; only the package's version number did.

Description & Review Guide

This ports the fix applied to core workflows in PR #6636 to DurableTask.

Fixes #6669

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

@peibekwe peibekwe self-assigned this Jun 22, 2026
Copilot AI review requested due to automatic review settings June 22, 2026 18:27
@moonbox3 moonbox3 added the .NET Usage: [Issues, PRs], Target: .Net label Jun 22, 2026
@github-actions github-actions Bot changed the title Fix issue with resuming checkpoint after package version upgrade .NET: Fix issue with resuming checkpoint after package version upgrade Jun 22, 2026

@github-actions github-actions Bot 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.

Automated Code Review

Reviewers: 5 | Confidence: 92% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by peibekwe's agents

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.

Pull request overview

Ports the workflows checkpoint-compatibility fix to the DurableTask implementation so persisted assembly-qualified type names (from checkpoints/custom status payloads) can be resolved after package upgrades where only assembly version/culture/PKT metadata changed.

Changes:

  • Add DurableTaskTypeResolver to normalize persisted type names and resolve them against loaded assemblies.
  • Use the resolver when deserializing streamed workflow events and when resolving executor input types.
  • Add unit tests covering mutated assembly versions (outer and generic-argument cases) and the streaming deserialization path.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dotnet/src/Microsoft.Agents.AI.DurableTask/Workflows/DurableTaskTypeResolver.cs New resolver that normalizes persisted assembly-qualified names and caches resolution.
dotnet/src/Microsoft.Agents.AI.DurableTask/Workflows/DurableStreamingWorkflowRun.cs Switch event type lookup to use the new resolver during stream parsing.
dotnet/src/Microsoft.Agents.AI.DurableTask/Workflows/DurableActivityExecutor.cs Use the resolver to match persisted input type names to supported executor input types across version changes.
dotnet/tests/Microsoft.Agents.AI.DurableTask.UnitTests/Workflows/DurableTaskTypeResolverTests.cs New tests validating type resolution across assembly metadata mutations.
dotnet/tests/Microsoft.Agents.AI.DurableTask.UnitTests/Workflows/DurableActivityExecutorResolveInputTypeTests.cs New tests validating input-type matching behavior across metadata mutations.
dotnet/tests/Microsoft.Agents.AI.DurableTask.UnitTests/Workflows/DurableStreamingWorkflowRunTests.cs New test validating mutated event type names still deserialize during WatchStreamAsync.

@moonbox3 moonbox3 added the documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs label Jun 23, 2026
@peibekwe peibekwe marked this pull request as ready for review June 23, 2026 21:44

@github-actions github-actions Bot 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.

Automated Code Review

Reviewers: 5 | Confidence: 93% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by peibekwe's agents

@peibekwe peibekwe requested a review from a team June 23, 2026 22:03
@kshyju kshyju self-requested a review June 24, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: [Bug]: DurableTask Workflow checkpoints are not restorable across SDK upgrades

5 participants