{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/diagnostic.schema.json",
  "title": "diagnostic",
  "type": "object",
  "required": [
    "id",
    "test",
    "status"
  ],
  "properties": {
    "id": {
      "$ref": "common.schema.json#/$defs/uuid",
      "x-heart-privacy": "public"
    },
    "test": {
      "type": "string",
      "x-heart-privacy": "public"
    },
    "status": {
      "enum": [
        "available",
        "running",
        "passed",
        "failed",
        "skipped"
      ],
      "x-heart-privacy": "public"
    },
    "disruptive": {
      "type": "boolean",
      "x-heart-privacy": "public"
    },
    "startedAt": {
      "$ref": "common.schema.json#/$defs/timestamp",
      "x-heart-privacy": "public"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-heart-privacy": "internal"
    },
    "artifactId": {
      "$ref": "common.schema.json#/$defs/uuid",
      "x-heart-privacy": "internal"
    },
    "bundle": {
      "description": "A support bundle (test bundle), filtered for the caller's clearance. Never holds never-share data or secrets.",
      "type": "object",
      "properties": {
        "since": {
          "$ref": "common.schema.json#/$defs/timestamp"
        },
        "until": {
          "$ref": "common.schema.json#/$defs/timestamp"
        },
        "include": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        },
        "maxBytes": {
          "type": "integer",
          "minimum": 0
        },
        "truncated": {
          "type": "boolean",
          "description": "True when entries were left out to keep within maxBytes."
        },
        "sections": {
          "type": "object",
          "description": "One member per included section, such as logs or config."
        }
      },
      "x-heart-privacy": "internal"
    },
    "ext": {
      "$ref": "common.schema.json#/$defs/ext",
      "x-heart-privacy": "private"
    }
  }
}
