{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://civicdataforge.pages.dev/schemas/property-enrichment-response-v1.schema.json",
  "title": "CivicDataForge Property Enrichment Response v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "state", "persisted", "provider", "dataset", "rights", "generated_at", "records", "benchmark", "source_registry", "batch_receipt_hash", "signature_state"],
  "properties": {
    "schema_version": {"const": "civicdataforge.property-enrichment.v1"}, "state": {"const": "PATCHES_READY"}, "persisted": {"const": false}, "provider": {"type": "string"}, "dataset": {"type": "string"}, "rights": {"type": "object"}, "generated_at": {"type": "string", "format": "date-time"},
    "workspace_receipt_hash": {"type": ["string", "null"]},
    "records": {"type": "array", "minItems": 1, "maxItems": 25, "items": {"type": "object", "required": ["property_id", "provider_record_id", "match_state", "input_key_set", "input_key_set_receipt_hash", "patches", "checks", "summary", "record_receipt_hash"]}},
    "benchmark": {"type": "object", "required": ["records_examined", "facts_compared", "fields_confirmed", "missing_fields_recovered", "stale_values_detected", "value_conflicts", "incorrect_zeros_prevented", "permit_or_compliance_fields_added", "false_positive_rate", "false_positive_rate_state"]},
    "source_registry": {"type": "array"}, "batch_receipt_hash": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"}, "signature_state": {"enum": ["SERVER_HMAC_VERIFIABLE", "HASH_BOUND_NOT_SIGNED"]}, "batch_signature": {"type": "string", "pattern": "^hmac-sha256:[a-f0-9]{64}$"}, "verification_endpoint": {"const": "/api/property-enrichment-verify"}
  }
}
