{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hud-ai/json-schema/hud-ai-check-run-response-schema.json",
  "title": "CheckRunResponse",
  "description": "One immutable check execution and its subject snapshot.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hud-ai-checks-api-openapi.yml#/components/schemas/CheckRunResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "check_key": {
      "type": "string",
      "title": "Check Key"
    },
    "definition_version": {
      "type": "integer",
      "title": "Definition Version"
    },
    "definition_snapshot": {
      "additionalProperties": true,
      "type": "object",
      "title": "Definition Snapshot"
    },
    "definition_hash": {
      "type": "string",
      "title": "Definition Hash"
    },
    "executor_type": {
      "$ref": "#/$defs/CheckExecutorType"
    },
    "subject_type": {
      "$ref": "#/$defs/CheckSubjectType"
    },
    "subject_id": {
      "type": "string",
      "format": "uuid",
      "title": "Subject Id"
    },
    "subject_snapshot": {
      "additionalProperties": true,
      "type": "object",
      "title": "Subject Snapshot"
    },
    "snapshot_hash": {
      "type": "string",
      "title": "Snapshot Hash"
    },
    "status": {
      "$ref": "#/$defs/CheckRunStatus"
    },
    "result": {
      "additionalProperties": true,
      "type": "object",
      "title": "Result"
    },
    "summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Summary"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "execution_trace_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Trace Id"
    },
    "attempt": {
      "type": "integer",
      "title": "Attempt"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "check_key",
    "definition_version",
    "definition_snapshot",
    "definition_hash",
    "executor_type",
    "subject_type",
    "subject_id",
    "subject_snapshot",
    "snapshot_hash",
    "status",
    "summary",
    "error",
    "execution_trace_id",
    "attempt",
    "created_at",
    "completed_at"
  ],
  "$defs": {
    "CheckExecutorType": {
      "type": "string",
      "enum": [
        "deterministic",
        "scenario_agent"
      ],
      "title": "CheckExecutorType",
      "description": "Execution mechanisms supported by a check definition."
    },
    "CheckRunStatus": {
      "type": "string",
      "enum": [
        "running",
        "passed",
        "failed",
        "error"
      ],
      "title": "CheckRunStatus",
      "description": "Lifecycle states for a platform check run."
    },
    "CheckSubjectType": {
      "type": "string",
      "enum": [
        "environment",
        "taskset",
        "task",
        "trace"
      ],
      "title": "CheckSubjectType",
      "description": "Platform resources supported by the check framework."
    }
  }
}