{
  "$id": "https://targetspace.ai/platform/schemas/sealed-prediction.schema.json",
  "title": "SealedPrediction",
  "type": "object",
  "required": [
    "prediction_id",
    "run_id",
    "instance_id",
    "submitter",
    "distribution",
    "payload_hash",
    "answer_space_hash",
    "sealed_at",
    "status"
  ],
  "properties": {
    "prediction_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._-]{3,64}$"
    },
    "run_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._-]{3,64}$"
    },
    "instance_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._-]{3,64}$"
    },
    "submitter": {
      "type": "string",
      "description": "model/lab identifier; baseline arms use r1:/r2:/retrieval: prefixes"
    },
    "distribution": {
      "type": "object",
      "description": "answer key -> probability; must sum to 1 within 1e-6"
    },
    "payload_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "answer_space_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "sealed_at": {
      "type": "string",
      "format": "date-time"
    },
    "witness": {
      "type": "string",
      "description": "prototype: local ledger chain; production: external timestamping witness"
    },
    "status": {
      "enum": [
        "sealed",
        "resolved",
        "scored",
        "void"
      ]
    }
  }
}
