test(a2a): exercise official SDK JSON-RPC loopback - #151
Conversation
Signed-off-by: Noah Ingwers <98993329+noah-ing@users.noreply.github.com>
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Signed-off-by: Noah Ingwers <98993329+noah-ing@users.noreply.github.com>
imran-siddique
left a comment
There was a problem hiding this comment.
Reviewed the complete SDK loopback example, tutorial, dependency changes, and tests. All 18 loopback scenarios pass locally, alongside 50 existing TPM tests. Protected inventory access passes through the real cA2A verifier; ordinary requests cannot dispatch that handler. The documentation accurately limits the example to software assurance, unsigned diagnostics, and loopback HTTP.
imran-siddique
left a comment
There was a problem hiding this comment.
Reviewed the complete SDK loopback example, tutorial, dependency changes, and tests. All 18 loopback scenarios pass locally, alongside 50 existing TPM tests. Protected inventory access passes through the real cA2A verifier; ordinary requests cannot dispatch that handler. The documentation accurately limits the example to software assurance, unsigned diagnostics, and loopback HTTP.
What
Add a runnable official Python A2A SDK JSON-RPC loopback example, 18 transport-level regression cases in the existing CI test matrix, and a refreshed integration tutorial linked from the README.
This is a practical follow-up to #130 and a bounded step toward the workstream recorded in #113. It does not complete that workstream or claim TCK/cross-language conformance.
Why
The bridge tests exercise real SDK models, but not an SDK HTTP server, card resolver and client together. The integration tutorial also still described the live peer/policy/sealing path as unbuilt. An adopter needs a working composition of the APIs that now exist.
The example leaves card serving and application routing with the SDK/operator. It does not add another server implementation to
ca2a start.Security impact
No changes under
src/, to cryptography, or to core enforcement.PeerNode.handle()runs before the private lookup handler.The bootstrap is local HTTP with software-only assurance, not authenticated production transport. The payload is public fixture data. Challenges remain repeatable within their TTL; diagnostic records are unsigned. No hardware, key-residency, co-location, runtime-integrity, at-most-once or exactly-once claim.
Test plan
Verified from a fresh checkout of
a91ac72f74be01991ab82a4abd4e4718297d46ee, Python 3.12.14:pytest tests/ -q --cov=src: 571 passed, 2 existing hardware-dependent skips, 90.41% runtime coverage. All 18 new loopback cases pass without skips. The normal CI matrix discovers them undertests/unit/.ruff check src/ tests/ examples/a2a-sdk/ruff format --check src/ tests/ examples/a2a-sdk/mypy src/ca2a_runtime/ src/ca2a_verify/ examples/a2a-sdk/loopback.py: 45 source files.ca2a-runtime==0.2.1itself is not in PyPI's audit database.python examples/a2a-sdk/loopback.pyprints ordinary response, widget stock,SCOPE_NOT_PERMITTED, one protected invocation, assurancenoneand callernot_offered.SPONSORS.mdassembly warning on base and head; no new warnings.The exercised SDK/server versions are pinned in the dev dependencies and example requirements:
a2a-sdk[http-server]==1.1.2,uvicorn==0.52.4. This is not a complete transitive lock. SDK protobuf deprecation warnings remain visible rather than suppressed.Hosted verification on the same head also passes: all six Linux/Windows Python 3.11–3.13 jobs and strict governance, CodeQL, and the Docker PR build. The initial Windows shutdown probes used a one-second connection deadline; the follow-up allows five seconds for refusal while still rejecting timeouts. No test is skipped to accommodate Windows. Maintainer approval is still required.
DCO sign-off