a2aproject / a2aproject/a2a-tck
[Bug]: Normalize A2A method mapping source across JSON-RPC transport and validators
- Lingua principale
- Python
- Stelle
- 50
- Fork
- 40
- Merge medio
- 7g 1h
- PR unite (30g)
- 1
Descrizione
## Summary
While using a2a-tck to validate my own project, I observed several high-confidence inconsistencies in JSON-RPC method-name mapping. These were identified by tracing the outcomes in the compliance checks and then cross-checking the corresponding validator definitions against transport-layer implementation. This appears to be a method-mapping contract mismatch, not a cosmetic issue, because the same method intent is represented with different names across mapping sources and wire-level calls.
## High-confidence findings
### 1) JSON-RPC streaming/task methods are not aligned with mapping contract
- `tests/validators/method_mapping_validator.py` declares JSON-RPC mapping with v0.3.0-style RPC names (e.g. `message/stream`, `tasks/get`).
- `tck/transport/jsonrpc_client.py` currently invokes:
- `send_streaming_message(...)` -> `SendStreamingMessage`
- `get_task(...)` -> `GetTask`
- `subscribe_task(...)` / `subscribe_to_task(...)` -> `SubscribeToTask`
- This creates a direct mismatch between mapping spec/table and actual wire calls.
### 2) Mapping references are not single-sourced between validators
- `tests/validators/method_mapping_validator.py` and `tests/validators/a2a_v030_compliance.py` use different JSON-RPC naming aliases for related methods.
- The dual representation appears in the same test layer rather than behind a clear compatibility boundary.
### 3) Extended-agent-card mapping still shows mixed naming in validation path
- `jsonrpc_client.py` uses `GetExtendedAgentCard` while some validation/docs paths still reference `agent/getAuthenticatedExtendedCard` / `getExtendedCard` naming in method-mapping context.
- This increases uncertainty for anyone implementing against the tests and hardens false negatives/false assumptions.
## Why this matters
Method names are wire-level contract for A2A. Inconsistent naming across validator and transport implementations weakens multi-transport compliance checks and may produce misleading interoperability diagnostics.
## Proposed fix
1. Define one canonical mapping source for A2A method names and map each transport against it.
2. Keep non-canonical names only in an explicit compatibility layer.
3. Update transport + validators to consume the same mapping contract.
4. Add regression tests to ensure: mapping table -> wire request names are consistent for each transport.
## Priority
High. This affects core JSON-RPC compatibility and test correctness for streaming/task flows.
## References checked
- `tests/validators/method_mapping_validator.py`
- `tests/validators/a2a_v030_compliance.py`
- `tck/transport/jsonrpc_client.py`
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.