.NET: Preserve table state after declarative EditTable Add - #7324
Merged
peibekwe merged 1 commit intoJul 27, 2026
Merged
Conversation
KXHXK
marked this pull request as ready for review
July 26, 2026 11:04
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a bug in the .NET declarative workflow EditTable/EditTableV2 executors where Add overwrote the bound items variable with the newly-added RecordValue, causing subsequent Add operations to fail because the variable was no longer a table.
Changes:
- Update
EditTableExecutorandEditTableV2Executorto re-assign the mutatedTableValueback to theitemsVariableafterAppendAsync. - Update existing unit tests to assert that the variable remains a table after
Add. - Add regression tests for consecutive
Addoperations that verify the final table contents and row order.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/ObjectModel/EditTableExecutor.cs | Preserve table binding by assigning tableValue (not the new record) back to the items variable after Add. |
| dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/ObjectModel/EditTableV2Executor.cs | Same table-preserving assignment semantics for the V2 executor after Add. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableExecutorTest.cs | Update assertions to expect a table result and add a consecutive-add regression test. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableV2ExecutorTest.cs | Update assertions to expect a table result and add a consecutive-add regression test validating order. |
Contributor
Author
|
@microsoft-github-policy-service agree |
Signed-off-by: KXH <shepherdlaurie238@gmail.com>
KXHXK
force-pushed
the
fix/7323-edit-table-add-preserves-table
branch
from
July 27, 2026 15:09
3eb842c to
40aa32c
Compare
peibekwe
approved these changes
Jul 27, 2026
rogerbarreto
approved these changes
Jul 27, 2026
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 & Context
Declarative
EditTableandEditTableV2currently replace their items variable with the newly added record after an Add operation. A second Add then fails because the variable is no longer a table. This change keeps the mutated table bound to the variable so repeated additions work as expected.AI assistance was used for codebase analysis and test scaffolding. The final implementation, diff, and validation results were reviewed by KXH.
Description & Review Guide
TableValueafter Add in both executors; update existing Add assertions; add regression tests that execute two consecutive additions and verify row order.net10.0, 841 tests passed onnet472, the declarative project built across all target frameworks with 0 warnings/errors, anddotnet format --verify-no-changespassed.Related Issue
Fixes #7323
Contribution Checklist
breaking changelabel (or add [BREAKING] to the title prefix, before or after any language prefix) - a workflow keeps the label and title prefix in sync automatically.