.NET: [BREAKING] Support Checkpoint Serialization (#735)

* feat: Support Checkpoint Serialization

* Implements serialization roundtripping for checkpoints.
* Adds support for JSON serialization
* Adds FileSystem-based checkpoint persistence

* fix: Executor State does not deserialize correctly

The StateManager was not properly handling delay-deserialized values.

* Fix PortableValue handling in StateManager (this makes it delegate to PortableValue the uwnrapping)
* Fix UnitTest to actually test checkpoint serialization
* Additional review comment fixes

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
This commit is contained in:
Jacob Alber
2025-09-17 15:57:19 -04:00
committed by GitHub
Unverified
parent 2a04c4197e
commit 2015f0dc09
90 changed files with 3011 additions and 341 deletions
@@ -53,7 +53,7 @@ internal sealed class Program
// Run the workflow, just like any other workflow
string input = this.GetWorkflowInput();
CheckpointManager checkpointManager = new();
CheckpointManager checkpointManager = CheckpointManager.Default;
Checkpointed<StreamingRun> run = await InProcessExecution.StreamAsync(workflow, input, checkpointManager);
bool isComplete = false;
@@ -151,7 +151,7 @@ internal sealed class Program
Debug.WriteLine($"ACTION EXIT #{actionComplete.ActionId} [{actionComplete.ActionType}]");
break;
case ExecutorFailureEvent executorFailure:
case ExecutorFailedEvent executorFailure:
Debug.WriteLine($"STEP ERROR #{executorFailure.ExecutorId}: {executorFailure.Data?.Message ?? "Unknown"}");
break;
@@ -256,7 +256,7 @@ internal sealed class Program
}
private static InputResponse HandleExternalRequest(ExternalRequest request)
{
InputRequest? message = request.Data as InputRequest;
InputRequest? message = request.Data.As<InputRequest>();
string? userInput = null;
do
{