{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-task-verification-response-schema.json",
  "title": "TaskVerificationResponse",
  "description": "Explicit verification response; only lifecycle states stored by the task store are exposed.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-run-openapi.json#/components/schemas/TaskVerificationResponse",
  "properties": {
    "schema": {
      "type": "string",
      "title": "Schema",
      "default": "bay-run.task-verification.v1"
    },
    "execution_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Id"
    },
    "execution_authentic": {
      "type": "boolean",
      "title": "Execution Authentic",
      "default": false
    },
    "receipt_valid": {
      "type": "boolean",
      "title": "Receipt Valid",
      "default": false
    },
    "receipt_authentic": {
      "type": "boolean",
      "title": "Receipt Authentic",
      "default": false
    },
    "receipt_record_consistent": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Receipt Record Consistent"
    },
    "execution_record_consistent": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Record Consistent"
    },
    "receipt_integrity": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Receipt Integrity"
    },
    "provenance_verification": {
      "title": "Provenance Verification"
    },
    "output_hash_matches": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Hash Matches"
    },
    "input_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Hash"
    },
    "output_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Hash"
    },
    "amount_charged_usd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Amount Charged Usd"
    },
    "hard_max_price_usd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hard Max Price Usd"
    },
    "within_authorized_price": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Within Authorized Price"
    },
    "timestamp": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "title": "Timestamp"
    },
    "timestamp_semantics": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timestamp Semantics"
    },
    "provider": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Provider"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "actual_latency_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Actual Latency Ms"
    },
    "fallback_occurred": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fallback Occurred"
    },
    "fallback_route": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fallback Route"
    },
    "quoted_restrictions_complied": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Quoted Restrictions Complied"
    },
    "data_handling_policy_complied": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data Handling Policy Complied"
    },
    "receipt_binding_status": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "bound",
            "legacy",
            "invalid"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Receipt Binding Status"
    },
    "receipt_binding": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Receipt Binding"
    },
    "legacy_limitations": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Legacy Limitations"
    },
    "supplied_execution_receipt_matches": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Supplied Execution Receipt Matches"
    },
    "execution_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Status"
    },
    "receipt_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Receipt Status"
    },
    "current_lifecycle_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Current Lifecycle Status"
    },
    "current_lifecycle_status_receipt_bound": {
      "type": "boolean",
      "title": "Current Lifecycle Status Receipt Bound",
      "default": false
    },
    "limitations": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Limitations"
    },
    "next_call": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Call",
      "description": "Machine-readable follow-up call, when verification is not terminal."
    },
    "durable_free_key": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Durable Free Key",
      "description": "Email-free durable-key offer with its published daily task quota."
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "schema",
    "execution_id",
    "execution_authentic",
    "receipt_valid",
    "receipt_authentic",
    "receipt_record_consistent",
    "execution_record_consistent",
    "receipt_integrity",
    "provenance_verification",
    "output_hash_matches",
    "input_hash",
    "output_hash",
    "amount_charged_usd",
    "hard_max_price_usd",
    "within_authorized_price",
    "timestamp",
    "timestamp_semantics",
    "provider",
    "model",
    "actual_latency_ms",
    "fallback_occurred",
    "fallback_route",
    "quoted_restrictions_complied",
    "data_handling_policy_complied",
    "receipt_binding_status",
    "receipt_binding",
    "legacy_limitations",
    "supplied_execution_receipt_matches",
    "execution_status",
    "receipt_status",
    "current_lifecycle_status",
    "current_lifecycle_status_receipt_bound",
    "limitations"
  ]
}