Skip to content

fix(a2a): reject ambiguous default agent selection (#79) - #82

Merged
BaSui01 merged 1 commit into
masterfrom
fix/issue-79-a2a-default-agent
May 11, 2026
Merged

fix(a2a): reject ambiguous default agent selection (#79)#82
BaSui01 merged 1 commit into
masterfrom
fix/issue-79-a2a-default-agent

Conversation

@BaSui01

@BaSui01 BaSui01 commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • only auto-select the lone registered agent when DefaultAgentID is unset
  • return an explicit error when multiple agents are registered without a configured default instead of relying on random map iteration order
  • add regression coverage for getDefaultAgent and discovery fallback behavior

TDD

  • red: go test ./agent/execution/protocol/a2a -run 'TestHTTPServer_(GetDefaultAgent_MultipleAgentsWithoutDefaultReturnsError|HandleAgentCardDiscovery_MultipleAgentsWithoutDefaultReturnsNotFound)$' -count=1
  • green: go test ./agent/execution/protocol/a2a -run 'TestHTTPServer_(GetDefaultAgent_MultipleAgentsWithoutDefaultReturnsError|HandleAgentCardDiscovery_MultipleAgentsWithoutDefaultReturnsNotFound)$' -count=1
  • green: go test ./agent/execution/protocol/a2a -count=1

Closes #79

- only auto-select the lone registered agent when DefaultAgentID is unset
- return an explicit error when multiple agents are registered without a configured default instead of relying on random map iteration
- add regression coverage for getDefaultAgent and discovery fallback behavior

Co-authored-by: Codex <noreply@openai.com>
Copilot AI review requested due to automatic review settings May 11, 2026 20:44
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@BaSui01
BaSui01 merged commit 9de05d9 into master May 11, 2026
1 of 4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants