Repository navigation
.NET: Preserve A2A task status messages in agent responses - #9534
SergeyMenshykh merged 3 commits into
Conversation
Include status-message content for unsuccessful, interrupted, and unspecified tasks in ordinary and streaming responses. Preserve artifacts and continuation behavior, and add regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5855f4d-414c-4f06-a89d-8fcbaf0e77db
There was a problem hiding this comment.
🟢 Approval recommended
The focused conversion changes are consistent across response paths, with regression coverage and no unresolved findings.
No open issues 🎉
What changed in this PR
Preserves important A2A task-status messages in .NET agent responses instead of discarding failure explanations and other actionable content.
Changes:
- Applies shared status-message conversion across ordinary and streaming responses.
- Continues omitting routine progress and successful-completion messages.
- Adds regression coverage for status filtering, artifacts, and continuation behavior.
| File | Description |
|---|---|
| dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/Extensions/AgentTaskStatusExtensionsTests.cs | Tests status filtering and content preservation. |
| dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/Extensions/A2AAgentTaskExtensionsTests.cs | Tests status messages alongside artifacts. |
| dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentTests.cs | Covers unsuccessful ordinary and streaming responses. |
| dotnet/src/Microsoft.Agents.AI.A2A/Extensions/AgentTaskStatusExtensions.cs | Expands eligible status-message conversion. |
| dotnet/src/Microsoft.Agents.AI.A2A/Extensions/A2AAgentTaskExtensions.cs | Uses shared conversion for task responses. |
| dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs | Uses shared conversion for streamed status updates. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (1 commit(s)): db33fa99bffc
Model: gpt-5.6-sol
Overview
The review found 1 verified inline finding(s).
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.A2A/Extensions/A2AAgentTaskExtensions.cs
Preserve status message roles, IDs, metadata, and raw representations in task responses. Retain streaming envelope metadata and add regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5855f4d-414c-4f06-a89d-8fcbaf0e77db
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5855f4d-414c-4f06-a89d-8fcbaf0e77db
Motivation & Context
Optional A2A task-status messages were discarded unless the task required input, hiding failure explanations and other messages that require attention.
Description
InputRequired,AuthRequired,Failed,Canceled,Rejected, andUnspecified.AI Assistance
AI assistance details: Copilot assisted with the implementation, regression tests, and 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.