{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agenticrail-nz/json-schema/agenticrail-nz-report-schema.json",
  "title": "Report",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agenticrail-nz-openapi.json#/components/schemas/Report",
  "type": "object",
  "properties": {
    "report_version": {
      "type": "string"
    },
    "report_hash": {
      "type": "string"
    },
    "generated_at": {
      "type": "integer"
    },
    "sequence_id": {
      "type": "string"
    },
    "model_id": {
      "type": "string"
    },
    "verification_status": {
      "type": "string",
      "enum": [
        "VERIFIED_INTACT",
        "CHAIN_BROKEN",
        "RECORD_INCOMPLETE",
        "SIGNATURE_INVALID"
      ],
      "description": "Recomputed fresh on every call, never stored. RECORD_INCOMPLETE (added 2026-10-08): every chain link holds but one or more numbered receipts are absent, named in `decision_index.missing`. CHAIN_BROKEN takes precedence over it."
    },
    "seal_status": {
      "type": "string",
      "enum": [
        "OPEN",
        "SEALED"
      ]
    },
    "signatures": {
      "type": "object",
      "additionalProperties": true
    },
    "hash_chain": {
      "type": "object",
      "additionalProperties": true
    },
    "decision_index": {
      "type": "object",
      "description": "Whether the signed decision numbers run unbroken from 1 (added 2026-10-08). `status` is `complete`, `gaps` (with `missing`, and `duplicates` if any), `not_applicable` (the receipts predate the field) or `not_checked` (a partial listing). A missing number is an absent receipt, never written or removed; the report does not say which. Receipts missing after the highest number present cannot be seen by this check.",
      "additionalProperties": true
    },
    "independent_archive": {
      "type": "object",
      "description": "Verdict from comparing against a separate write-once archive bucket held under a different credential. Answers verdict-only and never returns archived bytes. Includes `archived_at`, the storage service's own upload stamp — corroboration, explicitly not a cryptographically attested timestamp.",
      "additionalProperties": true
    },
    "verification": {
      "type": "object",
      "description": "How to verify this report yourself, including the public key reference and the timestamp caveat.",
      "additionalProperties": true
    },
    "summary": {
      "type": "object",
      "additionalProperties": true
    },
    "enforcement_log": {
      "type": "array",
      "description": "One entry per decision, each carrying the raw `signature` (base64), the exact `signed_canonical` preimage, `key_id` and `signature_alg`, plus `third_party_verifiable` so an Ed25519 receipt is distinguishable from a legacy server-side-only one. This is a presentation projection: `prev_receipt_id` is not a field here, and `chain_integrity` is the authoritative block for linkage.",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "chain_integrity": {
      "type": "array",
      "description": "Authoritative per-receipt linkage verdicts.",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "enforcement_summary": {
      "type": "string",
      "description": "Deterministic plain-language summary of the enforcement record, composed from the counts in this document. NO LANGUAGE MODEL IS INVOLVED: the same inputs always produce byte-identical text, so this field reproduces like the rest of the report. It states what the record establishes (the order steps were permitted in, and that the record has not changed since it was written) alongside what it does not (that a permitted step's downstream work ran, or that timestamps are independently attested). Replaced an LLM-written `compliance_narrative` on 2026-08-07."
    }
  }
}