{
  "$comment": "Generated from the Buildish Release Tooling Pydantic models. Do not edit by hand; regenerate with `make schemas`.",
  "$defs": {
    "InspectReproCountSummary": {
      "additionalProperties": false,
      "description": "One count bucket emitted by inspect-repro machine-readable summaries.",
      "properties": {
        "count": {
          "description": "Count value reported for one grouped summary bucket.",
          "minimum": 0,
          "title": "Count",
          "type": "integer"
        },
        "key": {
          "description": "Stable grouping or category key used in one Buildish summary object.",
          "minLength": 1,
          "title": "Key",
          "type": "string"
        }
      },
      "required": [
        "key",
        "count"
      ],
      "title": "InspectReproCountSummary",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "InspectReproSummaryV1": {
      "additionalProperties": false,
      "description": "Top-level summary block for machine-readable inspect-repro output.",
      "properties": {
        "failure_classes": {
          "description": "Count summary grouped by failure-class identifier across all selected inspect-repro targets.",
          "items": {
            "$ref": "#/$defs/InspectReproCountSummary"
          },
          "title": "Failure Classes",
          "type": "array"
        },
        "failure_count": {
          "description": "Total number of failing source or secondary reproducibility targets selected for inspect-repro output.",
          "minimum": 0,
          "title": "Failure Count",
          "type": "integer"
        },
        "failure_groups": {
          "description": "Count summary grouped by high-level inspect-repro failure group.",
          "items": {
            "$ref": "#/$defs/InspectReproCountSummary"
          },
          "title": "Failure Groups",
          "type": "array"
        },
        "failure_kinds": {
          "description": "Count summary grouped by artifact kind across all selected inspect-repro targets.",
          "items": {
            "$ref": "#/$defs/InspectReproCountSummary"
          },
          "title": "Failure Kinds",
          "type": "array"
        },
        "secondary_failure_count": {
          "description": "Number of failing secondary-artifact reproducibility targets selected for inspect-repro output.",
          "minimum": 0,
          "title": "Secondary Failure Count",
          "type": "integer"
        },
        "source_failure_count": {
          "description": "Number of failing source-artifact reproducibility targets selected for inspect-repro output.",
          "minimum": 0,
          "title": "Source Failure Count",
          "type": "integer"
        }
      },
      "required": [
        "failure_count",
        "source_failure_count",
        "secondary_failure_count"
      ],
      "title": "InspectReproSummaryV1",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "InspectReproTargetV1": {
      "additionalProperties": false,
      "description": "One selected reproducibility failure reported by inspect-repro JSON mode.",
      "properties": {
        "artifact_id": {
          "description": "Stable identifier for one source, secondary, or emitted artifact within Buildish release tooling.",
          "minLength": 1,
          "title": "Artifact Id",
          "type": "string"
        },
        "build_command": {
          "description": "Literal argv list that inspect-repro or verify-rc recorded as the effective build command for this target.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Build Command",
          "type": "array"
        },
        "build_working_directory": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Repository-root-relative working directory that inspect-repro or verify-rc recorded for the effective build command.",
          "title": "Build Working Directory"
        },
        "comparison_mode": {
          "description": "Declared reproducibility comparison mode used for the related artifact or profile.",
          "minLength": 1,
          "title": "Comparison Mode",
          "type": "string"
        },
        "evidence": {
          "description": "Inspection-bundle evidence references retained for one reproducibility result.",
          "items": {
            "$ref": "#/$defs/InspectionEvidenceReference"
          },
          "title": "Evidence",
          "type": "array"
        },
        "evidence_labels": {
          "description": "Short labels naming the retained evidence files that inspect-repro associated with this target.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Evidence Labels",
          "type": "array"
        },
        "execution_backend": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Execution backend that verify-rc used for the recorded reproducibility run.",
          "title": "Execution Backend"
        },
        "failure_class": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Structured failure classification that summarizes the main reason why verification or reproducibility failed.",
          "title": "Failure Class"
        },
        "failure_group": {
          "description": "Higher-level grouping bucket that inspect-repro assigned to the target, such as source-artifact or secondary artifact family.",
          "minLength": 1,
          "title": "Failure Group",
          "type": "string"
        },
        "injected_environment_keys": {
          "description": "Environment variable names that Buildish injected into the effective rebuild subprocess.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Injected Environment Keys",
          "type": "array"
        },
        "kind": {
          "description": "Declared artifact or report kind discriminator.",
          "minLength": 1,
          "title": "Kind",
          "type": "string"
        },
        "override_fields": {
          "description": "Sparse list of build-recipe fields that a local reproducibility override changed for this target.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Override Fields",
          "type": "array"
        },
        "profile_id": {
          "description": "Reproducibility profile identifier selected for the related artifact or source verification.",
          "minLength": 1,
          "title": "Profile Id",
          "type": "string"
        },
        "recipe_source": {
          "description": "Origin of the reproducibility recipe used for this target, such as verifier-internal logic, the canonical profile, or a local override.",
          "enum": [
            "verifier-internal",
            "canonical-profile",
            "local-override"
          ],
          "title": "Recipe Source",
          "type": "string"
        },
        "section_label": {
          "description": "Human-facing section label that groups related inspect-repro targets.",
          "minLength": 1,
          "title": "Section Label",
          "type": "string"
        }
      },
      "required": [
        "section_label",
        "artifact_id",
        "kind",
        "failure_group",
        "profile_id",
        "comparison_mode",
        "recipe_source"
      ],
      "title": "InspectReproTargetV1",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "InspectionEvidenceReference": {
      "additionalProperties": false,
      "description": "One retained evidence file inside the verify-rc inspection bundle.",
      "properties": {
        "label": {
          "description": "Human-readable label used to name one evidence file or report section.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "path": {
          "description": "Filesystem path, relative artifact path, or retained evidence path associated with the related record.",
          "minLength": 1,
          "title": "Path",
          "type": "string"
        }
      },
      "required": [
        "label",
        "path"
      ],
      "title": "InspectionEvidenceReference",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    }
  },
  "$id": "https://buildish.org/components/release-tooling/schemas/inspect-repro-report-v1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Machine-readable inspect-repro output for automation and post-processing.",
  "properties": {
    "build_checks_attempted": {
      "description": "Whether the command attempted local reproducibility or rebuild checks during this run.",
      "title": "Build Checks Attempted",
      "type": "boolean"
    },
    "bundle_schema_version": {
      "anyOf": [
        {
          "const": "1",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Supported schema version of the retained inspection-bundle manifest that inspect-repro consumed.",
      "title": "Bundle Schema Version"
    },
    "component_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Stable component identifier used across Buildish manifests, reports, and release-state records.",
      "title": "Component Id"
    },
    "inspection_bundle_path": {
      "description": "Filesystem path of the retained inspection bundle directory.",
      "minLength": 1,
      "title": "Inspection Bundle Path",
      "type": "string"
    },
    "rc_tag": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Exact RC Git tag, including the leading `v` prefix and `-rcN` suffix.",
      "title": "Rc Tag"
    },
    "report_json_path": {
      "description": "Filesystem path of the verify-rc JSON report consumed by inspect-repro.",
      "minLength": 1,
      "title": "Report Json Path",
      "type": "string"
    },
    "report_type": {
      "const": "inspect-repro",
      "default": "inspect-repro",
      "description": "Stable report discriminator for one Buildish JSON report contract.",
      "title": "Report Type",
      "type": "string"
    },
    "schema_version": {
      "const": "1",
      "default": "1",
      "description": "Schema version of the enclosing Buildish JSON or YAML contract.",
      "title": "Schema Version",
      "type": "string"
    },
    "selected_artifact_ids": {
      "description": "Artifact ids that inspect-repro selected for detailed output.",
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "title": "Selected Artifact Ids",
      "type": "array"
    },
    "selected_failure_classes": {
      "description": "Failure-class filters that inspect-repro applied when selecting targets.",
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "title": "Selected Failure Classes",
      "type": "array"
    },
    "summary": {
      "$ref": "#/$defs/InspectReproSummaryV1",
      "description": "Human-readable short summary for the related result or mocked tool behavior."
    },
    "summary_only": {
      "default": false,
      "description": "Whether inspect-repro emitted only grouped summaries rather than full per-target detail sections.",
      "title": "Summary Only",
      "type": "boolean"
    },
    "targets": {
      "description": "Selected inspect-repro target entries that Buildish included in the machine-readable report.",
      "items": {
        "$ref": "#/$defs/InspectReproTargetV1"
      },
      "title": "Targets",
      "type": "array"
    },
    "verify_rc_report_schema_version": {
      "const": "1",
      "description": "Schema version of the verify-rc JSON report that inspect-repro read before generating its own output.",
      "title": "Verify Rc Report Schema Version",
      "type": "string"
    },
    "verify_rc_verdict": {
      "description": "Final verify-rc verdict that inspect-repro observed in the input verification report.",
      "enum": [
        "verified",
        "failed"
      ],
      "title": "Verify Rc Verdict",
      "type": "string"
    }
  },
  "required": [
    "verify_rc_report_schema_version",
    "verify_rc_verdict",
    "build_checks_attempted",
    "report_json_path",
    "inspection_bundle_path",
    "summary"
  ],
  "title": "Buildish Release Tooling InspectReproReportV1",
  "type": "object",
  "x-buildish-contract": {
    "category": "emitted",
    "ownership": "tooling-derived",
    "summary": "Machine-readable `inspect-repro --json` output contract."
  }
}
