Skip to content

.NET: Add tests for subworkflow shared state behavior#3444

Merged
lokitoth merged 1 commit intomainfrom
dev/dotnet_workflow/add_subworkflow_state_tests
Jan 27, 2026
Merged

.NET: Add tests for subworkflow shared state behavior#3444
lokitoth merged 1 commit intomainfrom
dev/dotnet_workflow/add_subworkflow_state_tests

Conversation

@lokitoth
Copy link
Member

Description

Adds tests documenting current shared state behavior in subworkflows:

  • Shared State works correctly within a subworkflow
  • Shared State is isolated across parent/subworkflow boundaries

Related to #2419

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive test coverage for shared state behavior in subworkflows, documenting both working and isolated state scenarios. The tests verify that shared state operates correctly within a subworkflow while also documenting the current limitation where state is isolated across parent/subworkflow boundaries (issue #2419).

Changes:

  • Added test file documenting shared state behavior in subworkflows with three executor classes that pass data through shared state
  • Added two test methods validating shared state works within subworkflows and is isolated across boundaries
  • Implemented helper methods to run different workflow configurations for testing state persistence

Reviewed changes

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

File Description
SampleSmokeTest.cs Added two test methods to verify shared state behavior within and across subworkflow boundaries
14_Subworkflow_SharedState.cs New test file containing executor implementations and workflow configurations for testing shared state scenarios

@lokitoth lokitoth force-pushed the dev/dotnet_workflow/add_subworkflow_state_tests branch from 750bbc9 to bb6b25e Compare January 26, 2026 18:05
Adds tests documenting current shared state behavior in subworkflows:

- State works correctly within a subworkflow

- State is isolated across parent/subworkflow boundaries

Related to #2419
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/add_subworkflow_state_tests branch from bb6b25e to d8685e1 Compare January 26, 2026 18:36
@lokitoth lokitoth added the workflows Related to Workflows in agent-framework label Jan 26, 2026
@lokitoth lokitoth added this pull request to the merge queue Jan 27, 2026
@lokitoth lokitoth removed this pull request from the merge queue due to a manual request Jan 27, 2026
@lokitoth lokitoth added this pull request to the merge queue Jan 27, 2026
Merged via the queue into main with commit 4245561 Jan 27, 2026
15 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET workflows Related to Workflows in agent-framework

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants