{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compatlab-me/json-schema/compatlab-me-report-envelope-schema.json",
  "title": "ReportEnvelope",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compatlab-me-openapi.yml#/components/schemas/ReportEnvelope",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "number",
      "const": 1
    },
    "status": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "scanId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "current": {
          "type": "boolean"
        },
        "policyAllowed": {
          "type": "boolean"
        },
        "snapshotAvailable": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "invalidatedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "invalidationReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "replacedBy": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "observationRevision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "previousScanId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "previousReportId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "scanId",
        "current",
        "policyAllowed",
        "snapshotAvailable",
        "createdAt",
        "invalidatedAt",
        "invalidationReason",
        "replacedBy"
      ],
      "additionalProperties": false
    },
    "report": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "scanId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "classifierRevision": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "observedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "classifiedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "artifact": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "maxLength": 214
            },
            "version": {
              "type": "string",
              "maxLength": 256
            },
            "integrity": {
              "type": "string",
              "maxLength": 1024
            },
            "tarballUrl": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "required": [
            "name",
            "version",
            "integrity",
            "tarballUrl"
          ],
          "additionalProperties": false
        },
        "preparation": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "outcome": {
              "type": "string",
              "enum": [
                "pass",
                "partial",
                "fail",
                "inconclusive",
                "unsupported",
                "not_applicable",
                "infrastructure_error"
              ]
            },
            "failure": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "classification": {
                      "type": "string",
                      "enum": [
                        "package_not_found",
                        "package_version_not_found",
                        "registry_unavailable",
                        "artifact_download_failed",
                        "artifact_integrity_mismatch",
                        "artifact_integrity_unavailable",
                        "archive_rejected",
                        "package_manifest_invalid",
                        "declared_platform_unsupported",
                        "dependency_source_unsupported",
                        "dependency_install_failed",
                        "install_script_required",
                        "native_compilation_required",
                        "preparation_limit_exceeded",
                        "package_resolution_failed",
                        "optional_peer_missing",
                        "esm_import_failed",
                        "commonjs_require_failed",
                        "export_path_failed",
                        "unsupported_builtin",
                        "unsupported_runtime_api",
                        "native_addon_load_failed",
                        "unexpected_process_exit",
                        "unclassified_runtime_failure",
                        "sandbox_policy_limited",
                        "process_timeout",
                        "process_out_of_memory",
                        "process_limit_exceeded",
                        "output_limit_exceeded",
                        "temporary_disk_limit_exceeded",
                        "coverage_limit_exceeded",
                        "sandbox_start_failed",
                        "runner_unavailable",
                        "runtime_image_unavailable",
                        "harness_protocol_error",
                        "result_submission_failed",
                        "control_plane_error",
                        "job_cancelled",
                        "service_policy_rejected",
                        "probe_assertion_failed"
                      ]
                    },
                    "phase": {
                      "type": "string",
                      "enum": [
                        "resolution",
                        "acquisition",
                        "extraction",
                        "preparation",
                        "static_analysis",
                        "sandbox_startup",
                        "module_resolution",
                        "module_evaluation",
                        "probe_assertion",
                        "teardown"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "package",
                        "prerequisite",
                        "policy",
                        "infrastructure",
                        "assertion"
                      ]
                    },
                    "retryable": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "captured_error_code",
                        "harness_observation",
                        "supervisor",
                        "preparation",
                        "control"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "optionalPeer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 214
                        },
                        "range": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "required": [
                        "name",
                        "range"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "classification",
                    "phase",
                    "origin",
                    "retryable",
                    "source",
                    "message"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "profileRevision": {
              "type": "string",
              "maxLength": 128
            },
            "snapshot": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "generation": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lockDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "treeDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "profileRevision": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "installerImage": {
                      "type": "string",
                      "maxLength": 256
                    }
                  },
                  "required": [
                    "id",
                    "generation",
                    "lockDigest",
                    "treeDigest",
                    "profileRevision",
                    "installerImage"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "installedCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "omittedOptionalCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "staticObservations": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "id",
            "outcome",
            "failure",
            "profileRevision",
            "snapshot",
            "installedCount",
            "omittedOptionalCount",
            "staticObservations"
          ],
          "additionalProperties": false
        },
        "matrix": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "revision": {
              "type": "string",
              "maxLength": 128
            },
            "platform": {
              "type": "string",
              "const": "linux_amd64_glibc"
            },
            "harnessRevision": {
              "type": "string",
              "maxLength": 128
            },
            "planRevision": {
              "type": "string",
              "maxLength": 128
            },
            "policyRevision": {
              "type": "string",
              "maxLength": 128
            },
            "images": {
              "minItems": 1,
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]{0,63}$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "node",
                      "bun",
                      "deno"
                    ]
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^\\d+\\.\\d+\\.\\d+$"
                  },
                  "imageId": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "builtAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "sourceImage": {
                    "type": "string",
                    "maxLength": 256,
                    "pattern": "@sha256:[a-f0-9]{64}$"
                  },
                  "baseImage": {
                    "type": "string",
                    "maxLength": 256,
                    "pattern": "@sha256:[a-f0-9]{64}$"
                  },
                  "supportImage": {
                    "type": "string",
                    "maxLength": 256,
                    "pattern": "@sha256:[a-f0-9]{64}$"
                  },
                  "platform": {
                    "type": "string",
                    "const": "linux_amd64_glibc"
                  },
                  "recipeRevision": {
                    "type": "string",
                    "const": "runtime_image_v1"
                  }
                },
                "required": [
                  "profileId",
                  "kind",
                  "version",
                  "imageId",
                  "builtAt",
                  "sourceImage",
                  "baseImage",
                  "supportImage",
                  "platform",
                  "recipeRevision"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "id",
            "revision",
            "platform",
            "harnessRevision",
            "planRevision",
            "policyRevision",
            "images"
          ],
          "additionalProperties": false
        },
        "omissions": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "counts": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "enum": [
                      "pattern",
                      "non_executable",
                      "not_exported",
                      "invalid_subpath",
                      "coverage_limit"
                    ]
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "required": [
                    "pattern",
                    "non_executable",
                    "not_exported",
                    "invalid_subpath",
                    "coverage_limit"
                  ]
                },
                "samples": {
                  "maxItems": 64,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "subpath": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "pattern",
                          "non_executable",
                          "not_exported",
                          "invalid_subpath",
                          "coverage_limit"
                        ]
                      }
                    },
                    "required": [
                      "subpath",
                      "reason"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "counts",
                "samples"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "outcome": {
          "type": "string",
          "enum": [
            "pass",
            "partial",
            "fail",
            "inconclusive",
            "unsupported",
            "not_applicable",
            "infrastructure_error"
          ]
        },
        "evidenceLevel": {
          "type": "string",
          "enum": [
            "static_only",
            "smoke_tested"
          ]
        },
        "coverageComplete": {
          "type": "boolean"
        },
        "cells": {
          "minItems": 4,
          "maxItems": 64,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "runId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profileId": {
                "type": "string",
                "maxLength": 64
              },
              "group": {
                "type": "string",
                "enum": [
                  "root",
                  "subpaths"
                ]
              },
              "mode": {
                "type": "string",
                "enum": [
                  "esm",
                  "commonjs"
                ]
              },
              "method": {
                "type": "string",
                "enum": [
                  "fresh_root_v2",
                  "sequential_batch_v2"
                ]
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "pass",
                  "partial",
                  "fail",
                  "inconclusive",
                  "unsupported",
                  "not_applicable",
                  "infrastructure_error"
                ]
              },
              "evidenceLevel": {
                "type": "string",
                "enum": [
                  "static_only",
                  "smoke_tested"
                ]
              },
              "coverage": {
                "type": "object",
                "properties": {
                  "planned": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 512
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "observed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "passed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "prerequisiteLimited": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "isolationPassed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "isolationUnconfirmed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "interrupted": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 512
                  },
                  "untested": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 512
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "complete": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "planned",
                  "observed",
                  "passed",
                  "failed",
                  "interrupted",
                  "untested",
                  "complete"
                ],
                "additionalProperties": false
              },
              "durationMs": {
                "type": "number",
                "minimum": 0
              },
              "failure": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "classification": {
                        "type": "string",
                        "enum": [
                          "package_not_found",
                          "package_version_not_found",
                          "registry_unavailable",
                          "artifact_download_failed",
                          "artifact_integrity_mismatch",
                          "artifact_integrity_unavailable",
                          "archive_rejected",
                          "package_manifest_invalid",
                          "declared_platform_unsupported",
                          "dependency_source_unsupported",
                          "dependency_install_failed",
                          "install_script_required",
                          "native_compilation_required",
                          "preparation_limit_exceeded",
                          "package_resolution_failed",
                          "optional_peer_missing",
                          "esm_import_failed",
                          "commonjs_require_failed",
                          "export_path_failed",
                          "unsupported_builtin",
                          "unsupported_runtime_api",
                          "native_addon_load_failed",
                          "unexpected_process_exit",
                          "unclassified_runtime_failure",
                          "sandbox_policy_limited",
                          "process_timeout",
                          "process_out_of_memory",
                          "process_limit_exceeded",
                          "output_limit_exceeded",
                          "temporary_disk_limit_exceeded",
                          "coverage_limit_exceeded",
                          "sandbox_start_failed",
                          "runner_unavailable",
                          "runtime_image_unavailable",
                          "harness_protocol_error",
                          "result_submission_failed",
                          "control_plane_error",
                          "job_cancelled",
                          "service_policy_rejected",
                          "probe_assertion_failed"
                        ]
                      },
                      "phase": {
                        "type": "string",
                        "enum": [
                          "resolution",
                          "acquisition",
                          "extraction",
                          "preparation",
                          "static_analysis",
                          "sandbox_startup",
                          "module_resolution",
                          "module_evaluation",
                          "probe_assertion",
                          "teardown"
                        ]
                      },
                      "origin": {
                        "type": "string",
                        "enum": [
                          "package",
                          "prerequisite",
                          "policy",
                          "infrastructure",
                          "assertion"
                        ]
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "captured_error_code",
                          "harness_observation",
                          "supervisor",
                          "preparation",
                          "control"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "maxLength": 1024
                      },
                      "optionalPeer": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 214
                          },
                          "range": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "name",
                          "range"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "classification",
                      "phase",
                      "origin",
                      "retryable",
                      "source",
                      "message"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entries": {
                "maxItems": 512,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 512
                    },
                    "specifier": {
                      "type": "string",
                      "maxLength": 2304
                    },
                    "displaySpecifier": {
                      "type": "string",
                      "maxLength": 13824
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "partial",
                        "fail",
                        "inconclusive",
                        "unsupported",
                        "not_applicable",
                        "infrastructure_error"
                      ]
                    },
                    "durationMs": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolvedTo": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4096
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "failure": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "classification": {
                              "type": "string",
                              "enum": [
                                "package_not_found",
                                "package_version_not_found",
                                "registry_unavailable",
                                "artifact_download_failed",
                                "artifact_integrity_mismatch",
                                "artifact_integrity_unavailable",
                                "archive_rejected",
                                "package_manifest_invalid",
                                "declared_platform_unsupported",
                                "dependency_source_unsupported",
                                "dependency_install_failed",
                                "install_script_required",
                                "native_compilation_required",
                                "preparation_limit_exceeded",
                                "package_resolution_failed",
                                "optional_peer_missing",
                                "esm_import_failed",
                                "commonjs_require_failed",
                                "export_path_failed",
                                "unsupported_builtin",
                                "unsupported_runtime_api",
                                "native_addon_load_failed",
                                "unexpected_process_exit",
                                "unclassified_runtime_failure",
                                "sandbox_policy_limited",
                                "process_timeout",
                                "process_out_of_memory",
                                "process_limit_exceeded",
                                "output_limit_exceeded",
                                "temporary_disk_limit_exceeded",
                                "coverage_limit_exceeded",
                                "sandbox_start_failed",
                                "runner_unavailable",
                                "runtime_image_unavailable",
                                "harness_protocol_error",
                                "result_submission_failed",
                                "control_plane_error",
                                "job_cancelled",
                                "service_policy_rejected",
                                "probe_assertion_failed"
                              ]
                            },
                            "phase": {
                              "type": "string",
                              "enum": [
                                "resolution",
                                "acquisition",
                                "extraction",
                                "preparation",
                                "static_analysis",
                                "sandbox_startup",
                                "module_resolution",
                                "module_evaluation",
                                "probe_assertion",
                                "teardown"
                              ]
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "package",
                                "prerequisite",
                                "policy",
                                "infrastructure",
                                "assertion"
                              ]
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "captured_error_code",
                                "harness_observation",
                                "supervisor",
                                "preparation",
                                "control"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "maxLength": 1024
                            },
                            "optionalPeer": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 214
                                },
                                "range": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "required": [
                                "name",
                                "range"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "classification",
                            "phase",
                            "origin",
                            "retryable",
                            "source",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isolation": {
                      "type": "object",
                      "properties": {
                        "priorFailureIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 512
                        },
                        "batchFailure": {
                          "type": "object",
                          "properties": {
                            "classification": {
                              "type": "string",
                              "enum": [
                                "package_not_found",
                                "package_version_not_found",
                                "registry_unavailable",
                                "artifact_download_failed",
                                "artifact_integrity_mismatch",
                                "artifact_integrity_unavailable",
                                "archive_rejected",
                                "package_manifest_invalid",
                                "declared_platform_unsupported",
                                "dependency_source_unsupported",
                                "dependency_install_failed",
                                "install_script_required",
                                "native_compilation_required",
                                "preparation_limit_exceeded",
                                "package_resolution_failed",
                                "optional_peer_missing",
                                "esm_import_failed",
                                "commonjs_require_failed",
                                "export_path_failed",
                                "unsupported_builtin",
                                "unsupported_runtime_api",
                                "native_addon_load_failed",
                                "unexpected_process_exit",
                                "unclassified_runtime_failure",
                                "sandbox_policy_limited",
                                "process_timeout",
                                "process_out_of_memory",
                                "process_limit_exceeded",
                                "output_limit_exceeded",
                                "temporary_disk_limit_exceeded",
                                "coverage_limit_exceeded",
                                "sandbox_start_failed",
                                "runner_unavailable",
                                "runtime_image_unavailable",
                                "harness_protocol_error",
                                "result_submission_failed",
                                "control_plane_error",
                                "job_cancelled",
                                "service_policy_rejected",
                                "probe_assertion_failed"
                              ]
                            },
                            "phase": {
                              "type": "string",
                              "enum": [
                                "resolution",
                                "acquisition",
                                "extraction",
                                "preparation",
                                "static_analysis",
                                "sandbox_startup",
                                "module_resolution",
                                "module_evaluation",
                                "probe_assertion",
                                "teardown"
                              ]
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "package",
                                "prerequisite",
                                "policy",
                                "infrastructure",
                                "assertion"
                              ]
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "captured_error_code",
                                "harness_observation",
                                "supervisor",
                                "preparation",
                                "control"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "maxLength": 1024
                            },
                            "optionalPeer": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 214
                                },
                                "range": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "required": [
                                "name",
                                "range"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "classification",
                            "phase",
                            "origin",
                            "retryable",
                            "source",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        "confirmation": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "method": {
                                  "type": "string",
                                  "const": "fresh_entry_v2"
                                },
                                "probeId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "stopReason": {
                                  "type": "string",
                                  "enum": [
                                    "completed",
                                    "entry_timeout",
                                    "batch_timeout",
                                    "scan_deadline",
                                    "cancelled",
                                    "output_limit_exceeded",
                                    "memory_limit_exceeded",
                                    "sandbox_start_failed",
                                    "harness_protocol_error",
                                    "unexpected_process_exit"
                                  ]
                                },
                                "durationMs": {
                                  "type": "number",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "method",
                                "probeId",
                                "stopReason",
                                "durationMs"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "priorFailureIndex",
                        "batchFailure",
                        "confirmation"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "specifier",
                    "displaySpecifier",
                    "outcome",
                    "durationMs",
                    "resolvedTo",
                    "failure"
                  ],
                  "additionalProperties": false
                }
              },
              "sessions": {
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "probeId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "startIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 512
                    },
                    "stopReason": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "entry_timeout",
                        "batch_timeout",
                        "scan_deadline",
                        "cancelled",
                        "output_limit_exceeded",
                        "memory_limit_exceeded",
                        "sandbox_start_failed",
                        "harness_protocol_error",
                        "unexpected_process_exit"
                      ]
                    },
                    "exitCode": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "oomKilled": {
                      "type": "boolean"
                    },
                    "durationMs": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "probeId",
                    "startIndex",
                    "stopReason",
                    "exitCode",
                    "oomKilled",
                    "durationMs"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "runId",
              "profileId",
              "group",
              "mode",
              "method",
              "outcome",
              "evidenceLevel",
              "coverage",
              "durationMs",
              "failure",
              "entries",
              "sessions"
            ],
            "additionalProperties": false
          }
        },
        "assertions": {
          "maxItems": 1,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "definition": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "harnessRevision": {
                    "type": "string",
                    "const": "assertion_v1"
                  },
                  "policyRevision": {
                    "type": "string",
                    "const": "runtime_limits_v2"
                  },
                  "repository": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]{1,39}\\/[A-Za-z0-9_.-]{1,100}$"
                  },
                  "commit": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{40}$"
                  },
                  "tree": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{40}$"
                  },
                  "manifestPath": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^[A-Za-z0-9_.-]+(?:\\/[A-Za-z0-9_.-]+)*$"
                  },
                  "manifest": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "name": {
                        "type": "string",
                        "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
                      },
                      "packageName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 214
                      },
                      "packageRange": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "entry": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^[A-Za-z0-9_.-]+(?:\\/[A-Za-z0-9_.-]+)*$"
                      },
                      "timeoutMs": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 30000
                      },
                      "capabilities": {
                        "type": "object",
                        "properties": {
                          "network": {
                            "type": "string",
                            "const": "none"
                          },
                          "filesystem": {
                            "type": "string",
                            "const": "read_only_workspace_and_bounded_temporary_output"
                          },
                          "processes": {
                            "type": "string",
                            "const": "bounded"
                          }
                        },
                        "required": [
                          "network",
                          "filesystem",
                          "processes"
                        ],
                        "additionalProperties": false
                      },
                      "fixtures": {
                        "maxItems": 15,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[A-Za-z0-9_.-]+(?:\\/[A-Za-z0-9_.-]+)*$"
                        }
                      },
                      "expectedBehavior": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "name",
                      "packageName",
                      "packageRange",
                      "entry",
                      "timeoutMs",
                      "capabilities",
                      "fixtures",
                      "expectedBehavior"
                    ],
                    "additionalProperties": false
                  },
                  "digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "files": {
                    "minItems": 1,
                    "maxItems": 16,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[A-Za-z0-9_.-]+(?:\\/[A-Za-z0-9_.-]+)*$"
                        },
                        "gitBlobSha": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{40}$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "path",
                        "gitBlobSha",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "schemaVersion",
                  "harnessRevision",
                  "policyRevision",
                  "repository",
                  "commit",
                  "tree",
                  "manifestPath",
                  "manifest",
                  "digest",
                  "files"
                ],
                "additionalProperties": false
              },
              "cells": {
                "minItems": 1,
                "maxItems": 16,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "profileId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "classifierRevision": {
                      "type": "string",
                      "const": "assertion_classifier_v1"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "partial",
                        "fail",
                        "inconclusive",
                        "unsupported",
                        "not_applicable",
                        "infrastructure_error"
                      ]
                    },
                    "evidenceLevel": {
                      "type": "string",
                      "enum": [
                        "static_only",
                        "probe_verified"
                      ]
                    },
                    "durationMs": {
                      "type": "number",
                      "minimum": 0
                    },
                    "failure": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "classification": {
                              "type": "string",
                              "enum": [
                                "package_not_found",
                                "package_version_not_found",
                                "registry_unavailable",
                                "artifact_download_failed",
                                "artifact_integrity_mismatch",
                                "artifact_integrity_unavailable",
                                "archive_rejected",
                                "package_manifest_invalid",
                                "declared_platform_unsupported",
                                "dependency_source_unsupported",
                                "dependency_install_failed",
                                "install_script_required",
                                "native_compilation_required",
                                "preparation_limit_exceeded",
                                "package_resolution_failed",
                                "optional_peer_missing",
                                "esm_import_failed",
                                "commonjs_require_failed",
                                "export_path_failed",
                                "unsupported_builtin",
                                "unsupported_runtime_api",
                                "native_addon_load_failed",
                                "unexpected_process_exit",
                                "unclassified_runtime_failure",
                                "sandbox_policy_limited",
                                "process_timeout",
                                "process_out_of_memory",
                                "process_limit_exceeded",
                                "output_limit_exceeded",
                                "temporary_disk_limit_exceeded",
                                "coverage_limit_exceeded",
                                "sandbox_start_failed",
                                "runner_unavailable",
                                "runtime_image_unavailable",
                                "harness_protocol_error",
                                "result_submission_failed",
                                "control_plane_error",
                                "job_cancelled",
                                "service_policy_rejected",
                                "probe_assertion_failed"
                              ]
                            },
                            "phase": {
                              "type": "string",
                              "enum": [
                                "resolution",
                                "acquisition",
                                "extraction",
                                "preparation",
                                "static_analysis",
                                "sandbox_startup",
                                "module_resolution",
                                "module_evaluation",
                                "probe_assertion",
                                "teardown"
                              ]
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "package",
                                "prerequisite",
                                "policy",
                                "infrastructure",
                                "assertion"
                              ]
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "captured_error_code",
                                "harness_observation",
                                "supervisor",
                                "preparation",
                                "control"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "maxLength": 1024
                            },
                            "optionalPeer": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 214
                                },
                                "range": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "required": [
                                "name",
                                "range"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "classification",
                            "phase",
                            "origin",
                            "retryable",
                            "source",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "runId",
                    "profileId",
                    "classifierRevision",
                    "outcome",
                    "evidenceLevel",
                    "durationMs",
                    "failure"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "definition",
              "cells"
            ],
            "additionalProperties": false
          }
        },
        "limitations": {
          "maxItems": 16,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 512
          }
        }
      },
      "required": [
        "schemaVersion",
        "id",
        "scanId",
        "classifierRevision",
        "observedAt",
        "classifiedAt",
        "artifact",
        "preparation",
        "matrix",
        "omissions",
        "outcome",
        "evidenceLevel",
        "coverageComplete",
        "cells",
        "limitations"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "schemaVersion",
    "status",
    "report"
  ],
  "additionalProperties": false
}