Skip to content

Commit fd9fadc

Browse files
committed
fix(server): address pre-PR review findings on alias route fix
- Remove brand name from inline comment (use generic "A2A 0.3 buyer SDKs") - Expand A2ABearerAuthMiddleware docstring to mention 0.3 alias path - Add comment to inverse-drift-guard test noting it's structural-only https://claude.ai/code/session_01JHq6DLPhFf2kQQpUkPtfZe
1 parent ad726e5 commit fd9fadc

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/adcp/server/a2a_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def create_a2a_server(
919919
jsonrpc_kwargs["context_builder"] = context_builder
920920
routes = (
921921
list(create_agent_card_routes(agent_card=agent_card))
922-
# 0.3 alias: buyer SDKs (e.g. @adcp/sdk) probe /.well-known/agent.json
922+
# 0.3 alias: A2A 0.3 buyer SDKs probe /.well-known/agent.json
923923
# as a positive A2A signal. Same handler, no redirect round-trip.
924924
+ list(
925925
create_agent_card_routes(

src/adcp/server/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,8 @@ class A2ABearerAuthMiddleware:
763763
:func:`adcp.server.a2a_server.create_a2a_server` with this
764764
middleware to require a valid bearer header on every JSON-RPC
765765
request, while leaving the spec-mandated public discovery
766-
surface (``/.well-known/agent-card.json``) accessible.
766+
surface (``/.well-known/agent-card.json`` and the 0.3 alias
767+
``/.well-known/agent.json``) accessible.
767768
768769
Designed to compose with a2a-sdk's
769770
:class:`DefaultServerCallContextBuilder`: on auth success the

tests/test_serve_auth_both.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ def test_all_discovery_paths_are_registered_routes() -> None:
629629
from adcp.server.auth import _A2A_DISCOVERY_PATHS
630630

631631
app = create_a2a_server(_OkHandler(), name="inverse-drift-guard", validation=None)
632+
# Structural check only (r.path membership). Live dispatch is validated by
633+
# test_a2a_agent_card_served_on_root_path in test_unified_mcp_a2a.py.
632634
app_paths = {r.path for r in app.routes}
633635

634636
not_routed = [p for p in _A2A_DISCOVERY_PATHS if p not in app_paths]

0 commit comments

Comments
 (0)