{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ohmyfin-ai/json-schema/ohmyfin-ai-coverage-gate-schema.json",
  "title": "CoverageGate",
  "description": "Whether the screening engine lowered a `BLOCK` to `REVIEW` because the name\nscreened is more likely a namesake than the designated party: no blocking row\ncarries more than half of the distinctive words in the name, once generic company\nwords, legal forms, titles and vessel prefixes are set aside. Nothing is removed\nfrom `matches` and no score changes, so when `applied` is true do NOT restore\n`BLOCK` from the row-level `action` fields: treat the result as a possible match\nthat needs identity confirmation (registration number, full legal name, date of\nbirth, address).\n",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ohmyfin-ai-openapi.json#/components/schemas/CoverageGate",
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "`false` means the gate is switched off, which is not the same as having declined."
    },
    "applied": {
      "type": "boolean",
      "description": "`true` when `recommended_action` was lowered from `BLOCK` to `REVIEW`."
    },
    "reason": {
      "type": "string",
      "description": "Why the gate did or did not fire. The common values: `demoted` (measured and\nlowered), `coverage_above_floor` (measured, verdict stands),\n`near_exact_block_row` (a blocking row scored 0.98 or more), `verdict_not_block`\n(nothing to lower), `identifier_query` (the name screened is a registration or\ntax number that matched a designation's own identifier, which is a match on\nidentity and is never measured), `conclusive_identifier` (a supplied\nidentifier proved identity), `non_latin_query`, `disabled`. Treat any other\nvalue as \"not applied\".\n"
    },
    "query_coverage": {
      "type": [
        "number",
        "null"
      ],
      "description": "Largest share (0 to 1) of the name's distinctive words carried by any blocking row. `null` when not measured."
    },
    "demote_at_or_below": {
      "type": "number",
      "description": "The threshold. The verdict is lowered when `query_coverage` is at or below it."
    },
    "best_blocking_row": {
      "type": [
        "object",
        "null"
      ],
      "description": "The blocking row that carried the most of the name. `null` when not measured.",
      "properties": {
        "entity_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "list_source": {
          "type": "string"
        },
        "match_score": {
          "type": "number"
        }
      }
    },
    "original_recommended_action": {
      "type": [
        "string",
        "null"
      ],
      "description": "The engine's verdict before the gate ran. `null` when the engine returned none (no match)."
    },
    "matches_removed": {
      "type": "integer",
      "description": "Always 0. The gate never removes a row."
    },
    "note": {
      "type": "string",
      "description": "The same explanation in prose, for a reader of the raw payload."
    }
  }
}