{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://torneo.ai/schemas/release_acceptance.v1",
  "title": "release_acceptance.v1",
  "description": "P-12: acceptance on an exact SHA (all paths pass, defect register, 0 blocking and 0 major defect, install within 300 s on CLI, API and MCP). Shape of the fields check_finalite reads; extra evidence fields are allowed. Dated, not synthetic and bound by sha256 to files of the repository (receipts/gates/<schema>/*.json).",
  "type": "object",
  "required": [
    "schema",
    "synthetic",
    "observed_on",
    "sha",
    "all_paths_pass",
    "defect_register_ref",
    "defects",
    "install_seconds"
  ],
  "properties": {
    "schema": {
      "const": "release_acceptance.v1"
    },
    "synthetic": {
      "type": "boolean",
      "description": "Only false counts (gate_common.read_receipts)."
    },
    "observed_on": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}"
    },
    "sha": {
      "type": "string",
      "pattern": "^[0-9a-f]{40}$"
    },
    "all_paths_pass": {
      "type": "boolean"
    },
    "defect_register_ref": {
      "type": "object",
      "required": [
        "path",
        "sha256"
      ],
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        }
      }
    },
    "defects": {
      "type": "object",
      "required": [
        "blocking",
        "major"
      ],
      "properties": {
        "blocking": {
          "type": "integer",
          "minimum": 0
        },
        "major": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "install_seconds": {
      "type": "object",
      "required": [
        "cli",
        "api",
        "mcp"
      ],
      "properties": {
        "cli": {
          "type": "number",
          "minimum": 0
        },
        "api": {
          "type": "number",
          "minimum": 0
        },
        "mcp": {
          "type": "number",
          "minimum": 0
        }
      }
    }
  }
}
