{
  "openapi": "3.1.0",
  "info": {
    "title": "Zenon Observatory Discovery API",
    "version": "1.2.0",
    "description": "Read-only observations, not a full network census. Version strings are self-reported; unsuccessful handshakes do not prove a peer is offline. Cache peer data and normally poll at most once per minute; momentum projections may be polled every ten seconds and production history every thirty seconds."
  },
  "servers": [
    {
      "url": "https://tw7v2v7y9rjq7mle1isnlktq.172.245.238.165.sslip.io"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "Usage, evidence semantics, and LLM instructions",
    "url": "https://0x3639.com/go-zenon-version/guide/"
  },
  "paths": {
    "/api/v1/network": {
      "get": {
        "operationId": "getSnapshot",
        "summary": "Get one coherent network observation snapshot",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ETag from a prior response to this same URL."
          }
        ],
        "responses": {
          "200": {
            "description": "Get one coherent network observation snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          },
          "304": {
            "description": "Unchanged; reuse the prior response body."
          },
          "503": {
            "description": "Source unavailable or warming up; retry later. Momentum responses may retain historical slots with their original timestamp. This is not a count of the network.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/nodes": {
      "get": {
        "operationId": "getNodes",
        "summary": "Get observed peer identities",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ETag from a prior response to this same URL."
          }
        ],
        "responses": {
          "200": {
            "description": "Get observed peer identities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Nodes"
                }
              }
            }
          },
          "304": {
            "description": "Unchanged; reuse the prior response body."
          },
          "503": {
            "description": "Source unavailable or warming up; retry later. Momentum responses may retain historical slots with their original timestamp. This is not a count of the network.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Nodes"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ips": {
      "get": {
        "operationId": "getIPs",
        "summary": "Get deduplicated observed public IPs",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ETag from a prior response to this same URL."
          }
        ],
        "responses": {
          "200": {
            "description": "Get deduplicated observed public IPs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IPs"
                }
              }
            }
          },
          "304": {
            "description": "Unchanged; reuse the prior response body."
          },
          "503": {
            "description": "Source unavailable or warming up; retry later. Momentum responses may retain historical slots with their original timestamp. This is not a count of the network.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IPs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/momentums": {
      "get": {
        "operationId": "getMomentumSchedule",
        "summary": "Get upcoming momentum projections and observed outcomes; cached RPC weights do not guarantee future producers",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ETag from a prior response to this same URL."
          }
        ],
        "responses": {
          "200": {
            "description": "Get upcoming momentum projections and observed outcomes; cached RPC weights do not guarantee future producers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MomentumSchedule"
                }
              }
            }
          },
          "304": {
            "description": "Unchanged; reuse the prior response body."
          },
          "503": {
            "description": "Source unavailable or warming up; retry later. Momentum responses may retain historical slots with their original timestamp. This is not a count of the network.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MomentumSchedule"
                }
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getHealth",
        "summary": "Check process liveness",
        "responses": {
          "200": {
            "description": "Check process liveness",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/readyz": {
      "get": {
        "operationId": "getReadiness",
        "summary": "Check whether observations are available",
        "responses": {
          "200": {
            "description": "Check whether observations are available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "503": {
            "description": "Source unavailable or warming up; retry later. Momentum responses may retain historical slots with their original timestamp. This is not a count of the network.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/production/gaps": {
      "get": {
        "operationId": "getGapStudy",
        "summary": "Compare later projected slots for fixed first-hour production groups; not proof of a fork",
        "responses": {
          "200": {
            "description": "No-store study. Windows are inclusive/exclusive Unix seconds, null while waiting. all includes excluded rounds; comparable and pillar/group counts exclude them. Current weights are not authoritative historical elections. Check timestamps and status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GapStudy"
                }
              }
            }
          },
          "503": {
            "description": "Production database unavailable."
          }
        }
      }
    },
    "/api/v1/production": {
      "get": {
        "operationId": "getProduction",
        "summary": "Get actual production since the inclusive configured timestamp; partial/stale status is independent of peer discovery",
        "responses": {
          "200": {
            "description": "No-store snapshot; errors preserve prior generation time. Check status and complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionSnapshot"
                }
              }
            }
          },
          "503": {
            "description": "Production database unavailable."
          }
        }
      }
    },
    "/api/v1/production/momentums": {
      "get": {
        "operationId": "getProductionHistory",
        "summary": "Page through saved intervals at a fixed checked tip",
        "parameters": [
          {
            "name": "tipHeight",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "tipHash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          {
            "name": "beforeHeight",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Exclusive descending cursor. Start with last.height + 1, then use nextBeforeHeight; null ends paging."
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "At most limit records in descending height order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query."
          },
          "409": {
            "description": "Pinned tip is no longer present. Return to latest."
          },
          "503": {
            "description": "History is unavailable."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Handshake": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "confirmed",
              "failed"
            ]
          },
          "ip": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "minimum": 1024,
            "maximum": 65535
          },
          "attemptedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSuccessAt": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "ip",
          "port",
          "attemptedAt"
        ]
      },
      "Node": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{128}$"
          },
          "ip": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reportedVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence": {
            "enum": [
              "p2p",
              "rpc",
              "peer",
              "discovery"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rpcEndpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "firstSeen": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeen": {
            "type": "string",
            "format": "date-time"
          },
          "tcpPort": {
            "type": "integer",
            "minimum": 0,
            "maximum": 65535
          },
          "udpPort": {
            "type": "integer",
            "minimum": 0,
            "maximum": 65535
          },
          "handshake": {
            "$ref": "#/components/schemas/Handshake"
          },
          "lastDiscoveryAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "ip",
          "name",
          "version",
          "reportedVersions",
          "commit",
          "evidence",
          "sources",
          "rpcEndpoints",
          "firstSeen",
          "lastSeen"
        ]
      },
      "Source": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "status": {
            "enum": [
              "ok",
              "error"
            ]
          },
          "peerCount": {
            "type": "integer",
            "minimum": 0
          },
          "nodeId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": "string"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "endpoint",
          "status",
          "peerCount",
          "nodeId",
          "checkedAt"
        ]
      },
      "Release": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "version",
          "tag",
          "url",
          "checkedAt"
        ]
      },
      "Crawl": {
        "type": "object",
        "properties": {
          "candidates": {
            "type": "integer",
            "minimum": 0
          },
          "pending": {
            "type": "integer",
            "minimum": 0
          },
          "attempted": {
            "type": "integer",
            "minimum": 0
          },
          "confirmed": {
            "type": "integer",
            "minimum": 0
          },
          "uniqueIPs": {
            "type": "integer",
            "minimum": 0
          },
          "confirmedIPs": {
            "type": "integer",
            "minimum": 0
          },
          "completedPasses": {
            "type": "integer",
            "minimum": 0
          },
          "capped": {
            "type": "boolean"
          }
        },
        "required": [
          "candidates",
          "pending",
          "attempted",
          "confirmed",
          "uniqueIPs",
          "confirmedIPs",
          "completedPasses",
          "capped"
        ]
      },
      "Snapshot": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "mode": {
            "enum": [
              "discovery",
              "collector",
              "browser"
            ]
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          },
          "limited": {
            "type": "boolean"
          },
          "release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Release"
              },
              {
                "type": "null"
              }
            ]
          },
          "scanning": {
            "type": "boolean"
          },
          "pillarCount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "pillarCountCheckedAt": {
            "type": "string",
            "format": "date-time"
          },
          "crawl": {
            "$ref": "#/components/schemas/Crawl"
          }
        },
        "required": [
          "schemaVersion",
          "startedAt",
          "generatedAt",
          "mode",
          "nodes",
          "sources",
          "limited",
          "release"
        ]
      },
      "IP": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string"
          },
          "nodeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confirmedNodes": {
            "type": "integer",
            "minimum": 0
          },
          "lastAttemptAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSuccessAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "ip",
          "nodeIds",
          "confirmedNodes"
        ]
      },
      "Nodes": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          }
        },
        "required": [
          "generatedAt",
          "nodes"
        ]
      },
      "IPs": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ips": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IP"
            }
          }
        },
        "required": [
          "generatedAt",
          "ips"
        ]
      },
      "MomentumHeader": {
        "type": "object",
        "properties": {
          "height": {
            "type": "integer",
            "minimum": 0
          },
          "hash": {
            "type": "string"
          },
          "previousHash": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer",
            "minimum": 0,
            "description": "Unix seconds"
          },
          "producer": {
            "type": "string"
          },
          "chainIdentifier": {
            "const": 1
          }
        },
        "required": [
          "height",
          "hash",
          "previousHash",
          "timestamp",
          "producer",
          "chainIdentifier"
        ]
      },
      "PillarSoftware": {
        "type": "object",
        "properties": {
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "peerId": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reportedVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "enum": [
              "no-pillar-peer-link",
              "linked-peer-not-observed",
              "linked-observation-stale",
              "configured-peer-link",
              "linked-peer-version-unknown"
            ]
          }
        },
        "required": [
          "version",
          "reason"
        ]
      },
      "MomentumSlot": {
        "type": "object",
        "properties": {
          "round": {
            "type": "integer",
            "minimum": 0
          },
          "index": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "startsAt": {
            "type": "integer",
            "minimum": 0,
            "description": "Projected slot start in Unix seconds, not a future momentum height."
          },
          "pillar": {
            "type": "string"
          },
          "producer": {
            "type": "string"
          },
          "software": {
            "$ref": "#/components/schemas/PillarSoftware"
          },
          "observed": {
            "$ref": "#/components/schemas/MomentumHeader"
          }
        },
        "required": [
          "round",
          "index",
          "startsAt",
          "pillar",
          "producer",
          "software"
        ]
      },
      "ScheduleRound": {
        "type": "object",
        "properties": {
          "round": {
            "type": "integer",
            "minimum": 0
          },
          "proofHeight": {
            "type": "integer",
            "minimum": 0
          },
          "proofHash": {
            "type": "string"
          },
          "proofCutoff": {
            "type": "integer",
            "minimum": 0
          },
          "checked": {
            "type": "integer",
            "minimum": 0
          },
          "matched": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "round",
          "proofHeight",
          "proofHash",
          "proofCutoff",
          "checked",
          "matched"
        ]
      },
      "MomentumSchedule": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "generatedAt": {
            "type": "string",
            "description": "UTC time of last successful snapshot, or empty during warmup. Does not refresh on failure."
          },
          "status": {
            "enum": [
              "ready",
              "stale",
              "unavailable"
            ]
          },
          "source": {
            "type": "string"
          },
          "basis": {
            "const": "rpc-current-weights"
          },
          "error": {
            "type": "string"
          },
          "genesis": {
            "const": 1637755200
          },
          "slotSeconds": {
            "const": 10
          },
          "frontier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MomentumHeader"
              },
              {
                "type": "null"
              }
            ]
          },
          "checked": {
            "type": "integer",
            "minimum": 0
          },
          "matched": {
            "type": "integer",
            "minimum": 0
          },
          "rounds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleRound"
            }
          },
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MomentumSlot"
            }
          }
        },
        "required": [
          "schemaVersion",
          "generatedAt",
          "status",
          "source",
          "basis",
          "genesis",
          "slotSeconds",
          "frontier",
          "checked",
          "matched",
          "rounds",
          "slots"
        ]
      },
      "ProductionPillar": {
        "type": "object",
        "properties": {
          "producer": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "registered": {
            "type": "boolean"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "lastHeight": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "lastTimestamp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "producer",
          "name",
          "registered",
          "count",
          "lastHeight",
          "lastTimestamp"
        ]
      },
      "ProductionMomentum": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MomentumHeader"
          },
          {
            "type": "object",
            "properties": {
              "intervalSeconds": {
                "type": "integer",
                "minimum": 10,
                "description": "Chain timestamp difference from the preceding momentum, including missed slots; not execution time."
              }
            },
            "required": [
              "intervalSeconds"
            ]
          }
        ]
      },
      "ProductionIntervals": {
        "type": "object",
        "properties": {
          "samples": {
            "type": "integer",
            "minimum": 0
          },
          "averageSeconds": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 10
              },
              {
                "type": "null"
              }
            ]
          },
          "shortestSeconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "longestSeconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "latestSeconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "samples",
          "averageSeconds",
          "shortestSeconds",
          "longestSeconds",
          "latestSeconds"
        ]
      },
      "ProductionSnapshot": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "generatedAt": {
            "type": "string",
            "description": "Last successful checked snapshot time; empty during initial warmup, unchanged on error."
          },
          "since": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "enum": [
              "ready",
              "backfilling",
              "stale",
              "unavailable"
            ]
          },
          "source": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "complete": {
            "type": "boolean"
          },
          "firstHeight": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "last": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MomentumHeader"
              },
              {
                "type": "null"
              }
            ]
          },
          "frontier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MomentumHeader"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalMomentums": {
            "type": "integer",
            "minimum": 0
          },
          "remaining": {
            "type": "integer",
            "minimum": 0
          },
          "pillars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionPillar"
            }
          },
          "intervals": {
            "$ref": "#/components/schemas/ProductionIntervals"
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionMomentum"
            },
            "maxItems": 25
          }
        },
        "required": [
          "schemaVersion",
          "generatedAt",
          "since",
          "status",
          "source",
          "complete",
          "firstHeight",
          "last",
          "frontier",
          "totalMomentums",
          "remaining",
          "pillars",
          "intervals",
          "recent"
        ]
      },
      "ProductionPage": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "tipHeight": {
            "type": "integer",
            "minimum": 0
          },
          "tipHash": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionMomentum"
            },
            "maxItems": 100
          },
          "nextBeforeHeight": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "tipHeight",
          "tipHash",
          "data",
          "nextBeforeHeight"
        ]
      },
      "GapCounts": {
        "type": "object",
        "properties": {
          "scheduled": {
            "type": "integer",
            "minimum": 0,
            "maximum": 360
          },
          "produced": {
            "type": "integer",
            "minimum": 0
          },
          "missed": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "scheduled",
          "produced",
          "missed"
        ]
      },
      "GapPillar": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GapCounts"
          },
          {
            "type": "object",
            "properties": {
              "producer": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "baselineCount": {
                "type": "integer",
                "minimum": 0
              },
              "group": {
                "enum": [
                  "no-baseline-production",
                  "prior-production"
                ],
                "description": "Fixed by the first hour only. Not a current fork or inactivity label."
              }
            },
            "required": [
              "producer",
              "name",
              "baselineCount",
              "group"
            ]
          }
        ]
      },
      "GapRound": {
        "type": "object",
        "properties": {
          "start": {
            "type": "integer",
            "minimum": 0
          },
          "end": {
            "type": "integer",
            "minimum": 0
          },
          "proofHeight": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "proofHash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "produced": {
            "type": "integer",
            "minimum": 0
          },
          "matched": {
            "type": "integer",
            "minimum": 0
          },
          "missed": {
            "type": "integer",
            "minimum": 0
          },
          "included": {
            "type": "boolean"
          },
          "reason": {
            "enum": [
              "missing-proof",
              "producer-mismatch",
              "too-few-produced-slots",
              "replay-matched"
            ]
          }
        },
        "required": [
          "start",
          "end",
          "proofHeight",
          "proofHash",
          "produced",
          "matched",
          "missed",
          "included",
          "reason"
        ]
      },
      "GapStudy": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "method": {
            "const": "baseline-holdout-current-weights-v1"
          },
          "generatedAt": {
            "type": "string",
            "description": "Last successful study snapshot time, empty during warmup; unchanged on error."
          },
          "source": {
            "type": "string"
          },
          "status": {
            "enum": [
              "waiting",
              "ready",
              "stale",
              "unavailable"
            ]
          },
          "error": {
            "type": "string"
          },
          "baselineStart": {
            "type": "integer",
            "minimum": 0
          },
          "baselineEnd": {
            "type": "integer",
            "minimum": 0
          },
          "baselineComplete": {
            "type": "boolean"
          },
          "baselineMomentums": {
            "type": "integer",
            "minimum": 0
          },
          "windowStart": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "windowEnd": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "frontier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MomentumHeader"
              },
              {
                "type": "null"
              }
            ]
          },
          "minimumReplay": {
            "const": 5
          },
          "all": {
            "$ref": "#/components/schemas/GapCounts"
          },
          "comparable": {
            "$ref": "#/components/schemas/GapCounts"
          },
          "noBaselineProduction": {
            "$ref": "#/components/schemas/GapCounts"
          },
          "priorProduction": {
            "$ref": "#/components/schemas/GapCounts"
          },
          "rounds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GapRound"
            },
            "maxItems": 12
          },
          "pillars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GapPillar"
            },
            "maxItems": 360
          }
        },
        "required": [
          "schemaVersion",
          "method",
          "generatedAt",
          "source",
          "status",
          "baselineStart",
          "baselineEnd",
          "baselineComplete",
          "baselineMomentums",
          "windowStart",
          "windowEnd",
          "frontier",
          "minimumReplay",
          "all",
          "comparable",
          "noBaselineProduction",
          "priorProduction",
          "rounds",
          "pillars"
        ]
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ok"
          },
          "scanning": {
            "type": "boolean"
          },
          "nodes": {
            "type": "integer",
            "minimum": 0
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "scanning",
          "nodes",
          "updatedAt"
        ]
      }
    }
  }
}