Skip to content

AP2 v2 cross-SDK conformance — verify against the official Python SDK in CI #40

Description

@dzuluaga

Companion to #39 (Node/TS AP2 v2 wire format). Part of the trust-level roadmap (#16).

Goal. Prove v2 conformance bidirectionally against Google's official ap2 Python SDK rather than only against our own tests. "Python support" here means interop, not a reimplementation — the Python SDK is the reference verifier.

Scope:

  • CI job (Python 3.12 + ap2 SDK) that runs a conformance suite:
    • TS → Python: chains signed by attestomcp-gate (AP2 v2 conformance (Node/TS) — SD-JWT/KB-SD-JWT mandate chain wire format #39) verify with MandateClient.verify + PaymentMandateChain.parse(...).verify(...) — zero violations.
    • Python → TS: chains produced by the Python SDK (root SD-JWT + hop + closed PaymentMandate) verify with our TS chain verifier, including aud/nonce, sd_hash vs issuer_jwt_hash modes, and constraint checks.
    • Receipts: references (sha256(closed leaf JWT)) computed by each side agree.
    • Negative vectors: tampered amount, wrong nonce, forged hop → refused by BOTH sides.
  • Publish the fixture vectors (chains + keys) in-repo so failures are reproducible offline.
  • Track upstream SDK releases (pin + renovate) so drift from the AP2 spec surfaces in CI, not in the field.

Stretch: contribute the TS chain layer upstream to google-agentic-commerce/AP2 as a community TypeScript SDK — the AP2 team has engaged directly with this project and there is no official TS SDK today.

Depends on: #39 (nothing to conformance-test until we emit v2 chains).

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions