Repository navigation
[dotnet-port-fixes] fix(a2a): reject outbound messages without sendable content - #1303
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
API consistency review
Changed Go contract
Upstream evidence reviewed
AssessmentBoth upstream implementations already reject requests that resolve to no sendable content, using wording functionally identical to the new Go error. This PR brings Go into parity by replacing the previous silent no-op on empty Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"
- "raw.githubusercontent.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused validation covers both send modes, preserves continuation handling, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds outbound A2A validation so messages without sendable content fail before contacting the remote agent.
Changes:
- Rejects empty message lists and messages with no convertible A2A parts.
- Adds regression coverage for streaming and non-streaming requests, verifying no transport calls occur.
| File | Description |
|---|---|
| provider/a2aprovider/a2a.go | Rejects requests without sendable content. |
| provider/a2aprovider/a2a_test.go | Tests rejection cases and absence of transport calls. |
Review effort: Balanced
Summary
Port the pinned .NET A2A validation fix to the Go outbound A2A provider. Requests whose messages contain no convertible A2A parts now return an error before any transport call, including empty message lists, empty text, empty contents, and unsupported contents.
Ported .NET PRs
Pinned upstream revision:
ebcf4db7f9462ef6c377761e0b3159c4c5a73027.Inspected recent groups: A2A validation commit
44fe223da7ea6853eefb7053e25c2c213a2e5c15(source) and AG-UI resolver ordering commit501cc6f6c702d444caabe8e1aba1732f9bc3bc3f(source). The selected A2A change is fix-only under the existing Go API; the AG-UI change was excluded because Go delegates serialization to the external AG-UI SDK rather than configuring ASP.NET resolver chains.Duplicate checks used the fixed issue query
repo:microsoft/agent-framework-go A2A empty message parts no content send request validationand PR queryrepo:microsoft/agent-framework-go A2A messagesToA2AMessage empty parts validation, before and after editing. The issue search surfaced filteredmicrosoft/agent-framework-go#540; its direct read showed only an already-merged helper extraction and no overlap with this validation fix. The PR query returned no results.Breaking Changes
No. This corrects invalid outbound requests by returning an error before the remote A2A service is called.
Tests and Examples
go test ./provider/a2aprovidergit diff --checkNotes
Go changes are limited to
provider/a2aprovider/a2a.goandprovider/a2aprovider/a2a_test.go. No public API, configuration, default, generated file, binary, or build artifact was added.Warning
Firewall blocked 3 domains
The following domains were blocked by the firewall during workflow execution:
proxy.golang.orgstorage.googleapis.comsum.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.