Agent Record conformance test kit
Anyone who writes or reads OCC Agent Records needs to agree on what a well-formed record is. This kit gives you 20 fictional test records with the expected verdict for each, the profile rules behind them, and a checker that runs in your browser. Use it to test your own tooling, or to check a record before you publish it.
Run the vectors
Each vector is a complete record with one thing changed. A checker passes a vector when its verdict matches expect and it reports the listed code. Codes starting schema: are JSON Schema 2020-12 keywords; OCC-R codes are the profile rules below.
| ID | Case | Expect | Code | Result |
|---|---|---|---|---|
| V01 | Full recordThe published example with every optional block filled. | valid | – | not run |
| V02 | Minimal recordOnly required fields; optional blocks removed. | valid | – | not run |
| V03 | Record with a disclosed incidentAn incident coded under the Incident & Disclosure protocol. | valid | – | not run |
| V04 | Withdrawn evidence stays listedWithdrawn evidence is recorded, not erased. | valid | – | not run |
| V05 | Missing principalEvery record says on whose behalf the agent acts. | invalid | schema:required | not run |
| V06 | Unknown authority ceilingThe ceiling uses one of the seven named levels. | invalid | schema:enum | not run |
| V07 | Horizon out of rangeAIH-12 runs from H1 to H12. | invalid | schema:pattern | not run |
| V08 | Date in the wrong formatDates are written YYYY-MM-DD. | invalid | schema:format | not run |
| V09 | Impossible calendar date30 February does not exist. | invalid | schema:format | not run |
| V10 | Malformed evidence digestA digest is sha256: followed by 64 lowercase hex characters. | invalid | schema:pattern | not run |
| V11 | Wrong record versionThis kit checks version 0.1. | invalid | schema:const | not run |
| V12 | Declared authority as free textDeclared and effective authority are lists, so they can be compared line by line. | invalid | schema:type | not run |
| V13 | Threshold does not match horizonAn H5 agent is checked against T5 and E5. | invalid | OCC-R1 | not run |
| V14 | Reassessment date before issueA record cannot fall due before it exists. | invalid | OCC-R2 | not run |
| V15 | Evidence withdrawn before it was producedDates must run forwards. | invalid | OCC-R3 | not run |
| V16 | Incident detected before it occurredDates must run forwards. | invalid | OCC-R4 | not run |
| V17 | Incident severity outside S1–S4Severity uses the protocol scale. | invalid | schema:enum | not run |
| V18 | Unknown field inside OECD codingThe OECD block is closed so codes stay comparable. | invalid | schema:additional | not run |
| V19 | Threshold not met, no gaps listedWell formed, but a reader cannot see what is missing. Raises a warning. | valid | OCC-R5 | not run |
| V20 | GUARD level without a declarationWell formed, but the claim cannot be followed. Raises a warning. | valid | OCC-R8 | not run |
Free to use under the same terms as the OCC schemas. Every record uses example.org and invented names.
What the schema cannot say
The Agent Record schema and the Incident schema fix the shape of a record. These rules cover relationships between fields. Errors make a record not well formed; warnings flag something a reader will struggle to follow.
| Code | Level | Rule |
|---|---|---|
| OCC-R1 | error | The AIT-12 threshold and AIE-12 profile carry the same number as the AIH-12 horizon (H5 → T5 → E5). |
| OCC-R2 | error | reassess_by is later than issued. |
| OCC-R3 | error | Evidence cannot be withdrawn before the date it was produced. |
| OCC-R4 | error | An incident cannot be detected before it occurred. |
| OCC-R5 | warning | If the AIT-12 status is not "meets", the gaps are listed. |
| OCC-R6 | warning | The mandate has not already expired on the issue date. |
| OCC-R7 | warning | The revocation test date is not later than the issue date. |
| OCC-R8 | warning | A GUARD level of GUARD 1 or above points to its F-ACT declaration. |
| OCC-R9 | warning | record_id is a URL or URN, so others can cite it. |
| OCC-R10 | warning | Evidence whose valid_until is before the issue date is stale and should be refreshed or withdrawn. |
Check a record
Fetch a listed public record by its reference, or paste one. To check the register’s signature as well, use Verify a signed record.
Runs in your browser. Nothing you paste is sent anywhere.
What passing means
Building the kit turned up ten schema errors in our own fictional example record, which have been corrected. If you find a vector you disagree with, raise it in the public review.