[Bug]: Mandate Receipt fields in agent_authorization.md (`result`) do not match the receipt schemas and SDK (`status`)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- json, python
- Domain
- backend-api-design, documentation
Research direction
Read the Mandate Receipt section in docs/ap2/agent_authorization.md and compare it with code/sdk/schemas/ap2/checkout_receipt.json, payment_receipt.json, and the Python generated model and tests cited in the issue. Confirm the intended fields against those schemas and SDK references; done when the specification and published receipt definitions agree on outcome field, enum values, and required fields.
Written by the indexing model from the issue text.
Description
What happened?
What happened?
The Mandate Receipt format is described in two places, and they disagree on the
name and values of the field that carries the outcome, and on whether some
fields are required.
1. docs/ap2/agent_authorization.md (Action Authorization, lines 503–516)
- iss: REQUIRED. ...
- result: REQUIRED. An Enum with value
["success", "error"]
indicating the result of the action authorization.- reference: REQUIRED. ...
- error: OPTIONAL. ... MUST be present when the result is
"error".- error_description: OPTIONAL. A human-readable error description String.
2. code/sdk/schemas/ap2/checkout_receipt.json and payment_receipt.json
- the outcome field is
status(viatypes/receipt_status.json), with values
"Success"/"Error" status,iss,iat,referenceare required- when
statusis"Error", botherroranderror_descriptionare required
3. Python SDK
The generated models follow the schemas, e.g.
code/sdk/python/ap2/sdk/generated/checkout_receipt.py:
status: Literal['Success']
code/sdk/python/ap2/tests/receipt_wrapper_tests.py asserts
receipt.root.status == 'Success', and the samples create receipts with
status='Success'
(code/samples/python/src/roles/merchant_payment_processor_agent/tools.py).
Differences
| agent_authorization.md | receipt schemas / SDK | |
|---|---|---|
| outcome field | result |
status |
| values | success / error |
Success / Error |
iat |
not listed | required |
error_description on error |
optional | required |
Impact
An implementer who follows the specification text produces
{"result": "success", ...}, which does not validate against the published
schemas and is not understood by the SDK. Because field names and enum values
must match exactly, two implementations that each follow one of these
definitions cannot read each other's receipts.
Expected
A single definition of the Mandate Receipt. Since the schemas, the SDK, and the
samples already use status with Success / Error, it looks like
agent_authorization.md was not updated. Either:
- update
agent_authorization.mdto usestatus/Success/Error, list
iatas required, and requireerror_descriptionwhen the status is
"Error", or - if
resultis the intended name, update the schemas and regenerate the SDK.
I understand that specification changes now go through FIDO. I am filing this
here because the schemas and SDK in this repository are affected, and in case it
should be forwarded to the specification work.
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 514
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google-agentic-commerce/AP2
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
google-agentic-commerce/AP2#388 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
google-agentic-commerce/AP2#320 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
google-agentic-commerce/AP2#294 · 1 comment ·
-
[Feat]: Revocation path for open Mandates — rescinding standing agent authority bound to a cnf keyOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
google-agentic-commerce/AP2#386 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
google-agentic-commerce/AP2#381 · 1 comment ·
All issues in google-agentic-commerce/AP2
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
yzhao062/awesome-auditable-ai#45 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
NVIDIA/flare-local-inference#90 ·
Maintainers usually reply within 1 day
-
area/streaming comp/gateway P2 platform/telegram type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#144897 ·
Maintainers usually reply within 1 day
-
request-theme
Difficulty 1/5 Under an hour Newbie friendliness 66/100
LizardByte/ThemerrDB#9575 ·
Maintainers usually reply within 1 day