Conformance kit
What the fixtures, test vectors and catalogs published with draft 0.1 hold, how to run them against an implementation in any language, and how to check a download against the manifest.
The conformance kit is the set of files that tests an implementation of this draft, in any language: the conformance fixtures of section 13.1, test vectors for canonical forms and digests, and catalogs of the draft’s tables in JSON. The site publishes each file byte for byte as the protocol package of the reference implementation holds it, with a manifest that gives the SHA-256 of every file.
The kit’s files are licensed under the Apache License 2.0. This page, like the rest of the specification, is licensed under CC BY 4.0. The kit belongs to draft 0.1 and changes with it, at the same addresses: a correction to the draft changes the files it touches, and the manifest’s hashes show which files changed.
The files
Every address is on https://businessagentprotocol.org.
| Address | What it holds |
|---|---|
/spec |
Documents that pass, one per file, and index, which says how to check each. |
/spec |
Cases that fail, one per file, each with the (code, path) pairs its check reports. |
/spec |
JSON texts with their canonical forms and digests (section 2.15). |
/spec |
The canonical form and digest of each distinct execution receipt and authority binding in the valid fixtures (sections 5.3 and 6.6). |
/spec |
The error catalog (section 8.4). |
/spec |
The business lifecycle and its mappings to A2A and PAP states (section 10). |
/spec |
The prefix of each kind of identifier (section 2.3). |
/spec |
The profiles this draft defines (section 2.14). |
/spec |
The extensions this draft defines (section 2.12). |
/spec |
The JSON Schemas (section 2.14). |
/spec |
Every file under /spec but the pages and the manifest itself, with its media type, SHA-256 and license. |
A folder has no page of its own; the manifest lists every file in it. The fixtures, the vectors, the catalogs and the manifest are served as application/json, and the schemas as application/schema+json.
Running the fixtures
- Read
fixtures/valid/index.json. It names every valid file, with the check to run on it (validate) and the inputs of that check (options). - Run each valid file’s check on its document, with its inputs. The check reports no (code, path) pair.
- For each file in
fixtures/invalid/, build the input. A case withinput_textgives the exact text to check, and a case withinput_base64the exact bytes; both are checked by decoding alone (section 2.1), so hand them to the decoder as they are. Any other case starts from a copy of the valid document itsbasenames, applies itspatch, and, when it hasreseal, recomputes the digests the patch made stale (below). - Run the check the case’s
validatenames on the input, with the case’soptions. - Compare the (code, path) pairs the check reports with the case’s
expected. Section 13.1 states the requirement: a Consumer that claims conformance MUST report at least every expected pair, and SHOULD report exactly the expected list (checklist item C-11).
A claim covers the kinds of document the implementation validates: objects, envelopes, records and discovery documents. Every Consumer decodes, so the json cases apply to all of them. validate names one of these checks:
validate |
The check |
|---|---|
json |
Decoding alone: strict UTF-8 JSON, with no byte order mark, no lone surrogate and no repeated member name (section 2.1). Only invalid cases use it. |
object |
One of the five objects, in the order of section 8.2. |
envelope |
An envelope and the objects it carries (section 8.2). |
bundle |
A record of one contract revision: its objects, then the invariants (section 9.1). |
discovery |
An enna document, in the order of section 12.7. |
Each path in expected points into the input as section 8.3 says: into the object itself, under /objects/<index> for an envelope, and under /<index> for a record.
The case format
Valid documents
Each file in valid/ holds one document, or, for a record, a JSON array of objects. valid/index.json maps each file name to how it is checked:
| Member | Meaning |
|---|---|
validate |
The check: object, envelope, bundle or discovery. |
options |
The inputs the check takes besides the document (below). Absent means none. |
For example, the record in bundle is checked at the Controlled level:
{
"bundle-brand-approvals.json": {
"validate": "bundle",
"options": {
"now": "2026-10-20T00:00:00Z",
"level": "controlled"
}
}
}
Invalid cases
Each file in invalid/ is one case:
| Member | Meaning |
|---|---|
description |
What is wrong, in a sentence. |
section |
The section of this draft whose rule the case exercises. |
validate |
The check, as above, or json for text or bytes that decoding alone refuses. |
base |
The name of a valid fixture the case starts from. |
input |
Instead of base, the exact text to check, for json cases. |
input |
Instead of base or input, the exact bytes to check, in base64 (RFC 4648, the standard alphabet, padded), for json cases whose bytes are not text. A runner decodes it to bytes and decodes those as section 2.1 says. |
patch |
Edits applied to a copy of base, in order (below). |
reseal |
When present, the digests to recompute after the patch (below): receipts for the receipt chain and the evaluations’ citations, all for the approvals’ binding digests as well. |
options |
The inputs of the check (below). |
expected |
The exact list of { "code", "path" } pairs the check reports, in order: sorted by path, then by code. |
A case with a base and no patch checks the valid document as it is, under other inputs or as another kind of document. A case, in full:
{
"description": "A cost in another currency than the limits.",
"section": "9.9",
"validate": "bundle",
"base": "bundle-brand-approvals.json",
"patch": [
{
"op": "replace",
"path": "/6/cost/currency",
"value": "EUR"
}
],
"reseal": "receipts",
"options": {
"now": "2026-10-20T00:00:00Z"
},
"expected": [
{
"code": "currency_mismatch",
"path": "/6/cost"
}
]
}
Patches
A patch is a list of operations from RFC 6902, limited to add, replace and remove. Each has an op, a path (an RFC 6901 JSON Pointer into the document) and, for add and replace, a value. In an array, add inserts before the index it names, and the index - appends.
Resealing
A case resealed with all first sets, for every authority binding in the record, every approval’s covers.binding_digest to the binding’s digest (section 5.3). Then, for both receipts and all:
- Take the execution receipts in array order.
- For each, remove
integrity.previous_digest; if another receipt came before it in the array, setintegrity.previous_digestto theintegrity.digestof the receipt just before it in the array. - Set its
integrity.digestto its digest (section 6.6). - Finally, for every evaluation result, set the
digestof each entry of itsreceiptsto the digest of the receipt with thatid, where the record holds one.
A case without reseal is checked as patched: its digests are left as the base had them, on purpose.
Options
The options name the inputs of section 9.1 and section 12:
| Option | Input |
|---|---|
now |
The current time, a UTC timestamp. |
level |
The assurance level: essential, controlled or assured. Absent means essential. |
sodThreshold |
The checking party’s separation-of-duties threshold, as money. |
revocations |
The live revocation status: a list of { "id", "revoked, each a binding or approval identifier and the time it was revoked. |
requestedHost |
For a discovery document, the host it was requested from. |
issuerMetadata |
For a discovery document, the authorization server metadata its auth serves. |
poppy |
For a discovery document, the linked poppy: its url and its document. |
No case names the supported extensions of section 9.1: every case is checked with no extension supported but the core one, pap, which work contracts carry (section 2.12).
From a schema validator to (code, path) pairs
The schemas check the shape of a document (section 8.2, step 5). They refer to each other by $id, which is an identifier, not a location to fetch, so bundle all of them, from /spec/v0.1/schemas/, with the validator (section 2.14). A JSON Schema validator reports failing assertions, not (code, path) pairs. Have it report every failing assertion of a step, since a step reports all of its errors together, where most validators stop at the first unless they are told otherwise. Apply a profile’s schema (step 6) only once the object’s own schema passes: section 8.2 stops at the first step that finds an error, so a profile’s errors are never reported beside the object schema’s, as object shows. From its output:
- A failing
requiredisschema_violationat the pointer of the missing member. - A member that
additionalPropertiesrefuses isunknown_memberat that member’s pointer. - A
falsesubschema, which forbids a member, isschema_violationat that member. - Every other failing assertion is
schema_violationat its instance location: the value that fails it. - The
ifof a conditional reports nothing itself; the assertions of itsthenorelsereport instead. AnallOfreports nothing of its own either. - Each (code, path) pair is reported once, sorted by path, then by code, comparing strings by UTF-16 code units (section 8.3).
Every object’s schema lists all of the object’s members and closes it with additionalProperties: false, so a member is unknown exactly when that list does not name it, whatever a validator does with annotations (section 2.13). Unknown members therefore come out the same in every validator.
Formats and text
formatis an assertion in this draft, with the rules of section 2.14:dateis the timestamp rule of section 2.7, and-time uriis theURIof RFC 3986 with a hierarchical part that is not empty. A library’s own checks may differ. Itsdatecheck may refuse-time 23:59:60, or accept a sixtieth second at another time of day, and its time arithmetic may not treat23:59:60as the same instant as00:00:00of the next day, as section 2.7 does. Itsuricheck may accept a value with nothing after its scheme, a port that is not digits, or a bracket in a path; fixtures hold each. Apply the draft’s rules.- Patterns keep to the subset of regular expressions that JSON Schema recommends (section 2.14), and
$matches only at the very end of a value, as in ECMA-262. In PCRE, Python, Java and .NET,$also matches before a final line break unless the engine is told otherwise, for example with PCRE’sPCRE2_DOLLAR_ENDONLYoption, or by ending the pattern with\zinstead (\Zin Python). A fixture holds a domain that ends with a line break. - A lone surrogate in a string or a member name is
invalid_jsonat"", found at decoding (section 2.1). Many JSON parsers replace a lone surrogate or drop it without a word, so check the text itself. Decoding is strict UTF-8 too: an overlong form, a truncated sequence, a continuation byte with no lead byte and an encoded surrogate are all refused, where a lenient decoder would replace them. - A record is decoded as one document before its objects are checked (section 9.1), so a lone surrogate anywhere in it is
invalid_jsonat"", not an error at one object’s path.
The test vectors
Canonicalization
fixtures/vectors/canonicalization.json tests the canonical form of section 2.15, the JSON Canonicalization Scheme of RFC 8785. Besides draft and defined_in, it holds cases, each with:
| Member | Meaning |
|---|---|
description |
What the case shows, in a sentence. |
input |
A JSON text to parse. |
canonical |
Its canonical form, exactly. |
digest |
sha256: and the lowercase hexadecimal SHA-256 of the canonical form’s UTF-8 bytes: a digest as section 2.15 defines it. |
error |
Instead of canonical and digest, why the text has no canonical form. lone: a string or a member name holds a lone surrogate, on which a canonicalizer fails. |
Parse input_text, canonicalize the value, and compare the result with canonical and its digest with digest. The cases are the examples of RFC 8785 and others that follow its rules: member names sorted by UTF-16 code units at every depth, the escapes in strings, integers, numbers from its Appendix B written in another form, and the literals. Strict decoding refuses the text of an error case before a canonicalizer sees it (section 2.1), so to test a canonicalizer on it, parse the text with a parser that keeps a lone surrogate. A case:
{
"description": "Zero is written 0, and so is minus zero.",
"input_text": "[0, -0]",
"canonical": "[0,0]",
"digest": "sha256:3d5812abc84c11768aa73a732c85d75dbed439188f5bb3239e9b762ea31d9862"
}
Digests
fixtures/vectors/digests.json gives the two digests this draft defines over Enna data for the execution receipts and authority bindings in the valid fixtures, once for each distinct digest, with the canonical form each is computed over. Besides draft, it holds receipts and bindings, each with its own defined_in and its cases. Each case is the first receipt or binding found with its digest, taking the fixtures in the order of their file names and the objects of each in record order.
| Member | Meaning |
|---|---|
fixture |
The fixture’s path under /spec, such as valid. |
pointer |
The JSON Pointer of the object in that fixture: "" for a file that holds it alone, /3 for the fourth object of a record, /objects for the third object an envelope carries. |
id |
The object’s identifier. |
canonical |
The canonical form the digest covers: the receipt without integrity (section 6.6), or the binding without approvals, revision, revision, change and created (section 5.3). |
digest |
For a receipt, its digest, which its integrity states. |
previous |
For a receipt that states one, its integrity: the digest of the receipt before it in its chain. |
binding |
For a binding, its digest, which the covers of each of its approvals states. |
The catalogs
Each file in /spec/v0.1/catalogs/ starts with draft, which is "0.1", and defined_in: the section that defines what the file lists, and the url of that section’s page. Entries keep the order of the protocol package’s own data.
error:-codes.json codes, each with itscode, theareaof section 8.4 it is listed under, and itsdescription.lifecycle.json:states,terminal_states,events,transitions(each afromstate, aneventand atostate) andblock_reasons, from sections 10.1 to 10.4. Thena2a, the mapping of section 10.6:task_states, the A2A task states;states, giving each business state its task statea2a, amatchofexactorapproximate, and anote; andunmapped, the task states that stand for no business state, each with the reason. Thenpap, the mapping of section 10.7:states, giving each business state its operation statepap, orfrom_receiptswhere the receipts decide it, amatchofexact,approximateorderived, and anote; andunmapped. Anoteis empty where an exact match needs none.identifiers.json:prefixes, each kind of identifier with its prefix.profiles.json:profiles, each with itsid, the$idof its schema asschema, which is also the address the schema is published at, and thedefined_inof the section that defines it.extensions.json:core, each core extension with the type ofobjectit is defined for, itsname, and thedefined_inof the section that defines it.
The manifest
/spec/v0.1/manifest.json lists every file under /spec/v0.1/ but the pages and the manifest itself: the Markdown of each page of the specification, the schemas, the fixtures, the vectors and the catalogs. Besides draft, it holds files, sorted by path, each with:
| Member | Meaning |
|---|---|
path |
Where the file is published, on https://businessagentprotocol. |
media |
The media type the file is served with: text for the Markdown, application for the schemas, and application for the rest. |
sha256 |
The SHA-256 of the file’s bytes, as 64 lowercase hexadecimal digits. |
license |
The file’s license, by its SPDX identifier: CC-BY-4.0 for the Markdown, and Apache-2.0 for the rest. |
The manifest holds no time, so the same files always give the same manifest. To check a download, compute the SHA-256 of each file’s bytes exactly as they were served, before parsing them or changing their line ends, and compare it with the file’s sha256. To see what changed between two copies of the kit, compare their manifests. Like any digest, a hash shows that a file is unchanged only against a manifest you already trust (section 2.15).