{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudworldmodel-ai/json-schema/cloudworldmodel-ai-pre-provision-finalize-request-schema.json",
  "title": "PreProvisionFinalizeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudworldmodel-ai-multi-cloud-api-openapi.yml#/components/schemas/PreProvisionFinalizeRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "strategyId"
  ],
  "properties": {
    "strategyId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "maxCostPerHour": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Optional explicit hourly cost budget, replacing the exploration budget check for this evaluation only."
    },
    "errorBudgetPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Optional explicit error budget percentage, replacing the exploration error-budget check for this evaluation only."
    },
    "resilienceEvidence": {
      "$ref": "#/$defs/CompletedResilienceEvidence"
    }
  },
  "$defs": {
    "CompletedResilienceEvidence": {
      "type": "object",
      "additionalProperties": false,
      "description": "Caller-attested completed test report for the exact candidateFingerprint. Keep the fingerprint with the actual test inputs; never relabel a report from another architecture or workload. Recorded means observations recorded during the test, not externally verified production evidence. Estimated reports remain unevaluated for deployment gating.",
      "required": [
        "candidateFingerprint",
        "reportRef",
        "status",
        "completedAt",
        "provenance",
        "failureInjected",
        "recoveryObserved",
        "finalHealthy",
        "resilienceCheck",
        "scope"
      ],
      "properties": {
        "candidateFingerprint": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "reportRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "status": {
          "type": "string",
          "enum": [
            "completed"
          ]
        },
        "completedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Actual completion timestamp, not in the future."
        },
        "provenance": {
          "type": "string",
          "enum": [
            "recorded",
            "estimated"
          ]
        },
        "failureInjected": {
          "type": "boolean"
        },
        "recoveryObserved": {
          "type": "boolean"
        },
        "finalHealthy": {
          "type": "boolean"
        },
        "resilienceCheck": {
          "type": "string",
          "enum": [
            "pass",
            "fail",
            "not_evaluated"
          ]
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000,
          "description": "Tested failures, test coverage, and pass criteria."
        }
      }
    }
  }
}