{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nmdvcell.com/resource/api/v1.1/model_run.schema.json",
  "title": "NMD-VCell ModelRun",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "run_schema",
    "interface_build",
    "resource_release",
    "run_id",
    "model_id",
    "model_name",
    "model_version",
    "run_role",
    "execution_status",
    "decision_state",
    "completed_at",
    "biological_context",
    "task_id",
    "data_release",
    "split_id",
    "seeds",
    "provenance",
    "metrics",
    "baseline_comparison",
    "gate",
    "verification",
    "source_artifacts",
    "promoted_to_current_model",
    "claim_boundary",
    "stable_url",
    "json_url"
  ],
  "properties": {
    "run_schema": {
      "const": "nmd-vcell-model-run/1.0"
    },
    "interface_build": {
      "const": "EA-20260817-57"
    },
    "resource_release": {
      "const": "v1.2.0-measured-dmd-evidence"
    },
    "evidence_freeze": {
      "type": "string",
      "format": "date"
    },
    "run_id": {
      "type": "string",
      "pattern": "^MRUN-[A-Z0-9.-]+$"
    },
    "model_id": {
      "type": "string",
      "minLength": 1
    },
    "model_name": {
      "type": "string",
      "minLength": 1
    },
    "model_version": {
      "type": "string",
      "minLength": 1
    },
    "run_role": {
      "type": "string",
      "minLength": 1
    },
    "execution_status": {
      "const": "COMPLETED"
    },
    "decision_state": {
      "type": "string",
      "minLength": 1
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "completion_date_status": {
      "type": "string",
      "minLength": 1
    },
    "biological_context": {
      "type": "string",
      "minLength": 1
    },
    "task_id": {
      "type": "string",
      "minLength": 1
    },
    "data_release": {
      "type": "string",
      "minLength": 1
    },
    "split_id": {
      "type": "string",
      "minLength": 1
    },
    "seeds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "seed_status": {
      "type": "string",
      "minLength": 1
    },
    "provenance": {
      "type": "object",
      "required": [
        "code_revision",
        "code_revision_status",
        "container_digest",
        "container_digest_status",
        "data_digests",
        "runtime",
        "source_report_path",
        "source_report_sha256"
      ],
      "properties": {
        "code_revision": {
          "type": [
            "string",
            "null"
          ]
        },
        "code_revision_status": {
          "type": "string"
        },
        "container_digest": {
          "type": [
            "string",
            "null"
          ]
        },
        "container_digest_status": {
          "type": "string"
        },
        "data_digests": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "runtime": {
          "type": "string"
        },
        "source_report_path": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_report_sha256": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    },
    "metrics": {
      "type": "object"
    },
    "baseline_comparison": {
      "type": "string",
      "minLength": 1
    },
    "gate": {
      "type": "object",
      "required": [
        "decision",
        "reason",
        "next_action"
      ],
      "properties": {
        "decision": {
          "type": "string",
          "minLength": 1
        },
        "reason": {
          "type": "string",
          "minLength": 1
        },
        "next_action": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "verification": {
      "type": "string",
      "minLength": 1
    },
    "source_artifacts": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "promoted_to_current_model": {
      "type": "boolean"
    },
    "claim_boundary": {
      "type": "object",
      "required": [
        "calibrated_dmd_prediction",
        "dmd_disease_response_prediction",
        "therapeutic_or_clinical_use"
      ],
      "properties": {
        "calibrated_dmd_prediction": {
          "const": false
        },
        "dmd_disease_response_prediction": {
          "const": false
        },
        "therapeutic_or_clinical_use": {
          "const": false
        }
      }
    },
    "stable_url": {
      "type": "string",
      "pattern": "^/resource/model-run/"
    },
    "json_url": {
      "type": "string",
      "pattern": "^/resource/api/v1\\.1/model-runs/"
    }
  }
}
