{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://fartbench.invalid/schemas/generation-manifest.schema.json",
  "title": "FARTBench Generation Manifest Record",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "benchmark",
    "benchmark_version",
    "test_id",
    "sample_id",
    "model_label",
    "provider",
    "model_id",
    "adapter_id",
    "adapter_version",
    "rendered_prompt_sha256",
    "requested_duration_seconds",
    "aspect_ratio",
    "native_audio",
    "generation_timestamp_utc",
    "status"
  ],
  "properties": {
    "benchmark": {
      "const": "FARTBench"
    },
    "benchmark_version": {
      "type": "string"
    },
    "test_id": {
      "type": "string",
      "pattern": "^FB-C[0-9]{2}$"
    },
    "sample_id": {
      "type": "string"
    },
    "replicate": {
      "type": "integer",
      "minimum": 1
    },
    "model_label": {
      "type": "string",
      "minLength": 1
    },
    "provider": {
      "type": "string",
      "minLength": 1
    },
    "model_id": {
      "type": "string",
      "minLength": 1
    },
    "pipeline_mode": {
      "type": [
        "string",
        "null"
      ]
    },
    "adapter_id": {
      "type": "string"
    },
    "adapter_version": {
      "type": "string"
    },
    "rendered_prompt_path": {
      "type": "string"
    },
    "rendered_prompt_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "requested_duration_seconds": {
      "type": "number",
      "minimum": 0
    },
    "actual_duration_seconds": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "aspect_ratio": {
      "type": "string"
    },
    "actual_width": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1
    },
    "actual_height": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1
    },
    "native_audio": {
      "type": "boolean"
    },
    "seed": {
      "type": [
        "integer",
        "null"
      ]
    },
    "prompt_enhancement": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "candidate_count_requested": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1
    },
    "candidate_index_used": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "provider_request_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "generation_timestamp_utc": {
      "type": "string",
      "format": "date-time"
    },
    "generation_latency_seconds": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "generation_cost_usd": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "status": {
      "enum": [
        "completed",
        "refused",
        "generation_failed",
        "transport_failed"
      ]
    },
    "error_or_refusal_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "raw_output_path": {
      "type": [
        "string",
        "null"
      ]
    },
    "raw_output_sha256": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      ]
    },
    "playback_derivative_path": {
      "type": [
        "string",
        "null"
      ]
    },
    "playback_derivative_sha256": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
