Repository navigation
.NET: fix(dotnet): handle parse-value conversion failures consistently - #9845
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef2ce05-b99f-46ac-94dc-ef4fbb4a821d
There was a problem hiding this comment.
🟡 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
There was a problem hiding this comment.
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
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 1 most impacted file.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef2ce05-b99f-46ac-94dc-ef4fbb4a821d

Motivation & Context
Make
ParseValueconversion-result handling consistent with expression-result handling while preserving assignment metadata and existing ordinary conversion errors.Description & Review Guide
Commands run from
dotnet:dotnet run --project tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests -f net10.0 -- --filter-class '*ParseValueExecutorTest'dotnet run --project tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests -f net10.0 --no-builddotnet build src\Microsoft.Agents.AI.Workflows.Declarative\Microsoft.Agents.AI.Workflows.Declarative.csproj --no-restore --tl:offdotnet format src\Microsoft.Agents.AI.Workflows.Declarative\Microsoft.Agents.AI.Workflows.Declarative.csproj --no-restoredotnet format tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests.csproj --no-restoredotnet build --tl:offThe 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
AI assistance details: Copilot assisted with implementation, regression tests, documentation, validation, and this PR description.
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.