{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dnsdoctor-dev/json-schema/dnsdoctor-dev-bulk-propagation-out-schema.json",
  "title": "BulkPropagationOut",
  "description": "The batch. `checks_answered` (verdict not `unknown`) is what the settle\ngate reads. Every requested check gets a row, in request order.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dnsdoctor-dev-tools-api-openapi.yml#/components/schemas/BulkPropagationOut",
  "properties": {
    "checks_requested": {
      "type": "integer",
      "title": "Checks Requested"
    },
    "checks_answered": {
      "type": "integer",
      "title": "Checks Answered"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/BulkPropagationRow"
      },
      "type": "array",
      "title": "Results"
    }
  },
  "type": "object",
  "required": [
    "checks_requested",
    "checks_answered",
    "results"
  ],
  "$defs": {
    "BulkPropagationRow": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "record_type": {
          "type": "string",
          "title": "Record Type"
        },
        "status": {
          "$ref": "#/$defs/RowStatus"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/PropagationResponse"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error"
        }
      },
      "type": "object",
      "required": [
        "name",
        "record_type",
        "status"
      ],
      "title": "BulkPropagationRow",
      "description": "One check's row: the core's response verbatim, or a fixed error reason."
    },
    "CellStatus": {
      "type": "string",
      "enum": [
        "match",
        "mismatch",
        "answered",
        "no_answer",
        "unavailable"
      ],
      "title": "CellStatus",
      "description": "What one resolver at one vantage point contributed.\n\n`MATCH`/`MISMATCH` exist only in expected-value mode; `ANSWERED` is their\nconsistency-mode counterpart (we were given nothing to compare against, so\nthe cell reports that it answered and the grid shows what it said).\n`NO_ANSWER` is an answer — the name resolves to nothing there.\n`UNAVAILABLE` is the absence of one, and never counts toward a verdict."
    },
    "CheckMode": {
      "type": "string",
      "enum": [
        "expected",
        "consistency"
      ],
      "title": "CheckMode",
      "description": "Which question was asked — the caller supplied an expected value, or not."
    },
    "PropagationResponse": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "record_type": {
          "type": "string",
          "title": "Record Type"
        },
        "expected_value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expected Value"
        },
        "mode": {
          "$ref": "#/$defs/CheckMode"
        },
        "verdict": {
          "$ref": "#/$defs/Verdict"
        },
        "vantages": {
          "items": {
            "$ref": "#/$defs/VantageRow"
          },
          "type": "array",
          "title": "Vantages"
        },
        "vantage_total": {
          "type": "integer",
          "title": "Vantage Total"
        },
        "vantage_reached": {
          "type": "integer",
          "title": "Vantage Reached"
        },
        "answer_sets": {
          "items": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": "array",
          "title": "Answer Sets"
        },
        "checked_at": {
          "type": "string",
          "format": "date-time",
          "title": "Checked At"
        }
      },
      "type": "object",
      "required": [
        "name",
        "record_type",
        "expected_value",
        "mode",
        "verdict",
        "vantages",
        "vantage_total",
        "vantage_reached",
        "answer_sets",
        "checked_at"
      ],
      "title": "PropagationResponse",
      "description": "The whole grid plus its verdict. Deterministic throughout — no LLM ever,\nno composed record, no remediation field.\n\n`vantage_total` / `vantage_reached` are the coverage honesty: they are\nserialized beside the verdict so a consumer can say \"4 of 6\" rather than\nimplying the world. `answer_sets` lists every DISTINCT answer set observed\nacross reached cells (sorted, deduped) — with more than one entry the name\nis mid-flight somewhere, which is the finding a single verdict word cannot\ncarry on its own."
    },
    "ResolverCell": {
      "properties": {
        "resolver": {
          "type": "string",
          "title": "Resolver"
        },
        "status": {
          "$ref": "#/$defs/CellStatus"
        },
        "answers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Answers"
        },
        "ttl": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ttl"
        },
        "rtt_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rtt Ms"
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail"
        }
      },
      "type": "object",
      "required": [
        "resolver",
        "status",
        "answers"
      ],
      "title": "ResolverCell",
      "description": "One resolver's reading at one vantage point — a single grid cell.\n\n`answers` is deterministically ordered by the probe and re-sorted here, so\ntwo cells holding the same record set compare equal regardless of the order\nthe wire happened to deliver them in. `detail` carries the reason a cell is\n`unavailable`; it is never prose about the record."
    },
    "RowStatus": {
      "type": "string",
      "enum": [
        "ok",
        "error"
      ],
      "title": "RowStatus",
      "description": "Whether the core returned a grid for this check (`ok`) or not (`error`)."
    },
    "VantageRow": {
      "properties": {
        "region": {
          "type": "string",
          "title": "Region"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "reached": {
          "type": "boolean",
          "title": "Reached"
        },
        "cells": {
          "items": {
            "$ref": "#/$defs/ResolverCell"
          },
          "type": "array",
          "title": "Cells"
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail"
        }
      },
      "type": "object",
      "required": [
        "region",
        "label",
        "reached",
        "cells"
      ],
      "title": "VantageRow",
      "description": "One vantage point's row of the grid.\n\n`reached` is True when the probe answered at all — a reached vantage may\nstill hold `no_answer` cells (an honest \"nothing there\"), and an unreached\none contributes nothing to the verdict but is still rendered, because a\nsilently dropped row reads as \"we checked and it was fine\".\n\nAn unreached row carries no cells and puts the reason in `detail`: the loss\nbelongs to the vantage point, not to a resolver it never got to ask."
    },
    "Verdict": {
      "type": "string",
      "enum": [
        "propagated",
        "partial",
        "not_propagated",
        "consistent",
        "inconsistent",
        "unknown"
      ],
      "title": "Verdict",
      "description": "The overall reading. Expected-value mode yields the first three,\nconsistency mode the next two (or `NOT_PROPAGATED` when every reading agrees\non no answer at all), and either downgrades to `UNKNOWN` when\nfewer than `MIN_VANTAGES_FOR_VERDICT` vantage points were reached."
    }
  }
}