Skip to content

Add AlgoVoi Compliance Receipt v1 schema#5726

Merged
madskristensen merged 2 commits into
SchemaStore:masterfrom
chopmob-cloud:add-algovoi-compliance-receipt-v1
May 23, 2026
Merged

Add AlgoVoi Compliance Receipt v1 schema#5726
madskristensen merged 2 commits into
SchemaStore:masterfrom
chopmob-cloud:add-algovoi-compliance-receipt-v1

Conversation

@chopmob-cloud
Copy link
Copy Markdown
Contributor

Summary

Adds a new JSON Schema (algovoi-compliance-receipt-v1.json) for the AlgoVoi compliance receipt -- a categorical screening decision record emitted at agentic-payment admission time and retained under framework-bound retention obligations (UK MLR 2017, EU AMLD5/6, MiCA Art 80, AMLR Art 56, DORA Art 14).

The schema enforces:

  • Closed enum on screen_result (ALLOW / REFER / DENY). The categorical outcome is load-bearing for downstream regulatory obligations -- under UK POCA 2002 s 330 a REFER carries a mandatory SAR obligation that a DENY does not. A score / tier projection would lose this distinction and break year-five auditability.
  • Integer-only screen_timestamp_ms (Substrate Rule 1 from x402-foundation/x402 PR Add New Horizons Schemas #2436).
  • DID pattern enforcement on screen_provider_did.
  • canon_version pinned to jcs-rfc8785-v1 (canonicalisation discipline pin).
  • Closed envelope (additionalProperties: false) so retained bytes are unambiguous.

Files added

  • src/schemas/json/algovoi-compliance-receipt-v1.json -- the schema itself (draft-07).
  • src/test/algovoi-compliance-receipt-v1/ -- 3 positive tests:
    • receipt-allow-uk-eu.json (ALLOW under UK + EU joint jurisdiction)
    • receipt-refer-uk-sar-obligation.json (REFER under UK, mandatory SAR)
    • receipt-deny-sanctions.json (DENY across UK + EU + US sanctions)
  • src/negative_test/algovoi-compliance-receipt-v1/ -- 7 negative tests:
    • missing-payer-ref.json, invalid-screen-result.json, float-timestamp.json, empty-jurisdiction-flags.json, invalid-did-format.json, unknown-canon-version.json, extra-field-score.json
  • src/api/json/catalog.json -- new catalog entry.

Validation

node cli.js check --SchemaName algovoi-compliance-receipt-v1 passes all pre-checks and Ajv validation.

Context

The substrate underneath this receipt is formalised in x402-foundation/x402 PR #2436 (three-voice coalition co-signed) and pinned to urn:x402:canonicalisation:jcs-rfc8785-v1. Reference implementations in Python (algovoi-substrate) and TypeScript (@algovoi/substrate) produce schema-valid receipts via build_compliance_receipt(...) / buildComplianceReceipt(...).

The canonical home of the schema with examples and per-anchor-set conformance vectors is at https://github.com/chopmob-cloud/algovoi-jcs-conformance-vectors.

Test plan

  • Schema validates against its own meta-schema (draft-07)
  • Three positive tests validate against the schema
  • Seven negative tests are correctly rejected
  • node cli.js check --SchemaName algovoi-compliance-receipt-v1 passes
  • Catalog entry has no trailing forbidden characters, valid URL pattern (https://www.schemastore.org/...), specific (non-generic) fileMatch patterns

The AlgoVoi compliance receipt is the categorical screening decision
record emitted by an AlgoVoi-discipline screening provider at admission
time (ALLOW / REFER / DENY) and retained as part of an audit chain under
framework-bound retention obligations (UK MLR 2017 reg 40, EU AMLD5/6,
MiCA Art 80, AMLR Art 56, DORA Art 14).

The categorical outcome is load-bearing for downstream regulatory
obligations -- under UK POCA 2002 s 330 a REFER carries a mandatory SAR
obligation that a DENY does not -- so the schema enforces a closed enum
on screen_result rather than a score/tier projection.

Substrate references:
- x402-foundation/x402 PR SchemaStore#2436 (canonicalisation discipline)
- x402-foundation/x402 PR SchemaStore#2434 (compliance-receipt-fixture)
- chopmob-cloud/algovoi-substrate (reference implementations in Python
  + TypeScript that produce schema-valid receipts)
- chopmob-cloud/algovoi-jcs-conformance-vectors (the canonical home of
  this schema with examples and per-anchor-set conformance vectors)

Includes 3 positive test cases (ALLOW UK+EU, REFER UK with SAR
obligation, DENY across UK/EU/US sanctions) and 7 negative cases
(missing required field, invalid screen_result, float timestamp,
empty jurisdiction_flags, invalid DID format, unknown canon_version,
extra field).
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

chopmob-cloud added a commit to chopmob-cloud/algovoi-jcs-conformance-vectors that referenced this pull request May 23, 2026
The schemastore.org submission required draft-07 for broader IDE coverage.
All features used by the schema work in draft-07 (closed enum, additional-
Properties: false, pattern, minimum, type integer). No functional change to
the schema; only the $schema meta-version moves from draft 2020-12 to
draft-07. Examples revalidated; algovoi-substrate output revalidated.

Schemastore PR: SchemaStore/schemastore#5726
@madskristensen madskristensen merged commit 0a439cd into SchemaStore:master May 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants