.NET: Add checkpoint on super step started event: issue #4280#4604
Open
elgold92 wants to merge 17 commits intomicrosoft:mainfrom
Open
.NET: Add checkpoint on super step started event: issue #4280#4604elgold92 wants to merge 17 commits intomicrosoft:mainfrom
elgold92 wants to merge 17 commits intomicrosoft:mainfrom
Conversation
added 7 commits
March 9, 2026 16:53
…ely b/c the test definitions are now wrong
…c definition. I think this is correct, but the test now hangs, likely because the first checkpoint (or it's related data structures) we're now creating aren't initialized correctly.
…ShouldPersist_CheckpointedAsync test definition
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for creating/checkpointing workflow state at the SuperStepStarted boundary so runs can resume from “pre-delivery” checkpoints (addressing #4280), and updates tests accordingly.
Changes:
- Add a
CheckpointInfo?field toSuperStepStartInfoand populate it onSuperStepStartedEvent. - Create a checkpoint at the start of each superstep (capturing pre-delivery queued messages) by extending runner state export to accept an override
StepContext. - Update and expand unit tests to account for the additional checkpoints and validate parent chaining/resume behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InProcessStateTests.cs | Updates expected checkpoint count due to start+end checkpointing per superstep. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs | Extends tests to include checkpoints emitted on SuperStepStartedEvent and adds new resume/count assertions. |
| dotnet/src/Microsoft.Agents.AI.Workflows/SuperStepStartInfo.cs | Adds Checkpoint property to expose the checkpoint emitted at superstep start. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs | Allows exporting runner state from an alternate StepContext (pre-delivery snapshot). |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunner.cs | Saves a checkpoint before superstep execution and wires it into the started event. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcStepTracer.cs | Plumbs the start-checkpoint into SuperStepStartedEvent payload. |
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
…tParentTests.cs rename local variable Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread. Changes look to be generally minor improvements. |
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs
Show resolved
Hide resolved
…tParentTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Address issue #4280, allowing workflows to resume from checkpoints saved from SuperStepStarted events.
Description
Adds
CheckpointInfo?field to theSuperStepStartInfoclass, populating this information in the InProcessRunner and InProcStepTracer. Also updates associated unit tests to expect more checkpoints to be created on checkpointed workflows.