Skip to content

.NET: fix(dotnet): handle parse-value conversion failures consistently - #9845

Merged
Vincent Biret (baywet) merged 3 commits into
mainfrom
fix/parse-value-conversion-results
Oct 30, 2026
Merged

Vincent Biret (baywet) merged 3 commits into
mainfrom
fix/parse-value-conversion-results

Conversation

@baywet

@baywet Vincent Biret (baywet) commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Motivation & Context

Make ParseValue conversion-result handling consistent with expression-result handling while preserving assignment metadata and existing ordinary conversion errors.

Description & Review Guide

  • What are the major changes? Handle supported conversion failures with a blank assignment when the input metadata requires it; retain that metadata and emit a value-free diagnostic. Add focused regression cases and update the package and consumer documentation.
  • What is the impact of these changes? Subsequent actions can continue consistently. Successful conversions and ordinary conversion-failure behavior remain unchanged; no public API changes.
  • What do you want reviewers to focus on? Conversion failure filtering, metadata preservation, continuation, and unchanged ordinary failure behavior.

Commands run from dotnet:

Command Result
dotnet run --project tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests -f net10.0 -- --filter-class '*ParseValueExecutorTest' Initial baseline: 6 failed, 11 passed. Follow-up materialization regression: 1 failed, 20 passed before correction. Final: 23 passed.
dotnet run --project tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests -f net10.0 --no-build Passed: 1,281 tests.
dotnet build src\Microsoft.Agents.AI.Workflows.Declarative\Microsoft.Agents.AI.Workflows.Declarative.csproj --no-restore --tl:off Passed for all target frameworks; no warnings or errors.
dotnet format src\Microsoft.Agents.AI.Workflows.Declarative\Microsoft.Agents.AI.Workflows.Declarative.csproj --no-restore Passed.
dotnet format tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests.csproj --no-restore Passed.
dotnet build --tl:off Blocked by insufficient disk space; stopped, cleaned this worktree's generated outputs, and reran targeted validation successfully.

The full solution unit-test suite was not run because the full solution build could not complete.

Related Issue

N/A - maintainer-directed bugfix; no public issue.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Copilot assisted with implementation, regression tests, documentation, validation, and this PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3ef2ce05-b99f-46ac-94dc-ef4fbb4a821d
Copilot AI balanced review requested due to automatic review settings October 29, 2026 17:21
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Oct 29, 2026
@github-actions github-actions Bot changed the title fix(dotnet): handle parse-value conversion failures consistently .NET: fix(dotnet): handle parse-value conversion failures consistently Oct 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Sensitive nested-array inputs still abort during Table result materialization because the exception filter excludes DeclarativeModelException, bypassing the required sensitive-blank assignment.

1 open issue
What changed in this PR

This PR updates .NET declarative ParseValue handling so supported sensitive-input conversion failures produce a blank result while preserving sensitivity metadata and allowing execution to continue.

Changes:

  • Adds filtered conversion-error handling and a value-free warning.
  • Adds regression cases for sensitivity preservation, continuation, and ordinary conversion errors.
  • Documents the behavior in package and consumer guidance.
File Description
skills/​agent-framework-builder-dotnet/​references/​declarative.md Documents sensitive conversion-failure behavior for consumers.
dotnet/​tests/​Microsoft.Agents.AI.Workflows.Declarative.UnitTests/​ObjectModel/​ParseValueExecutorTest.cs Adds conditional-expression and invalid-conversion regression cases.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Declarative/​README.md Describes blank results and preserved sensitivity metadata.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Declarative/​ObjectModel/​ParseValueExecutor.cs Handles selected sensitive conversion failures with blank assignments and diagnostics.

Review effort: Balanced

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MAF Automated Review — Iteration 1

Result: Findings reported
Scope: full PR (1 commit(s)): 9502f7c0a4fe
Model: gpt-5.6-sol

Overview

The change narrowly handles common sensitive conversion failures, preserves sensitivity through the existing assignment path, avoids logging source values, and adds paired sensitive/non-sensitive regression coverage. The exception filter does not cover failures raised while materializing some successfully parsed structured conversion results, so those sensitive inputs can still abort the workflow instead of taking the documented blank-and-continue path.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.

Affected areas: dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/ObjectModel/ParseValueExecutor.cs

@github-code-quality

github-code-quality Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main adb2f4e fix/parse-value-conv... 45320d9 +/-
85% 86% +1%
View coverage of the 1 most impacted file.
File main adb2f4e fix/parse-value-conv... 45320d9 +/-
/home/runner/wo...SessionStore.cs 100% 56% -44%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 30, 2026 13:44 UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3ef2ce05-b99f-46ac-94dc-ef4fbb4a821d

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the sensitive ParseValue failure-handling change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

This was referenced Nov 2, 2026

This branch was previously deployed

2 inactive deployments
github-app-auth — 45320d99 Deployed Oct 30, 2026 by Copilot via add_label #26589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants