Skip to content

docs(ap2): add Trust Query -- multi-issuer composite verdict envelope (AlgoVoi-authored)#272

Open
chopmob-cloud wants to merge 6 commits into
google-agentic-commerce:mainfrom
chopmob-cloud:docs-ap2-trust-query
Open

docs(ap2): add Trust Query -- multi-issuer composite verdict envelope (AlgoVoi-authored)#272
chopmob-cloud wants to merge 6 commits into
google-agentic-commerce:mainfrom
chopmob-cloud:docs-ap2-trust-query

Conversation

@chopmob-cloud

@chopmob-cloud chopmob-cloud commented May 30, 2026

Copy link
Copy Markdown

Summary

Adds docs/ap2/trust_query.md -- the AlgoVoi-authored Composite Trust Query format, a multi-issuer composite verdict envelope that composes independent issuer attestations into a single categorical trust decision.

  • Closed four-state enum: TRUSTED / PROVISIONAL / INSUFFICIENT_EVIDENCE / UNTRUSTED
  • issuer_references array carries content-addressed references to each upstream attestation considered
  • Canonicalised under urn:x402:canonicalisation:jcs-rfc8785-v1 (RFC 8785 JCS), byte-for-byte cross-validated across 8 independent implementations
  • Composes Compliance Receipt, Settlement Attestation, and counterparty-risk evidence into a single verifiable envelope

Normative wire format: IETF Internet-Draft draft-hopley-x402-composite-trust-query (https://datatracker.ietf.org/doc/draft-hopley-x402-composite-trust-query/)

Reference implementations (Apache 2.0): algovoi-composite-trust-query on PyPI, @algovoi/composite-trust-query on npm.

Sibling to PR #269 (Compliance Receipt), PR #270 (Payment Lifecycle), and PR #271 (Settlement Attestation). AP2 references the format; AP2 does not redefine it. AlgoVoi is sole author.


AlgoVoi (chopmob-cloud) -- Acquisition enquiries: https://docs.algovoi.co.uk/acquisition

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new documentation file, docs/ap2/trust_query.md, which defines the Trust Query format—a categorical, content-addressed composite verdict envelope. Feedback on this specification highlights two main issues: first, a potential circular dependency in JCS canonicalisation due to the signature field being included inside the JSON object (making it enveloped rather than detached); second, a logical inconsistency between the mandatory requirement (MUST) to re-derive canonical hashes of referenced attestations and the optional permission (MAY) to walk the reference chain to verify them.

Comment thread docs/ap2/trust_query.md
Comment thread docs/ap2/trust_query.md Outdated
…l vs verification

Two precision fixes in response to review feedback:

1. Signature preimage: adds explicit 'Signature preimage' subsection
   under Canonicalisation stating that the signature field is excluded
   from the JCS preimage. Signs canonical bytes of the remaining fields,
   then stores the result in the signature field. Eliminates any
   appearance of circularity between the canonical form and its signature.

2. MUST/MAY consistency: the Composition section 'MAY walk the reference
   chain' and the Security section 'MUST re-derive the canonical hash'
   referred to two different operations without making the distinction
   explicit. Clarified throughout: retrieval of upstream attestations is
   optional (MAY); if an attestation is retrieved, hash verification is
   mandatory (MUST). Both sections now use the same framing.
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.

1 participant