{
  "$defs": {
    "Candidate": {
      "additionalProperties": false,
      "properties": {
        "admissible": {
          "title": "Admissible",
          "type": "boolean"
        },
        "perturbed": {
          "items": {
            "type": "string"
          },
          "title": "Perturbed",
          "type": "array"
        },
        "rejection_reasons": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Rejection Reasons"
        },
        "reset_mode": {
          "title": "Reset Mode",
          "type": "string"
        },
        "scenario_id": {
          "title": "Scenario Id",
          "type": "string"
        },
        "stratum": {
          "enum": [
            "uniform",
            "perturbed",
            "in-distribution"
          ],
          "title": "Stratum",
          "type": "string"
        },
        "training_distribution": {
          "$ref": "#/$defs/TrainingDistribution"
        },
        "values": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "title": "Values",
          "type": "object"
        }
      },
      "required": [
        "scenario_id",
        "stratum",
        "perturbed",
        "values",
        "reset_mode",
        "training_distribution",
        "admissible"
      ],
      "title": "Candidate",
      "type": "object"
    },
    "GroupSelection": {
      "additionalProperties": false,
      "description": "One group's selection. Its uplift is its diversity over the mean of random draws\nFROM THE SAME GROUP; absent when the group had fewer than 2 candidates.",
      "properties": {
        "diversity_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Diversity Score"
        },
        "diversity_uplift": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Diversity Uplift"
        },
        "k": {
          "title": "K",
          "type": "integer"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Note"
        },
        "pool_size": {
          "title": "Pool Size",
          "type": "integer"
        },
        "random_baseline_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Random Baseline Score"
        },
        "selected_scenario_ids": {
          "items": {
            "type": "string"
          },
          "title": "Selected Scenario Ids",
          "type": "array"
        }
      },
      "required": [
        "pool_size",
        "k",
        "selected_scenario_ids"
      ],
      "title": "GroupSelection",
      "type": "object"
    },
    "Mixture": {
      "additionalProperties": false,
      "properties": {
        "counts": {
          "additionalProperties": {
            "type": "integer"
          },
          "propertyNames": {
            "enum": [
              "uniform",
              "perturbed",
              "in-distribution"
            ]
          },
          "title": "Counts",
          "type": "object"
        },
        "proportions": {
          "additionalProperties": {
            "type": "number"
          },
          "propertyNames": {
            "enum": [
              "uniform",
              "perturbed",
              "in-distribution"
            ]
          },
          "title": "Proportions",
          "type": "object"
        }
      },
      "required": [
        "proportions",
        "counts"
      ],
      "title": "Mixture",
      "type": "object"
    },
    "ParameterSpaceDescriptor": {
      "additionalProperties": false,
      "description": "The space definition; its canonical-JSON sha256 is ``parameter_space_sha256``.",
      "properties": {
        "deferred": {
          "items": {
            "$ref": "#/$defs/SpaceDeferred"
          },
          "title": "Deferred",
          "type": "array"
        },
        "encoding": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Encoding",
          "type": "object"
        },
        "feature_names": {
          "items": {
            "type": "string"
          },
          "title": "Feature Names",
          "type": "array"
        },
        "harness_class": {
          "title": "Harness Class",
          "type": "string"
        },
        "parameters": {
          "items": {
            "$ref": "#/$defs/SpaceParameter"
          },
          "title": "Parameters",
          "type": "array"
        },
        "space_id": {
          "title": "Space Id",
          "type": "string"
        },
        "task": {
          "title": "Task",
          "type": "string"
        }
      },
      "required": [
        "space_id",
        "harness_class",
        "task",
        "encoding",
        "feature_names",
        "parameters",
        "deferred"
      ],
      "title": "ParameterSpaceDescriptor",
      "type": "object"
    },
    "ReferenceSelection": {
      "additionalProperties": false,
      "description": "REFERENCE ONLY: the all-pool selector over the same candidates. Never run.",
      "properties": {
        "diversity_uplift": {
          "title": "Diversity Uplift",
          "type": "number"
        },
        "label": {
          "title": "Label",
          "type": "string"
        },
        "selected_scenario_ids": {
          "items": {
            "type": "string"
          },
          "title": "Selected Scenario Ids",
          "type": "array"
        },
        "selected_strata": {
          "additionalProperties": {
            "type": "integer"
          },
          "propertyNames": {
            "enum": [
              "uniform",
              "perturbed",
              "in-distribution"
            ]
          },
          "title": "Selected Strata",
          "type": "object"
        }
      },
      "required": [
        "label",
        "selected_scenario_ids",
        "selected_strata",
        "diversity_uplift"
      ],
      "title": "ReferenceSelection",
      "type": "object"
    },
    "Rejection": {
      "additionalProperties": false,
      "properties": {
        "reasons": {
          "items": {
            "type": "string"
          },
          "title": "Reasons",
          "type": "array"
        },
        "scenario_id": {
          "title": "Scenario Id",
          "type": "string"
        }
      },
      "required": [
        "scenario_id",
        "reasons"
      ],
      "title": "Rejection",
      "type": "object"
    },
    "Rejections": {
      "additionalProperties": false,
      "properties": {
        "parameters": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "title": "Parameters",
          "type": "object"
        },
        "rejected": {
          "items": {
            "$ref": "#/$defs/Rejection"
          },
          "title": "Rejected",
          "type": "array"
        },
        "rule": {
          "title": "Rule",
          "type": "string"
        }
      },
      "required": [
        "rule",
        "parameters",
        "rejected"
      ],
      "title": "Rejections",
      "type": "object"
    },
    "Selection": {
      "additionalProperties": false,
      "description": "Per-group selection (decided 2026-10-02): the budget split in ``ratio`` with at\nleast 1 pick per group; ``combined_uplift`` is the ratio-weighted sum of the groups'\nuplifts. The pack runs exactly ``selected_scenario_ids``.",
      "properties": {
        "backend": {
          "title": "Backend",
          "type": "string"
        },
        "combined_rule": {
          "title": "Combined Rule",
          "type": "string"
        },
        "combined_uplift": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Combined Uplift"
        },
        "groups": {
          "additionalProperties": {
            "$ref": "#/$defs/GroupSelection"
          },
          "propertyNames": {
            "enum": [
              "uniform",
              "perturbed",
              "in-distribution"
            ]
          },
          "title": "Groups",
          "type": "object"
        },
        "k": {
          "title": "K",
          "type": "integer"
        },
        "method": {
          "title": "Method",
          "type": "string"
        },
        "ratio": {
          "additionalProperties": {
            "type": "number"
          },
          "propertyNames": {
            "enum": [
              "uniform",
              "perturbed",
              "in-distribution"
            ]
          },
          "title": "Ratio",
          "type": "object"
        },
        "seed": {
          "title": "Seed",
          "type": "integer"
        },
        "selected_scenario_ids": {
          "items": {
            "type": "string"
          },
          "title": "Selected Scenario Ids",
          "type": "array"
        },
        "split": {
          "additionalProperties": {
            "type": "integer"
          },
          "propertyNames": {
            "enum": [
              "uniform",
              "perturbed",
              "in-distribution"
            ]
          },
          "title": "Split",
          "type": "object"
        }
      },
      "required": [
        "backend",
        "seed",
        "k",
        "method",
        "ratio",
        "split",
        "groups",
        "combined_uplift",
        "combined_rule",
        "selected_scenario_ids"
      ],
      "title": "Selection",
      "type": "object"
    },
    "SpaceDeferred": {
      "additionalProperties": false,
      "properties": {
        "parameter": {
          "title": "Parameter",
          "type": "string"
        },
        "reason": {
          "title": "Reason",
          "type": "string"
        }
      },
      "required": [
        "parameter",
        "reason"
      ],
      "title": "SpaceDeferred",
      "type": "object"
    },
    "SpaceParameter": {
      "additionalProperties": false,
      "properties": {
        "applied": {
          "title": "Applied",
          "type": "string"
        },
        "categories": {
          "items": {
            "type": "string"
          },
          "title": "Categories",
          "type": "array"
        },
        "distribution": {
          "title": "Distribution",
          "type": "string"
        },
        "effect": {
          "enum": [
            "physics",
            "rendering",
            "both",
            "policy-input",
            "audio-signal"
          ],
          "title": "Effect",
          "type": "string"
        },
        "hi": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hi"
        },
        "kind": {
          "enum": [
            "continuous",
            "integer",
            "angular",
            "categorical"
          ],
          "title": "Kind",
          "type": "string"
        },
        "lo": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lo"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "note": {
          "title": "Note",
          "type": "string"
        },
        "training": {
          "anyOf": [
            {
              "$ref": "#/$defs/TrainingRange"
            },
            {
              "$ref": "#/$defs/TrainingFixed"
            },
            {
              "$ref": "#/$defs/TrainingSet"
            },
            {
              "type": "null"
            }
          ],
          "title": "Training"
        },
        "unit": {
          "title": "Unit",
          "type": "string"
        }
      },
      "required": [
        "name",
        "unit",
        "kind",
        "effect",
        "applied",
        "lo",
        "hi",
        "categories",
        "distribution",
        "training",
        "note"
      ],
      "title": "SpaceParameter",
      "type": "object"
    },
    "TrainingDistribution": {
      "additionalProperties": false,
      "properties": {
        "out_of_training_distribution": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Out Of Training Distribution"
        },
        "outside": {
          "items": {
            "type": "string"
          },
          "title": "Outside",
          "type": "array"
        },
        "unrecorded": {
          "items": {
            "type": "string"
          },
          "title": "Unrecorded",
          "type": "array"
        }
      },
      "required": [
        "out_of_training_distribution",
        "outside",
        "unrecorded"
      ],
      "title": "TrainingDistribution",
      "type": "object"
    },
    "TrainingFixed": {
      "additionalProperties": false,
      "properties": {
        "fixed": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ],
          "title": "Fixed"
        }
      },
      "required": [
        "fixed"
      ],
      "title": "TrainingFixed",
      "type": "object"
    },
    "TrainingRange": {
      "additionalProperties": false,
      "properties": {
        "range": {
          "items": {
            "type": "number"
          },
          "maxItems": 2,
          "minItems": 2,
          "title": "Range",
          "type": "array"
        }
      },
      "required": [
        "range"
      ],
      "title": "TrainingRange",
      "type": "object"
    },
    "TrainingSet": {
      "additionalProperties": false,
      "properties": {
        "set": {
          "items": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "title": "Set",
          "type": "array"
        }
      },
      "required": [
        "set"
      ],
      "title": "TrainingSet",
      "type": "object"
    }
  },
  "$id": "https://schema.certanix.eu/v1/parameter-coverage-map-1.0.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "The coverage map a pack binds when its scenarios were drawn from a declared parameter space (artefact type `parameter-coverage-map`, format `certanix-parameter-coverage-map/1`; the embodied and the audio paths both bind it): the parameter space and its sha256, the candidate mixture, every candidate with its stratum and training-distribution flags, the admissibility rejections, and the PER-GROUP selection (budget split, each group's uplift against random draws from the same group, their ratio-weighted combination), with the all-pool selector beside it as a labelled reference that was never run. A COMPANION file, bound into a pack by its sha256, not a pack field: the pack schema does not move when this one does. FROZEN: a correction is a new version. Structural validity only.",
  "properties": {
    "artifact_type": {
      "const": "parameter-coverage-map",
      "title": "Artifact Type",
      "type": "string"
    },
    "candidates": {
      "items": {
        "$ref": "#/$defs/Candidate"
      },
      "title": "Candidates",
      "type": "array"
    },
    "format": {
      "const": "certanix-parameter-coverage-map/1",
      "title": "Format",
      "type": "string"
    },
    "mixture": {
      "$ref": "#/$defs/Mixture"
    },
    "parameter_space": {
      "$ref": "#/$defs/ParameterSpaceDescriptor"
    },
    "parameter_space_sha256": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Parameter Space Sha256",
      "type": "string"
    },
    "reference_all_pool_selection": {
      "$ref": "#/$defs/ReferenceSelection"
    },
    "rejections": {
      "$ref": "#/$defs/Rejections"
    },
    "selected_training_distribution": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Selected Training Distribution",
      "type": "object"
    },
    "selection": {
      "$ref": "#/$defs/Selection"
    }
  },
  "required": [
    "artifact_type",
    "format",
    "parameter_space",
    "parameter_space_sha256",
    "mixture",
    "candidates",
    "rejections",
    "selection",
    "reference_all_pool_selection",
    "selected_training_distribution"
  ],
  "title": "Certanix parameter coverage map, schema 1.0",
  "type": "object"
}
