Skip to content

.NET: Re-enable the "retrieve object" check in StateManager#1881

Merged
lokitoth merged 2 commits intomainfrom
dev/dotnet_workflow/state_manager_object_check
Mar 25, 2026
Merged

.NET: Re-enable the "retrieve object" check in StateManager#1881
lokitoth merged 2 commits intomainfrom
dev/dotnet_workflow/state_manager_object_check

Conversation

@lokitoth
Copy link
Copy Markdown
Member

@lokitoth lokitoth commented Nov 3, 2025

Motivation and Context

As we implemented more of Checkpointing and proper support for polymorphic values behind PortableValue, there was a brief period where the Declarative layer needed to gradually switch from the old way of using the APIs to PortableValue. To make this integration easier, we temporarily disabled the check that users are not trying to read object from the state store.

Description

This change restores the check.

Closes #1369

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.

Copilot AI review requested due to automatic review settings November 3, 2025 21:35
@markwallace-microsoft markwallace-microsoft added .NET workflows Related to Workflows in agent-framework labels Nov 3, 2025
Copy link
Copy Markdown
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 re-enables a previously disabled validation check that prevents reading state as object type. The check was previously commented out pending upstream updates, but is now being enforced.

Key Changes:

  • Uncommented the NotSupportedException that was disabled in StateManager.cs

@lokitoth lokitoth force-pushed the dev/dotnet_workflow/state_manager_object_check branch from 78e858b to 9cb1dc3 Compare November 5, 2025 14:50
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/state_manager_object_check branch from 9cb1dc3 to db47402 Compare November 5, 2025 18:42
@lokitoth lokitoth added this pull request to the merge queue Dec 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 16, 2025
@lokitoth lokitoth added this pull request to the merge queue Feb 19, 2026
@lokitoth lokitoth enabled auto-merge March 25, 2026 22:51
@lokitoth lokitoth added this pull request to the merge queue Mar 25, 2026
Merged via the queue into main with commit 0bdcaa5 Mar 25, 2026
21 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Mar 25, 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.

.NET: Re-Enable failure for StateManager.ReadStateAsync<T>() when T is object

4 participants