Skip to content

fix(multitenancy): resolve agent card via router when no default bean… - #1184

Merged
ehsavoie merged 1 commit into
a2aproject:mainfrom
ehsavoie:issue_1182
Sep 28, 2026
Merged

ehsavoie merged 1 commit into
a2aproject:mainfrom
ehsavoie:issue_1182

Conversation

@ehsavoie

Copy link
Copy Markdown
Collaborator

… exists

When all @PublicAgentCard beans carry a @tenant qualifier, resolveAgentCard() threw IllegalStateException because CdiUtils.resolveDefault() skips tenant-qualified beans. Thread the tenant and AgentCardRouter through the resolution chain so the router is consulted before throwing.

Fixes #1182 🦕

@ehsavoie
ehsavoie force-pushed the issue_1182 branch 2 times, most recently from ce51067 to daf85cb Compare September 25, 2026 15:31
@ehsavoie
ehsavoie force-pushed the issue_1182 branch 3 times, most recently from 80fc9f2 to a08d019 Compare September 26, 2026 11:44
@ehsavoie
ehsavoie requested a review from kabir September 28, 2026 07:13
@ehsavoie
ehsavoie force-pushed the issue_1182 branch 2 times, most recently from 16ad2b9 to ee008f1 Compare September 28, 2026 10:45
- Thread AgentCardRouter through handlers for tenant-scoped card resolution
- Map TenantNotFoundException to client errors instead of HTTP 500
- Gate extended card router on non-blank tenant; fall back to CDI bean otherwise
- Track per-card validation with ConcurrentHashMap instead of single AtomicBoolean

Fixes a2aproject#1182

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@ehsavoie
ehsavoie merged commit 93e521a into a2aproject:main Sep 28, 2026
15 checks passed
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.

[Bug]: resolveAgentCard() fails in pure multi-tenant setup with no default @PublicAgentCard

2 participants