{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kaldenframelabs.com/schemas/tabular-shape-receipt-comparison-v1.schema.json",
  "title": "KaldenFrame Tabular Shape Receipt comparison v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "tool",
    "version",
    "release_status",
    "label",
    "status",
    "exact_bytes_match",
    "retained_shape_match",
    "recorded_source_sha256",
    "current_source_sha256",
    "recorded_shape_sha256",
    "current_shape_sha256",
    "changed_dimensions",
    "boundaries"
  ],
  "properties": {
    "schema": {"const": "kaldenframe.tabular-shape-receipt.comparison.v1"},
    "tool": {"const": "Tabular Shape Receipt"},
    "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"},
    "release_status": {"const": "COMMERCIAL_RELEASE"},
    "label": {"type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$"},
    "status": {"enum": ["EXACT_MATCH", "SHAPE_MATCH", "DRIFT"]},
    "exact_bytes_match": {"type": "boolean"},
    "retained_shape_match": {"type": "boolean"},
    "recorded_source_sha256": {"$ref": "#/$defs/sha256"},
    "current_source_sha256": {"$ref": "#/$defs/sha256"},
    "recorded_shape_sha256": {"$ref": "#/$defs/sha256"},
    "current_shape_sha256": {"$ref": "#/$defs/sha256"},
    "changed_dimensions": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
    "boundaries": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "network_requested",
        "raw_row_value_displayed",
        "semantic_correctness_proved",
        "distribution_stability_proved",
        "absence_of_leakage_proved",
        "security_safety_compliance_or_fitness_proved"
      ],
      "properties": {
        "network_requested": {"const": false},
        "raw_row_value_displayed": {"const": false},
        "semantic_correctness_proved": {"const": false},
        "distribution_stability_proved": {"const": false},
        "absence_of_leakage_proved": {"const": false},
        "security_safety_compliance_or_fitness_proved": {"const": false}
      }
    }
  },
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
  }
}
