Uh oh!
There was an error while loading. Please reload this page.
.NET: [BREAKING] Workflows API Review Naming Changes (Part 1?) - #4090
Conversation
fc41dd3 to
c0cef4aComparec0cef4a to
f6a842bCompareUh oh!
There was an error while loading. Please reload this page.
f6a842b to
7b451aaCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
This PR applies API-review-driven naming changes across the .NET Workflows surface to better distinguish sessions vs runs, normalize naming with single-agent APIs, and clarify Fan-In semantics.
Changes:
- Renames workflow execution identifiers from
RunIdtoSessionIdacross runtime, checkpointing, tests, and samples. - Renames streaming entry points to
OpenStreamingAsync/RunStreamingAsync/ResumeStreamingAsyncand updates call sites. - Renames fan-in workflow edges to
AddFanInBarrierEdgeand updates usages in tests/samples/builders.
Reviewed changes
Copilot reviewed 63 out of 63 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/WorkflowVisualizerTests.cs | Updates visualization tests to use AddFanInBarrierEdge. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/TestRequestAgent.cs | Updates request payload extraction to TryGetDataAs. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/13_Subworkflow_Checkpointing.cs | Updates streaming run/resume method names. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/09_Subworkflow_ExternalRequest.cs | Updates PortableValue/TryGetDataAs usage for external request handling. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/06_GroupChat_Workflow.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/05_Simple_Workflow_Checkpointing.cs | Updates checkpointing sample to new streaming/resume APIs and SessionId. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/04_Simple_Workflow_ExternalRequest.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/03_Simple_Workflow_Loop.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/02_Simple_Workflow_Condition.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/01_Simple_Workflow_Sequential.cs | Updates streaming execution call to RunStreamingAsync and removes outdated TODO. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RepresentationTests.cs | Updates executor binding factory argument to sessionId. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InMemoryJsonStore.cs | Updates checkpoint store test helper types/parameters to Session*. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs | Updates checkpoint-parent tests to RunStreamingAsync/ResumeStreamingAsync and SessionId. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AgentWorkflowBuilderTests.cs | Updates workflow execution to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.cs | Updates Cosmos checkpoint tests to sessionId and /sessionId partition key. |
| dotnet/src/Shared/Workflows/Execution/WorkflowRunner.cs | Switches external request extraction to TryGetDataAs. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs | Renames session identifier to SessionId and updates streaming/resume calls. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowHostAgent.cs | Renames assigned ID tracking to session terminology. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowBuilder.cs | Introduces AddFanInBarrierEdge and updates fan-in API naming. |
| dotnet/src/Microsoft.Agents.AI.Workflows/SwitchBuilder.cs | Renames fan-out selector local function for clarity. |
| dotnet/src/Microsoft.Agents.AI.Workflows/SubworkflowBinding.cs | Updates executor factory parameter name to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/StreamingRun.cs | Exposes SessionId on StreamingRun. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/WorkflowHostExecutor.cs | Updates internal state and checkpoint interactions to use sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Run.cs | Exposes SessionId on Run. |
| dotnet/src/Microsoft.Agents.AI.Workflows/RouteBuilder.cs | Updates typed-response extraction to TryGetDataAs. |
| dotnet/src/Microsoft.Agents.AI.Workflows/PortableValue.cs | Clarifies docs around default values vs nullable value types. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Observability/Tags.cs | Renames telemetry tag constant to SessionId (key currently unchanged). |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProcessExecution.cs | Updates helper APIs to call new streaming methods and accept sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs | Updates runner context to pass and report sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunner.cs | Renames runner identifier to SessionId and updates checkpointing calls. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessExecutionEnvironment.cs | Renames/implements streaming APIs and propagates sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/IWorkflowExecutionEnvironment.cs | Renames streaming API surface and runId parameter to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatWorkflowBuilder.cs | Updates group chat host factory parameter name to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExternalResponse.cs | Replaces DataIs/DataAs patterns with TryGetDataAs and keeps DataIs<T>(). |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExternalRequest.cs | Replaces DataIs(out ...) with TryGetDataAs and adds TryGetDataAs(Type, ...). |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs | Updates executor factory delegate parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBinding.cs | Updates factory invocation parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/StreamingRunEventStream.cs | Updates telemetry tagging to use SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/LockstepRunEventStream.cs | Updates telemetry tagging to use SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/ISuperStepRunner.cs | Renames runner identifier contract to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/AsyncRunHandle.cs | Renames exposed identifier to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs | Updates configured factory delegate parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs | Updates configuration adapter delegate parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/SessionCheckpointCache.cs | Renames checkpoint cache type to SessionCheckpointCache. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/JsonCheckpointStore.cs | Updates abstract store methods to accept sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/InMemoryCheckpointManager.cs | Updates in-memory checkpoint manager to Session* naming. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointStore.cs | Updates checkpoint store interface parameter/docs to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointManager.cs | Updates checkpoint manager interface parameter/docs to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/FileSystemJsonCheckpointStore.cs | Updates filesystem store APIs and filenames to use sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/CheckpointManagerImpl.cs | Updates checkpoint manager impl to pass sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/CheckpointInfoConverter.cs | Updates converter regex/grouping and stringification to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/CheckpointManager.cs | Updates adapter to forward sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/CheckpointInfo.cs | Renames checkpoint identifier from RunId to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/AgentWorkflowBuilder.cs | Updates workflow construction to use AddFanInBarrierEdge. |
| dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosCheckpointStore.cs | Updates Cosmos checkpoint storage schema/API to sessionId. |
| dotnet/samples/GettingStarted/Workflows/SharedStates/Program.cs | Updates sample workflow fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Observability/WorkflowAsAnAgent/WorkflowHelper.cs | Updates sample workflow fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs | Updates sample to use PortableValue.As<T>() directly where needed. |
| dotnet/samples/GettingStarted/Workflows/Concurrent/MapReduce/Program.cs | Updates sample fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Concurrent/Concurrent/Program.cs | Updates sample fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Checkpoint/CheckpointWithHumanInTheLoop/Program.cs | Updates sample request handling to TryGetDataAs. |
| dotnet/samples/GettingStarted/Workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs | Updates sample fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Agents/GroupChatToolApproval/Program.cs | Updates streaming execution to RunStreamingAsync and request extraction to TryGetDataAs. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3c0f570 to
c40cd5aCompare
Description
Update names to take into account feedback from API Review, with the underlying goal of normalizing names between single agent and workflows, make the semantics of session vs. run clearer at the workflow level, and prevent a future breaking change in the FanIn APIs.
Contains many breaking changes.
Contribution Checklist