[dotnet-port] Populate MessageID from TaskStatusUpdateEvent.Status.Message in A2A agent - #215
Conversation
When the Go A2A agent receives a TaskStatusUpdateEvent during streaming, ResponseUpdate.MessageID is now set from Status.Message.ID when the message is present, falling back to the TaskID otherwise. This aligns with the .NET fix in microsoft/agent-framework#6043. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the Go A2A agent’s streaming handling so ResponseUpdate.MessageID is derived from the status update’s embedded message (TaskStatusUpdateEvent.Status.Message.ID) when available, matching the behavior of the referenced .NET fix and improving message correlation during streaming.
Changes:
- Populate
ResponseUpdate.MessageIDfromTaskStatusUpdateEvent.Status.Message.IDwhen present; otherwise keep theTaskIDfallback. - Add a streaming unit test covering the “status update contains a message” scenario to validate the new
MessageIDbehavior.
Show a summary per file
| File | Description |
|---|---|
agent/provider/a2aagent/a2a.go |
Adjusts streaming status-update mapping to prefer Status.Message.ID for MessageID with TaskID fallback. |
agent/provider/a2aagent/a2a_test.go |
Adds a test ensuring MessageID is sourced from Status.Message.ID when provided. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
Cross-Repo Parity Review ✅This PR is a direct port of the .NET fix from microsoft/agent-framework#6043 and is semantically aligned with the upstream fix. What was fixed in .NET: What this PR does in Go: Both implementations are semantically identical. The test coverage mirrors the .NET approach (cases with and without a message in the status update). No parity issues found.
|
When the Go A2A agent receives a TaskStatusUpdateEvent during streaming, ResponseUpdate.MessageID is now set from Status.Message.ID when the message is present, falling back to the TaskID otherwise.
This aligns with the .NET fix in microsoft/agent-framework#6043.