{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crosstabs-com/json-schema/crosstabs-com-health-report-schema.json",
  "title": "HealthReport",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crosstabs-com-openapi.json#/components/schemas/HealthReport",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "integer",
      "const": 3
    },
    "service": {
      "type": "string",
      "const": "crosstabs.com"
    },
    "status": {
      "type": "string",
      "enum": [
        "operational",
        "degraded"
      ]
    },
    "checkedAt": {
      "type": "string",
      "format": "date-time"
    },
    "build": {
      "type": "object",
      "properties": {
        "deploymentId": {
          "type": [
            "string",
            "null"
          ]
        },
        "deploymentUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceRevision": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceBranch": {
          "type": [
            "string",
            "null"
          ]
        },
        "applicationVersion": {
          "type": "string"
        },
        "provenance": {
          "type": "object",
          "properties": {
            "confidence": {
              "type": "string",
              "enum": [
                "metadata_only",
                "unverified"
              ]
            },
            "limitations": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "confidence",
            "limitations"
          ]
        }
      },
      "required": [
        "deploymentId",
        "deploymentUrl",
        "sourceRevision",
        "sourceBranch",
        "applicationVersion",
        "provenance"
      ]
    },
    "trustReadiness": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "evidence_recorded"
          ]
        },
        "affectsOperationalStatus": {
          "type": "boolean",
          "const": false
        },
        "basis": {
          "type": "string",
          "const": "checked-in-release-contract"
        },
        "contractUpdatedAt": {
          "type": "string"
        },
        "pendingEvidence": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "detail": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "detail"
            ]
          }
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "status",
        "affectsOperationalStatus",
        "basis",
        "contractUpdatedAt",
        "pendingEvidence",
        "limitations"
      ]
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "application_runtime",
              "statistics_engine"
            ]
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded"
            ]
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "detail"
        ]
      }
    }
  },
  "required": [
    "schemaVersion",
    "service",
    "status",
    "checkedAt",
    "build",
    "trustReadiness",
    "checks"
  ]
}