{
 "$id": "https://compute.tlay.io/schemas/verification-report.v1.json",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "additionalProperties": false,
 "description": "A record of one check of a TLAY receipt or result bundle, made by tlay_verify.py --json or by compute.tlay.io/verify (docs/EVIDENCE_CONTRACT.md section 8). It is not signed and it is not evidence: the receipt is. Anyone relying on a verdict re-runs the check on the bundle. It never holds the result value, the commitment salt or any key. Uses only these keywords: type, const, enum, pattern, required, properties, additionalProperties, items.",
 "properties": {
  "checked_at": {
   "description": "UTC time of the check, from the checking machine's clock",
   "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$",
   "type": "string"
  },
  "checks": {
   "items": {
    "additionalProperties": false,
    "properties": {
     "detail": {
      "type": "string"
     },
     "name": {
      "pattern": "^[a-z_]+$",
      "type": "string"
     },
     "status": {
      "enum": [
       "PASS",
       "FAIL",
       "SIMULATED",
       "NOT_CHECKED",
       "NOT_AVAILABLE"
      ]
     }
    },
    "required": [
     "name",
     "status",
     "detail"
    ],
    "type": "object"
   },
   "type": "array"
  },
  "evidence_scope": {
   "enum": [
    "attestation_record_signature",
    "simulated_attestation_record",
    "unknown"
   ]
  },
  "informational_fields": {
   "description": "bundle fields present that no signature covers",
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "input": {
   "additionalProperties": false,
   "properties": {
    "bundle_version": {
     "description": "null for a bare receipt",
     "type": [
      "string",
      "null"
     ]
    },
    "name": {
     "type": "string"
    },
    "sha256": {
     "description": "SHA-256 of the file as read",
     "pattern": "^[0-9a-f]{64}$",
     "type": "string"
    }
   },
   "required": [
    "name",
    "sha256",
    "bundle_version"
   ],
   "type": "object"
  },
  "notes": {
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "raw_hardware_evidence": {
   "description": "the attestation_evidence check (docs/adr/0055): PASS or FAIL when the bundle carries the raw evidence and its policy, else NOT_CHECKED",
   "enum": [
    "PASS",
    "FAIL",
    "SIMULATED",
    "NOT_CHECKED"
   ]
  },
  "receipt_id": {
   "type": [
    "string",
    "null"
   ]
  },
  "release_id": {
   "type": [
    "string",
    "null"
   ]
  },
  "result_visibility": {
   "enum": [
    "open",
    "sealed",
    "absent"
   ]
  },
  "schema_version": {
   "const": "tlay-verification-report/v1"
  },
  "security_mode": {
   "enum": [
    "local_simulation",
    "attested_pilot",
    "unknown"
   ]
  },
  "simulated": {
   "description": "a check was SIMULATED (local simulation: no hardware evidence)",
   "type": "boolean"
  },
  "trust_anchor_key_ids": {
   "additionalProperties": false,
   "properties": {
    "key_authority": {
     "pattern": "^ed25519:[0-9a-f]{16}$",
     "type": "string"
    },
    "release_service": {
     "pattern": "^ed25519:[0-9a-f]{16}$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "trust_source": {
   "enum": [
    "user-pinned",
    "site-published",
    "bundle-supplied"
   ]
  },
  "unchecked_reasons": {
   "items": {
    "additionalProperties": false,
    "properties": {
     "name": {
      "pattern": "^[a-z_]+$",
      "type": "string"
     },
     "reason": {
      "type": "string"
     }
    },
    "required": [
     "name",
     "reason"
    ],
    "type": "object"
   },
   "type": "array"
  },
  "verdict": {
   "enum": [
    "PASS",
    "PARTIAL",
    "FAIL"
   ]
  },
  "verifier_version": {
   "description": "tlay_verify@<version> or compute.tlay.io/verify@<asset version>",
   "pattern": "^(tlay_verify|compute\\.tlay\\.io/verify)@[0-9A-Za-z._-]+$",
   "type": "string"
  }
 },
 "required": [
  "schema_version",
  "verifier_version",
  "checked_at",
  "input",
  "receipt_id",
  "release_id",
  "verdict",
  "simulated",
  "security_mode",
  "trust_source",
  "trust_anchor_key_ids",
  "evidence_scope",
  "raw_hardware_evidence",
  "result_visibility",
  "checks",
  "unchecked_reasons",
  "informational_fields",
  "notes"
 ],
 "title": "tlay-verification-report/v1",
 "type": "object"
}
