docs(ap2): add Trust Query -- multi-issuer composite verdict envelope (AlgoVoi-authored)#272
Open
chopmob-cloud wants to merge 6 commits into
Open
Conversation
… (AlgoVoi-authored)
Contributor
There was a problem hiding this comment.
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.
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.TRUSTED/PROVISIONAL/INSUFFICIENT_EVIDENCE/UNTRUSTEDissuer_referencesarray carries content-addressed references to each upstream attestation consideredurn:x402:canonicalisation:jcs-rfc8785-v1(RFC 8785 JCS), byte-for-byte cross-validated across 8 independent implementationsNormative 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