{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repowise-dev/json-schema/repowise-dev-blast-radius-response-schema.json",
  "title": "BlastRadiusResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repowise-dev-blast-radius-api-openapi.yml#/components/schemas/BlastRadiusResponse",
  "properties": {
    "direct_risks": {
      "items": {
        "$ref": "#/$defs/DirectRiskEntry"
      },
      "type": "array",
      "title": "Direct Risks"
    },
    "transitive_affected": {
      "items": {
        "$ref": "#/$defs/TransitiveEntry"
      },
      "type": "array",
      "title": "Transitive Affected"
    },
    "cochange_warnings": {
      "items": {
        "$ref": "#/$defs/CochangeWarning"
      },
      "type": "array",
      "title": "Cochange Warnings"
    },
    "recommended_reviewers": {
      "items": {
        "$ref": "#/$defs/ReviewerEntry"
      },
      "type": "array",
      "title": "Recommended Reviewers"
    },
    "test_gaps": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Test Gaps"
    },
    "test_impact": {
      "$ref": "#/$defs/TestImpactResponse"
    },
    "structural_impact_score": {
      "type": "number",
      "title": "Structural Impact Score"
    },
    "structural_impact_band": {
      "type": "string",
      "enum": [
        "localized",
        "moderate",
        "broad"
      ],
      "title": "Structural Impact Band"
    },
    "structural_impact_scale": {
      "$ref": "#/$defs/RiskScalarSemantics"
    },
    "overall_risk_score": {
      "type": "number",
      "title": "Overall Risk Score"
    },
    "overall_risk_score_compatibility": {
      "$ref": "#/$defs/RiskCompatibilityField"
    }
  },
  "type": "object",
  "required": [
    "direct_risks",
    "transitive_affected",
    "cochange_warnings",
    "recommended_reviewers",
    "test_gaps",
    "test_impact",
    "structural_impact_score",
    "structural_impact_band",
    "structural_impact_scale",
    "overall_risk_score",
    "overall_risk_score_compatibility"
  ],
  "$defs": {
    "CochangeWarning": {
      "properties": {
        "changed": {
          "type": "string",
          "title": "Changed"
        },
        "missing_partner": {
          "type": "string",
          "title": "Missing Partner"
        },
        "score": {
          "type": "number",
          "title": "Score"
        }
      },
      "type": "object",
      "required": [
        "changed",
        "missing_partner",
        "score"
      ],
      "title": "CochangeWarning"
    },
    "DirectRiskEntry": {
      "properties": {
        "path": {
          "type": "string",
          "title": "Path"
        },
        "structural_score": {
          "type": "number",
          "title": "Structural Score"
        },
        "risk_score": {
          "type": "number",
          "title": "Risk Score"
        },
        "temporal_hotspot": {
          "type": "number",
          "title": "Temporal Hotspot"
        },
        "churn_percentile": {
          "type": "number",
          "title": "Churn Percentile"
        },
        "is_hotspot": {
          "type": "boolean",
          "title": "Is Hotspot"
        },
        "centrality": {
          "type": "number",
          "title": "Centrality"
        }
      },
      "type": "object",
      "required": [
        "path",
        "structural_score",
        "risk_score",
        "temporal_hotspot",
        "churn_percentile",
        "is_hotspot",
        "centrality"
      ],
      "title": "DirectRiskEntry"
    },
    "ReviewerEntry": {
      "properties": {
        "email": {
          "type": "string",
          "title": "Email"
        },
        "files": {
          "type": "integer",
          "title": "Files"
        },
        "ownership_pct": {
          "type": "number",
          "title": "Ownership Pct"
        }
      },
      "type": "object",
      "required": [
        "email",
        "files",
        "ownership_pct"
      ],
      "title": "ReviewerEntry"
    },
    "RiskCalibration": {
      "properties": {
        "status": {
          "type": "string",
          "title": "Status"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        },
        "calibrated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Calibrated At"
        },
        "population": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Population"
        },
        "granularity": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Granularity"
        }
      },
      "type": "object",
      "required": [
        "status"
      ],
      "title": "RiskCalibration"
    },
    "RiskCompatibilityField": {
      "properties": {
        "deprecated": {
          "type": "boolean",
          "title": "Deprecated"
        },
        "replacement": {
          "type": "string",
          "title": "Replacement"
        },
        "equivalent_value": {
          "type": "boolean",
          "title": "Equivalent Value"
        },
        "historical_meaning": {
          "type": "string",
          "title": "Historical Meaning"
        }
      },
      "type": "object",
      "required": [
        "deprecated",
        "replacement",
        "equivalent_value",
        "historical_meaning"
      ],
      "title": "RiskCompatibilityField"
    },
    "RiskScalarSemantics": {
      "properties": {
        "field": {
          "type": "string",
          "title": "Field"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "unit": {
          "type": "string",
          "title": "Unit"
        },
        "range": {
          "anyOf": [
            {
              "$ref": "#/$defs/RiskScaleRange"
            },
            {
              "type": "null"
            }
          ]
        },
        "measures": {
          "type": "string",
          "title": "Measures"
        },
        "deterministic": {
          "type": "boolean",
          "title": "Deterministic",
          "default": true
        },
        "calibration": {
          "anyOf": [
            {
              "$ref": "#/$defs/RiskCalibration"
            },
            {
              "type": "null"
            }
          ]
        },
        "authoritative": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authoritative"
        },
        "authoritative_for_change_review": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authoritative For Change Review"
        },
        "runtime_breakage_probability": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Runtime Breakage Probability"
        },
        "formula": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Formula"
        },
        "thresholds": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "number"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Thresholds"
        },
        "band_thresholds": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "number"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Band Thresholds"
        },
        "component_fields": {
          "anyOf": [
            {
              "additionalProperties": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Component Fields"
        }
      },
      "type": "object",
      "required": [
        "field",
        "kind",
        "unit",
        "range",
        "measures"
      ],
      "title": "RiskScalarSemantics"
    },
    "RiskScaleRange": {
      "properties": {
        "minimum": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Minimum"
        },
        "maximum": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Maximum"
        }
      },
      "type": "object",
      "required": [
        "minimum",
        "maximum"
      ],
      "title": "RiskScaleRange"
    },
    "TestImpactAggregate": {
      "properties": {
        "file_count": {
          "type": "integer",
          "title": "File Count"
        },
        "ingested_commit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ingested Commit"
        },
        "freshness": {
          "type": "string",
          "enum": [
            "current",
            "stale",
            "unknown"
          ],
          "title": "Freshness"
        }
      },
      "type": "object",
      "required": [
        "file_count",
        "freshness"
      ],
      "title": "TestImpactAggregate"
    },
    "TestImpactAnalysis": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "available",
            "partial",
            "degraded"
          ],
          "title": "Status"
        },
        "stale": {
          "type": "boolean",
          "title": "Stale"
        },
        "partial": {
          "type": "boolean",
          "title": "Partial"
        },
        "degraded": {
          "type": "boolean",
          "title": "Degraded"
        },
        "basis_categories": {
          "items": {
            "type": "string",
            "enum": [
              "measured",
              "inferred"
            ]
          },
          "type": "array",
          "title": "Basis Categories"
        }
      },
      "type": "object",
      "required": [
        "status",
        "stale",
        "partial",
        "degraded",
        "basis_categories"
      ],
      "title": "TestImpactAnalysis"
    },
    "TestImpactCoverage": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "available",
            "partial",
            "unavailable",
            "degraded"
          ],
          "title": "Status"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "map_present": {
          "type": "boolean",
          "title": "Map Present"
        },
        "pair_count": {
          "type": "integer",
          "title": "Pair Count"
        },
        "test_count": {
          "type": "integer",
          "title": "Test Count"
        },
        "source_file_count": {
          "type": "integer",
          "title": "Source File Count"
        },
        "changed_files_total": {
          "type": "integer",
          "title": "Changed Files Total"
        },
        "changed_files_with_measured_tests": {
          "type": "integer",
          "title": "Changed Files With Measured Tests"
        },
        "changed_files_without_measured_tests": {
          "type": "integer",
          "title": "Changed Files Without Measured Tests"
        },
        "ingested_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ingested At"
        },
        "source_format": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Format"
        },
        "freshness": {
          "$ref": "#/$defs/TestImpactFreshness"
        },
        "aggregate": {
          "anyOf": [
            {
              "$ref": "#/$defs/TestImpactAggregate"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "status",
        "map_present",
        "pair_count",
        "test_count",
        "source_file_count",
        "changed_files_total",
        "changed_files_with_measured_tests",
        "changed_files_without_measured_tests",
        "freshness"
      ],
      "title": "TestImpactCoverage"
    },
    "TestImpactEvidence": {
      "properties": {
        "basis": {
          "type": "string",
          "enum": [
            "measured",
            "inferred"
          ],
          "title": "Basis"
        },
        "source_file": {
          "type": "string",
          "title": "Source File"
        },
        "via": {
          "type": "string",
          "enum": [
            "coverage-map",
            "call-graph",
            "import-graph"
          ],
          "title": "Via"
        },
        "match": {
          "anyOf": [
            {
              "type": "string",
              "const": "file"
            },
            {
              "type": "null"
            }
          ],
          "title": "Match"
        },
        "source_format": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Format"
        }
      },
      "type": "object",
      "required": [
        "basis",
        "source_file",
        "via"
      ],
      "title": "TestImpactEvidence"
    },
    "TestImpactFile": {
      "properties": {
        "source_file": {
          "type": "string",
          "title": "Source File"
        },
        "status": {
          "type": "string",
          "enum": [
            "measured",
            "inferred",
            "unknown",
            "deleted"
          ],
          "title": "Status"
        },
        "change_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Change Status"
        },
        "head_present": {
          "type": "boolean",
          "title": "Head Present",
          "default": true
        },
        "measured_tests": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Measured Tests"
        },
        "measured_tests_total": {
          "type": "integer",
          "title": "Measured Tests Total"
        },
        "inferred_tests": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Inferred Tests"
        },
        "inferred_tests_total": {
          "type": "integer",
          "title": "Inferred Tests Total"
        }
      },
      "type": "object",
      "required": [
        "source_file",
        "status",
        "measured_tests",
        "measured_tests_total",
        "inferred_tests",
        "inferred_tests_total"
      ],
      "title": "TestImpactFile"
    },
    "TestImpactFreshness": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "current",
            "stale",
            "unknown"
          ],
          "title": "Status"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "ingested_commit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ingested Commit"
        },
        "indexed_commit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Indexed Commit"
        }
      },
      "type": "object",
      "required": [
        "status"
      ],
      "title": "TestImpactFreshness"
    },
    "TestImpactInference": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "available",
            "degraded"
          ],
          "title": "Status"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "changed_files_total": {
          "type": "integer",
          "title": "Changed Files Total"
        },
        "changed_files_with_candidates": {
          "type": "integer",
          "title": "Changed Files With Candidates"
        },
        "candidates_before_dedup": {
          "type": "integer",
          "title": "Candidates Before Dedup"
        }
      },
      "type": "object",
      "required": [
        "status",
        "changed_files_total",
        "changed_files_with_candidates",
        "candidates_before_dedup"
      ],
      "title": "TestImpactInference"
    },
    "TestImpactResponse": {
      "properties": {
        "recommendations": {
          "items": {
            "$ref": "#/$defs/TestRecommendation"
          },
          "type": "array",
          "title": "Recommendations"
        },
        "recommendations_total": {
          "type": "integer",
          "title": "Recommendations Total"
        },
        "recommendations_emitted": {
          "type": "integer",
          "title": "Recommendations Emitted"
        },
        "recommendations_truncated": {
          "type": "boolean",
          "title": "Recommendations Truncated"
        },
        "recommendations_omitted": {
          "type": "integer",
          "title": "Recommendations Omitted"
        },
        "recommendations_by_primary_basis": {
          "additionalProperties": {
            "type": "integer"
          },
          "propertyNames": {
            "enum": [
              "measured",
              "inferred"
            ]
          },
          "type": "object",
          "title": "Recommendations By Primary Basis"
        },
        "files": {
          "items": {
            "$ref": "#/$defs/TestImpactFile"
          },
          "type": "array",
          "title": "Files"
        },
        "files_total": {
          "type": "integer",
          "title": "Files Total"
        },
        "files_without_measured_tests": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Files Without Measured Tests"
        },
        "unknown_files": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Unknown Files"
        },
        "deleted_files": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Deleted Files",
          "default": []
        },
        "coverage": {
          "$ref": "#/$defs/TestImpactCoverage"
        },
        "inference": {
          "$ref": "#/$defs/TestImpactInference"
        },
        "analysis": {
          "$ref": "#/$defs/TestImpactAnalysis"
        }
      },
      "type": "object",
      "required": [
        "recommendations",
        "recommendations_total",
        "recommendations_emitted",
        "recommendations_truncated",
        "recommendations_omitted",
        "recommendations_by_primary_basis",
        "files",
        "files_total",
        "files_without_measured_tests",
        "unknown_files",
        "coverage",
        "inference",
        "analysis"
      ],
      "title": "TestImpactResponse"
    },
    "TestRecommendation": {
      "properties": {
        "test_id": {
          "type": "string",
          "title": "Test Id"
        },
        "test_file": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Test File"
        },
        "repository_id": {
          "type": "string",
          "title": "Repository Id"
        },
        "repository": {
          "type": "string",
          "title": "Repository"
        },
        "basis": {
          "type": "string",
          "enum": [
            "measured",
            "inferred"
          ],
          "title": "Basis"
        },
        "bases": {
          "items": {
            "type": "string",
            "enum": [
              "measured",
              "inferred"
            ]
          },
          "type": "array",
          "title": "Bases"
        },
        "source_files": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Source Files"
        },
        "evidence": {
          "items": {
            "$ref": "#/$defs/TestImpactEvidence"
          },
          "type": "array",
          "title": "Evidence"
        },
        "stale": {
          "type": "boolean",
          "title": "Stale",
          "default": false
        },
        "stale_reason": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "test_file_missing",
                "test_file_changed"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Stale Reason"
        }
      },
      "type": "object",
      "required": [
        "test_id",
        "repository_id",
        "repository",
        "basis",
        "bases",
        "source_files",
        "evidence"
      ],
      "title": "TestRecommendation"
    },
    "TransitiveEntry": {
      "properties": {
        "path": {
          "type": "string",
          "title": "Path"
        },
        "depth": {
          "type": "integer",
          "title": "Depth"
        }
      },
      "type": "object",
      "required": [
        "path",
        "depth"
      ],
      "title": "TransitiveEntry"
    }
  }
}