{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://fermihdi.io/schemas/dynamic_webhook_payload.schema.json",
  "title": "Storage Cluster Controller (SCC) Configuration Schema",
  "description": "JSON schema for the dynamic configuration payload received by the SCC via the /v1/scc/config endpoint.",
  "type": "object",
  "properties": {
    "record_size": {
      "type": "integer",
      "description": "Base size of FermiHDI records to process in bytes.",
      "minimum": 1
    },
    "max_hash_queue_bytes": {
      "type": "integer",
      "description": "Maximum allowed RAM usage in bytes for the raw buffering ingest queue. Controls backpressure.",
      "minimum": 1048576
    },
    "batch_timeout_ms": {
      "type": "integer",
      "description": "Timeout in milliseconds to wait for a batch End-of-Batch delimiter before forcing a close.",
      "minimum": 100
    },
    "timeout_action": {
      "type": "string",
      "description": "Determines the action taken when a batch stream stalls and reaches timeout bounds.",
      "enum": [
        "EOB",
        "BBN",
        "DROP"
      ]
    },
    "hash_algorithm": {
      "type": "string",
      "description": "Cryptographic Hash algorithm applied to the batch records dynamically.",
      "enum": [
        "sha512",
        "xxh64_hybrid",
        "XXH64_HYBRID"
      ]
    },
    "sn_targets": {
      "type": "string",
      "description": "CSV list of Storage Node targets and production ports (e.g., node_name:ip:coord_port:prod_port,...)."
    },
    "hash_chain_block_size": {
      "type": "integer",
      "description": "Number of record hashes per chain block. Instance-wide \u2014 must be identical across all nodes. Default: 64.",
      "minimum": 1,
      "default": 64
    }
  },
  "additionalProperties": false
}
