{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fwozen-com/json-schema/fwozen-com-enforcement-summary-schema.json",
  "title": "EnforcementSummary",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fwozen-com-openapi.yml#/components/schemas/EnforcementSummary",
  "type": "object",
  "properties": {
    "level": {
      "type": "string",
      "enum": [
        "green",
        "yellow",
        "red",
        "unknown"
      ]
    },
    "counts": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "enum": [
          "green",
          "yellow",
          "red",
          "unknown"
        ]
      },
      "additionalProperties": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "required": [
        "green",
        "yellow",
        "red",
        "unknown"
      ]
    },
    "configurationCounts": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "enum": [
          "verified",
          "needs_attention",
          "missing",
          "unknown"
        ]
      },
      "additionalProperties": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "required": [
        "verified",
        "needs_attention",
        "missing",
        "unknown"
      ]
    },
    "bypassCounts": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "enum": [
          "present",
          "known_none",
          "unknown"
        ]
      },
      "additionalProperties": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "required": [
        "present",
        "known_none",
        "unknown"
      ]
    },
    "worstOffenders": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "pattern": "^wbr_[1-9A-HJ-NP-Za-km-z]{16}$"
          },
          "repoFullName": {
            "type": "string"
          },
          "branch": {
            "type": "string"
          },
          "level": {
            "type": "string",
            "enum": [
              "green",
              "yellow",
              "red",
              "unknown"
            ]
          },
          "configuration": {
            "type": "string",
            "enum": [
              "verified",
              "needs_attention",
              "missing",
              "unknown"
            ]
          },
          "bypassAssurance": {
            "type": "string",
            "enum": [
              "present",
              "known_none",
              "unknown"
            ]
          },
          "topProblem": {
            "type": "string"
          }
        },
        "required": [
          "branchId",
          "repoFullName",
          "branch",
          "level",
          "configuration",
          "bypassAssurance",
          "topProblem"
        ],
        "additionalProperties": false
      }
    },
    "freshness": {
      "type": "object",
      "properties": {
        "oldestVerifiedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "oldestProbedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "staleBranches": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "neverVerifiedBranches": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "horizonSeconds": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "oldestVerifiedAt",
        "oldestProbedAt",
        "staleBranches",
        "neverVerifiedBranches",
        "horizonSeconds"
      ],
      "additionalProperties": false
    },
    "reconciler": {
      "type": "object",
      "properties": {
        "lastRunAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "lagSeconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "driftRepairedLast24h": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "lastRunAt",
        "lagSeconds",
        "driftRepairedLast24h"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "level",
    "counts",
    "configurationCounts",
    "bypassCounts",
    "worstOffenders",
    "freshness",
    "reconciler"
  ],
  "additionalProperties": false
}