# SO4AG 0.1 conformance suite

Version 0.1.0, 2026-11-20. Plain JSON files for anyone who writes a validator or a reader. Nothing here needs SOQVER, an account or our code.

| File | What it is |
|---|---|
| `shop.json`, `rental.json` | Two valid sources. Together they use every value type, an unknown and a not-applicable claim, an expired and a future claim, a dispute, attestations and an extension. |
| `shop.jsonld`, `rental.jsonld` | The same sources in JSON-LD ([mapping](../../so4ag-0.1-jsonld.md)). |
| `digests.json` | Claim id to digest (`sha256:` of the canonical JSON of the claim without `attestations`, RFC 8785). |
| `evaluation.json` | 32 cases for readers: a claim, a task, a time and the expected answer. |
| `validation.json` | 24 cases for validators: a manifest and whether it is valid, with the error or warning codes that must be reported. |

## A reader passes when

1. For every claim in `shop.json` and `rental.json` it computes the digest in `digests.json`.
2. Reading `shop.jsonld` and `rental.jsonld` gives claims with the same digests. The same holds when the JSON-LD sits in a `<script type="application/ld+json">` block of an HTML page.
3. For every case in `evaluation.json` it returns the expected `usable`, the expected set of `reasons` and, when usable, the expected `value`. The answer must be the same whichever of the three forms the claim was read from.

`task` has `property`, optional `subject`, `scope` (key to value), optional `understoodScopeKeys` (defaults to the scope keys of the profile that defines the property), optional `requireReview` and `trustedIssuers`. `now` is the time of the question.

Reasons: `property_mismatch`, `subject_mismatch`, `scope_not_comparable:<key>`, `scope_not_in_task:<key>`, `scope_mismatch:<key>`, `not_yet_valid`, `expired`, `disputed`, `unknown`, `not_applicable`, `no_valid_independent_attestation`. `disputed` is reported but does not make the claim unusable; every other reason does.

## A validator passes when

For every case in `validation.json` it agrees on `valid` and reports at least the listed `errors` and `warnings` codes (it may report more warnings). `schema` means the manifest breaks the JSON schema.

## Implementations checked against this suite

| Implementation | Language | Covers |
|---|---|---|
| `validator/` (reference) | JavaScript | validation, reading, JSON-LD both ways |
| `readers/python/so4ag_reader.py` | Python, standard library | reading from all three forms, digests |

Both were written by the SOQVER team; they share no code. No third-party implementation exists yet. If you write one, tell us at info@soqver.com and we will list it, including cases where you disagree with the expected answer.

Licence: Apache-2.0 for code, CC BY 4.0 for the cases.
