{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aiwg.io/schemas/decision/D17StudySplits.v1.schema.json",
  "title": "D17StudySplits",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "frozenAt",
    "seed",
    "allocation",
    "familyIsolation",
    "duplicatePayloads",
    "splits"
  ],
  "properties": {
    "schemaVersion": {
      "const": "decision-d17-splits/v1"
    },
    "frozenAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"
    },
    "seed": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$"
    },
    "allocation": {
      "const": "separately-keyed-balanced-label-shuffle-and-slice-quota"
    },
    "familyIsolation": {
      "const": true
    },
    "duplicatePayloads": {
      "const": 0
    },
    "splits": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tuning",
        "calibration",
        "test"
      ],
      "properties": {
        "tuning": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "count",
            "digest",
            "members"
          ],
          "properties": {
            "count": {
              "const": 200
            },
            "digest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            },
            "members": {
              "type": "array",
              "minItems": 200,
              "maxItems": 200,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "id",
                  "familyId",
                  "slice",
                  "inputDigest"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "familyId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "slice": {
                    "enum": [
                      "direct-facts",
                      "multi-fact",
                      "negation",
                      "authority"
                    ]
                  },
                  "inputDigest": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  }
                }
              }
            }
          }
        },
        "calibration": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "count",
            "digest",
            "members"
          ],
          "properties": {
            "count": {
              "const": 400
            },
            "digest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            },
            "members": {
              "type": "array",
              "minItems": 400,
              "maxItems": 400,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "id",
                  "familyId",
                  "slice",
                  "inputDigest"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "familyId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "slice": {
                    "enum": [
                      "direct-facts",
                      "multi-fact",
                      "negation",
                      "authority"
                    ]
                  },
                  "inputDigest": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  }
                }
              }
            }
          }
        },
        "test": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "count",
            "digest",
            "members"
          ],
          "properties": {
            "count": {
              "const": 1200
            },
            "digest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            },
            "members": {
              "type": "array",
              "minItems": 1200,
              "maxItems": 1200,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "id",
                  "familyId",
                  "slice",
                  "inputDigest"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "familyId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "slice": {
                    "enum": [
                      "direct-facts",
                      "multi-fact",
                      "negation",
                      "authority"
                    ]
                  },
                  "inputDigest": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
