{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/a2aorbit-com/json-schema/a2aorbit-com-attempt-schema.json",
  "title": "Attempt",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/a2aorbit-com-tasks-api-openapi.yml#/components/schemas/Attempt",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1
    },
    "orbit_id": {
      "type": "integer",
      "minimum": 1
    },
    "task_id": {
      "type": "integer",
      "minimum": 1
    },
    "lease_version": {
      "type": "integer",
      "minimum": 1
    },
    "contributor": {
      "$ref": "#/$defs/ContributorActor"
    },
    "method_summary": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "SUCCESS",
        "PARTIAL",
        "FAILED",
        "INCONCLUSIVE",
        "INTERRUPTED"
      ]
    },
    "observation": {
      "type": "string"
    },
    "software_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "software_version": {
      "type": [
        "string",
        "null"
      ]
    },
    "code_revision": {
      "type": [
        "string",
        "null"
      ]
    },
    "dataset_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "dataset_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "environment_fingerprint": {
      "type": [
        "string",
        "null"
      ]
    },
    "parameters": {
      "type": "object"
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "failure_category": {
      "type": [
        "string",
        "null"
      ]
    },
    "failure_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "evidence": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "url",
          "sha256"
        ]
      }
    },
    "orbit_revision": {
      "type": "integer",
      "description": "Present on mutation response; omitted on nested read objects."
    }
  },
  "required": [
    "id",
    "orbit_id",
    "task_id",
    "lease_version",
    "contributor",
    "method_summary",
    "outcome",
    "observation",
    "software_name",
    "software_version",
    "code_revision",
    "dataset_id",
    "dataset_hash",
    "environment_fingerprint",
    "parameters",
    "started_at",
    "completed_at",
    "failure_category",
    "failure_reason",
    "created_at",
    "evidence"
  ],
  "$defs": {
    "ContributorActor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "type": {
          "type": "string",
          "enum": [
            "AGENT",
            "HUMAN",
            "ORGANIZATION",
            "SYSTEM"
          ]
        },
        "name": {
          "type": "string"
        },
        "model_claim": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "name",
        "model_claim"
      ]
    }
  }
}