{
  "components": {
    "schemas": {
      "AIActor": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "user_id": {
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id"
        ],
        "title": "AIActor",
        "type": "object"
      },
      "AIAnalysisDiffBrief": {
        "description": "``RunCompareResponse.ai_analysis_diff``. Only ``available`` is required, so\n``{\"available\": false, \"reason\": ...}`` validates.",
        "properties": {
          "ai_changes": {
            "items": {
              "type": "string"
            },
            "title": "Ai Changes",
            "type": "array"
          },
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "clusters_added": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Clusters Added",
            "type": "array"
          },
          "clusters_removed": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Clusters Removed",
            "type": "array"
          },
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Counts",
            "type": "object"
          },
          "left_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Left Ref"
          },
          "provenance": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provenance"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "right_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Right Ref"
          },
          "test_changes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Test Changes",
            "type": "array"
          },
          "verdict": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          }
        },
        "required": [
          "available"
        ],
        "title": "AIAnalysisDiffBrief",
        "type": "object"
      },
      "AICompareNarrative": {
        "properties": {
          "ai_changes": {
            "items": {
              "type": "string"
            },
            "title": "Ai Changes",
            "type": "array"
          },
          "executive_summary": {
            "default": "",
            "title": "Executive Summary",
            "type": "string"
          },
          "fallback_used": {
            "default": false,
            "title": "Fallback Used",
            "type": "boolean"
          },
          "generated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "prompt_version": {
            "default": "run_compare_v2",
            "title": "Prompt Version",
            "type": "string"
          },
          "report_status": {
            "default": "absent",
            "title": "Report Status",
            "type": "string"
          },
          "risk_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Level"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "source",
          "label"
        ],
        "title": "AICompareNarrative",
        "type": "object"
      },
      "AICompareResponse": {
        "properties": {
          "ai_disclaimer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer"
          },
          "ai_disclaimer_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer Version"
          },
          "baseline": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline"
          },
          "baseline_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIVersionRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIVersionRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "diff": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Diff"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "narrative": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AICompareNarrative"
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "requires_human_review": {
            "default": true,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIHistoryReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "sides": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DigestSide"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sides"
          }
        },
        "required": [
          "run_id",
          "project_id"
        ],
        "title": "AICompareResponse",
        "type": "object"
      },
      "AIConfigRead": {
        "description": "AI / LLM configuration returned to the client (no API keys).",
        "properties": {
          "ai_confidence_threshold": {
            "title": "Ai Confidence Threshold",
            "type": "integer"
          },
          "ai_confidence_threshold_source": {
            "default": "env_default",
            "title": "Ai Confidence Threshold Source",
            "type": "string"
          },
          "ai_offline_mode": {
            "title": "Ai Offline Mode",
            "type": "boolean"
          },
          "ai_offline_mode_env_pinned": {
            "default": false,
            "title": "Ai Offline Mode Env Pinned",
            "type": "boolean"
          },
          "ai_offline_mode_source": {
            "default": "not_offline",
            "title": "Ai Offline Mode Source",
            "type": "string"
          },
          "ai_timeout_seconds": {
            "title": "Ai Timeout Seconds",
            "type": "integer"
          },
          "ai_timeout_seconds_source": {
            "default": "env_default",
            "title": "Ai Timeout Seconds Source",
            "type": "string"
          },
          "analysis_mode": {
            "title": "Analysis Mode",
            "type": "string"
          },
          "analysis_mode_source": {
            "default": "env_default",
            "title": "Analysis Mode Source",
            "type": "string"
          },
          "anthropic_key_set": {
            "default": false,
            "title": "Anthropic Key Set",
            "type": "boolean"
          },
          "base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "deep_investigation_enabled": {
            "title": "Deep Investigation Enabled",
            "type": "boolean"
          },
          "deep_investigation_enabled_source": {
            "default": "env_default",
            "title": "Deep Investigation Enabled Source",
            "type": "string"
          },
          "embedding_index": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbeddingIndexRead"
              },
              {
                "type": "null"
              }
            ]
          },
          "embedding_model": {
            "title": "Embedding Model",
            "type": "string"
          },
          "embedding_provider": {
            "title": "Embedding Provider",
            "type": "string"
          },
          "finetune_enabled": {
            "title": "Finetune Enabled",
            "type": "boolean"
          },
          "finetune_enabled_source": {
            "default": "env_default",
            "title": "Finetune Enabled Source",
            "type": "string"
          },
          "google_key_set": {
            "title": "Google Key Set",
            "type": "boolean"
          },
          "knowledge_rag_enabled": {
            "default": false,
            "title": "Knowledge Rag Enabled",
            "type": "boolean"
          },
          "llm_max_tokens": {
            "title": "Llm Max Tokens",
            "type": "integer"
          },
          "llm_model": {
            "title": "Llm Model",
            "type": "string"
          },
          "llm_provider": {
            "title": "Llm Provider",
            "type": "string"
          },
          "llm_temperature": {
            "title": "Llm Temperature",
            "type": "number"
          },
          "ml_human_label_count": {
            "default": 0,
            "title": "Ml Human Label Count",
            "type": "integer"
          },
          "ml_human_label_floor": {
            "default": 50,
            "title": "Ml Human Label Floor",
            "type": "integer"
          },
          "ml_maturity": {
            "default": "not_trained",
            "title": "Ml Maturity",
            "type": "string"
          },
          "ml_min_training_samples": {
            "default": 200,
            "title": "Ml Min Training Samples",
            "type": "integer"
          },
          "ml_model_accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ml Model Accuracy"
          },
          "ml_model_available": {
            "default": false,
            "title": "Ml Model Available",
            "type": "boolean"
          },
          "ml_training_sample_count": {
            "default": 0,
            "title": "Ml Training Sample Count",
            "type": "integer"
          },
          "openai_key_set": {
            "title": "Openai Key Set",
            "type": "boolean"
          },
          "openrouter_key_set": {
            "default": false,
            "title": "Openrouter Key Set",
            "type": "boolean"
          },
          "rag_faithfulness_evaluator": {
            "default": "ollama",
            "title": "Rag Faithfulness Evaluator",
            "type": "string"
          },
          "rag_faithfulness_evaluator_effective": {
            "default": "ollama",
            "title": "Rag Faithfulness Evaluator Effective",
            "type": "string"
          },
          "rag_faithfulness_evaluator_reason": {
            "default": "configured",
            "title": "Rag Faithfulness Evaluator Reason",
            "type": "string"
          },
          "rag_faithfulness_gate_enabled": {
            "default": false,
            "title": "Rag Faithfulness Gate Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "llm_provider",
          "llm_model",
          "llm_temperature",
          "llm_max_tokens",
          "ai_offline_mode",
          "embedding_provider",
          "embedding_model",
          "ai_confidence_threshold",
          "ai_timeout_seconds",
          "deep_investigation_enabled",
          "finetune_enabled",
          "openai_key_set",
          "google_key_set",
          "analysis_mode"
        ],
        "title": "AIConfigRead",
        "type": "object"
      },
      "AIConfigUpdate": {
        "description": "Payload for updating AI configuration. None = keep existing.",
        "properties": {
          "ai_confidence_threshold": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Confidence Threshold"
          },
          "ai_offline_mode": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Offline Mode"
          },
          "ai_timeout_seconds": {
            "anyOf": [
              {
                "maximum": 1800.0,
                "minimum": 5.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Timeout Seconds"
          },
          "analysis_mode": {
            "anyOf": [
              {
                "pattern": "^(llm|ml|rules|auto)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "anthropic_api_key": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anthropic Api Key"
          },
          "base_url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "deep_investigation_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deep Investigation Enabled"
          },
          "embedding_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embedding Model"
          },
          "embedding_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embedding Provider"
          },
          "finetune_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finetune Enabled"
          },
          "google_api_key": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Google Api Key"
          },
          "knowledge_rag_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Rag Enabled"
          },
          "llm_max_tokens": {
            "anyOf": [
              {
                "maximum": 32768.0,
                "minimum": 256.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Max Tokens"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "llm_provider": {
            "anyOf": [
              {
                "pattern": "^(ollama|lmstudio|localai|vllm|openai|gemini|anthropic|openrouter)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider"
          },
          "llm_temperature": {
            "anyOf": [
              {
                "maximum": 2.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Temperature"
          },
          "openai_api_key": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openai Api Key"
          },
          "openrouter_api_key": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openrouter Api Key"
          },
          "rag_faithfulness_evaluator": {
            "anyOf": [
              {
                "pattern": "^(ollama|ragas)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rag Faithfulness Evaluator"
          }
        },
        "title": "AIConfigUpdate",
        "type": "object"
      },
      "AICoverageAnalysisRequest": {
        "properties": {
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "requirements": {
            "minLength": 3,
            "title": "Requirements",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "requirements"
        ],
        "title": "AICoverageAnalysisRequest",
        "type": "object"
      },
      "AICoverageAnalysisResponse": {
        "properties": {
          "coverage_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Score"
          },
          "covered_areas": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Covered Areas"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "partial_coverage": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Partial Coverage"
          },
          "recommended_new_tests": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended New Tests"
          },
          "risk_assessment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Assessment"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "uncovered_areas": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uncovered Areas"
          }
        },
        "title": "AICoverageAnalysisResponse",
        "type": "object"
      },
      "AIDigestDiffResponse": {
        "description": "``from`` / ``to`` are emitted under those JSON keys (aliases).",
        "properties": {
          "ai_disclaimer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer"
          },
          "ai_disclaimer_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer Version"
          },
          "diff": {
            "additionalProperties": true,
            "title": "Diff",
            "type": "object"
          },
          "from": {
            "$ref": "#/components/schemas/AIVersionRef"
          },
          "requires_human_review": {
            "default": true,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIHistoryReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "to": {
            "$ref": "#/components/schemas/AIVersionRef"
          }
        },
        "required": [
          "run_id",
          "from",
          "to",
          "diff"
        ],
        "title": "AIDigestDiffResponse",
        "type": "object"
      },
      "AIEvalDatasetCreate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Items",
            "type": "array"
          },
          "name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "task_type": {
            "pattern": "^(classification|root_cause|release_decision|duplicate_detection)$",
            "title": "Task Type",
            "type": "string"
          }
        },
        "required": [
          "name",
          "task_type"
        ],
        "title": "AIEvalDatasetCreate",
        "type": "object"
      },
      "AIEvalDatasetResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "task_type": {
            "title": "Task Type",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "name",
          "task_type",
          "item_count",
          "is_active",
          "created_at"
        ],
        "title": "AIEvalDatasetResponse",
        "type": "object"
      },
      "AIEvalGateRunListResponse": {
        "description": "Agent-stack history (``gate_type IS NULL``) and the G2 history (W16).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AIEvalGateRunResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "AIEvalGateRunListResponse",
        "type": "object"
      },
      "AIEvalGateRunResponse": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "baseline_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Tier"
          },
          "blocking_gates": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Blocking Gates",
            "type": "array"
          },
          "candidate_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Candidate Tier"
          },
          "change_id": {
            "title": "Change Id",
            "type": "string"
          },
          "evaluated_at": {
            "format": "date-time",
            "title": "Evaluated At",
            "type": "string"
          },
          "evaluated_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluated By"
          },
          "gate_results": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Gate Results",
            "type": "array"
          },
          "gate_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gate Type"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "manifest": {
            "additionalProperties": true,
            "title": "Manifest",
            "type": "object"
          },
          "manifest_checksum_sha256": {
            "title": "Manifest Checksum Sha256",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "sample_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sample Count"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "version_changes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Version Changes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "change_id",
          "status",
          "manifest_checksum_sha256",
          "manifest",
          "gate_results",
          "blocking_gates",
          "version_changes",
          "evaluated_at"
        ],
        "title": "AIEvalGateRunResponse",
        "type": "object"
      },
      "AIEvalItemListResponse": {
        "properties": {
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Counts",
            "type": "object"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AIEvalItemOutputRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "counts"
        ],
        "title": "AIEvalItemListResponse",
        "type": "object"
      },
      "AIEvalItemOutputRead": {
        "properties": {
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Text"
          },
          "expected": {
            "additionalProperties": true,
            "title": "Expected",
            "type": "object"
          },
          "input": {
            "additionalProperties": true,
            "title": "Input",
            "type": "object"
          },
          "item_index": {
            "title": "Item Index",
            "type": "integer"
          },
          "item_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Key"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "mode_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode Used"
          },
          "output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "score": {
            "additionalProperties": true,
            "title": "Score",
            "type": "object"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens"
          }
        },
        "required": [
          "item_index",
          "status",
          "expected"
        ],
        "title": "AIEvalItemOutputRead",
        "type": "object"
      },
      "AIEvalManifestResponse": {
        "properties": {
          "eval_manifest_checksum": {
            "title": "Eval Manifest Checksum",
            "type": "string"
          },
          "evaluated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluated At"
          },
          "gate_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gate Run Id"
          },
          "manifest": {
            "additionalProperties": true,
            "title": "Manifest",
            "type": "object"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "eval_manifest_checksum",
          "source",
          "status",
          "manifest"
        ],
        "title": "AIEvalManifestResponse",
        "type": "object"
      },
      "AIEvalRunListResponse": {
        "description": "GET /ai-eval/runs (was a bare list; no client read it).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AIEvalRunResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "AIEvalRunListResponse",
        "type": "object"
      },
      "AIEvalRunResponse": {
        "properties": {
          "accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accuracy"
          },
          "agreement_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreement Rate"
          },
          "candidate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvalCandidateResolved"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "correct_items": {
            "default": 0,
            "title": "Correct Items",
            "type": "integer"
          },
          "dataset_id": {
            "format": "uuid",
            "title": "Dataset Id",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 0,
            "title": "Error Items"
          },
          "error_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Text"
          },
          "evaluated_at": {
            "format": "date-time",
            "title": "Evaluated At",
            "type": "string"
          },
          "f1_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "F1 Score"
          },
          "fallback_used": {
            "default": false,
            "title": "Fallback Used",
            "type": "boolean"
          },
          "heartbeat_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heartbeat At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "items_capped": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": false,
            "title": "Items Capped"
          },
          "measured": {
            "default": true,
            "title": "Measured",
            "type": "boolean"
          },
          "metric_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "label_agreement",
            "title": "Metric Kind"
          },
          "metric_label": {
            "default": "",
            "title": "Metric Label",
            "type": "string"
          },
          "metrics": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/EvalMetric"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metrics"
          },
          "model_name": {
            "title": "Model Name",
            "type": "string"
          },
          "model_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Version Id"
          },
          "precision": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Precision"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "recall": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recall"
          },
          "requested_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By"
          },
          "scored_items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 0,
            "title": "Scored Items"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "completed",
            "title": "Status"
          },
          "task_type": {
            "title": "Task Type",
            "type": "string"
          },
          "total_items": {
            "default": 0,
            "title": "Total Items",
            "type": "integer"
          },
          "unscored_items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 0,
            "title": "Unscored Items"
          }
        },
        "required": [
          "id",
          "dataset_id",
          "model_name",
          "task_type",
          "evaluated_at"
        ],
        "title": "AIEvalRunResponse",
        "type": "object"
      },
      "AIGenerateStrategyRequest": {
        "properties": {
          "project_context": {
            "minLength": 3,
            "title": "Project Context",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "strategy_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strategy Name"
          }
        },
        "required": [
          "project_id",
          "project_context"
        ],
        "title": "AIGenerateStrategyRequest",
        "type": "object"
      },
      "AIGenerateTestCasesRequest": {
        "properties": {
          "persist": {
            "default": false,
            "title": "Persist",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "requirements": {
            "minLength": 3,
            "title": "Requirements",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "requirements"
        ],
        "title": "AIGenerateTestCasesRequest",
        "type": "object"
      },
      "AIGenerateTestCasesResponse": {
        "properties": {
          "coverage_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Summary"
          },
          "created_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Created Ids",
            "type": "array"
          },
          "gaps_noted": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Gaps Noted",
            "type": "array"
          },
          "test_cases": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Test Cases",
            "type": "array"
          }
        },
        "required": [
          "test_cases"
        ],
        "title": "AIGenerateTestCasesResponse",
        "type": "object"
      },
      "AIHistoryListResponse": {
        "properties": {
          "ai_disclaimer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer"
          },
          "ai_disclaimer_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer Version"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "latest_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Version"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "live": {
            "additionalProperties": true,
            "title": "Live",
            "type": "object"
          },
          "requires_human_review": {
            "default": true,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIHistoryReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/AIVersionSummary"
            },
            "title": "Versions",
            "type": "array"
          }
        },
        "required": [
          "run_id",
          "kind",
          "total",
          "limit",
          "truncated"
        ],
        "title": "AIHistoryListResponse",
        "type": "object"
      },
      "AIHistoryReviewBlock": {
        "description": "E8.3 review status of an AI artefact (state is a plain string here).\n\nNamed apart from ``schemas.ReviewBlock`` (whose ``state`` is a Literal) so\nthe OpenAPI schema keeps one component per name.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "review_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Id"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "state": {
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state",
          "message"
        ],
        "title": "AIHistoryReviewBlock",
        "type": "object"
      },
      "AIModeRead": {
        "description": "What every role's screens branch on: the analysis mode, and whether AI\nstays on this deployment.",
        "properties": {
          "ai_offline_mode": {
            "title": "Ai Offline Mode",
            "type": "boolean"
          },
          "analysis_mode": {
            "title": "Analysis Mode",
            "type": "string"
          },
          "deep_investigation_enabled": {
            "default": true,
            "title": "Deep Investigation Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "analysis_mode",
          "ai_offline_mode"
        ],
        "title": "AIModeRead",
        "type": "object"
      },
      "AIModelStatusRead": {
        "description": "Live model presence + fallback-chain state (US-13.2).\n\n``ollama_reachable=False`` and \"model missing\" are deliberately\nseparate signals: an unreachable daemon is a connectivity problem,\nan empty/incomplete model list on a reachable daemon is a model-pack\nimport problem. The UI must not collapse them.",
        "properties": {
          "analysis_mode": {
            "title": "Analysis Mode",
            "type": "string"
          },
          "checked_at": {
            "title": "Checked At",
            "type": "string"
          },
          "fallback_chain": {
            "items": {
              "$ref": "#/components/schemas/FallbackChainEntry"
            },
            "title": "Fallback Chain",
            "type": "array"
          },
          "installed_models": {
            "items": {
              "type": "string"
            },
            "title": "Installed Models",
            "type": "array"
          },
          "llm_provider": {
            "title": "Llm Provider",
            "type": "string"
          },
          "offline_mode": {
            "title": "Offline Mode",
            "type": "boolean"
          },
          "ollama_base_url": {
            "title": "Ollama Base Url",
            "type": "string"
          },
          "ollama_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ollama Error"
          },
          "ollama_reachable": {
            "title": "Ollama Reachable",
            "type": "boolean"
          },
          "required": {
            "items": {
              "$ref": "#/components/schemas/RequiredModel"
            },
            "title": "Required",
            "type": "array"
          }
        },
        "required": [
          "ollama_reachable",
          "ollama_base_url",
          "installed_models",
          "required",
          "fallback_chain",
          "offline_mode",
          "llm_provider",
          "analysis_mode",
          "checked_at"
        ],
        "title": "AIModelStatusRead",
        "type": "object"
      },
      "AIOptimizePlanRequest": {
        "properties": {
          "constraints": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraints"
          },
          "plan_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Name"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "AIOptimizePlanRequest",
        "type": "object"
      },
      "AIPreviousRunResponse": {
        "properties": {
          "baseline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunBrief"
              },
              {
                "type": "null"
              }
            ]
          },
          "current": {
            "$ref": "#/components/schemas/RunBrief"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "rule": {
            "additionalProperties": true,
            "title": "Rule",
            "type": "object"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "rule",
          "current"
        ],
        "title": "AIPreviousRunResponse",
        "type": "object"
      },
      "AIQualityDashboardResponse": {
        "description": "Combined dashboard data for AI quality metrics.",
        "properties": {
          "agreement": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreement"
          },
          "drift": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Drift"
          },
          "eval_provenance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvalProvenanceHealthResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "feedback_summary": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feedback Summary"
          },
          "label_health": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Health"
          },
          "model_versions": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Model Versions",
            "type": "array"
          },
          "recent_eval_runs": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AIEvalRunResponse"
            },
            "title": "Recent Eval Runs",
            "type": "array"
          }
        },
        "title": "AIQualityDashboardResponse",
        "type": "object"
      },
      "AIReviewTestCaseResponse": {
        "properties": {
          "best_practices_violations": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Best Practices Violations"
          },
          "coverage_gaps": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Gaps"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "grade": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grade"
          },
          "issues": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issues"
          },
          "positive_aspects": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Positive Aspects"
          },
          "quality_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality Score"
          },
          "score_breakdown": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Breakdown"
          },
          "suggestions": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggestions"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "title": "AIReviewTestCaseResponse",
        "type": "object"
      },
      "AITaskEnqueueResponse": {
        "properties": {
          "status": {
            "default": "queued",
            "title": "Status",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "task_id"
        ],
        "title": "AITaskEnqueueResponse",
        "type": "object"
      },
      "AITaskStatusResponse": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "task_id",
          "status"
        ],
        "title": "AITaskStatusResponse",
        "type": "object"
      },
      "AITestHistoryResponse": {
        "properties": {
          "current": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AITestVersion"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "test_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Fingerprint"
          },
          "test_id": {
            "title": "Test Id",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/AITestVersion"
            },
            "title": "Versions",
            "type": "array"
          }
        },
        "required": [
          "run_id",
          "test_id",
          "test_name"
        ],
        "title": "AITestHistoryResponse",
        "type": "object"
      },
      "AITestVersion": {
        "properties": {
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "confidence_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Score"
          },
          "content_sha256": {
            "title": "Content Sha256",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "is_flaky": {
            "default": false,
            "title": "Is Flaky",
            "type": "boolean"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "requires_human_review": {
            "default": false,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "root_cause_excerpt": {
            "default": "",
            "title": "Root Cause Excerpt",
            "type": "string"
          },
          "trigger": {
            "title": "Trigger",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "version_id": {
            "title": "Version Id",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "version",
          "trigger",
          "content_sha256",
          "created_at"
        ],
        "title": "AITestVersion",
        "type": "object"
      },
      "AIVersionRef": {
        "description": "One side of a diff or a compare.",
        "properties": {
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "content_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Sha256"
          },
          "generated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "kind": {
            "default": "analysis_digest",
            "title": "Kind",
            "type": "string"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "ref": {
            "title": "Ref",
            "type": "string"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "ref",
          "source",
          "run_id"
        ],
        "title": "AIVersionRef",
        "type": "object"
      },
      "AIVersionResponse": {
        "properties": {
          "ai_disclaimer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer"
          },
          "ai_disclaimer_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer Version"
          },
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "categories": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "cluster_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Count"
          },
          "content_sha256": {
            "title": "Content Sha256",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "decision_report_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DecisionReportRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "deterministic": {
            "default": false,
            "title": "Deterministic",
            "type": "boolean"
          },
          "failing_tests": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Tests"
          },
          "fallback_used": {
            "default": false,
            "title": "Fallback Used",
            "type": "boolean"
          },
          "generated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "headline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headline"
          },
          "is_latest": {
            "default": false,
            "title": "Is Latest",
            "type": "boolean"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "requires_human_review": {
            "default": true,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIHistoryReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Score"
          },
          "summary_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary Version"
          },
          "trigger": {
            "title": "Trigger",
            "type": "string"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "version_id": {
            "title": "Version Id",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "kind",
          "version",
          "trigger",
          "content_sha256",
          "payload"
        ],
        "title": "AIVersionResponse",
        "type": "object"
      },
      "AIVersionSummary": {
        "description": "One row of a run's AI history list, and the head of a single version.",
        "properties": {
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "categories": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "cluster_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Count"
          },
          "content_sha256": {
            "title": "Content Sha256",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "decision_report_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DecisionReportRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "deterministic": {
            "default": false,
            "title": "Deterministic",
            "type": "boolean"
          },
          "failing_tests": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Tests"
          },
          "fallback_used": {
            "default": false,
            "title": "Fallback Used",
            "type": "boolean"
          },
          "generated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "headline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headline"
          },
          "is_latest": {
            "default": false,
            "title": "Is Latest",
            "type": "boolean"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIHistoryReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Score"
          },
          "summary_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary Version"
          },
          "trigger": {
            "title": "Trigger",
            "type": "string"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "version_id": {
            "title": "Version Id",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "kind",
          "version",
          "trigger",
          "content_sha256"
        ],
        "title": "AIVersionSummary",
        "type": "object"
      },
      "AcceptCaseRequest": {
        "properties": {
          "edits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RagCaseAcceptEdits"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AcceptCaseRequest",
        "type": "object"
      },
      "AcceptInvitationRequest": {
        "properties": {
          "full_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "token": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          },
          "username": {
            "maxLength": 50,
            "minLength": 3,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "token",
          "username",
          "password"
        ],
        "title": "AcceptInvitationRequest",
        "type": "object"
      },
      "AcceptReviewRequest": {
        "properties": {
          "notes": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "title": "AcceptReviewRequest",
        "type": "object"
      },
      "ActionTransitionRequest": {
        "properties": {
          "error_code": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "reason_code": {
            "anyOf": [
              {
                "maxLength": 40,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code"
          },
          "status": {
            "enum": [
              "approved",
              "rejected",
              "rolled_back"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "ActionTransitionRequest",
        "type": "object"
      },
      "ActiveSessionsResponse": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/LiveSessionState"
            },
            "title": "Sessions",
            "type": "array"
          }
        },
        "required": [
          "sessions",
          "count"
        ],
        "title": "ActiveSessionsResponse",
        "type": "object"
      },
      "AddProjectMemberRequest": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "QA_ENGINEER"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id"
        ],
        "title": "AddProjectMemberRequest",
        "type": "object"
      },
      "AdminCreateUserRequest": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "QA_ENGINEER"
          },
          "username": {
            "maxLength": 50,
            "minLength": 3,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "email",
          "username"
        ],
        "title": "AdminCreateUserRequest",
        "type": "object"
      },
      "AdminCreateUserResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "temp_password": {
            "title": "Temp Password",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "username",
          "role",
          "is_active",
          "created_at",
          "temp_password"
        ],
        "title": "AdminCreateUserResponse",
        "type": "object"
      },
      "AgentActionListResponse": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentActionRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "count",
          "total"
        ],
        "title": "AgentActionListResponse",
        "type": "object"
      },
      "AgentActionRead": {
        "properties": {
          "action_type": {
            "title": "Action Type",
            "type": "string"
          },
          "approvable": {
            "default": false,
            "title": "Approvable",
            "type": "boolean"
          },
          "approval_required": {
            "title": "Approval Required",
            "type": "boolean"
          },
          "approve_blocked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approve Blocked Reason"
          },
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By"
          },
          "approved_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By Name"
          },
          "canonical_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Type"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "execution_completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Completed At"
          },
          "execution_started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Started At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "idempotency_key": {
            "title": "Idempotency Key",
            "type": "string"
          },
          "outcome": {
            "default": "unknown",
            "title": "Outcome",
            "type": "string"
          },
          "outcome_text": {
            "default": "",
            "title": "Outcome Text",
            "type": "string"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "pipeline_workflow_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Workflow Type"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "proposing_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposing Agent Id"
          },
          "proposing_agent_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposing Agent Label"
          },
          "proposing_review_state": {
            "default": "none",
            "title": "Proposing Review State",
            "type": "string"
          },
          "rationale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rationale"
          },
          "rejection_reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejection Reason Code"
          },
          "request_payload": {
            "additionalProperties": true,
            "title": "Request Payload",
            "type": "object"
          },
          "request_sha256": {
            "title": "Request Sha256",
            "type": "string"
          },
          "result_link": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentActionResultLink"
              },
              {
                "type": "null"
              }
            ]
          },
          "result_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Payload"
          },
          "reversible": {
            "default": false,
            "title": "Reversible",
            "type": "boolean"
          },
          "review_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Id"
          },
          "risk": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk"
          },
          "rollback_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rollback Payload"
          },
          "side_effect": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Side Effect"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "target": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentActionTarget"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Id"
          },
          "target_type": {
            "title": "Target Type",
            "type": "string"
          },
          "test_run_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Run Branch"
          },
          "test_run_build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Run Build Number"
          },
          "test_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Run Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "project_id",
          "action_type",
          "target_type",
          "status",
          "approval_required",
          "idempotency_key",
          "request_sha256",
          "request_payload"
        ],
        "title": "AgentActionRead",
        "type": "object"
      },
      "AgentActionResultLink": {
        "properties": {
          "href": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Href"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AgentActionResultLink",
        "type": "object"
      },
      "AgentActionTarget": {
        "properties": {
          "href": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Href"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AgentActionTarget",
        "type": "object"
      },
      "AgentCatalogDetail": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "concurrency_class": {
            "title": "Concurrency Class",
            "type": "string"
          },
          "default_tier": {
            "enum": [
              "deterministic",
              "slm",
              "llm"
            ],
            "title": "Default Tier",
            "type": "string"
          },
          "dependencies": {
            "items": {
              "type": "string"
            },
            "title": "Dependencies",
            "type": "array"
          },
          "escalation": {
            "items": {
              "enum": [
                "validation_failure",
                "low_confidence",
                "not_enough_evidence",
                "contradictions",
                "multi_artifact_evidence"
              ],
              "type": "string"
            },
            "title": "Escalation",
            "type": "array"
          },
          "execution": {
            "title": "Execution",
            "type": "string"
          },
          "expected_cost_usd": {
            "title": "Expected Cost Usd",
            "type": "number"
          },
          "expected_latency_ms": {
            "title": "Expected Latency Ms",
            "type": "integer"
          },
          "fallback": {
            "title": "Fallback",
            "type": "string"
          },
          "inline_input_json_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inline Input Json Schema"
          },
          "inline_input_supported": {
            "default": false,
            "description": "Accepts inline_input on POST /api/v1/agents/{agent_id}/invoke (a pasted input anchored to a stored test run of the project); the detail publishes its schema as inline_input_json_schema.",
            "title": "Inline Input Supported",
            "type": "boolean"
          },
          "input_json_schema": {
            "additionalProperties": true,
            "title": "Input Json Schema",
            "type": "object"
          },
          "input_schema": {
            "title": "Input Schema",
            "type": "string"
          },
          "input_schema_resolved": {
            "description": "False when the input schema is a label with no model yet; the wrapper then accepts only a SubjectRef.",
            "title": "Input Schema Resolved",
            "type": "boolean"
          },
          "input_wrapper": {
            "title": "Input Wrapper",
            "type": "string"
          },
          "invokable": {
            "description": "Can be invoked independently; false means the capability requires a surrounding workflow.",
            "title": "Invokable",
            "type": "boolean"
          },
          "max_retries": {
            "title": "Max Retries",
            "type": "integer"
          },
          "output_json_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Json Schema"
          },
          "output_schema": {
            "title": "Output Schema",
            "type": "string"
          },
          "output_schema_resolved": {
            "title": "Output Schema Resolved",
            "type": "boolean"
          },
          "permission": {
            "title": "Permission",
            "type": "string"
          },
          "produces_report": {
            "description": "Its output is a report contract, so a run of it needs human review (E8).",
            "title": "Produces Report",
            "type": "boolean"
          },
          "required_evidence": {
            "items": {
              "type": "string"
            },
            "title": "Required Evidence",
            "type": "array"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          },
          "sync_eligible": {
            "description": "May be invoked synchronously: deterministic and expected to finish in 5 s or less.",
            "title": "Sync Eligible",
            "type": "boolean"
          },
          "timeout_seconds": {
            "title": "Timeout Seconds",
            "type": "integer"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "agent_id",
          "version",
          "stage_name",
          "permission",
          "execution",
          "default_tier",
          "escalation",
          "sync_eligible",
          "invokable",
          "produces_report",
          "input_schema",
          "output_schema",
          "input_schema_resolved",
          "output_schema_resolved",
          "dependencies",
          "required_evidence",
          "expected_latency_ms",
          "expected_cost_usd",
          "timeout_seconds",
          "max_retries",
          "fallback",
          "concurrency_class",
          "input_wrapper",
          "input_json_schema"
        ],
        "title": "AgentCatalogDetail",
        "type": "object"
      },
      "AgentCatalogEntry": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "concurrency_class": {
            "title": "Concurrency Class",
            "type": "string"
          },
          "default_tier": {
            "enum": [
              "deterministic",
              "slm",
              "llm"
            ],
            "title": "Default Tier",
            "type": "string"
          },
          "dependencies": {
            "items": {
              "type": "string"
            },
            "title": "Dependencies",
            "type": "array"
          },
          "escalation": {
            "items": {
              "enum": [
                "validation_failure",
                "low_confidence",
                "not_enough_evidence",
                "contradictions",
                "multi_artifact_evidence"
              ],
              "type": "string"
            },
            "title": "Escalation",
            "type": "array"
          },
          "execution": {
            "title": "Execution",
            "type": "string"
          },
          "expected_cost_usd": {
            "title": "Expected Cost Usd",
            "type": "number"
          },
          "expected_latency_ms": {
            "title": "Expected Latency Ms",
            "type": "integer"
          },
          "fallback": {
            "title": "Fallback",
            "type": "string"
          },
          "inline_input_supported": {
            "default": false,
            "description": "Accepts inline_input on POST /api/v1/agents/{agent_id}/invoke (a pasted input anchored to a stored test run of the project); the detail publishes its schema as inline_input_json_schema.",
            "title": "Inline Input Supported",
            "type": "boolean"
          },
          "input_schema": {
            "title": "Input Schema",
            "type": "string"
          },
          "input_schema_resolved": {
            "description": "False when the input schema is a label with no model yet; the wrapper then accepts only a SubjectRef.",
            "title": "Input Schema Resolved",
            "type": "boolean"
          },
          "invokable": {
            "description": "Can be invoked independently; false means the capability requires a surrounding workflow.",
            "title": "Invokable",
            "type": "boolean"
          },
          "max_retries": {
            "title": "Max Retries",
            "type": "integer"
          },
          "output_schema": {
            "title": "Output Schema",
            "type": "string"
          },
          "output_schema_resolved": {
            "title": "Output Schema Resolved",
            "type": "boolean"
          },
          "permission": {
            "title": "Permission",
            "type": "string"
          },
          "produces_report": {
            "description": "Its output is a report contract, so a run of it needs human review (E8).",
            "title": "Produces Report",
            "type": "boolean"
          },
          "required_evidence": {
            "items": {
              "type": "string"
            },
            "title": "Required Evidence",
            "type": "array"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          },
          "sync_eligible": {
            "description": "May be invoked synchronously: deterministic and expected to finish in 5 s or less.",
            "title": "Sync Eligible",
            "type": "boolean"
          },
          "timeout_seconds": {
            "title": "Timeout Seconds",
            "type": "integer"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "agent_id",
          "version",
          "stage_name",
          "permission",
          "execution",
          "default_tier",
          "escalation",
          "sync_eligible",
          "invokable",
          "produces_report",
          "input_schema",
          "output_schema",
          "input_schema_resolved",
          "output_schema_resolved",
          "dependencies",
          "required_evidence",
          "expected_latency_ms",
          "expected_cost_usd",
          "timeout_seconds",
          "max_retries",
          "fallback",
          "concurrency_class"
        ],
        "title": "AgentCatalogEntry",
        "type": "object"
      },
      "AgentConfigExtensions": {
        "additionalProperties": false,
        "description": "Typed homes for pre-registry contracts migrated from agent_policies.",
        "properties": {
          "fixer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FixerConfigExtension"
              },
              {
                "type": "null"
              }
            ]
          },
          "investigator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InvestigatorConfigExtension"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AgentConfigExtensions",
        "type": "object"
      },
      "AgentConfigPatch": {
        "additionalProperties": false,
        "description": "What one request may override. Every field may only tighten the project layer.\n\n``mode``, ``temperature``, ``max_tokens``, ``escalation``, most thresholds and\nany provider or endpoint are absent on purpose: ``extra=\"forbid\"`` rejects them.",
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/_BudgetPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/_TierPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "retry": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/_RetryPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/_ReviewPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "thresholds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/_ThresholdsPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds"
          },
          "tools": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/_ToolsPatch"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AgentConfigPatch",
        "type": "object"
      },
      "AgentConfigV1": {
        "additionalProperties": false,
        "description": "A project's configuration of one agent (section 4.2).",
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "budget": {
            "$ref": "#/components/schemas/BudgetConfig"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "extensions": {
            "$ref": "#/components/schemas/AgentConfigExtensions"
          },
          "mode": {
            "default": "shadow",
            "enum": [
              "shadow",
              "suggest",
              "act"
            ],
            "title": "Mode",
            "type": "string"
          },
          "model": {
            "$ref": "#/components/schemas/ModelConfig"
          },
          "override_policy": {
            "$ref": "#/components/schemas/OverridePolicyConfig"
          },
          "retry": {
            "$ref": "#/components/schemas/RetryConfig"
          },
          "review": {
            "$ref": "#/components/schemas/ReviewConfig"
          },
          "shadow": {
            "$ref": "#/components/schemas/ShadowConfig"
          },
          "thresholds": {
            "$ref": "#/components/schemas/ThresholdsConfig"
          },
          "timeout_seconds": {
            "default": 60,
            "minimum": 1.0,
            "title": "Timeout Seconds",
            "type": "integer"
          },
          "tools": {
            "$ref": "#/components/schemas/ToolsConfig"
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "AgentConfigV1",
        "type": "object"
      },
      "AgentEvidenceV1": {
        "additionalProperties": false,
        "properties": {
          "classification": {
            "default": "internal",
            "enum": [
              "internal",
              "restricted"
            ],
            "title": "Classification",
            "type": "string"
          },
          "description": {
            "default": "",
            "maxLength": 2000,
            "title": "Description",
            "type": "string"
          },
          "evidence_id": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Evidence Id",
            "type": "string"
          },
          "kind": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "schema_version": {
            "const": 1,
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "task_id": {
            "maxLength": 240,
            "minLength": 1,
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "evidence_id",
          "task_id",
          "kind",
          "label"
        ],
        "title": "AgentEvidenceV1",
        "type": "object"
      },
      "AgentFindingV1": {
        "additionalProperties": false,
        "properties": {
          "classification": {
            "enum": [
              "fact",
              "inference",
              "unknown",
              "recommendation"
            ],
            "title": "Classification",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "confidence_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Basis"
          },
          "counter_evidence_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Counter Evidence Ids",
            "type": "array"
          },
          "evidence_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Evidence Ids",
            "type": "array"
          },
          "finding_id": {
            "title": "Finding Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "schema_version": {
            "const": 1,
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "statement": {
            "title": "Statement",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "finding_id",
          "task_id",
          "kind",
          "statement",
          "classification"
        ],
        "title": "AgentFindingV1",
        "type": "object"
      },
      "AgentInvocationResponse": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "attempt": {
            "title": "Attempt",
            "type": "integer"
          },
          "config_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credential-free resolved configuration accepted for this invocation.",
            "title": "Config Snapshot"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The inline input as stored: secrets and personal data redacted before storage. None for stored_run.",
            "title": "Input"
          },
          "input_kind": {
            "default": "stored_run",
            "enum": [
              "stored_run",
              "inline"
            ],
            "title": "Input Kind",
            "type": "string"
          },
          "input_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "sha256 of the redacted stored inline input; None for a stored-run invocation.",
            "title": "Input Sha256"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Links",
            "type": "object"
          },
          "max_attempts": {
            "title": "Max Attempts",
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sync",
              "async"
            ],
            "title": "Mode",
            "type": "string"
          },
          "next_retry_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The invoked agent's stored stage output, once that stage has completed.",
            "title": "Output"
          },
          "pipeline_run_id": {
            "format": "uuid",
            "title": "Pipeline Run Id",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "requires_human_review": {
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "$ref": "#/components/schemas/ReviewBlock"
          },
          "status": {
            "enum": [
              "in_progress",
              "completed",
              "failed",
              "passed"
            ],
            "title": "Status",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "agent_id",
          "test_run_id",
          "pipeline_run_id",
          "mode",
          "status",
          "attempt",
          "max_attempts",
          "requires_human_review",
          "review",
          "links"
        ],
        "title": "AgentInvocationResponse",
        "type": "object"
      },
      "AgentInvokeRequest": {
        "additionalProperties": false,
        "properties": {
          "config_overrides": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfigPatch"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-invocation tighten-only overrides. Provider, endpoint, mode, temperature, max_tokens, escalation, and other ambiguous fields are rejected."
          },
          "correlation_id": {
            "anyOf": [
              {
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          },
          "inline_input": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inline input for an agent that accepts it (catalog: inline_input_supported). input.payload must then name a stored test run of project_id, which anchors tenancy, review and retention. ≤ 262144 bytes; redacted before storage.",
            "title": "Inline Input"
          },
          "input": {
            "additionalProperties": true,
            "description": "The agent's <StageName>InvokeInput, as published by GET /api/v1/agents/catalog/{agent_id}.",
            "title": "Input",
            "type": "object"
          },
          "mode": {
            "default": "async",
            "description": "sync waits for the result, and only for sync-eligible agents (see the catalog); any other agent runs async and answers 202.",
            "enum": [
              "async",
              "sync"
            ],
            "title": "Mode",
            "type": "string"
          },
          "project_id": {
            "description": "Assertion: must equal the project of the test run named in input, else 400.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "input"
        ],
        "title": "AgentInvokeRequest",
        "type": "object"
      },
      "AgentMemoryEntryResponse": {
        "description": "Single memory entry returned to the client.",
        "properties": {
          "confidence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "entity_id": {
            "title": "Entity Id",
            "type": "string"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "error_signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Signature"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "lifecycle_status": {
            "default": "active",
            "title": "Lifecycle Status",
            "type": "string"
          },
          "payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "resolution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution"
          },
          "root_cause_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Root Cause Summary"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "source_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Hash"
          },
          "source_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Snapshot Id"
          },
          "source_type": {
            "default": "pipeline_agent",
            "title": "Source Type",
            "type": "string"
          },
          "superseded_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Superseded At"
          },
          "superseded_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Superseded By Id"
          },
          "trust_level": {
            "default": "derived",
            "title": "Trust Level",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "run_id",
          "entity_type",
          "entity_id",
          "created_at"
        ],
        "title": "AgentMemoryEntryResponse",
        "type": "object"
      },
      "AgentMemoryListResponse": {
        "description": "Paginated memory entry list.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentMemoryEntryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "items",
          "page",
          "size"
        ],
        "title": "AgentMemoryListResponse",
        "type": "object"
      },
      "AgentPipelineResponse": {
        "properties": {
          "attempt": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attempt"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "cancel_requested": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Requested"
          },
          "completed_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "title": "Created At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "execution_metadata": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Execution Metadata"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "max_attempts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Attempts"
          },
          "next_retry_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "provenance_metadata": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Provenance Metadata"
          },
          "public_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Status"
          },
          "rerun_of": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rerun Of"
          },
          "review_summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentPipelineReviewSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Seq"
          },
          "started_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "test_run_id",
          "workflow_type",
          "status",
          "created_at"
        ],
        "title": "AgentPipelineResponse",
        "type": "object"
      },
      "AgentPipelineReviewSummary": {
        "description": "Minimal review projection for a pipeline card.\n\nReviewer identity deliberately stays out of this API response.  A settled\ntimestamp is enough for the status card to distinguish an accepted report\nfrom a non-report pipeline that passed without human review.",
        "properties": {
          "settled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settled At"
          },
          "state": {
            "enum": [
              "pending_review",
              "accepted",
              "rejected"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "title": "AgentPipelineReviewSummary",
        "type": "object"
      },
      "AgentRunSummaryResponse": {
        "properties": {
          "ai_disclaimer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer"
          },
          "ai_disclaimer_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Disclaimer Version"
          },
          "analysis_count": {
            "default": 0,
            "title": "Analysis Count",
            "type": "integer"
          },
          "anomaly_count": {
            "default": 0,
            "title": "Anomaly Count",
            "type": "integer"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "executive_panel": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Executive Panel"
          },
          "executive_summary": {
            "title": "Executive Summary",
            "type": "string"
          },
          "generated_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "is_regression": {
            "default": false,
            "title": "Is Regression",
            "type": "boolean"
          },
          "markdown_report": {
            "title": "Markdown Report",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "requires_human_review": {
            "default": true,
            "description": "True for AI-generated content: a draft until review.state == accepted.",
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "test_run_id": {
            "title": "Test Run Id",
            "type": "string"
          }
        },
        "required": [
          "test_run_id",
          "executive_summary",
          "markdown_report"
        ],
        "title": "AgentRunSummaryResponse",
        "type": "object"
      },
      "AgentStackReleaseGateRequest": {
        "properties": {
          "change_id": {
            "title": "Change Id",
            "type": "string"
          },
          "model_versions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Model Versions",
            "type": "object"
          },
          "persist": {
            "default": true,
            "title": "Persist",
            "type": "boolean"
          },
          "prompt_versions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Prompt Versions",
            "type": "object"
          },
          "required_gates": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required Gates"
          },
          "routing_versions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Routing Versions",
            "type": "object"
          }
        },
        "required": [
          "change_id"
        ],
        "title": "AgentStackReleaseGateRequest",
        "type": "object"
      },
      "AgentTaskV1": {
        "additionalProperties": false,
        "properties": {
          "attempt": {
            "default": 1,
            "minimum": 1.0,
            "title": "Attempt",
            "type": "integer"
          },
          "budget": {
            "$ref": "#/components/schemas/TaskBudgetV1"
          },
          "capability_id": {
            "title": "Capability Id",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "dependencies": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Dependencies",
            "type": "array"
          },
          "enrichment_stop_reason": {
            "anyOf": [
              {
                "enum": [
                  "cancelled",
                  "llm_call_budget_exhausted",
                  "token_budget_exhausted",
                  "wall_clock_budget_exhausted",
                  "investigation_not_found",
                  "budget_reservation_failed",
                  "duplicate_reservation",
                  "budget_ledger_invalid",
                  "budget_reservation_identity_mismatch",
                  "budget_settlement_failed",
                  "budget_settlement_pending",
                  "budget_overrun",
                  "reservation_lease_expired",
                  "cost_budget_exhausted",
                  "cluster_child_join_timeout",
                  "cluster_child_cancelled",
                  "cluster_child_failed",
                  "cluster_child_dispatch_exhausted",
                  "project_child_capacity_exhausted"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Stop Reason"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "evidence_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Evidence Ids",
            "type": "array"
          },
          "failure_cluster_id": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Cluster Id"
          },
          "finding_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Finding Ids",
            "type": "array"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Id"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          },
          "schema_version": {
            "const": 1,
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "selected": {
            "title": "Selected",
            "type": "boolean"
          },
          "selection_reason": {
            "title": "Selection Reason",
            "type": "string"
          },
          "source_pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Pipeline Run Id"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "completed",
              "failed",
              "skipped",
              "cancelled",
              "partial"
            ],
            "title": "Status",
            "type": "string"
          },
          "stop_reason": {
            "anyOf": [
              {
                "enum": [
                  "completed",
                  "policy_skip",
                  "not_selected",
                  "budget_exhausted",
                  "timeout",
                  "capability_error",
                  "cancelled",
                  "partial"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/TaskUsageV1"
          }
        },
        "required": [
          "task_id",
          "capability_id",
          "stage_name",
          "status",
          "selected",
          "selection_reason"
        ],
        "title": "AgentTaskV1",
        "type": "object"
      },
      "AgenticRunV1": {
        "additionalProperties": false,
        "properties": {
          "agentic_run_id": {
            "title": "Agentic Run Id",
            "type": "string"
          },
          "child_agentic_run_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Child Agentic Run Ids",
            "type": "array"
          },
          "children_truncated": {
            "default": false,
            "title": "Children Truncated",
            "type": "boolean"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "evidence": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentEvidenceV1"
            },
            "title": "Evidence",
            "type": "array"
          },
          "findings": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentFindingV1"
            },
            "title": "Findings",
            "type": "array"
          },
          "observed_child_runs": {
            "default": 0,
            "minimum": 0.0,
            "title": "Observed Child Runs",
            "type": "integer"
          },
          "observed_task_rows": {
            "default": 0,
            "minimum": 0.0,
            "title": "Observed Task Rows",
            "type": "integer"
          },
          "plan_id": {
            "title": "Plan Id",
            "type": "string"
          },
          "plan_integrity_status": {
            "enum": [
              "verified",
              "failed",
              "legacy_unhashed"
            ],
            "title": "Plan Integrity Status",
            "type": "string"
          },
          "plan_sha256": {
            "anyOf": [
              {
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Sha256"
          },
          "planner_version": {
            "title": "Planner Version",
            "type": "string"
          },
          "public_status": {
            "enum": [
              "in_progress",
              "completed",
              "failed",
              "passed"
            ],
            "title": "Public Status",
            "type": "string"
          },
          "root_task_id": {
            "title": "Root Task Id",
            "type": "string"
          },
          "run_budget": {
            "$ref": "#/components/schemas/TaskBudgetV1"
          },
          "schema_version": {
            "const": 1,
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "selected_capability_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Selected Capability Ids",
            "type": "array"
          },
          "skipped_capability_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Skipped Capability Ids",
            "type": "array"
          },
          "source_pipeline_run_id": {
            "title": "Source Pipeline Run Id",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "retry_wait",
              "completed",
              "passed",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "tasks": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentTaskV1"
            },
            "title": "Tasks",
            "type": "array"
          },
          "tasks_truncated": {
            "default": false,
            "title": "Tasks Truncated",
            "type": "boolean"
          },
          "terminal_outcome": {
            "$ref": "#/components/schemas/TerminalOutcomeV1"
          },
          "test_run_id": {
            "title": "Test Run Id",
            "type": "string"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "required": [
          "agentic_run_id",
          "source_pipeline_run_id",
          "test_run_id",
          "workflow_type",
          "status",
          "public_status",
          "root_task_id",
          "plan_id",
          "plan_integrity_status",
          "planner_version",
          "terminal_outcome"
        ],
        "title": "AgenticRunV1",
        "type": "object"
      },
      "AllowedTransitionResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked Reason"
          },
          "requires_reason": {
            "default": false,
            "title": "Requires Reason",
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "allowed"
        ],
        "title": "AllowedTransitionResponse",
        "type": "object"
      },
      "AnalysisLookupResponse": {
        "description": "US-2.4: latest AI analysis for a (project, fingerprint) pair.\n\nAll fields are ``None`` when the test has never been analysed — the UI\nrenders a \"no AI analysis recorded yet\" empty state instead of a 404\n(which axios would surface as a scary error toast).\n\n``failure_category`` is a plain string, NOT the ``FailureCategory``\nenum: the backing column is ``String(30)`` and a strict enum here would\n422 the whole response if a stored value ever drifts out of vocab.",
        "properties": {
          "analysis_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Id"
          },
          "analyzed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analyzed At"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          }
        },
        "title": "AnalysisLookupResponse",
        "type": "object"
      },
      "AnalysisProvenance": {
        "description": "US-15.1 — which engine actually produced this conclusion, and why.\n\nPopulated verbatim from ``AIAnalysis.routing_metadata`` (written by the\nanalysis router). It is NEVER recomputed or inferred: rows analysed before\nthis feature carry no routing metadata, so ``AnalysisResponse.provenance``\nis ``None`` for them rather than a plausible-looking guess.\n\nThe point of this block is a specific honesty case: when the LLM was\nunavailable and the rules engine ran instead, the card must be able to say\nso (``fallback_occurred`` / ``fallback_from`` / ``fallback_reason``)\ninstead of silently presenting heuristics as model output.",
        "properties": {
          "confidence_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Basis"
          },
          "fallback_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback From"
          },
          "fallback_occurred": {
            "default": false,
            "title": "Fallback Occurred",
            "type": "boolean"
          },
          "fallback_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Reason"
          },
          "hint_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hint Id"
          },
          "hint_match_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hint Match Field"
          },
          "hint_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hint Pattern"
          },
          "hint_set_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hint Set By"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider"
          },
          "mode_requested": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode Requested"
          },
          "mode_resolved": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode Resolved"
          },
          "mode_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode Used"
          },
          "prompt_versions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Prompt Versions",
            "type": "object"
          },
          "threshold_check": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThresholdCheck"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AnalysisProvenance",
        "type": "object"
      },
      "AnalysisResponse": {
        "properties": {
          "analysis_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Id"
          },
          "backend_error_found": {
            "title": "Backend Error Found",
            "type": "boolean"
          },
          "confidence_gate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThresholdCheck"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence_gate_status": {
            "default": "not_evaluated",
            "title": "Confidence Gate Status",
            "type": "string"
          },
          "confidence_score": {
            "title": "Confidence Score",
            "type": "integer"
          },
          "confidence_why": {
            "$ref": "#/components/schemas/ConfidenceWhy"
          },
          "evidence_references": {
            "items": {
              "$ref": "#/components/schemas/EvidenceReference"
            },
            "title": "Evidence References",
            "type": "array"
          },
          "failure_category": {
            "$ref": "#/components/schemas/FailureCategory"
          },
          "is_flaky": {
            "title": "Is Flaky",
            "type": "boolean"
          },
          "kind_evidence": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind Evidence"
          },
          "llm_model": {
            "title": "Llm Model",
            "type": "string"
          },
          "llm_provider": {
            "title": "Llm Provider",
            "type": "string"
          },
          "low_confidence": {
            "default": false,
            "title": "Low Confidence",
            "type": "boolean"
          },
          "pod_issue_found": {
            "title": "Pod Issue Found",
            "type": "boolean"
          },
          "provenance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AnalysisProvenance"
              },
              {
                "type": "null"
              }
            ]
          },
          "recommended_actions": {
            "items": {
              "type": "string"
            },
            "title": "Recommended Actions",
            "type": "array"
          },
          "requires_human_review": {
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "role_actions": {
            "$ref": "#/components/schemas/RoleActions"
          },
          "root_cause_summary": {
            "title": "Root Cause Summary",
            "type": "string"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "tools_used": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tools Used",
            "type": "array"
          }
        },
        "required": [
          "test_case_id",
          "root_cause_summary",
          "failure_category",
          "backend_error_found",
          "pod_issue_found",
          "is_flaky",
          "confidence_score",
          "recommended_actions",
          "evidence_references",
          "llm_provider",
          "llm_model",
          "requires_human_review"
        ],
        "title": "AnalysisResponse",
        "type": "object"
      },
      "AnalyzeRequest": {
        "properties": {
          "ocp_namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Namespace"
          },
          "ocp_pod_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Pod Name"
          },
          "service_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp"
          }
        },
        "required": [
          "test_case_id"
        ],
        "title": "AnalyzeRequest",
        "type": "object"
      },
      "ApiKeyCreate": {
        "properties": {
          "expires_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires Days"
          },
          "name": {
            "maxLength": 100,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Bind key to a single project (ADMIN only)",
            "title": "Project Id"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "target_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Create key for another user (ADMIN only)",
            "title": "Target User Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate",
        "type": "object"
      },
      "ApiKeyCreatedResponse": {
        "description": "Returned ONCE at creation — includes the plaintext key.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "key_hint": {
            "title": "Key Hint",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "raw_key": {
            "title": "Raw Key",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "key_hint",
          "scopes",
          "is_active",
          "created_at",
          "raw_key"
        ],
        "title": "ApiKeyCreatedResponse",
        "type": "object"
      },
      "ApiKeyResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "key_hint": {
            "title": "Key Hint",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "key_hint",
          "scopes",
          "is_active",
          "created_at"
        ],
        "title": "ApiKeyResponse",
        "type": "object"
      },
      "AttributionPreviewResponse": {
        "properties": {
          "considered": {
            "title": "Considered",
            "type": "integer"
          },
          "explicit": {
            "default": 0,
            "title": "Explicit",
            "type": "integer"
          },
          "field_present": {
            "title": "Field Present",
            "type": "integer"
          },
          "matched": {
            "title": "Matched",
            "type": "integer"
          },
          "sample": {
            "items": {
              "$ref": "#/components/schemas/AttributionPreviewSample"
            },
            "title": "Sample",
            "type": "array"
          },
          "shadowed": {
            "default": 0,
            "title": "Shadowed",
            "type": "integer"
          },
          "target_exists": {
            "default": true,
            "title": "Target Exists",
            "type": "boolean"
          },
          "unattributed_recent": {
            "default": 0,
            "title": "Unattributed Recent",
            "type": "integer"
          }
        },
        "required": [
          "considered",
          "matched",
          "field_present",
          "sample"
        ],
        "title": "AttributionPreviewResponse",
        "type": "object"
      },
      "AttributionPreviewSample": {
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "current_release_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Release Name"
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "would_land": {
            "default": "rule",
            "title": "Would Land",
            "type": "string"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "AttributionPreviewSample",
        "type": "object"
      },
      "AttributionRuleField": {
        "properties": {
          "glob": {
            "title": "Glob",
            "type": "boolean"
          },
          "help": {
            "title": "Help",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value",
          "label",
          "glob",
          "help"
        ],
        "title": "AttributionRuleField",
        "type": "object"
      },
      "AttributionRuleFieldsResponse": {
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/AttributionRuleField"
            },
            "title": "Fields",
            "type": "array"
          }
        },
        "required": [
          "fields"
        ],
        "title": "AttributionRuleFieldsResponse",
        "type": "object"
      },
      "AttributionRuleIn": {
        "properties": {
          "is_enabled": {
            "default": true,
            "title": "Is Enabled",
            "type": "boolean"
          },
          "match_field": {
            "title": "Match Field",
            "type": "string"
          },
          "match_pattern": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Match Pattern",
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "priority": {
            "default": 100,
            "maximum": 10000.0,
            "minimum": 0.0,
            "title": "Priority",
            "type": "integer"
          },
          "target_release_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Target Release Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "match_field",
          "match_pattern",
          "target_release_name"
        ],
        "title": "AttributionRuleIn",
        "type": "object"
      },
      "AttributionRuleUpdate": {
        "properties": {
          "is_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Enabled"
          },
          "match_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Field"
          },
          "match_pattern": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Pattern"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "priority": {
            "anyOf": [
              {
                "maximum": 10000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "target_release_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Release Name"
          }
        },
        "title": "AttributionRuleUpdate",
        "type": "object"
      },
      "AuditLogListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditLogResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "AuditLogListResponse",
        "type": "object"
      },
      "AuditLogResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "actor_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "entity_id": {
            "format": "uuid",
            "title": "Entity Id",
            "type": "string"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "new_values": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Values"
          },
          "old_values": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Old Values"
          },
          "policy_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Snapshot"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "transition_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transition From"
          },
          "transition_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transition To"
          }
        },
        "required": [
          "id",
          "entity_type",
          "entity_id",
          "action",
          "created_at"
        ],
        "title": "AuditLogResponse",
        "type": "object"
      },
      "BaselineDiff": {
        "properties": {
          "baseline_build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Build Number"
          },
          "baseline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Run Id"
          },
          "baseline_suite_count": {
            "default": 0,
            "title": "Baseline Suite Count",
            "type": "integer"
          },
          "classified_new_failures": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Classified New Failures",
            "type": "array"
          },
          "commit_range": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Range"
          },
          "config_drift": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Config Drift",
            "type": "array"
          },
          "current_suite_count": {
            "default": 0,
            "title": "Current Suite Count",
            "type": "integer"
          },
          "new_failures": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "New Failures",
            "type": "array"
          },
          "pass_rate_delta": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Rate Delta"
          },
          "regression_classification": {
            "default": "unclassified",
            "title": "Regression Classification",
            "type": "string"
          },
          "regression_clusters": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Regression Clusters",
            "type": "array"
          },
          "resolved_failures": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Resolved Failures",
            "type": "array"
          },
          "selection_reason": {
            "default": "latest_passing",
            "title": "Selection Reason",
            "type": "string"
          },
          "suites_impacted_delta": {
            "default": 0,
            "title": "Suites Impacted Delta",
            "type": "integer"
          }
        },
        "title": "BaselineDiff",
        "type": "object"
      },
      "BatchAcceptRequest": {
        "properties": {
          "case_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Case Ids",
            "type": "array"
          },
          "edits": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/RagCaseAcceptEdits"
                },
                "propertyNames": {
                  "format": "uuid"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edits"
          }
        },
        "required": [
          "case_ids"
        ],
        "title": "BatchAcceptRequest",
        "type": "object"
      },
      "BillingOverviewProject": {
        "properties": {
          "cap_hits": {
            "title": "Cap Hits",
            "type": "integer"
          },
          "covered_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Covered Usd"
          },
          "current_cost_usd": {
            "title": "Current Cost Usd",
            "type": "number"
          },
          "hard_cap_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hard Cap Usd"
          },
          "included_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Included Usd"
          },
          "overage_charge_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage Charge Usd"
          },
          "overage_rate_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage Rate Usd"
          },
          "overage_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage Usd"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "title": "Project Name",
            "type": "string"
          },
          "projected_overage_charge_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projected Overage Charge Usd"
          },
          "projected_overage_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projected Overage Usd"
          },
          "projected_period_cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projected Period Cost Usd"
          },
          "projection_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projection Basis"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "utilization_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utilization Pct"
          }
        },
        "required": [
          "project_id",
          "project_name",
          "current_cost_usd",
          "status",
          "cap_hits"
        ],
        "title": "BillingOverviewProject",
        "type": "object"
      },
      "BillingOverviewResponse": {
        "properties": {
          "period_end": {
            "format": "date-time",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "title": "Period Start",
            "type": "string"
          },
          "price_table_updated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Table Updated"
          },
          "pricing_is_estimated": {
            "default": true,
            "title": "Pricing Is Estimated",
            "type": "boolean"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/BillingOverviewProject"
            },
            "title": "Projects",
            "type": "array"
          },
          "total_cost_usd": {
            "title": "Total Cost Usd",
            "type": "number"
          },
          "total_llm_calls": {
            "title": "Total Llm Calls",
            "type": "integer"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "total_cost_usd",
          "total_llm_calls",
          "projects"
        ],
        "title": "BillingOverviewResponse",
        "type": "object"
      },
      "BisectCommit": {
        "properties": {
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author"
          },
          "commit_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Url"
          },
          "committed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed At"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "rationale": {
            "additionalProperties": true,
            "title": "Rationale",
            "type": "object"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sha"
          }
        },
        "required": [
          "sha",
          "score",
          "rationale"
        ],
        "title": "BisectCommit",
        "type": "object"
      },
      "BisectCompare": {
        "properties": {
          "cached": {
            "default": false,
            "title": "Cached",
            "type": "boolean"
          },
          "caveat": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caveat"
          },
          "commit_count": {
            "default": 0,
            "title": "Commit Count",
            "type": "integer"
          },
          "commits": {
            "items": {
              "$ref": "#/components/schemas/BisectCommit"
            },
            "title": "Commits",
            "type": "array"
          },
          "has_location_signal": {
            "default": false,
            "title": "Has Location Signal",
            "type": "boolean"
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "run_level_commit_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Level Commit Count"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "state"
        ],
        "title": "BisectCompare",
        "type": "object"
      },
      "BisectResponse": {
        "properties": {
          "anchor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anchor"
          },
          "bad": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BisectRunRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "bounded": {
            "default": false,
            "title": "Bounded",
            "type": "boolean"
          },
          "compare": {
            "$ref": "#/components/schemas/BisectCompare"
          },
          "fallback_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Branch"
          },
          "fingerprint": {
            "title": "Fingerprint",
            "type": "string"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "good": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BisectRunRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "narrowed_from": {
            "default": "unavailable",
            "title": "Narrowed From",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "runs_read": {
            "default": 0,
            "title": "Runs Read",
            "type": "integer"
          },
          "series_branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Series Branch"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "streak_length": {
            "default": 0,
            "title": "Streak Length",
            "type": "integer"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "untested_count": {
            "default": 0,
            "title": "Untested Count",
            "type": "integer"
          },
          "untested_runs": {
            "items": {
              "$ref": "#/components/schemas/BisectRunRef"
            },
            "title": "Untested Runs",
            "type": "array"
          }
        },
        "required": [
          "run_id",
          "fingerprint",
          "test_name",
          "state",
          "compare",
          "generated_at"
        ],
        "title": "BisectResponse",
        "type": "object"
      },
      "BisectRunRef": {
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "title": "Build Number",
            "type": "string"
          },
          "ci_run_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Run Url"
          },
          "commit_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Hash"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "outcome": {
            "title": "Outcome",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "build_number",
          "created_at",
          "outcome"
        ],
        "title": "BisectRunRef",
        "type": "object"
      },
      "Body_draft_release_phases_api_v1_releases__release_id__phases_generate_post": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "title": "Body_draft_release_phases_api_v1_releases__release_id__phases_generate_post",
        "type": "object"
      },
      "Body_import_test_cases_api_v1_test_management_cases_import_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_import_test_cases_api_v1_test_management_cases_import_post",
        "type": "object"
      },
      "Body_ingest_file_api_v1_ingest_file_post": {
        "properties": {
          "branch": {
            "maxLength": 255,
            "title": "Branch",
            "type": "string"
          },
          "build_number": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Build Number",
            "type": "string"
          },
          "ci_actor": {
            "maxLength": 120,
            "title": "Ci Actor",
            "type": "string"
          },
          "ci_provider": {
            "maxLength": 30,
            "title": "Ci Provider",
            "type": "string"
          },
          "ci_repo": {
            "maxLength": 300,
            "title": "Ci Repo",
            "type": "string"
          },
          "ci_run_url": {
            "maxLength": 1000,
            "title": "Ci Run Url",
            "type": "string"
          },
          "commit_hash": {
            "maxLength": 64,
            "title": "Commit Hash",
            "type": "string"
          },
          "commit_range": {
            "title": "Commit Range",
            "type": "string"
          },
          "environment": {
            "maxLength": 100,
            "title": "Environment",
            "type": "string"
          },
          "executed_at": {
            "format": "date-time",
            "title": "Executed At",
            "type": "string"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "format": {
            "default": "auto",
            "title": "Format",
            "type": "string"
          },
          "jenkins_job": {
            "maxLength": 500,
            "title": "Jenkins Job",
            "type": "string"
          },
          "pr_number": {
            "minimum": 1.0,
            "title": "Pr Number",
            "type": "integer"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "release_name": {
            "maxLength": 255,
            "title": "Release Name",
            "type": "string"
          },
          "run_ai": {
            "default": true,
            "title": "Run Ai",
            "type": "boolean"
          },
          "run_context": {
            "maxLength": 16384,
            "title": "Run Context",
            "type": "string"
          }
        },
        "required": [
          "file",
          "project_id",
          "build_number"
        ],
        "title": "Body_ingest_file_api_v1_ingest_file_post",
        "type": "object"
      },
      "Body_login_api_v1_auth_login_post": {
        "properties": {
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "format": "password",
            "title": "Client Secret"
          },
          "grant_type": {
            "anyOf": [
              {
                "pattern": "^password$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "password": {
            "format": "password",
            "title": "Password",
            "type": "string"
          },
          "scope": {
            "default": "",
            "title": "Scope",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "username",
          "password"
        ],
        "title": "Body_login_api_v1_auth_login_post",
        "type": "object"
      },
      "Body_reassign_assigned_failure_api_v1_me_assigned_failures__test_case_id__reassign_put": {
        "properties": {
          "new_assignee_user_id": {
            "format": "uuid",
            "title": "New Assignee User Id",
            "type": "string"
          }
        },
        "required": [
          "new_assignee_user_id"
        ],
        "title": "Body_reassign_assigned_failure_api_v1_me_assigned_failures__test_case_id__reassign_put",
        "type": "object"
      },
      "Body_start_project_import_api_v1_projects_import_post": {
        "properties": {
          "client_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Token"
          },
          "file": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "Body_start_project_import_api_v1_projects_import_post",
        "type": "object"
      },
      "Body_trigger_finetune_api_v1_training_finetune_post": {
        "properties": {
          "track": {
            "title": "Track",
            "type": "string"
          }
        },
        "required": [
          "track"
        ],
        "title": "Body_trigger_finetune_api_v1_training_finetune_post",
        "type": "object"
      },
      "BudgetConfig": {
        "additionalProperties": false,
        "description": "Budget names are the existing ``DEFAULT_BUDGETS`` keys (section 4.2).",
        "properties": {
          "max_cost_usd_per_run": {
            "default": 5.0,
            "minimum": 0.0,
            "title": "Max Cost Usd Per Run",
            "type": "number"
          },
          "max_llm_calls_per_run": {
            "default": 30,
            "minimum": 0.0,
            "title": "Max Llm Calls Per Run",
            "type": "integer"
          },
          "max_runs_per_day": {
            "default": 10,
            "minimum": 0.0,
            "title": "Max Runs Per Day",
            "type": "integer"
          },
          "max_tokens_per_run": {
            "default": 60000,
            "minimum": 0.0,
            "title": "Max Tokens Per Run",
            "type": "integer"
          }
        },
        "title": "BudgetConfig",
        "type": "object"
      },
      "BulkJobProgress": {
        "properties": {
          "completed": {
            "title": "Completed",
            "type": "integer"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "in_progress": {
            "title": "In Progress",
            "type": "integer"
          },
          "not_started": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Not Started"
          },
          "passed": {
            "title": "Passed",
            "type": "integer"
          },
          "started": {
            "title": "Started",
            "type": "integer"
          }
        },
        "required": [
          "started",
          "in_progress",
          "completed",
          "passed",
          "failed"
        ],
        "title": "BulkJobProgress",
        "type": "object"
      },
      "BulkJobRead": {
        "properties": {
          "bulk_job_id": {
            "title": "Bulk Job Id",
            "type": "string"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          },
          "counters_source": {
            "title": "Counters Source",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "matched": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched"
          },
          "not_found": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Not Found"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "progress": {
            "$ref": "#/components/schemas/BulkJobProgress"
          },
          "queued": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queued"
          },
          "requested": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested"
          },
          "skipped_in_progress": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skipped In Progress"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "required": [
          "bulk_job_id",
          "workflow_type",
          "source",
          "state",
          "counters_source",
          "progress"
        ],
        "title": "BulkJobRead",
        "type": "object"
      },
      "BulkRunFilter": {
        "properties": {
          "branch": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 30,
            "title": "Days"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "q": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Q"
          },
          "recommendation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommendation"
          },
          "release_id": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          },
          "status": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "suite_name": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          }
        },
        "title": "BulkRunFilter",
        "type": "object"
      },
      "BulkTriggerRequest": {
        "properties": {
          "client_token": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 8,
                "pattern": "^[A-Za-z0-9_-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Token"
          },
          "run_filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BulkRunFilter"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 2000,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Ids"
          },
          "workflow_type": {
            "default": "offline",
            "enum": [
              "offline",
              "deep"
            ],
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "title": "BulkTriggerRequest",
        "type": "object"
      },
      "BulkTriggerResponse": {
        "properties": {
          "bulk_job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bulk Job Id"
          },
          "matched": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched"
          },
          "not_found": {
            "title": "Not Found",
            "type": "integer"
          },
          "not_found_ids": {
            "items": {
              "type": "string"
            },
            "title": "Not Found Ids",
            "type": "array"
          },
          "queued": {
            "title": "Queued",
            "type": "integer"
          },
          "replayed": {
            "default": false,
            "title": "Replayed",
            "type": "boolean"
          },
          "requested": {
            "default": 0,
            "title": "Requested",
            "type": "integer"
          },
          "skipped_in_progress": {
            "default": 0,
            "title": "Skipped In Progress",
            "type": "integer"
          },
          "skipped_in_progress_ids": {
            "items": {
              "type": "string"
            },
            "title": "Skipped In Progress Ids",
            "type": "array"
          },
          "source": {
            "default": "selection",
            "title": "Source",
            "type": "string"
          },
          "tracking": {
            "default": false,
            "title": "Tracking",
            "type": "boolean"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "required": [
          "queued",
          "not_found",
          "workflow_type"
        ],
        "title": "BulkTriggerResponse",
        "type": "object"
      },
      "CadenceWindowStatus": {
        "properties": {
          "deadline": {
            "format": "date-time",
            "title": "Deadline",
            "type": "string"
          },
          "local_label": {
            "default": "",
            "title": "Local Label",
            "type": "string"
          },
          "outcome": {
            "title": "Outcome",
            "type": "string"
          },
          "recorded": {
            "default": false,
            "title": "Recorded",
            "type": "boolean"
          },
          "run_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Count"
          },
          "window_end": {
            "format": "date-time",
            "title": "Window End",
            "type": "string"
          },
          "window_start": {
            "format": "date-time",
            "title": "Window Start",
            "type": "string"
          }
        },
        "required": [
          "deadline",
          "window_start",
          "window_end",
          "outcome"
        ],
        "title": "CadenceWindowStatus",
        "type": "object"
      },
      "CandidateEvaluationAccepted": {
        "properties": {
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "status"
        ],
        "title": "CandidateEvaluationAccepted",
        "type": "object"
      },
      "CandidateEvaluationRequest": {
        "additionalProperties": false,
        "properties": {
          "candidate": {
            "$ref": "#/components/schemas/EvalCandidateIn"
          },
          "limit": {
            "anyOf": [
              {
                "maximum": 200.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "candidate",
          "project_id"
        ],
        "title": "CandidateEvaluationRequest",
        "type": "object"
      },
      "CandidateOptionsResponse": {
        "properties": {
          "max_items": {
            "title": "Max Items",
            "type": "integer"
          },
          "offline_mode": {
            "title": "Offline Mode",
            "type": "boolean"
          },
          "prompt_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Version"
          },
          "supported_tiers_by_task": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "title": "Supported Tiers By Task",
            "type": "object"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/CandidateTierOption"
            },
            "title": "Tiers",
            "type": "array"
          }
        },
        "required": [
          "tiers",
          "offline_mode",
          "max_items",
          "supported_tiers_by_task"
        ],
        "title": "CandidateOptionsResponse",
        "type": "object"
      },
      "CandidateTierOption": {
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "tier": {
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "tier",
          "available"
        ],
        "title": "CandidateTierOption",
        "type": "object"
      },
      "CanonicalManagedUnlinkRequest": {
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "CanonicalManagedUnlinkRequest",
        "type": "object"
      },
      "CanonicalPromotionResponse": {
        "properties": {
          "canonical": {
            "$ref": "#/components/schemas/CanonicalTestCaseResponse"
          },
          "managed_case": {
            "$ref": "#/components/schemas/ManagedTestCaseResponse"
          }
        },
        "required": [
          "canonical",
          "managed_case"
        ],
        "title": "CanonicalPromotionResponse",
        "type": "object"
      },
      "CanonicalRetirementConfirmRequest": {
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "CanonicalRetirementConfirmRequest",
        "type": "object"
      },
      "CanonicalTestCaseBulkLinkRequest": {
        "description": "Move multiple canonical test cases to a different suite within the\nsame project. Pair with ``POST /api/v1/canonical-test-cases/bulk-link``.",
        "properties": {
          "canonical_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Canonical Ids",
            "type": "array"
          },
          "target_test_suite_id": {
            "format": "uuid",
            "title": "Target Test Suite Id",
            "type": "string"
          }
        },
        "required": [
          "target_test_suite_id",
          "canonical_ids"
        ],
        "title": "CanonicalTestCaseBulkLinkRequest",
        "type": "object"
      },
      "CanonicalTestCaseBulkLinkResponse": {
        "description": "Outcome of a bulk-link request. ``moved`` and\n``skipped_already_in_target`` always sum to the number of ids that\nactually resolved to a canonical row; ``missing_ids`` lists requested\nids that didn't resolve (stale UI selection, deleted in flight).",
        "properties": {
          "missing_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Missing Ids",
            "type": "array"
          },
          "moved": {
            "title": "Moved",
            "type": "integer"
          },
          "skipped_already_in_target": {
            "title": "Skipped Already In Target",
            "type": "integer"
          }
        },
        "required": [
          "moved",
          "skipped_already_in_target",
          "missing_ids"
        ],
        "title": "CanonicalTestCaseBulkLinkResponse",
        "type": "object"
      },
      "CanonicalTestCaseLinkRequest": {
        "description": "Move a canonical test case to a different suite within the same project.",
        "properties": {
          "test_suite_id": {
            "format": "uuid",
            "title": "Test Suite Id",
            "type": "string"
          }
        },
        "required": [
          "test_suite_id"
        ],
        "title": "CanonicalTestCaseLinkRequest",
        "type": "object"
      },
      "CanonicalTestCaseListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CanonicalTestCaseResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "CanonicalTestCaseListResponse",
        "type": "object"
      },
      "CanonicalTestCaseResponse": {
        "properties": {
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deleted_at_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At Run Id"
          },
          "deleted_observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted Observed At"
          },
          "first_seen_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seen Run Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "last_seen_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen Run Id"
          },
          "last_seen_test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen Test Case Id"
          },
          "managed_test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Managed Test Case Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "retirement_confirmed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retirement Confirmed At"
          },
          "retirement_confirmed_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retirement Confirmed By Id"
          },
          "retirement_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retirement Reason"
          },
          "review_tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Tag"
          },
          "run_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Count"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "test_suite_id": {
            "format": "uuid",
            "title": "Test Suite Id",
            "type": "string"
          },
          "test_suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Suite Name"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "created_at",
          "id",
          "project_id",
          "test_suite_id",
          "test_fingerprint",
          "test_name",
          "status",
          "source"
        ],
        "title": "CanonicalTestCaseResponse",
        "type": "object"
      },
      "ChangePasswordRequest": {
        "properties": {
          "current_password": {
            "maxLength": 128,
            "title": "Current Password",
            "type": "string"
          },
          "new_password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "New Password",
            "type": "string"
          }
        },
        "required": [
          "current_password",
          "new_password"
        ],
        "title": "ChangePasswordRequest",
        "type": "object"
      },
      "ChatMessageResponse": {
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          },
          "created_at": {
            "title": "Created At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "sources": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sources"
          }
        },
        "required": [
          "id",
          "session_id",
          "role",
          "content",
          "created_at"
        ],
        "title": "ChatMessageResponse",
        "type": "object"
      },
      "ChatSessionCreate": {
        "properties": {
          "active_report_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Report Id"
          },
          "active_report_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Report Version"
          },
          "active_test_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Test Run Id"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "ChatSessionCreate",
        "type": "object"
      },
      "ChatSessionResponse": {
        "properties": {
          "active_report_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Report Id"
          },
          "active_report_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Report Version"
          },
          "active_test_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Test Run Id"
          },
          "created_at": {
            "title": "Created At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ],
        "title": "ChatSessionResponse",
        "type": "object"
      },
      "CitationSchema": {
        "properties": {
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Url"
          },
          "case_index": {
            "title": "Case Index",
            "type": "integer"
          },
          "chunk_text_preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Text Preview"
          },
          "relevance_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relevance Score"
          },
          "section_heading": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Section Heading"
          },
          "source_id": {
            "format": "uuid",
            "title": "Source Id",
            "type": "string"
          },
          "source_title": {
            "title": "Source Title",
            "type": "string"
          },
          "vector_id": {
            "title": "Vector Id",
            "type": "string"
          }
        },
        "required": [
          "case_index",
          "vector_id",
          "source_id",
          "source_title"
        ],
        "title": "CitationSchema",
        "type": "object"
      },
      "ClassificationHintCreate": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "maxLength": 30,
            "title": "Category",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "match_field": {
            "maxLength": 20,
            "title": "Match Field",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "pattern": {
            "maxLength": 200,
            "title": "Pattern",
            "type": "string"
          }
        },
        "required": [
          "match_field",
          "pattern",
          "category"
        ],
        "title": "ClassificationHintCreate",
        "type": "object"
      },
      "ClassificationHintList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ClassificationHintResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "max_hints": {
            "title": "Max Hints",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "max_hints"
        ],
        "title": "ClassificationHintList",
        "type": "object"
      },
      "ClassificationHintPreview": {
        "properties": {
          "examples": {
            "default": [],
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Examples",
            "type": "array"
          },
          "lookback_days": {
            "title": "Lookback Days",
            "type": "integer"
          },
          "matched": {
            "title": "Matched",
            "type": "integer"
          },
          "sampled": {
            "title": "Sampled",
            "type": "integer"
          }
        },
        "required": [
          "matched",
          "sampled",
          "lookback_days"
        ],
        "title": "ClassificationHintPreview",
        "type": "object"
      },
      "ClassificationHintResponse": {
        "properties": {
          "category": {
            "title": "Category",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "match_field": {
            "title": "Match Field",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "pattern": {
            "title": "Pattern",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "project_id",
          "match_field",
          "pattern",
          "category",
          "enabled"
        ],
        "title": "ClassificationHintResponse",
        "type": "object"
      },
      "ClassificationHintUpdate": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "match_field": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Field"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "pattern": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern"
          }
        },
        "title": "ClassificationHintUpdate",
        "type": "object"
      },
      "ClassifyUncategorizedRequest": {
        "description": "POST body for /api/v1/analytics/classify-uncategorized — bulk-assign a\nfailure category to every test case currently labelled UNKNOWN (or\nNULL) in the requested project + window.",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/FailureCategory"
          },
          "days": {
            "default": 30,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Days",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          }
        },
        "required": [
          "project_id",
          "category"
        ],
        "title": "ClassifyUncategorizedRequest",
        "type": "object"
      },
      "ClassifyUncategorizedResponse": {
        "properties": {
          "category": {
            "title": "Category",
            "type": "string"
          },
          "days": {
            "title": "Days",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "updated": {
            "title": "Updated",
            "type": "integer"
          }
        },
        "required": [
          "updated",
          "category",
          "project_id",
          "days"
        ],
        "title": "ClassifyUncategorizedResponse",
        "type": "object"
      },
      "ClusterEpicCreateRequest": {
        "description": "POST /projects/{id}/systemic-clusters/{membership_key}/epic. Null fields take the prefill.",
        "properties": {
          "confirm_not_filed": {
            "default": false,
            "title": "Confirm Not Filed",
            "type": "boolean"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "summary": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "title": "ClusterEpicCreateRequest",
        "type": "object"
      },
      "ClusterEpicCreateResponse": {
        "description": "201 with ``created: true`` (filed now), 200 with ``created: false`` (an epic was already stored).",
        "properties": {
          "created": {
            "title": "Created",
            "type": "boolean"
          },
          "jira_key": {
            "title": "Jira Key",
            "type": "string"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          },
          "membership_key": {
            "title": "Membership Key",
            "type": "string"
          }
        },
        "required": [
          "membership_key",
          "jira_key",
          "created"
        ],
        "title": "ClusterEpicCreateResponse",
        "type": "object"
      },
      "ClusterEpicLink": {
        "description": "One epic filed for a current cluster (``systemic_cluster_epics``).",
        "properties": {
          "cluster_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Label"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "jira_key": {
            "title": "Jira Key",
            "type": "string"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          },
          "membership_key": {
            "title": "Membership Key",
            "type": "string"
          }
        },
        "required": [
          "membership_key",
          "jira_key",
          "created_at"
        ],
        "title": "ClusterEpicLink",
        "type": "object"
      },
      "ClusterEpicPreviewResponse": {
        "description": "GET /projects/{id}/systemic-clusters/{membership_key}/epic/preview (read-only).",
        "properties": {
          "cluster_label": {
            "title": "Cluster Label",
            "type": "string"
          },
          "co_failure_runs": {
            "title": "Co Failure Runs",
            "type": "integer"
          },
          "description_text": {
            "title": "Description Text",
            "type": "string"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "member_count": {
            "title": "Member Count",
            "type": "integer"
          },
          "membership_key": {
            "title": "Membership Key",
            "type": "string"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "membership_key",
          "summary",
          "description_text",
          "labels",
          "member_count",
          "co_failure_runs",
          "cluster_label"
        ],
        "title": "ClusterEpicPreviewResponse",
        "type": "object"
      },
      "ClusterEpicStatusResponse": {
        "description": "GET /projects/{id}/systemic-clusters/epics — the cluster list's one status read.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "epic_type_available": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Epic Type Available"
          },
          "links": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ClusterEpicLink"
            },
            "title": "Links",
            "type": "array"
          },
          "min_co_failure_runs": {
            "title": "Min Co Failure Runs",
            "type": "integer"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "enabled",
          "available",
          "min_co_failure_runs"
        ],
        "title": "ClusterEpicStatusResponse",
        "type": "object"
      },
      "ClusterInsightResponse": {
        "properties": {
          "cluster_id": {
            "title": "Cluster Id",
            "type": "string"
          },
          "cohesion_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cohesion Score"
          },
          "criticality_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Criticality Level"
          },
          "dimension_scores": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/DimensionScore"
            },
            "title": "Dimension Scores",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "member_test_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Member Test Ids",
            "type": "array"
          },
          "representative_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Representative Error"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "cluster_id",
          "label",
          "size"
        ],
        "title": "ClusterInsightResponse",
        "type": "object"
      },
      "ClusterResponse": {
        "properties": {
          "cluster_id": {
            "title": "Cluster Id",
            "type": "string"
          },
          "cohesion_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cohesion Score"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "member_test_ids": {
            "items": {
              "type": "string"
            },
            "title": "Member Test Ids",
            "type": "array"
          },
          "representative_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Representative Error"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          }
        },
        "required": [
          "cluster_id",
          "label",
          "representative_error",
          "member_test_ids",
          "size"
        ],
        "title": "ClusterResponse",
        "type": "object"
      },
      "CodeownersCoverage": {
        "description": "Coverage of recent failing-test paths by ``path`` ownership rules.",
        "properties": {
          "codeowners_rules": {
            "default": 0,
            "title": "Codeowners Rules",
            "type": "integer"
          },
          "coverage_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Pct"
          },
          "located": {
            "default": 0,
            "title": "Located",
            "type": "integer"
          },
          "lookback_days": {
            "default": 30,
            "title": "Lookback Days",
            "type": "integer"
          },
          "matched": {
            "default": 0,
            "title": "Matched",
            "type": "integer"
          },
          "path_rules": {
            "default": 0,
            "title": "Path Rules",
            "type": "integer"
          },
          "sampled": {
            "default": 0,
            "title": "Sampled",
            "type": "integer"
          },
          "source_roots": {
            "default": 0,
            "title": "Source Roots",
            "type": "integer"
          }
        },
        "title": "CodeownersCoverage",
        "type": "object"
      },
      "CodeownersImportRequest": {
        "description": "Import a CODEOWNERS file into ``path`` ownership rules (US-8.3).\n\n``source == \"text\"`` carries the raw file body in ``text`` (air-gapped /\npaste-upload). ``source == \"github\"`` fetches it over the configured\nGitHub connector and ``text`` is ignored.",
        "properties": {
          "source": {
            "pattern": "^(github|text)$",
            "title": "Source",
            "type": "string"
          },
          "text": {
            "anyOf": [
              {
                "maxLength": 1000000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "required": [
          "source"
        ],
        "title": "CodeownersImportRequest",
        "type": "object"
      },
      "CodeownersImportResponse": {
        "description": "Summary of a CODEOWNERS import.",
        "properties": {
          "coverage": {
            "$ref": "#/components/schemas/CodeownersCoverage"
          },
          "imported": {
            "title": "Imported",
            "type": "integer"
          },
          "rules_created": {
            "title": "Rules Created",
            "type": "integer"
          },
          "rules_replaced": {
            "title": "Rules Replaced",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "imported",
          "rules_created",
          "rules_replaced",
          "source",
          "coverage"
        ],
        "title": "CodeownersImportResponse",
        "type": "object"
      },
      "CommentMention": {
        "description": "A project member an ``@username`` in a test-case comment resolved to (W21d ACT-02).\n\nIds and display names only: never an e-mail.",
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "username",
          "display_name"
        ],
        "title": "CommentMention",
        "type": "object"
      },
      "CompliancePackFileCheck": {
        "properties": {
          "actual_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Sha256"
          },
          "expected_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Sha256"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "name",
          "status"
        ],
        "title": "CompliancePackFileCheck",
        "type": "object"
      },
      "CompliancePackGenerateRequest": {
        "description": "Body for POST /api/v1/releases/{id}/compliance-pack.",
        "properties": {
          "notes": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "retention_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Override retention window (default 2557 = ~7 years)",
            "title": "Retention Days"
          }
        },
        "title": "CompliancePackGenerateRequest",
        "type": "object"
      },
      "CompliancePackKeyRotateRequest": {
        "additionalProperties": false,
        "properties": {
          "confirmation": {
            "title": "Confirmation",
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "confirmation",
          "reason"
        ],
        "title": "CompliancePackKeyRotateRequest",
        "type": "object"
      },
      "CompliancePackLifecycleResponse": {
        "properties": {
          "pack_id": {
            "format": "uuid",
            "title": "Pack Id",
            "type": "string"
          },
          "purgeable_now": {
            "title": "Purgeable Now",
            "type": "boolean"
          },
          "retention_expires_at": {
            "format": "date-time",
            "title": "Retention Expires At",
            "type": "string"
          }
        },
        "required": [
          "pack_id",
          "retention_expires_at",
          "purgeable_now"
        ],
        "title": "CompliancePackLifecycleResponse",
        "type": "object"
      },
      "CompliancePackListRead": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CompliancePackSummaryRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "CompliancePackListRead",
        "type": "object"
      },
      "CompliancePackRead": {
        "properties": {
          "bytes": {
            "title": "Bytes",
            "type": "integer"
          },
          "file_count": {
            "title": "File Count",
            "type": "integer"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "generated_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated By User Id"
          },
          "holds": {
            "items": {
              "$ref": "#/components/schemas/HoldRefRead"
            },
            "title": "Holds",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "manifest_sha256": {
            "title": "Manifest Sha256",
            "type": "string"
          },
          "metadata_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata Snapshot"
          },
          "minio_key": {
            "title": "Minio Key",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "release_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          },
          "retention_expires_at": {
            "format": "date-time",
            "title": "Retention Expires At",
            "type": "string"
          },
          "signing_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Key Id"
          },
          "test_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Run Id"
          }
        },
        "required": [
          "id",
          "project_id",
          "minio_key",
          "manifest_sha256",
          "file_count",
          "bytes",
          "retention_expires_at",
          "generated_at"
        ],
        "title": "CompliancePackRead",
        "type": "object"
      },
      "CompliancePackSigningKeyRead": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "algorithm": {
            "title": "Algorithm",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "key_id": {
            "title": "Key Id",
            "type": "string"
          },
          "public_key_pem": {
            "title": "Public Key Pem",
            "type": "string"
          },
          "retired_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retired At"
          }
        },
        "required": [
          "key_id",
          "algorithm",
          "public_key_pem",
          "created_at",
          "active"
        ],
        "title": "CompliancePackSigningKeyRead",
        "type": "object"
      },
      "CompliancePackSigningKeysResponse": {
        "properties": {
          "active_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Key Id"
          },
          "keys": {
            "items": {
              "$ref": "#/components/schemas/CompliancePackSigningKeyRead"
            },
            "title": "Keys",
            "type": "array"
          }
        },
        "required": [
          "keys"
        ],
        "title": "CompliancePackSigningKeysResponse",
        "type": "object"
      },
      "CompliancePackSummaryRead": {
        "description": "One pack in the project-wide list (``GET /api/v1/compliance-packs``, W05 REL-04).\n\n``minio_key``, ``metadata_snapshot`` and ``notes`` are deliberately absent:\nstorage keys and evidence snapshots do not belong in a side rail.",
        "properties": {
          "bytes": {
            "title": "Bytes",
            "type": "integer"
          },
          "file_count": {
            "title": "File Count",
            "type": "integer"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "manifest_sha256": {
            "title": "Manifest Sha256",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "release_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          },
          "release_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Name"
          },
          "release_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Version"
          },
          "retention_expires_at": {
            "format": "date-time",
            "title": "Retention Expires At",
            "type": "string"
          },
          "retired": {
            "title": "Retired",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "project_id",
          "bytes",
          "file_count",
          "manifest_sha256",
          "generated_at",
          "retention_expires_at",
          "retired"
        ],
        "title": "CompliancePackSummaryRead",
        "type": "object"
      },
      "CompliancePackVerification": {
        "properties": {
          "chain": {
            "title": "Chain",
            "type": "string"
          },
          "checked_at": {
            "format": "date-time",
            "title": "Checked At",
            "type": "string"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/CompliancePackFileCheck"
            },
            "title": "Files",
            "type": "array"
          },
          "files_checked": {
            "title": "Files Checked",
            "type": "integer"
          },
          "files_ok": {
            "title": "Files Ok",
            "type": "integer"
          },
          "manifest_matches_record": {
            "title": "Manifest Matches Record",
            "type": "boolean"
          },
          "pack_id": {
            "format": "uuid",
            "title": "Pack Id",
            "type": "string"
          },
          "result": {
            "title": "Result",
            "type": "string"
          },
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "signing_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Key Id"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "pack_id",
          "result",
          "chain",
          "manifest_matches_record",
          "signature",
          "files_checked",
          "files_ok",
          "files",
          "summary",
          "checked_at"
        ],
        "title": "CompliancePackVerification",
        "type": "object"
      },
      "ConfidenceWhy": {
        "description": "Explains the basis of the confidence score for transparency.",
        "properties": {
          "confidence_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Basis"
          },
          "data_sources": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Data Sources",
            "type": "array"
          },
          "evidence_count": {
            "default": 0,
            "title": "Evidence Count",
            "type": "integer"
          },
          "investigation_depth": {
            "default": "fast_path",
            "title": "Investigation Depth",
            "type": "string"
          },
          "is_llm_inference": {
            "default": false,
            "title": "Is Llm Inference",
            "type": "boolean"
          }
        },
        "title": "ConfidenceWhy",
        "type": "object"
      },
      "ConnectorConfigTestRequest": {
        "properties": {
          "params": {
            "additionalProperties": true,
            "title": "Params",
            "type": "object"
          },
          "source_type": {
            "title": "Source Type",
            "type": "string"
          }
        },
        "required": [
          "source_type"
        ],
        "title": "ConnectorConfigTestRequest",
        "type": "object"
      },
      "ConnectorTestResult": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "ConnectorTestResult",
        "type": "object"
      },
      "CreateShareLinkRequest": {
        "properties": {
          "expiry_days": {
            "default": 7,
            "maximum": 30.0,
            "minimum": 1.0,
            "title": "Expiry Days",
            "type": "integer"
          },
          "layout": {
            "default": "executive",
            "pattern": "^(executive|engineering)$",
            "title": "Layout",
            "type": "string"
          }
        },
        "title": "CreateShareLinkRequest",
        "type": "object"
      },
      "DecisionLogEntry": {
        "description": "A single structured decision made by an agent — mirror of\n``BaseAgent.log_decision`` output stored on AgentStageResult.decision_log.",
        "properties": {
          "alternatives": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alternatives"
          },
          "at": {
            "title": "At",
            "type": "string"
          },
          "chosen": {
            "title": "Chosen",
            "type": "string"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "decision_point": {
            "title": "Decision Point",
            "type": "string"
          },
          "rationale": {
            "title": "Rationale",
            "type": "string"
          },
          "test_case_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Case Id"
          }
        },
        "required": [
          "at",
          "decision_point",
          "chosen",
          "rationale"
        ],
        "title": "DecisionLogEntry",
        "type": "object"
      },
      "DecisionReportFeedbackRequest": {
        "description": "Utility rating or claim correction for one immutable report version.",
        "properties": {
          "claim_id": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Claim Id"
          },
          "corrected_value": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Corrected Value"
          },
          "correction_type": {
            "anyOf": [
              {
                "enum": [
                  "category",
                  "cause",
                  "flaky",
                  "release"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correction Type"
          },
          "evidence_ids": {
            "items": {
              "type": "string"
            },
            "maxItems": 5,
            "title": "Evidence Ids",
            "type": "array"
          },
          "feedback_kind": {
            "enum": [
              "utility",
              "claim_correction"
            ],
            "title": "Feedback Kind",
            "type": "string"
          },
          "idempotency_key": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idempotency Key"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "report_version": {
            "minimum": 1.0,
            "title": "Report Version",
            "type": "integer"
          },
          "utility_rating": {
            "anyOf": [
              {
                "enum": [
                  "useful",
                  "partially_useful",
                  "not_useful"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utility Rating"
          }
        },
        "required": [
          "report_version",
          "feedback_kind"
        ],
        "title": "DecisionReportFeedbackRequest",
        "type": "object"
      },
      "DecisionReportRef": {
        "properties": {
          "report_id": {
            "title": "Report Id",
            "type": "string"
          },
          "report_version": {
            "title": "Report Version",
            "type": "integer"
          }
        },
        "required": [
          "report_id",
          "report_version"
        ],
        "title": "DecisionReportRef",
        "type": "object"
      },
      "DecisionTrailResponse": {
        "description": "Full decision trail for a pipeline run — the user-facing audit surface.",
        "properties": {
          "below_threshold_count": {
            "default": 0,
            "title": "Below Threshold Count",
            "type": "integer"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "fallback_count": {
            "default": 0,
            "title": "Fallback Count",
            "type": "integer"
          },
          "mode_distribution": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Mode Distribution",
            "type": "object"
          },
          "per_test": {
            "items": {
              "$ref": "#/components/schemas/PerTestRouting"
            },
            "title": "Per Test",
            "type": "array"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "pipeline_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Status"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/StageDecisionSummary"
            },
            "title": "Stages",
            "type": "array"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "total_cost_usd": {
            "default": 0.0,
            "title": "Total Cost Usd",
            "type": "number"
          },
          "total_tokens": {
            "default": 0,
            "title": "Total Tokens",
            "type": "integer"
          },
          "workflow_events": {
            "items": {
              "$ref": "#/components/schemas/WorkflowDecisionEvent"
            },
            "title": "Workflow Events",
            "type": "array"
          },
          "workflow_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Type"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "DecisionTrailResponse",
        "type": "object"
      },
      "DeepCostRead": {
        "properties": {
          "local_model": {
            "title": "Local Model",
            "type": "boolean"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "price_table_updated": {
            "title": "Price Table Updated",
            "type": "string"
          },
          "priced": {
            "title": "Priced",
            "type": "boolean"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usd"
          }
        },
        "required": [
          "priced",
          "local_model",
          "price_table_updated"
        ],
        "title": "DeepCostRead",
        "type": "object"
      },
      "DeepEstimateResponse": {
        "properties": {
          "configuration": {
            "$ref": "#/components/schemas/DeepRunConfigurationRead"
          },
          "cost": {
            "$ref": "#/components/schemas/DeepCostRead"
          },
          "gate": {
            "$ref": "#/components/schemas/DeepGateRead"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "minutes_p50": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minutes P50"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "sample_pipelines": {
            "title": "Sample Pipelines",
            "type": "integer"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/DeepEstimateStage"
            },
            "title": "Stages",
            "type": "array"
          },
          "tokens_p50": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens P50"
          }
        },
        "required": [
          "run_id",
          "gate",
          "configuration",
          "measured",
          "sample_pipelines",
          "cost",
          "stages"
        ],
        "title": "DeepEstimateResponse",
        "type": "object"
      },
      "DeepEstimateStage": {
        "properties": {
          "duration_seconds_p50": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds P50"
          },
          "input_tokens_p50": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens P50"
          },
          "output_tokens_p50": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens P50"
          },
          "per_failure": {
            "default": false,
            "title": "Per Failure",
            "type": "boolean"
          },
          "samples": {
            "title": "Samples",
            "type": "integer"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          }
        },
        "required": [
          "stage_name",
          "samples"
        ],
        "title": "DeepEstimateStage",
        "type": "object"
      },
      "DeepFindingResponse": {
        "properties": {
          "affected_services": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Affected Services"
          },
          "causal_chain": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Causal Chain"
          },
          "cluster_id": {
            "title": "Cluster Id",
            "type": "string"
          },
          "confidence_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Basis"
          },
          "confidence_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Score"
          },
          "contract_violations": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Violations"
          },
          "evidence": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "origin": {
            "default": "unknown",
            "title": "Origin",
            "type": "string"
          },
          "recommended_actions": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Actions"
          },
          "root_cause": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Root Cause"
          }
        },
        "required": [
          "cluster_id",
          "root_cause",
          "failure_category",
          "confidence_score",
          "causal_chain",
          "evidence",
          "affected_services",
          "contract_violations",
          "recommended_actions"
        ],
        "title": "DeepFindingResponse",
        "type": "object"
      },
      "DeepGateRead": {
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "analysis_mode": {
            "title": "Analysis Mode",
            "type": "string"
          },
          "deep_investigation_enabled": {
            "title": "Deep Investigation Enabled",
            "type": "boolean"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code"
          }
        },
        "required": [
          "allowed",
          "analysis_mode",
          "deep_investigation_enabled"
        ],
        "title": "DeepGateRead",
        "type": "object"
      },
      "DeepHistoryResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DeepHistoryRow"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "total",
          "page",
          "size",
          "items"
        ],
        "title": "DeepHistoryResponse",
        "type": "object"
      },
      "DeepHistoryRow": {
        "properties": {
          "avg_confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Confidence"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "clusters": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clusters"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "failures": {
            "title": "Failures",
            "type": "integer"
          },
          "findings": {
            "default": 0,
            "title": "Findings",
            "type": "integer"
          },
          "pipeline_run_id": {
            "format": "uuid",
            "title": "Pipeline Run Id",
            "type": "string"
          },
          "public_status": {
            "title": "Public Status",
            "type": "string"
          },
          "run_created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Created At"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "run_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Seq"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          }
        },
        "required": [
          "run_id",
          "failures",
          "pipeline_run_id",
          "status",
          "public_status"
        ],
        "title": "DeepHistoryRow",
        "type": "object"
      },
      "DeepPreScanResponse": {
        "properties": {
          "failing_results": {
            "title": "Failing Results",
            "type": "integer"
          },
          "grouped_by": {
            "default": "error_signature",
            "title": "Grouped By",
            "type": "string"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/PreScanGroup"
            },
            "title": "Groups",
            "type": "array"
          },
          "groups_total": {
            "title": "Groups Total",
            "type": "integer"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "refinement": {
            "title": "Refinement",
            "type": "string"
          },
          "refinement_note": {
            "title": "Refinement Note",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "measured",
          "failing_results",
          "groups_total",
          "groups",
          "refinement",
          "refinement_note"
        ],
        "title": "DeepPreScanResponse",
        "type": "object"
      },
      "DeepRunConfigurationRead": {
        "properties": {
          "allowed_tiers": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Tiers",
            "type": "array"
          },
          "evidence_sources": {
            "items": {
              "type": "string"
            },
            "title": "Evidence Sources",
            "type": "array"
          },
          "failures_analysed": {
            "title": "Failures Analysed",
            "type": "integer"
          },
          "max_failures_analyzed": {
            "title": "Max Failures Analyzed",
            "type": "integer"
          },
          "model_tier": {
            "title": "Model Tier",
            "type": "string"
          },
          "project_evidence_sources": {
            "items": {
              "type": "string"
            },
            "title": "Project Evidence Sources",
            "type": "array"
          },
          "project_max_failures_analyzed": {
            "title": "Project Max Failures Analyzed",
            "type": "integer"
          },
          "project_model_tier": {
            "title": "Project Model Tier",
            "type": "string"
          },
          "selected_failures": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Selected Failures"
          },
          "tool_narrowing_allowed": {
            "title": "Tool Narrowing Allowed",
            "type": "boolean"
          }
        },
        "required": [
          "failures_analysed",
          "max_failures_analyzed",
          "project_max_failures_analyzed",
          "model_tier",
          "project_model_tier",
          "allowed_tiers",
          "evidence_sources",
          "project_evidence_sources",
          "tool_narrowing_allowed"
        ],
        "title": "DeepRunConfigurationRead",
        "type": "object"
      },
      "DefectApprovalRequest": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "action"
        ],
        "title": "DefectApprovalRequest",
        "type": "object"
      },
      "DefectApprovalResponse": {
        "properties": {
          "approval_status": {
            "title": "Approval Status",
            "type": "string"
          },
          "defect_id": {
            "title": "Defect Id",
            "type": "string"
          },
          "jira_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Error"
          },
          "jira_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Reason"
          },
          "jira_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Status"
          },
          "jira_ticket": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Ticket"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "defect_id",
          "approval_status",
          "message"
        ],
        "title": "DefectApprovalResponse",
        "type": "object"
      },
      "DefectCandidateResponse": {
        "description": "Pre-assembled defect candidate for a cluster (editable before submission).",
        "properties": {
          "cluster_id": {
            "title": "Cluster Id",
            "type": "string"
          },
          "component": {
            "title": "Component",
            "type": "string"
          },
          "composite_score": {
            "default": 0.0,
            "title": "Composite Score",
            "type": "number"
          },
          "criticality_scores": {
            "additionalProperties": true,
            "default": {},
            "title": "Criticality Scores",
            "type": "object"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "duplicate_defect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duplicate Defect Id"
          },
          "duplicate_detected": {
            "default": false,
            "title": "Duplicate Detected",
            "type": "boolean"
          },
          "duplicate_hint": {
            "default": "",
            "title": "Duplicate Hint",
            "type": "string"
          },
          "evidence_bundle": {
            "additionalProperties": true,
            "default": {},
            "title": "Evidence Bundle",
            "type": "object"
          },
          "failure_category": {
            "default": "UNKNOWN",
            "title": "Failure Category",
            "type": "string"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "member_count": {
            "default": 0,
            "title": "Member Count",
            "type": "integer"
          },
          "owner_team": {
            "title": "Owner Team",
            "type": "string"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "cluster_id",
          "run_id",
          "title",
          "description",
          "severity",
          "component",
          "owner_team"
        ],
        "title": "DefectCandidateResponse",
        "type": "object"
      },
      "DefectIntakeRequest": {
        "description": "POST body for /api/v1/analytics/defects — manual defect intake.\n\nSeverity uses the P0–P3 vocabulary the Defects UI renders; it maps to the\n`defects.severity` column's CRITICAL/HIGH/MEDIUM/LOW values server-side.\n`test_name`/`suite_name` are optional — when both are supplied the service\nwill try to attach the new defect to the most-recent matching TestCase row,\notherwise the defect is created standalone (test_case_id NULL).",
        "properties": {
          "affects_releases": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Affects Releases"
          },
          "component": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 10000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "failure_category": {
            "$ref": "#/components/schemas/FailureCategory",
            "default": "PRODUCT_BUG"
          },
          "jira_ticket_url": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Ticket Url"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "severity": {
            "enum": [
              "P0",
              "P1",
              "P2",
              "P3"
            ],
            "title": "Severity",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_name": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "title": {
            "maxLength": 255,
            "minLength": 3,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "title",
          "severity"
        ],
        "title": "DefectIntakeRequest",
        "type": "object"
      },
      "DefectIntakeResponse": {
        "properties": {
          "ai_confidence_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Confidence Score"
          },
          "component": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "jira_ticket_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Ticket Id"
          },
          "jira_ticket_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Ticket Url"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "resolution_status": {
            "title": "Resolution Status",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "title",
          "severity",
          "resolution_status",
          "created_at"
        ],
        "title": "DefectIntakeResponse",
        "type": "object"
      },
      "DefectJiraLinkResult": {
        "description": "What linking a Jira key did. ``status``: \"validated\" | \"saved_locally\" | \"unlinked\".",
        "properties": {
          "jira_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Key"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "required": [
          "status"
        ],
        "title": "DefectJiraLinkResult",
        "type": "object"
      },
      "DefectPatchRequest": {
        "additionalProperties": false,
        "description": "PATCH /api/v1/projects/{project_id}/defects/{defect_id}.\n\nOnly the fields SENT are applied (``model_fields_set``); ``null`` or ``\"\"``\nclears ``assignee_user_id``, ``owner_team`` and ``jira_key``. No field takes\na URL: a Jira link is built by the server from the configured domain, and\n``extra=\"forbid\"`` makes a client-sent ``jira_url`` a 422, never stored.",
        "properties": {
          "assignee_user_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee User Id"
          },
          "jira_key": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Key"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "owner_team": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Team"
          },
          "resolution_status": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution Status"
          }
        },
        "title": "DefectPatchRequest",
        "type": "object"
      },
      "DefectPatchResponse": {
        "description": "The PATCH answer: the defect's list row as the server now reads it (the\n``GET /analytics/defects`` row shape), so the page replaces its row.",
        "properties": {
          "changed_fields": {
            "items": {
              "type": "string"
            },
            "title": "Changed Fields",
            "type": "array"
          },
          "defect": {
            "additionalProperties": true,
            "title": "Defect",
            "type": "object"
          },
          "jira": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefectJiraLinkResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "write_back": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DefectWriteBackResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "defect",
          "changed_fields"
        ],
        "title": "DefectPatchResponse",
        "type": "object"
      },
      "DefectPromotionRequest": {
        "description": "User-editable fields submitted from the promotion modal.",
        "properties": {
          "component": {
            "default": "",
            "title": "Component",
            "type": "string"
          },
          "description": {
            "default": "",
            "title": "Description",
            "type": "string"
          },
          "labels": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "owner_team": {
            "default": "",
            "title": "Owner Team",
            "type": "string"
          },
          "project_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Key"
          },
          "severity": {
            "default": "HIGH",
            "title": "Severity",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "DefectPromotionRequest",
        "type": "object"
      },
      "DefectPromotionResponse": {
        "properties": {
          "approval_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approval Status"
          },
          "cluster_id": {
            "title": "Cluster Id",
            "type": "string"
          },
          "component": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component"
          },
          "defect_id": {
            "title": "Defect Id",
            "type": "string"
          },
          "duplicate_defect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duplicate Defect Id"
          },
          "duplicate_detected": {
            "default": false,
            "title": "Duplicate Detected",
            "type": "boolean"
          },
          "jira_ticket": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Ticket"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          },
          "owner_team": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Team"
          },
          "policy_reasons": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Reasons"
          },
          "requires_approval": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Approval"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "defect_id",
          "cluster_id",
          "severity",
          "title"
        ],
        "title": "DefectPromotionResponse",
        "type": "object"
      },
      "DefectWriteBackResult": {
        "description": "The Jira status write-back after a status change. ``status``: \"sent\" | \"skipped\" | \"not_sent\" | \"failed\".",
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "DefectWriteBackResult",
        "type": "object"
      },
      "DeleteRunAcceptedResponse": {
        "description": "202, not 204.\n\nA synchronous delete of a multi-GB prefix times out at the gateway, and\nbecause the cross-store order is Mongo -> MinIO -> Postgres the caller\nwould get a 504 with the artifacts already gone and the run still listed.\nPoll ``job_id`` on the deletion-jobs endpoint instead.",
        "properties": {
          "floor_applies": {
            "default": false,
            "title": "Floor Applies",
            "type": "boolean"
          },
          "floor_note": {
            "default": "Explicit deletions are not limited by the keep-last floor; it applies to the scheduled purge only.",
            "title": "Floor Note",
            "type": "string"
          },
          "job_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deletion job to poll. NULL when the job record could not be written — the deletion still runs; only its bookkeeping failed.",
            "title": "Job Id"
          },
          "references_broken": {
            "items": {
              "$ref": "#/components/schemas/ReferenceBrokenRead"
            },
            "title": "References Broken",
            "type": "array"
          },
          "references_measured": {
            "default": true,
            "title": "References Measured",
            "type": "boolean"
          },
          "refused_prefixes": {
            "description": "Object prefixes NOT deleted because they fall outside the project's scope. Reported rather than silently skipped: storage that does not fall needs an explanation.",
            "items": {
              "type": "string"
            },
            "title": "Refused Prefixes",
            "type": "array"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "status": {
            "const": "accepted",
            "default": "accepted",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "DeleteRunAcceptedResponse",
        "type": "object"
      },
      "DeleteRunRequest": {
        "description": "Payload for ``DELETE /api/v1/runs/{run_id}``.\n\n``confirm`` is a deliberate second step, not ceremony: this deletes across\nfive stores and is irreversible. ``reason`` is recorded on the deletion job\nand the tombstone, so \"why is this run gone\" has an answer later.",
        "properties": {
          "confirm": {
            "description": "Must be true. A DELETE without it is refused, not assumed.",
            "title": "Confirm",
            "type": "boolean"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "confirm",
          "reason"
        ],
        "title": "DeleteRunRequest",
        "type": "object"
      },
      "DeletedProjectStorageEntry": {
        "properties": {
          "footprint": {
            "$ref": "#/components/schemas/ProjectStorageResponse"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "reachable_by_retention": {
            "title": "Reachable By Retention",
            "type": "boolean"
          }
        },
        "required": [
          "project_id",
          "name",
          "reachable_by_retention",
          "footprint"
        ],
        "title": "DeletedProjectStorageEntry",
        "type": "object"
      },
      "DeletedProjectsStorageResponse": {
        "properties": {
          "computed_at": {
            "format": "date-time",
            "title": "Computed At",
            "type": "string"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/DeletedProjectStorageEntry"
            },
            "title": "Projects",
            "type": "array"
          },
          "projects_measured": {
            "title": "Projects Measured",
            "type": "integer"
          },
          "projects_total": {
            "title": "Projects Total",
            "type": "integer"
          },
          "total_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Bytes"
          },
          "total_is_estimate": {
            "default": false,
            "title": "Total Is Estimate",
            "type": "boolean"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          },
          "unreachable_by_retention": {
            "default": 0,
            "title": "Unreachable By Retention",
            "type": "integer"
          }
        },
        "required": [
          "computed_at",
          "projects_total",
          "projects_measured"
        ],
        "title": "DeletedProjectsStorageResponse",
        "type": "object"
      },
      "DeletionAcknowledgeRequest": {
        "description": "Confirms a collected archive was saved; the route answers ``DeletionJobResponse``.",
        "properties": {
          "manifest_sha256": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-fA-F]{64}$",
            "title": "Manifest Sha256",
            "type": "string"
          }
        },
        "required": [
          "manifest_sha256"
        ],
        "title": "DeletionAcknowledgeRequest",
        "type": "object"
      },
      "DeletionExecuteAcceptedResponse": {
        "properties": {
          "export_target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Target"
          },
          "export_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Tier"
          },
          "job_id": {
            "format": "uuid",
            "title": "Job Id",
            "type": "string"
          },
          "run_count": {
            "title": "Run Count",
            "type": "integer"
          },
          "status": {
            "const": "accepted",
            "default": "accepted",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "job_id",
          "run_count"
        ],
        "title": "DeletionExecuteAcceptedResponse",
        "type": "object"
      },
      "DeletionExecuteRequest": {
        "description": "Execute takes a JOB ID, never a criteria body.\n\nAccepting criteria here would re-resolve them, which is the bug the freeze\nexists to prevent — the set executed would not be the set reviewed.",
        "properties": {
          "confirmation_name": {
            "description": "Must equal the project's name exactly. A typed confirmation, not a checkbox, because this is irreversible across five stores.",
            "maxLength": 255,
            "minLength": 1,
            "title": "Confirmation Name",
            "type": "string"
          },
          "export": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExportChoice"
              },
              {
                "type": "null"
              }
            ]
          },
          "job_id": {
            "format": "uuid",
            "title": "Job Id",
            "type": "string"
          }
        },
        "required": [
          "job_id",
          "confirmation_name"
        ],
        "title": "DeletionExecuteRequest",
        "type": "object"
      },
      "DeletionJobListResponse": {
        "properties": {
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/DeletionJobResponse"
            },
            "title": "Jobs",
            "type": "array"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "DeletionJobListResponse",
        "type": "object"
      },
      "DeletionJobResponse": {
        "description": "One deletion that ran (or is running).\n\n`bytes_reclaimed` is nullable and is NOT defaulted to 0 — \"reclaimed\nnothing\" and \"nobody measured\" are opposite findings, and this is the\nsurface that tells an operator whether a purge was worth running.",
        "properties": {
          "acknowledged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged At"
          },
          "bytes_reclaimed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes Reclaimed"
          },
          "collect_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collect Expires At"
          },
          "collected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collected At"
          },
          "counts": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counts"
          },
          "criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Criteria"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "export_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Bytes"
          },
          "export_manifest_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Manifest Sha256"
          },
          "export_summary": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Summary"
          },
          "export_target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Target"
          },
          "export_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Tier"
          },
          "export_verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Verified At"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "holds_honoured": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Holds Honoured"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "job_kind": {
            "title": "Job Kind",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "references_broken": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "References Broken"
          },
          "requested_at": {
            "format": "date-time",
            "title": "Requested At",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "job_kind",
          "status",
          "requested_at"
        ],
        "title": "DeletionJobResponse",
        "type": "object"
      },
      "DeletionPreviewResponse": {
        "description": "A frozen candidate set an ADMIN authorises from.\n\nThe ids are materialized and hashed here, and ``execute`` replays them.\nRe-resolving at execute time would delete a different set from the one\nthat was reviewed: criteria read columns other code rewrites while the job\nis queued (``TestRun.status`` by aggregate updates and live-session close,\n``primary_suite_name`` at session close).",
        "properties": {
          "blocked": {
            "description": "Runs that cannot be deleted and why — in flight, or cited by a compliance pack, release or decision report. Surfaced at preview so an ADMIN sees them before authorising, not after.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Blocked",
            "type": "array"
          },
          "candidate_hash": {
            "title": "Candidate Hash",
            "type": "string"
          },
          "export_estimate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExportEstimate"
              },
              {
                "type": "null"
              }
            ]
          },
          "floor_applies": {
            "default": false,
            "title": "Floor Applies",
            "type": "boolean"
          },
          "floor_note": {
            "default": "Explicit deletions are not limited by the keep-last floor; it applies to the scheduled purge only.",
            "title": "Floor Note",
            "type": "string"
          },
          "job_id": {
            "format": "uuid",
            "title": "Job Id",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "references_broken": {
            "items": {
              "$ref": "#/components/schemas/ReferenceBrokenRead"
            },
            "title": "References Broken",
            "type": "array"
          },
          "references_measured": {
            "default": true,
            "title": "References Measured",
            "type": "boolean"
          },
          "refused_prefixes": {
            "items": {
              "type": "string"
            },
            "title": "Refused Prefixes",
            "type": "array"
          },
          "run_count": {
            "title": "Run Count",
            "type": "integer"
          },
          "run_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Run Ids",
            "type": "array"
          },
          "truncated": {
            "default": false,
            "description": "The candidate set exceeded the reviewable bound and was cut. Reported rather than silently deleting the first N.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "project_id",
          "run_count",
          "run_ids",
          "candidate_hash"
        ],
        "title": "DeletionPreviewResponse",
        "type": "object"
      },
      "DigestContentResponse": {
        "description": "Actionable digest content for a project or saved view scope.",
        "properties": {
          "action_items": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Action Items",
            "type": "array"
          },
          "avg_pass_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Pass Rate"
          },
          "changes_since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changes Since"
          },
          "delta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta"
          },
          "flaky_test_count": {
            "default": 0,
            "title": "Flaky Test Count",
            "type": "integer"
          },
          "generated_at": {
            "title": "Generated At",
            "type": "string"
          },
          "is_zero_change": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Zero Change"
          },
          "latest_run_total_tests": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run Total Tests"
          },
          "new_regressions": {
            "default": 0,
            "title": "New Regressions",
            "type": "integer"
          },
          "pass_rate_trend": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Rate Trend"
          },
          "period": {
            "title": "Period",
            "type": "string"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "release_decisions": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Release Decisions",
            "type": "array"
          },
          "release_verdict": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DigestReleaseVerdict"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DigestScopeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "top_blockers": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Top Blockers",
            "type": "array"
          },
          "top_clusters": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Top Clusters",
            "type": "array"
          },
          "total_runs": {
            "default": 0,
            "title": "Total Runs",
            "type": "integer"
          }
        },
        "required": [
          "period",
          "generated_at"
        ],
        "title": "DigestContentResponse",
        "type": "object"
      },
      "DigestReleaseVerdict": {
        "properties": {
          "blocker_count": {
            "default": 0,
            "title": "Blocker Count",
            "type": "integer"
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decided At"
          },
          "release_id": {
            "title": "Release Id",
            "type": "string"
          },
          "release_name": {
            "title": "Release Name",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          }
        },
        "required": [
          "release_id",
          "release_name",
          "source"
        ],
        "title": "DigestReleaseVerdict",
        "type": "object"
      },
      "DigestScopeInfo": {
        "description": "What a digest was filtered by (W09 NTF-04); ``digest_scope_service.scope_info``.",
        "properties": {
          "dropped_release_count": {
            "default": 0,
            "title": "Dropped Release Count",
            "type": "integer"
          },
          "release_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Release Ids",
            "type": "array"
          },
          "release_names": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Release Names",
            "type": "array"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "suites": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Suites",
            "type": "array"
          },
          "view_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "View Id"
          },
          "view_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "View Name"
          },
          "window_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Window Days"
          }
        },
        "required": [
          "source"
        ],
        "title": "DigestScopeInfo",
        "type": "object"
      },
      "DigestSide": {
        "description": "Compact per-side summary for the Run Compare columns (core.digest_side).",
        "properties": {
          "analysed_tests": {
            "default": 0,
            "title": "Analysed Tests",
            "type": "integer"
          },
          "avg_confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Confidence"
          },
          "categories": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Categories",
            "type": "object"
          },
          "composite_risk": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composite Risk"
          },
          "decision_report_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decision Report Version"
          },
          "deterministic": {
            "default": false,
            "title": "Deterministic",
            "type": "boolean"
          },
          "engine": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engine"
          },
          "fallback_used": {
            "default": false,
            "title": "Fallback Used",
            "type": "boolean"
          },
          "generated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "llm_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Provider"
          },
          "risk_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Score"
          },
          "top_clusters": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Top Clusters",
            "type": "array"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          }
        },
        "title": "DigestSide",
        "type": "object"
      },
      "DigestSubscriptionCreate": {
        "properties": {
          "channel": {
            "default": "email",
            "pattern": "^(email|slack|teams)$",
            "title": "Channel",
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_attachment": {
            "default": false,
            "title": "Report Attachment",
            "type": "boolean"
          },
          "saved_view_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved View Id"
          },
          "schedule": {
            "default": "WEEKLY",
            "pattern": "^(DAILY|WEEKLY|WEEKLY_RETRO|PER_RUN|PER_RELEASE|PER_SUITE)$",
            "title": "Schedule",
            "type": "string"
          },
          "scope_type": {
            "anyOf": [
              {
                "pattern": "^(project|release|suite|global)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "project",
            "title": "Scope Type"
          },
          "scope_value": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Value"
          },
          "send_when_unchanged": {
            "default": true,
            "title": "Send When Unchanged",
            "type": "boolean"
          },
          "trigger_filter": {
            "anyOf": [
              {
                "pattern": "^(all|failed_only|degraded_only)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "all",
            "title": "Trigger Filter"
          }
        },
        "required": [
          "name"
        ],
        "title": "DigestSubscriptionCreate",
        "type": "object"
      },
      "DigestSubscriptionResponse": {
        "properties": {
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivery_count": {
            "default": 0,
            "title": "Delivery Count",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_paused": {
            "title": "Is Paused",
            "type": "boolean"
          },
          "last_delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "next_delivery_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Delivery At"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_attachment": {
            "default": false,
            "title": "Report Attachment",
            "type": "boolean"
          },
          "saved_view_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved View Id"
          },
          "saved_view_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved View Name"
          },
          "schedule": {
            "title": "Schedule",
            "type": "string"
          },
          "scope_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Label"
          },
          "scope_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Problem"
          },
          "scope_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "project",
            "title": "Scope Type"
          },
          "scope_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Value"
          },
          "send_when_unchanged": {
            "default": true,
            "title": "Send When Unchanged",
            "type": "boolean"
          },
          "trigger_filter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "all",
            "title": "Trigger Filter"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "name",
          "schedule",
          "channel",
          "is_active",
          "is_paused",
          "created_at"
        ],
        "title": "DigestSubscriptionResponse",
        "type": "object"
      },
      "DigestSubscriptionUpdate": {
        "properties": {
          "channel": {
            "anyOf": [
              {
                "pattern": "^(email|slack|teams)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "is_paused": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Paused"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "report_attachment": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Attachment"
          },
          "saved_view_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved View Id"
          },
          "schedule": {
            "anyOf": [
              {
                "pattern": "^(DAILY|WEEKLY|WEEKLY_RETRO|PER_RUN|PER_RELEASE|PER_SUITE)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule"
          },
          "scope_type": {
            "anyOf": [
              {
                "pattern": "^(project|release|suite|global)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Type"
          },
          "scope_value": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope Value"
          },
          "send_when_unchanged": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send When Unchanged"
          },
          "trigger_filter": {
            "anyOf": [
              {
                "pattern": "^(all|failed_only|degraded_only)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Filter"
          }
        },
        "title": "DigestSubscriptionUpdate",
        "type": "object"
      },
      "DimensionScore": {
        "properties": {
          "contribution": {
            "title": "Contribution",
            "type": "number"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "name",
          "label",
          "score",
          "weight",
          "contribution"
        ],
        "title": "DimensionScore",
        "type": "object"
      },
      "DuplicateActionResponse": {
        "description": "Result of a dismiss / merge action on a candidate pair.",
        "properties": {
          "candidate_id": {
            "format": "uuid",
            "title": "Candidate Id",
            "type": "string"
          },
          "deprecated_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deprecated Case Id"
          },
          "status": {
            "enum": [
              "open",
              "merged",
              "dismissed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "candidate_id",
          "status"
        ],
        "title": "DuplicateActionResponse",
        "type": "object"
      },
      "DuplicateCandidateListResponse": {
        "description": "Paginated list of duplicate candidates for a project's review queue.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DuplicateCandidateResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "open_count": {
            "default": 0,
            "title": "Open Count",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "DuplicateCandidateListResponse",
        "type": "object"
      },
      "DuplicateCandidateResponse": {
        "description": "One detected near-duplicate pair with its explainable score breakdown.",
        "properties": {
          "band": {
            "enum": [
              "exact",
              "strong",
              "possible"
            ],
            "title": "Band",
            "type": "string"
          },
          "case_a": {
            "$ref": "#/components/schemas/DuplicateCaseRef"
          },
          "case_b": {
            "$ref": "#/components/schemas/DuplicateCaseRef"
          },
          "component_scores": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component Scores"
          },
          "detected_at": {
            "format": "date-time",
            "title": "Detected At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "method": {
            "enum": [
              "fingerprint",
              "structural",
              "semantic"
            ],
            "title": "Method",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "status": {
            "enum": [
              "open",
              "merged",
              "dismissed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "band",
          "score",
          "method",
          "status",
          "detected_at",
          "case_a",
          "case_b"
        ],
        "title": "DuplicateCandidateResponse",
        "type": "object"
      },
      "DuplicateCaseRef": {
        "description": "Minimal reference to one ManagedTestCase in a duplicate pair.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "title": "DuplicateCaseRef",
        "type": "object"
      },
      "DuplicateDetectionRunResponse": {
        "description": "Summary of a triggered detection sweep over a project's authored cases.",
        "properties": {
          "candidates_created": {
            "default": 0,
            "title": "Candidates Created",
            "type": "integer"
          },
          "candidates_total": {
            "default": 0,
            "title": "Candidates Total",
            "type": "integer"
          },
          "cases_scanned": {
            "default": 0,
            "title": "Cases Scanned",
            "type": "integer"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "sampled": {
            "default": false,
            "title": "Sampled",
            "type": "boolean"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "DuplicateDetectionRunResponse",
        "type": "object"
      },
      "DuplicateMergeRequest": {
        "description": "Non-destructive merge: flip the candidate to ``merged`` and optionally\nsoft-deprecate the losing case. NEVER deletes a case this phase.",
        "properties": {
          "candidate_id": {
            "format": "uuid",
            "title": "Candidate Id",
            "type": "string"
          },
          "deprecate_loser": {
            "default": false,
            "title": "Deprecate Loser",
            "type": "boolean"
          },
          "keep_case_id": {
            "format": "uuid",
            "title": "Keep Case Id",
            "type": "string"
          }
        },
        "required": [
          "candidate_id",
          "keep_case_id"
        ],
        "title": "DuplicateMergeRequest",
        "type": "object"
      },
      "DurationRegressionsResponse": {
        "description": "A run's duration regressions. ``measured: false`` + ``reason`` when\nneither check could be made -- never an empty list read as \"no\nregressions\". ``stored: false`` = computed at read time for a run that\nwas not evaluated on ingest (nothing was written).",
        "properties": {
          "evaluated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluated At"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "notified": {
            "additionalProperties": true,
            "title": "Notified",
            "type": "object"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "schema_version": {
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "spike_count": {
            "default": 0,
            "title": "Spike Count",
            "type": "integer"
          },
          "spikes": {
            "items": {
              "$ref": "#/components/schemas/DurationSpikeResponse"
            },
            "title": "Spikes",
            "type": "array"
          },
          "stored": {
            "default": false,
            "title": "Stored",
            "type": "boolean"
          },
          "suite_check": {
            "additionalProperties": true,
            "title": "Suite Check",
            "type": "object"
          },
          "suite_regression_count": {
            "default": 0,
            "title": "Suite Regression Count",
            "type": "integer"
          },
          "suites": {
            "items": {
              "$ref": "#/components/schemas/SuiteDurationRegressionResponse"
            },
            "title": "Suites",
            "type": "array"
          },
          "test_check": {
            "additionalProperties": true,
            "title": "Test Check",
            "type": "object"
          }
        },
        "required": [
          "run_id",
          "measured"
        ],
        "title": "DurationRegressionsResponse",
        "type": "object"
      },
      "DurationSpikeResponse": {
        "description": "A PASSED test slower than its Welford baseline (>= 3 sigma, >= 10 samples).",
        "properties": {
          "baseline_mean_ms": {
            "title": "Baseline Mean Ms",
            "type": "number"
          },
          "baseline_p95_ms": {
            "default": 0.0,
            "title": "Baseline P95 Ms",
            "type": "number"
          },
          "baseline_stddev_ms": {
            "default": 0.0,
            "title": "Baseline Stddev Ms",
            "type": "number"
          },
          "delta_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta Ms"
          },
          "new": {
            "default": false,
            "title": "New",
            "type": "boolean"
          },
          "observed_ms": {
            "title": "Observed Ms",
            "type": "integer"
          },
          "previous_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Ms"
          },
          "ratio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ratio"
          },
          "sample_count": {
            "default": 0,
            "title": "Sample Count",
            "type": "integer"
          },
          "sigma": {
            "title": "Sigma",
            "type": "number"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "was_slow_before": {
            "default": false,
            "title": "Was Slow Before",
            "type": "boolean"
          }
        },
        "required": [
          "test_fingerprint",
          "observed_ms",
          "baseline_mean_ms",
          "sigma"
        ],
        "title": "DurationSpikeResponse",
        "type": "object"
      },
      "EmailAvailability": {
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "available"
        ],
        "title": "EmailAvailability",
        "type": "object"
      },
      "EmailTrendsRequest": {
        "properties": {
          "chart_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Chart Ids",
            "type": "array"
          },
          "days": {
            "default": 30,
            "title": "Days",
            "type": "integer"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "recipient_email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Email"
          },
          "recipient_emails": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "maxItems": 5,
            "title": "Recipient Emails",
            "type": "array"
          },
          "recipient_user_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 10,
            "title": "Recipient User Ids",
            "type": "array"
          },
          "release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          },
          "suite_name": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "EmailTrendsRequest",
        "type": "object"
      },
      "EmailTrendsResponse": {
        "properties": {
          "recipient": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient"
          },
          "sent_to": {
            "title": "Sent To",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "status",
          "sent_to",
          "window_days"
        ],
        "title": "EmailTrendsResponse",
        "type": "object"
      },
      "EmbeddingFamilyProgress": {
        "properties": {
          "family": {
            "title": "Family",
            "type": "string"
          },
          "processed": {
            "default": 0,
            "title": "Processed",
            "type": "integer"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "family",
          "state"
        ],
        "title": "EmbeddingFamilyProgress",
        "type": "object"
      },
      "EmbeddingGenerationRead": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "tag": {
            "title": "Tag",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "model",
          "prefix",
          "key",
          "tag"
        ],
        "title": "EmbeddingGenerationRead",
        "type": "object"
      },
      "EmbeddingIndexRead": {
        "properties": {
          "active": {
            "$ref": "#/components/schemas/EmbeddingGenerationRead"
          },
          "configured": {
            "$ref": "#/components/schemas/EmbeddingGenerationRead"
          },
          "configured_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Configured Note"
          },
          "families": {
            "items": {
              "$ref": "#/components/schemas/EmbeddingFamilyProgress"
            },
            "title": "Families",
            "type": "array"
          },
          "in_sync": {
            "title": "In Sync",
            "type": "boolean"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "processed": {
            "default": 0,
            "title": "Processed",
            "type": "integer"
          },
          "requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested At"
          },
          "stalled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stalled"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "switched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Switched At"
          },
          "target": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbeddingGenerationRead"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "active",
          "configured",
          "in_sync",
          "status"
        ],
        "title": "EmbeddingIndexRead",
        "type": "object"
      },
      "EnrichedTestCaseDetailResponse": {
        "description": "Versioned additive contract for an executed test case.\n\nInherited flat fields intentionally remain present for existing clients.\nStructured sections provide stable extension points for richer metadata.",
        "properties": {
          "assigned_to_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To User Id"
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/TestAttachmentResponse"
            },
            "title": "Attachments",
            "type": "array"
          },
          "call_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Ms"
          },
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "classification": {
            "$ref": "#/components/schemas/TestCaseClassificationSection"
          },
          "contract": {
            "const": "test-case-detail",
            "default": "test-case-detail",
            "title": "Contract",
            "type": "string"
          },
          "contract_version": {
            "const": "1",
            "default": "1",
            "title": "Contract Version",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "definition": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Definition"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "epic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Epic"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "execution": {
            "$ref": "#/components/schemas/TestCaseExecutionSection"
          },
          "extensions": {
            "additionalProperties": true,
            "title": "Extensions",
            "type": "object"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "failure_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Derived failure-kind triad (US-9.1): product / test_code /\ninfrastructure / unknown. AI-derived from the stored\n``failure_category`` + the FAILED-vs-BROKEN status distinction —\nsee ``app/services/failure_kind.py`` for the mapping rationale.\nNone for non-failing rows (a kind only makes sense for failures).",
            "readOnly": true,
            "title": "Failure Kind"
          },
          "feature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "has_attachments": {
            "default": false,
            "title": "Has Attachments",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "identity": {
            "$ref": "#/components/schemas/TestCaseIdentitySection"
          },
          "links": {
            "items": {
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": "object"
            },
            "title": "Links",
            "type": "array"
          },
          "minio_s3_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minio S3 Prefix"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "package_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Package Name"
          },
          "provenance": {
            "$ref": "#/components/schemas/TestCaseProvenanceSection"
          },
          "schema_version": {
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/TestStatus"
          },
          "step_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Count"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/TestStepResponse"
            },
            "title": "Steps",
            "type": "array"
          },
          "steps_present": {
            "default": false,
            "title": "Steps Present",
            "type": "boolean"
          },
          "story": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Story"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "timing_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Source"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "required": [
          "id",
          "test_run_id",
          "test_name",
          "status",
          "created_at",
          "identity",
          "classification",
          "execution",
          "provenance",
          "failure_kind"
        ],
        "title": "EnrichedTestCaseDetailResponse",
        "type": "object"
      },
      "ErasureBlocker": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ErasureBlocker",
        "type": "object"
      },
      "ErasureLocationCount": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Count"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "measured": {
            "default": true,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "key",
          "label",
          "action"
        ],
        "title": "ErasureLocationCount",
        "type": "object"
      },
      "ErasurePreview": {
        "properties": {
          "blockers": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ErasureBlocker"
            },
            "title": "Blockers",
            "type": "array"
          },
          "changes": {
            "items": {
              "$ref": "#/components/schemas/ErasureLocationCount"
            },
            "title": "Changes",
            "type": "array"
          },
          "display": {
            "title": "Display",
            "type": "string"
          },
          "erasure_job": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubjectJobRead"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "kept": {
            "items": {
              "$ref": "#/components/schemas/ErasureLocationCount"
            },
            "title": "Kept",
            "type": "array"
          },
          "open_items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ErasureLocationCount"
            },
            "title": "Open Items",
            "type": "array"
          },
          "pseudonym": {
            "title": "Pseudonym",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "username",
          "display",
          "role",
          "is_active",
          "pseudonym",
          "changes",
          "kept"
        ],
        "title": "ErasurePreview",
        "type": "object"
      },
      "ErasureRequest": {
        "properties": {
          "confirm_username": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Confirm Username",
            "type": "string"
          }
        },
        "required": [
          "confirm_username"
        ],
        "title": "ErasureRequest",
        "type": "object"
      },
      "EscalationConfig": {
        "additionalProperties": false,
        "properties": {
          "max_escalations": {
            "default": 1,
            "maximum": 3.0,
            "minimum": 0.0,
            "title": "Max Escalations",
            "type": "integer"
          },
          "on_confidence_below": {
            "default": 70,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "On Confidence Below",
            "type": "integer"
          },
          "on_validation_failure": {
            "default": true,
            "title": "On Validation Failure",
            "type": "boolean"
          }
        },
        "title": "EscalationConfig",
        "type": "object"
      },
      "EvalCandidateIn": {
        "additionalProperties": false,
        "properties": {
          "model": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "prompt_version": {
            "anyOf": [
              {
                "maxLength": 400,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Version"
          },
          "tier": {
            "maxLength": 20,
            "minLength": 2,
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "tier"
        ],
        "title": "EvalCandidateIn",
        "type": "object"
      },
      "EvalCandidateResolved": {
        "description": "What the run ACTUALLY replays (stored in ``ai_eval_runs.candidate``).",
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "offline_mode": {
            "title": "Offline Mode",
            "type": "boolean"
          },
          "prompt_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Version"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "requested": {
            "$ref": "#/components/schemas/EvalCandidateIn"
          },
          "tier": {
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "tier",
          "offline_mode",
          "requested"
        ],
        "title": "EvalCandidateResolved",
        "type": "object"
      },
      "EvalMetric": {
        "properties": {
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "n": {
            "default": 0,
            "title": "N",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "measured",
          "kind"
        ],
        "title": "EvalMetric",
        "type": "object"
      },
      "EvalProvenanceHealthResponse": {
        "properties": {
          "has_unresolvable_checksums": {
            "title": "Has Unresolvable Checksums",
            "type": "boolean"
          },
          "missing_checksum_count": {
            "title": "Missing Checksum Count",
            "type": "integer"
          },
          "resolved_runs": {
            "title": "Resolved Runs",
            "type": "integer"
          },
          "stamped_runs": {
            "title": "Stamped Runs",
            "type": "integer"
          },
          "total_runs": {
            "title": "Total Runs",
            "type": "integer"
          },
          "unresolvable_checksums": {
            "items": {
              "type": "string"
            },
            "title": "Unresolvable Checksums",
            "type": "array"
          },
          "unresolvable_run_count": {
            "title": "Unresolvable Run Count",
            "type": "integer"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          },
          "window_end": {
            "format": "date-time",
            "title": "Window End",
            "type": "string"
          },
          "window_start": {
            "format": "date-time",
            "title": "Window Start",
            "type": "string"
          }
        },
        "required": [
          "window_days",
          "window_start",
          "window_end",
          "total_runs",
          "stamped_runs",
          "resolved_runs",
          "missing_checksum_count",
          "unresolvable_run_count",
          "unresolvable_checksums",
          "has_unresolvable_checksums"
        ],
        "title": "EvalProvenanceHealthResponse",
        "type": "object"
      },
      "EvidenceGapItem": {
        "properties": {
          "canonical_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Status"
          },
          "canonical_test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Test Case Id"
          },
          "deleted_observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted Observed At"
          },
          "flaky_confidence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Confidence"
          },
          "flaky_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Score"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_executed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Executed At"
          },
          "owner_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner State"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "title",
          "status"
        ],
        "title": "EvidenceGapItem",
        "type": "object"
      },
      "EvidenceGapListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EvidenceGapItem"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "EvidenceGapListResponse",
        "type": "object"
      },
      "EvidenceReference": {
        "properties": {
          "excerpt": {
            "default": "",
            "title": "Excerpt",
            "type": "string"
          },
          "reference_id": {
            "default": "",
            "title": "Reference Id",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source"
        ],
        "title": "EvidenceReference",
        "type": "object"
      },
      "ExecuteTestPlanItemRequest": {
        "properties": {
          "actual_duration_minutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Duration Minutes"
          },
          "execution_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Notes"
          },
          "execution_status": {
            "enum": [
              "passed",
              "failed",
              "blocked",
              "skipped"
            ],
            "title": "Execution Status",
            "type": "string"
          }
        },
        "required": [
          "execution_status"
        ],
        "title": "ExecuteTestPlanItemRequest",
        "type": "object"
      },
      "ExecutionDayPoint": {
        "properties": {
          "day": {
            "title": "Day",
            "type": "string"
          },
          "runs": {
            "default": 0,
            "title": "Runs",
            "type": "integer"
          },
          "summed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed Ms"
          },
          "summed_runs": {
            "default": 0,
            "title": "Summed Runs",
            "type": "integer"
          },
          "wall_clock_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Clock Ms"
          },
          "wall_runs": {
            "default": 0,
            "title": "Wall Runs",
            "type": "integer"
          }
        },
        "required": [
          "day"
        ],
        "title": "ExecutionDayPoint",
        "type": "object"
      },
      "ExecutionDurationHistogram": {
        "description": "TRND-09: the window's test executions by duration, over fixed\nlog-spaced bucket edges (every bucket present, zero-filled).",
        "properties": {
          "buckets": {
            "items": {
              "$ref": "#/components/schemas/ExecutionHistogramBucket"
            },
            "title": "Buckets",
            "type": "array"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "n": {
            "default": 0,
            "title": "N",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "title": "ExecutionDurationHistogram",
        "type": "object"
      },
      "ExecutionHistogramBucket": {
        "description": "One duration bucket: ``lower_ms <= duration < upper_ms``.",
        "properties": {
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "lower_ms": {
            "title": "Lower Ms",
            "type": "integer"
          },
          "upper_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upper Ms"
          }
        },
        "required": [
          "lower_ms"
        ],
        "title": "ExecutionHistogramBucket",
        "type": "object"
      },
      "ExecutionMetricsResponse": {
        "description": "GET /api/v1/analytics/execution-metrics.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "days": {
            "title": "Days",
            "type": "integer"
          },
          "duration_histogram": {
            "$ref": "#/components/schemas/ExecutionDurationHistogram"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "meta": {
            "additionalProperties": true,
            "title": "Meta",
            "type": "object"
          },
          "per_day": {
            "$ref": "#/components/schemas/ExecutionPerDay"
          },
          "previous_window_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Window Start"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "regressions": {
            "$ref": "#/components/schemas/ExecutionRegressions"
          },
          "slowest_tests": {
            "$ref": "#/components/schemas/ExecutionSlowTests"
          },
          "suites": {
            "$ref": "#/components/schemas/ExecutionSuites"
          },
          "totals": {
            "$ref": "#/components/schemas/ExecutionTotals"
          },
          "window_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Window End"
          },
          "window_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Window Start"
          }
        },
        "required": [
          "days",
          "suites",
          "regressions",
          "slowest_tests"
        ],
        "title": "ExecutionMetricsResponse",
        "type": "object"
      },
      "ExecutionPerDay": {
        "properties": {
          "grain": {
            "default": "run",
            "title": "Grain",
            "type": "string"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/ExecutionDayPoint"
            },
            "title": "Points",
            "type": "array"
          }
        },
        "title": "ExecutionPerDay",
        "type": "object"
      },
      "ExecutionPercentiles": {
        "description": "p50 / p95 of one figure over a set of executions.",
        "properties": {
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "n": {
            "default": 0,
            "title": "N",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "title": "ExecutionPercentiles",
        "type": "object"
      },
      "ExecutionRegressionRule": {
        "properties": {
          "baseline_runs": {
            "title": "Baseline Runs",
            "type": "integer"
          },
          "min_baseline_runs": {
            "title": "Min Baseline Runs",
            "type": "integer"
          },
          "ratio": {
            "title": "Ratio",
            "type": "number"
          },
          "recent_runs": {
            "title": "Recent Runs",
            "type": "integer"
          },
          "same_branch": {
            "default": true,
            "title": "Same Branch",
            "type": "boolean"
          },
          "test_min_samples": {
            "title": "Test Min Samples",
            "type": "integer"
          },
          "test_ratio": {
            "title": "Test Ratio",
            "type": "number"
          }
        },
        "required": [
          "recent_runs",
          "baseline_runs",
          "min_baseline_runs",
          "ratio",
          "test_min_samples",
          "test_ratio"
        ],
        "title": "ExecutionRegressionRule",
        "type": "object"
      },
      "ExecutionRegressions": {
        "properties": {
          "rule": {
            "$ref": "#/components/schemas/ExecutionRegressionRule"
          },
          "suites": {
            "$ref": "#/components/schemas/ExecutionSuiteRegressions"
          },
          "tests": {
            "$ref": "#/components/schemas/ExecutionTestRegressions"
          }
        },
        "required": [
          "rule",
          "suites",
          "tests"
        ],
        "title": "ExecutionRegressions",
        "type": "object"
      },
      "ExecutionSlowTest": {
        "properties": {
          "max_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Ms"
          },
          "n": {
            "default": 0,
            "title": "N",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          }
        },
        "required": [
          "test_fingerprint"
        ],
        "title": "ExecutionSlowTest",
        "type": "object"
      },
      "ExecutionSlowTests": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExecutionSlowTest"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "limit"
        ],
        "title": "ExecutionSlowTests",
        "type": "object"
      },
      "ExecutionSuiteRegression": {
        "properties": {
          "baseline_median_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Median Ms"
          },
          "baseline_runs": {
            "default": 0,
            "title": "Baseline Runs",
            "type": "integer"
          },
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "latest_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run At"
          },
          "latest_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run Id"
          },
          "metric": {
            "title": "Metric",
            "type": "string"
          },
          "observed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed Ms"
          },
          "ratio": {
            "title": "Ratio",
            "type": "number"
          },
          "recent_median_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recent Median Ms"
          },
          "recent_runs": {
            "default": 0,
            "title": "Recent Runs",
            "type": "integer"
          },
          "suite_key": {
            "title": "Suite Key",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "was_slow_before": {
            "default": false,
            "title": "Was Slow Before",
            "type": "boolean"
          }
        },
        "required": [
          "suite_key",
          "metric",
          "ratio"
        ],
        "title": "ExecutionSuiteRegression",
        "type": "object"
      },
      "ExecutionSuiteRegressions": {
        "properties": {
          "considered": {
            "default": 0,
            "title": "Considered",
            "type": "integer"
          },
          "evaluated": {
            "default": 0,
            "title": "Evaluated",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExecutionSuiteRegression"
            },
            "title": "Items",
            "type": "array"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "ExecutionSuiteRegressions",
        "type": "object"
      },
      "ExecutionSuiteRow": {
        "properties": {
          "current": {
            "$ref": "#/components/schemas/ExecutionSuiteWindow"
          },
          "previous": {
            "$ref": "#/components/schemas/ExecutionSuiteWindow"
          },
          "suite_key": {
            "title": "Suite Key",
            "type": "string"
          },
          "suite_name": {
            "title": "Suite Name",
            "type": "string"
          },
          "summed_p50_change_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed P50 Change Pct"
          },
          "summed_p95_change_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed P95 Change Pct"
          },
          "wall_p50_change_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall P50 Change Pct"
          },
          "wall_p95_change_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall P95 Change Pct"
          }
        },
        "required": [
          "suite_key",
          "suite_name",
          "current",
          "previous"
        ],
        "title": "ExecutionSuiteRow",
        "type": "object"
      },
      "ExecutionSuiteWindow": {
        "properties": {
          "runs": {
            "default": 0,
            "title": "Runs",
            "type": "integer"
          },
          "summed": {
            "$ref": "#/components/schemas/ExecutionPercentiles"
          },
          "wall": {
            "$ref": "#/components/schemas/ExecutionPercentiles"
          }
        },
        "title": "ExecutionSuiteWindow",
        "type": "object"
      },
      "ExecutionSuites": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExecutionSuiteRow"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "limit"
        ],
        "title": "ExecutionSuites",
        "type": "object"
      },
      "ExecutionTestRegression": {
        "properties": {
          "baseline_mean_ms": {
            "title": "Baseline Mean Ms",
            "type": "number"
          },
          "baseline_p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline P95 Ms"
          },
          "ratio": {
            "title": "Ratio",
            "type": "number"
          },
          "sample_count": {
            "default": 0,
            "title": "Sample Count",
            "type": "integer"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "window_n": {
            "default": 0,
            "title": "Window N",
            "type": "integer"
          },
          "window_p50_ms": {
            "title": "Window P50 Ms",
            "type": "number"
          }
        },
        "required": [
          "test_fingerprint",
          "baseline_mean_ms",
          "window_p50_ms",
          "ratio"
        ],
        "title": "ExecutionTestRegression",
        "type": "object"
      },
      "ExecutionTestRegressions": {
        "properties": {
          "considered": {
            "default": 0,
            "title": "Considered",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExecutionTestRegression"
            },
            "title": "Items",
            "type": "array"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "ExecutionTestRegressions",
        "type": "object"
      },
      "ExecutionTotals": {
        "properties": {
          "parallelism": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallelism"
          },
          "runs": {
            "default": 0,
            "title": "Runs",
            "type": "integer"
          },
          "summed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed Ms"
          },
          "summed_runs": {
            "default": 0,
            "title": "Summed Runs",
            "type": "integer"
          },
          "wall_clock_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Clock Ms"
          },
          "wall_runs": {
            "default": 0,
            "title": "Wall Runs",
            "type": "integer"
          }
        },
        "title": "ExecutionTotals",
        "type": "object"
      },
      "ExportChoice": {
        "description": "``DeletionExecuteRequest.export``. Validated in the service (fixed 422 sentence), not by ``Literal``.",
        "properties": {
          "target": {
            "title": "Target",
            "type": "string"
          },
          "tier": {
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "tier",
          "target"
        ],
        "title": "ExportChoice",
        "type": "object"
      },
      "ExportEstimate": {
        "description": "What archiving the DELETABLE runs of a criteria preview would cost and reclaim.",
        "properties": {
          "collect_ttl_hours": {
            "title": "Collect Ttl Hours",
            "type": "integer"
          },
          "exportable": {
            "title": "Exportable",
            "type": "boolean"
          },
          "max_bytes": {
            "title": "Max Bytes",
            "type": "integer"
          },
          "note": {
            "default": "Archive, not a backup — it cannot be re-imported.",
            "title": "Note",
            "type": "string"
          },
          "reclaim_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reclaim Bytes"
          },
          "reclaim_measured": {
            "default": false,
            "title": "Reclaim Measured",
            "type": "boolean"
          },
          "reclaim_mongo_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reclaim Mongo Bytes"
          },
          "reclaim_object_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reclaim Object Bytes"
          },
          "refusal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refusal"
          },
          "run_count": {
            "title": "Run Count",
            "type": "integer"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/ExportTierEstimate"
            },
            "title": "Tiers",
            "type": "array"
          }
        },
        "required": [
          "run_count",
          "exportable",
          "max_bytes",
          "collect_ttl_hours"
        ],
        "title": "ExportEstimate",
        "type": "object"
      },
      "ExportTierEstimate": {
        "description": "One tier's archive size estimate. ``None`` = not measured, never 0.",
        "properties": {
          "archive_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Bytes"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "over_cap": {
            "default": false,
            "title": "Over Cap",
            "type": "boolean"
          },
          "tier": {
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "tier"
        ],
        "title": "ExportTierEstimate",
        "type": "object"
      },
      "FailureCategory": {
        "enum": [
          "PRODUCT_BUG",
          "INFRASTRUCTURE",
          "TEST_DATA",
          "AUTOMATION_DEFECT",
          "FLAKY",
          "UNKNOWN"
        ],
        "title": "FailureCategory",
        "type": "string"
      },
      "FallbackChainEntry": {
        "description": "One analysis tier and whether it can actually run right now.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code"
          }
        },
        "required": [
          "mode",
          "available"
        ],
        "title": "FallbackChainEntry",
        "type": "object"
      },
      "FeatureFlagCreate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled_global": {
            "default": false,
            "title": "Enabled Global",
            "type": "boolean"
          },
          "enabled_projects": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Projects"
          },
          "enabled_roles": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Roles"
          },
          "key": {
            "maxLength": 80,
            "minLength": 2,
            "pattern": "^[a-z][a-z0-9_]*$",
            "title": "Key",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "rollout_percent": {
            "default": 100,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Rollout Percent",
            "type": "integer"
          }
        },
        "required": [
          "key"
        ],
        "title": "FeatureFlagCreate",
        "type": "object"
      },
      "FeatureFlagHistoryEntry": {
        "description": "One audit row of a flag (W17 ADM-07): what changed, who, when and why. Field names only.",
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Name"
          },
          "changed_fields": {
            "items": {
              "type": "string"
            },
            "title": "Changed Fields",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "action"
        ],
        "title": "FeatureFlagHistoryEntry",
        "type": "object"
      },
      "FeatureFlagResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled_global": {
            "title": "Enabled Global",
            "type": "boolean"
          },
          "enabled_projects": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Projects"
          },
          "enabled_roles": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Roles"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "last_change_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Change Reason"
          },
          "rollout_percent": {
            "title": "Rollout Percent",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Name"
          },
          "updated_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By User Id"
          }
        },
        "required": [
          "id",
          "key",
          "enabled_global",
          "rollout_percent",
          "created_at",
          "updated_at"
        ],
        "title": "FeatureFlagResponse",
        "type": "object"
      },
      "FeedbackRating": {
        "enum": [
          "correct",
          "incorrect",
          "partially_correct"
        ],
        "title": "FeedbackRating",
        "type": "string"
      },
      "FeedbackRequest": {
        "properties": {
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "corrected_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FailureCategory"
              },
              {
                "type": "null"
              }
            ]
          },
          "corrected_root_cause": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Corrected Root Cause"
          },
          "rating": {
            "$ref": "#/components/schemas/FeedbackRating"
          }
        },
        "required": [
          "rating"
        ],
        "title": "FeedbackRequest",
        "type": "object"
      },
      "FirstTimeResetRequest": {
        "description": "Used for forced password reset on first login — no current password required.",
        "properties": {
          "confirm_password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Confirm Password",
            "type": "string"
          },
          "new_password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "New Password",
            "type": "string"
          }
        },
        "required": [
          "new_password",
          "confirm_password"
        ],
        "title": "FirstTimeResetRequest",
        "type": "object"
      },
      "FixOutcomeRequest": {
        "description": "Outcome of a fix informed by TestLookup's diagnosis.\n\n``outcome`` is a closed vocabulary validated here (the values map onto\nFeedbackRating in the service); ``fingerprint`` is the stable test\nidentity (sha256(class::test)[:16]) the analytics surface uses.",
        "properties": {
          "comment": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "fingerprint": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Fingerprint",
            "type": "string"
          },
          "outcome": {
            "enum": [
              "fixed",
              "not_fixed",
              "reverted"
            ],
            "title": "Outcome",
            "type": "string"
          },
          "reference": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference"
          }
        },
        "required": [
          "fingerprint",
          "outcome"
        ],
        "title": "FixOutcomeRequest",
        "type": "object"
      },
      "FixerConfigExtension": {
        "additionalProperties": false,
        "properties": {
          "budgets": {
            "$ref": "#/components/schemas/FixerPolicyBudgets"
          },
          "runner": {
            "$ref": "#/components/schemas/FixerRunnerExtension"
          },
          "schedule": {
            "default": "off",
            "title": "Schedule",
            "type": "string"
          },
          "test_globs": {
            "items": {
              "type": "string"
            },
            "title": "Test Globs",
            "type": "array"
          }
        },
        "title": "FixerConfigExtension",
        "type": "object"
      },
      "FixerPolicyBudgets": {
        "additionalProperties": false,
        "properties": {
          "max_attempts_per_test": {
            "default": 2,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Max Attempts Per Test",
            "type": "integer"
          },
          "max_concurrent_open_prs": {
            "default": 2,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Max Concurrent Open Prs",
            "type": "integer"
          },
          "max_tests_per_run": {
            "default": 3,
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Max Tests Per Run",
            "type": "integer"
          },
          "validation_reruns": {
            "default": 5,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Validation Reruns",
            "type": "integer"
          }
        },
        "title": "FixerPolicyBudgets",
        "type": "object"
      },
      "FixerRunnerExtension": {
        "additionalProperties": false,
        "properties": {
          "command_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Command Template"
          },
          "runner_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runner Image"
          },
          "type": {
            "default": "none",
            "title": "Type",
            "type": "string"
          },
          "workflow_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Ref"
          }
        },
        "title": "FixerRunnerExtension",
        "type": "object"
      },
      "FlakyCoachEntry": {
        "description": "Single flaky test with coaching recommendation.",
        "properties": {
          "error_signature_diversity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Signature Diversity"
          },
          "failed_runs": {
            "default": 0,
            "title": "Failed Runs",
            "type": "integer"
          },
          "failing_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Step"
          },
          "failing_step_detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Step Detail"
          },
          "failure_rate": {
            "title": "Failure Rate",
            "type": "number"
          },
          "flaky_confidence_high": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Confidence High"
          },
          "flaky_confidence_low": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Confidence Low"
          },
          "flaky_likely_cause": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Likely Cause"
          },
          "flaky_likely_cause_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Likely Cause Code"
          },
          "flaky_score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlakyScoreBrief"
              },
              {
                "type": "null"
              }
            ]
          },
          "flaky_since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flaky Since"
          },
          "impact_score": {
            "default": 0.0,
            "title": "Impact Score",
            "type": "number"
          },
          "in_run_retry_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Run Retry Rate"
          },
          "intermittency_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intermittency Label"
          },
          "is_flaky_confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Flaky Confidence"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "quarantine_recommendation": {
            "default": "MONITOR",
            "title": "Quarantine Recommendation",
            "type": "string"
          },
          "stabilization_actions": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Stabilization Actions",
            "type": "array"
          },
          "stack_trace_diversity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stack Trace Diversity"
          },
          "status_history": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Status History",
            "type": "array"
          },
          "status_volatility": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Volatility"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "total_runs": {
            "default": 0,
            "title": "Total Runs",
            "type": "integer"
          }
        },
        "required": [
          "test_fingerprint",
          "test_name",
          "failure_rate"
        ],
        "title": "FlakyCoachEntry",
        "type": "object"
      },
      "FlakyCoachResponse": {
        "description": "Project-level flaky coach leaderboard.",
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FlakyCoachEntry"
            },
            "title": "Entries",
            "type": "array"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "quarantine_candidates": {
            "default": 0,
            "title": "Quarantine Candidates",
            "type": "integer"
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlakyCoachScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_flaky": {
            "default": 0,
            "title": "Total Flaky",
            "type": "integer"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "FlakyCoachResponse",
        "type": "object"
      },
      "FlakyCoachScope": {
        "description": "What each number in the leaderboard is scoped to.\n\nA filtered list LOOKS release-scoped, and here only half of it is:\nmembership is, the impact score is not. Stated in the payload rather than\nonly in the docs, because the number is what gets read — a reader who takes\na score as \"how flaky during 2.4.0\" would be wrong, and nothing in a bare\nfiltered list would tell them.",
        "properties": {
          "membership": {
            "default": "project",
            "title": "Membership",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          },
          "score": {
            "default": "project_window",
            "title": "Score",
            "type": "string"
          }
        },
        "title": "FlakyCoachScope",
        "type": "object"
      },
      "FlakyCountCriteria": {
        "description": "What a flaky-test count actually measured.\n\nA bare count cannot distinguish \"this project has no flaky tests\" from\n\"no test cleared this particular bar\", and surfaces applying different bars\nthen look like they contradict each other.",
        "properties": {
          "max_failure_ratio": {
            "description": "Upper bound of the failure ratio. Above it the test is treated as broken rather than flaky — it is not intermittent, it is failing.",
            "title": "Max Failure Ratio",
            "type": "number"
          },
          "min_failure_ratio": {
            "description": "Lower bound of the failure ratio. Below it the test is treated as healthy rather than flaky.",
            "title": "Min Failure Ratio",
            "type": "number"
          },
          "min_flips": {
            "description": "Pass<->fail transitions required, in run order. This is what separates a flaky test from a persistent regression, which a failure ratio alone cannot do.",
            "title": "Min Flips",
            "type": "integer"
          },
          "min_runs": {
            "description": "Runs a test must have inside the window to be judged at all. A test with fewer is not counted as flaky and not counted as healthy — there is not enough history to say.",
            "title": "Min Runs",
            "type": "integer"
          },
          "window_runs": {
            "description": "How many of each test's most recent runs were examined.",
            "title": "Window Runs",
            "type": "integer"
          }
        },
        "required": [
          "window_runs",
          "min_runs",
          "min_flips",
          "min_failure_ratio",
          "max_failure_ratio"
        ],
        "title": "FlakyCountCriteria",
        "type": "object"
      },
      "FlakyQuarantineRead": {
        "properties": {
          "approved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By User Id"
          },
          "consecutive_passes": {
            "default": 0,
            "title": "Consecutive Passes",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "defect_external_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect External Status"
          },
          "defect_external_status_conflict": {
            "default": false,
            "title": "Defect External Status Conflict",
            "type": "boolean"
          },
          "defect_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Id"
          },
          "defect_jira_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Jira Key"
          },
          "defect_jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Jira Url"
          },
          "detected_at": {
            "format": "date-time",
            "title": "Detected At",
            "type": "string"
          },
          "detection_method": {
            "title": "Detection Method",
            "type": "string"
          },
          "fail_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fail Count"
          },
          "flip_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flip Rate"
          },
          "flip_window_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flip Window Size"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "pass_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Count"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "proposed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposed At"
          },
          "quarantine_duration_days": {
            "title": "Quarantine Duration Days",
            "type": "integer"
          },
          "quarantine_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quarantine Expires At"
          },
          "quarantine_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quarantine Start"
          },
          "rationale": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rationale"
          },
          "ready_to_promote": {
            "default": false,
            "title": "Ready To Promote",
            "type": "boolean"
          },
          "recheck_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recheck At"
          },
          "rejected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejected At"
          },
          "rejected_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejected By User Id"
          },
          "reviewer_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewer Notes"
          },
          "sla_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sla Days"
          },
          "stale": {
            "default": false,
            "title": "Stale",
            "type": "boolean"
          },
          "stale_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stale At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "test_fingerprint",
          "status",
          "detection_method",
          "detected_at",
          "quarantine_duration_days",
          "created_at",
          "updated_at"
        ],
        "title": "FlakyQuarantineRead",
        "type": "object"
      },
      "FlakyScoreBrief": {
        "description": "The four-signal score of a Detected row; plain ``str`` vocabularies (W09 FLK-03).",
        "properties": {
          "components": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FlakyScoreComponent"
            },
            "title": "Components",
            "type": "array"
          },
          "computed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Computed At"
          },
          "confidence": {
            "default": "none",
            "title": "Confidence",
            "type": "string"
          },
          "min_observations": {
            "default": 5,
            "title": "Min Observations",
            "type": "integer"
          },
          "observations": {
            "default": 0,
            "title": "Observations",
            "type": "integer"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "window_days": {
            "default": 30,
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "status"
        ],
        "title": "FlakyScoreBrief",
        "type": "object"
      },
      "FlakyScoreComponent": {
        "description": "One of the four signals of the nightly flakiness score (W09 FLK-03).",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "number"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "name",
          "value",
          "weight"
        ],
        "title": "FlakyScoreComponent",
        "type": "object"
      },
      "FrontendError": {
        "properties": {
          "component_stack": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component Stack"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "stack": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stack"
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          }
        },
        "required": [
          "type",
          "message",
          "url"
        ],
        "title": "FrontendError",
        "type": "object"
      },
      "FrontendTelemetryBatch": {
        "properties": {
          "errors": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FrontendError"
            },
            "title": "Errors",
            "type": "array"
          },
          "vitals": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/WebVitalReport"
            },
            "title": "Vitals",
            "type": "array"
          }
        },
        "title": "FrontendTelemetryBatch",
        "type": "object"
      },
      "GatedChannel": {
        "properties": {
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "channel",
          "label"
        ],
        "title": "GatedChannel",
        "type": "object"
      },
      "GenerationBatchResponse": {
        "properties": {
          "cases_accepted": {
            "title": "Cases Accepted",
            "type": "integer"
          },
          "cases_generated": {
            "title": "Cases Generated",
            "type": "integer"
          },
          "cases_rejected": {
            "title": "Cases Rejected",
            "type": "integer"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "coverage_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Score"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "generation_mode": {
            "title": "Generation Mode",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "llm_model_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model Used"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "generation_mode",
          "cases_generated",
          "cases_accepted",
          "cases_rejected",
          "status",
          "created_at"
        ],
        "title": "GenerationBatchResponse",
        "type": "object"
      },
      "GitHubAppInstallUrl": {
        "properties": {
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_in"
        ],
        "title": "GitHubAppInstallUrl",
        "type": "object"
      },
      "GitHubAppSettingsRead": {
        "description": "W19 INT-06: the deployment's GitHub App. Secrets are never returned, only whether they are set.",
        "properties": {
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "configured": {
            "default": false,
            "title": "Configured",
            "type": "boolean"
          },
          "private_key_set": {
            "default": false,
            "title": "Private Key Set",
            "type": "boolean"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "webhook_secret_set": {
            "default": false,
            "title": "Webhook Secret Set",
            "type": "boolean"
          }
        },
        "title": "GitHubAppSettingsRead",
        "type": "object"
      },
      "GitHubAppSettingsWrite": {
        "properties": {
          "app_id": {
            "maxLength": 20,
            "minLength": 1,
            "pattern": "^[0-9]+$",
            "title": "App Id",
            "type": "string"
          },
          "private_key": {
            "anyOf": [
              {
                "maxLength": 10000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Private Key"
          },
          "slug": {
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9-]+$",
            "title": "Slug",
            "type": "string"
          },
          "webhook_secret": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Secret"
          }
        },
        "required": [
          "app_id",
          "slug"
        ],
        "title": "GitHubAppSettingsWrite",
        "type": "object"
      },
      "GitHubAppSetupCallback": {
        "properties": {
          "installation_id": {
            "minimum": 1.0,
            "title": "Installation Id",
            "type": "integer"
          },
          "state": {
            "maxLength": 600,
            "minLength": 10,
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "installation_id",
          "state"
        ],
        "title": "GitHubAppSetupCallback",
        "type": "object"
      },
      "GitHubAppSetupResult": {
        "properties": {
          "auth_kind": {
            "title": "Auth Kind",
            "type": "string"
          },
          "installation_id": {
            "title": "Installation Id",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "installation_id",
          "auth_kind"
        ],
        "title": "GitHubAppSetupResult",
        "type": "object"
      },
      "GitHubConnectionTestResponse": {
        "properties": {
          "auth_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Kind"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "repo_html_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repo Html Url"
          },
          "status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Code"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "GitHubConnectionTestResponse",
        "type": "object"
      },
      "GitHubIntegrationRead": {
        "properties": {
          "api_base_url": {
            "title": "Api Base Url",
            "type": "string"
          },
          "auth_kind": {
            "default": "pat",
            "title": "Auth Kind",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "has_pat": {
            "title": "Has Pat",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "installation_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Installation Id"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_error_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error At"
          },
          "last_posted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Posted At"
          },
          "pr_comment_mode": {
            "default": "failures_only",
            "title": "Pr Comment Mode",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "repo_name": {
            "title": "Repo Name",
            "type": "string"
          },
          "repo_owner": {
            "title": "Repo Owner",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "enabled",
          "repo_owner",
          "repo_name",
          "api_base_url",
          "has_pat",
          "created_at",
          "updated_at"
        ],
        "title": "GitHubIntegrationRead",
        "type": "object"
      },
      "GitHubIntegrationWrite": {
        "properties": {
          "api_base_url": {
            "default": "https://api.github.com",
            "maxLength": 500,
            "title": "Api Base Url",
            "type": "string"
          },
          "auth_kind": {
            "anyOf": [
              {
                "enum": [
                  "pat",
                  "app"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Kind"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "pat": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pat"
          },
          "pr_comment_mode": {
            "default": "failures_only",
            "enum": [
              "off",
              "failures_only",
              "always"
            ],
            "title": "Pr Comment Mode",
            "type": "string"
          },
          "repo_name": {
            "maxLength": 255,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._-]+$",
            "title": "Repo Name",
            "type": "string"
          },
          "repo_owner": {
            "maxLength": 255,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._-]+$",
            "title": "Repo Owner",
            "type": "string"
          }
        },
        "required": [
          "repo_owner",
          "repo_name"
        ],
        "title": "GitHubIntegrationWrite",
        "type": "object"
      },
      "GitLabConfigRead": {
        "description": "GET/PUT response for ``/projects/{id}/integrations/gitlab``.\n\nStructurally token-free — the PAT can never leak through this model;\n``has_token`` is the only token signal. ``mr_comment_mode`` is a plain\n``str`` on the read side (GitHub-sibling pattern): the column is an\nunconstrained ``String(20)``, and a drifted row value must degrade\ngracefully instead of turning GET into a ResponseValidationError 500.",
        "properties": {
          "base_url": {
            "default": "https://gitlab.com",
            "maxLength": 500,
            "title": "Base Url",
            "type": "string"
          },
          "commit_status_enabled": {
            "default": true,
            "title": "Commit Status Enabled",
            "type": "boolean"
          },
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          },
          "has_token": {
            "default": false,
            "title": "Has Token",
            "type": "boolean"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_error_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error At"
          },
          "mr_comment_mode": {
            "default": "failures_only",
            "title": "Mr Comment Mode",
            "type": "string"
          },
          "project_path": {
            "default": "",
            "maxLength": 500,
            "title": "Project Path",
            "type": "string"
          }
        },
        "title": "GitLabConfigRead",
        "type": "object"
      },
      "GitLabConfigWrite": {
        "description": "PUT body for ``/projects/{id}/integrations/gitlab``.\n\n``token`` is the optional write-only field: ``None`` leaves the stored\nsecret alone, ``\"\"`` clears it, any value sets/rotates it. The PAT is\nNEVER present on the read side (see ``GitLabConfigRead``).",
        "properties": {
          "base_url": {
            "default": "https://gitlab.com",
            "maxLength": 500,
            "pattern": "^https?://",
            "title": "Base Url",
            "type": "string"
          },
          "commit_status_enabled": {
            "default": true,
            "title": "Commit Status Enabled",
            "type": "boolean"
          },
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          },
          "mr_comment_mode": {
            "default": "failures_only",
            "enum": [
              "off",
              "failures_only",
              "always"
            ],
            "title": "Mr Comment Mode",
            "type": "string"
          },
          "project_path": {
            "default": "",
            "maxLength": 500,
            "title": "Project Path",
            "type": "string"
          },
          "token": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token"
          }
        },
        "title": "GitLabConfigWrite",
        "type": "object"
      },
      "GitLabConnectionTestResponse": {
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          },
          "project_id_resolved": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id Resolved"
          }
        },
        "required": [
          "ok",
          "detail"
        ],
        "title": "GitLabConnectionTestResponse",
        "type": "object"
      },
      "GroupMappingIn": {
        "properties": {
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "role"
        ],
        "title": "GroupMappingIn",
        "type": "object"
      },
      "GroupMappingsIn": {
        "properties": {
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/GroupMappingIn"
            },
            "maxItems": 200,
            "title": "Mappings",
            "type": "array"
          }
        },
        "title": "GroupMappingsIn",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HoldRefRead": {
        "description": "A live retention hold as it appears inside another answer.",
        "properties": {
          "entity_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id"
          },
          "entity_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Label"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "hold_id": {
            "format": "uuid",
            "title": "Hold Id",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "hold_id",
          "entity_type",
          "reason"
        ],
        "title": "HoldRefRead",
        "type": "object"
      },
      "HttpExchangeIn": {
        "description": "One HTTP request/response a test made (AGT-14). Lenient on purpose: a bad exchange is DROPPED by the\nlist pre-filter (IngestTestResult / LiveHttpExchangesIn), never a 422 that costs the batch its results.",
        "properties": {
          "duration_ms": {
            "anyOf": [
              {
                "maximum": 86400000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint"
          },
          "error": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "method": {
            "title": "Method",
            "type": "string"
          },
          "redaction_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Redaction Counts",
            "type": "object"
          },
          "request": {
            "$ref": "#/components/schemas/HttpMessageIn"
          },
          "response": {
            "$ref": "#/components/schemas/HttpMessageIn"
          },
          "response_schema": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Schema"
          },
          "response_schema_state": {
            "default": "empty",
            "title": "Response Schema State",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "anyOf": [
              {
                "maximum": 599.0,
                "minimum": 100.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "url": {
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "method",
          "url"
        ],
        "title": "HttpExchangeIn",
        "type": "object"
      },
      "HttpExchangeListResponse": {
        "description": "GET /api/v1/runs/{run_id}/tests/{test_id}/http-exchanges.",
        "properties": {
          "dropped": {
            "title": "Dropped",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/HttpExchangeRead"
            },
            "title": "Items",
            "type": "array"
          },
          "run_cap_reached": {
            "title": "Run Cap Reached",
            "type": "boolean"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "dropped",
          "run_cap_reached"
        ],
        "title": "HttpExchangeListResponse",
        "type": "object"
      },
      "HttpExchangeRead": {
        "properties": {
          "captured_at": {
            "format": "date-time",
            "title": "Captured At",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "endpoint": {
            "title": "Endpoint",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          },
          "method": {
            "title": "Method",
            "type": "string"
          },
          "redacted": {
            "title": "Redacted",
            "type": "boolean"
          },
          "request": {
            "$ref": "#/components/schemas/HttpMessageRead"
          },
          "response": {
            "$ref": "#/components/schemas/HttpMessageRead"
          },
          "response_schema_state": {
            "title": "Response Schema State",
            "type": "string"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "seq",
          "method",
          "endpoint",
          "url",
          "request",
          "response",
          "response_schema_state",
          "source",
          "captured_at",
          "redacted"
        ],
        "title": "HttpExchangeRead",
        "type": "object"
      },
      "HttpMessageIn": {
        "description": "One side of an exchange, as the SDK sends it (cut + redacted by ``HttpExchangeIn``).",
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "body_bytes": {
            "default": 0,
            "title": "Body Bytes",
            "type": "integer"
          },
          "body_truncated": {
            "default": false,
            "title": "Body Truncated",
            "type": "boolean"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Headers",
            "type": "object"
          }
        },
        "title": "HttpMessageIn",
        "type": "object"
      },
      "HttpMessageRead": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "body_bytes": {
            "default": 0,
            "title": "Body Bytes",
            "type": "integer"
          },
          "body_truncated": {
            "default": false,
            "title": "Body Truncated",
            "type": "boolean"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Headers",
            "type": "object"
          }
        },
        "required": [
          "headers"
        ],
        "title": "HttpMessageRead",
        "type": "object"
      },
      "IdentityEventListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/IdentityEventResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "items"
        ],
        "title": "IdentityEventListResponse",
        "type": "object"
      },
      "IdentityEventResponse": {
        "properties": {
          "actor_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "event_type": {
            "$ref": "#/components/schemas/IdentityEventType"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "sso_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Config Id"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "event_type",
          "success",
          "created_at"
        ],
        "title": "IdentityEventResponse",
        "type": "object"
      },
      "IdentityEventType": {
        "enum": [
          "SSO_LOGIN",
          "SSO_LOGIN_FAILED",
          "SSO_CONFIG_CREATED",
          "SSO_CONFIG_UPDATED",
          "SSO_CONFIG_DELETED",
          "SSO_TEST_CONNECTION",
          "SCIM_USER_CREATED",
          "SCIM_USER_UPDATED",
          "SCIM_USER_DEACTIVATED",
          "SCIM_USER_REACTIVATED",
          "SCIM_SYNC_ERROR",
          "SCIM_TOKEN_CREATED",
          "SCIM_TOKEN_REVOKED",
          "ADMIN_FALLBACK_LOGIN",
          "JIT_PROVISIONED",
          "ROLE_MAPPED",
          "SSO_LOGOUT",
          "MFA_ENROLL_STARTED",
          "MFA_ENABLED",
          "MFA_DISABLED",
          "MFA_VERIFY_SUCCESS",
          "MFA_VERIFY_FAILED",
          "MFA_RECOVERY_CODE_USED",
          "MFA_RECOVERY_CODES_REISSUED",
          "MFA_BREAKGLASS_RESET",
          "MFA_POLICY_UPDATED",
          "ACCOUNT_LOCKED",
          "ACCOUNT_UNLOCKED",
          "API_KEY_REVOKED"
        ],
        "title": "IdentityEventType",
        "type": "string"
      },
      "IdentitySyncStatus": {
        "description": "Aggregated sync health for the admin dashboard.",
        "properties": {
          "last_scim_sync_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Scim Sync At"
          },
          "last_sso_login_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sso Login At"
          },
          "recent_events": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/IdentityEventResponse"
            },
            "title": "Recent Events",
            "type": "array"
          },
          "recent_failures": {
            "default": 0,
            "title": "Recent Failures",
            "type": "integer"
          },
          "sso_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Config Id"
          },
          "sso_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Display Name"
          },
          "total_federated_users": {
            "default": 0,
            "title": "Total Federated Users",
            "type": "integer"
          }
        },
        "title": "IdentitySyncStatus",
        "type": "object"
      },
      "ImportDuplicateOf": {
        "properties": {
          "case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Case Id"
          },
          "row": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Row"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "ImportDuplicateOf",
        "type": "object"
      },
      "ImportHeaderReport": {
        "properties": {
          "ignored": {
            "items": {
              "type": "string"
            },
            "title": "Ignored",
            "type": "array"
          },
          "recognised": {
            "items": {
              "type": "string"
            },
            "title": "Recognised",
            "type": "array"
          },
          "unknown": {
            "items": {
              "type": "string"
            },
            "title": "Unknown",
            "type": "array"
          }
        },
        "required": [
          "recognised",
          "ignored",
          "unknown"
        ],
        "title": "ImportHeaderReport",
        "type": "object"
      },
      "ImportRowResult": {
        "properties": {
          "case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Case Id"
          },
          "duplicate_of": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ImportDuplicateOf"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "title": "Outcome",
            "type": "string"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "title": "Reasons",
            "type": "array"
          },
          "row": {
            "title": "Row",
            "type": "integer"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "row",
          "outcome"
        ],
        "title": "ImportRowResult",
        "type": "object"
      },
      "ImportSummary": {
        "properties": {
          "create": {
            "title": "Create",
            "type": "integer"
          },
          "created": {
            "default": 0,
            "title": "Created",
            "type": "integer"
          },
          "duplicate": {
            "title": "Duplicate",
            "type": "integer"
          },
          "invalid": {
            "title": "Invalid",
            "type": "integer"
          },
          "rows": {
            "title": "Rows",
            "type": "integer"
          }
        },
        "required": [
          "rows",
          "create",
          "duplicate",
          "invalid"
        ],
        "title": "ImportSummary",
        "type": "object"
      },
      "IngestPayload": {
        "description": "JSON batch ingest request body for POST /api/v1/ingest.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Build Number",
            "type": "string"
          },
          "ci_actor": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Actor"
          },
          "ci_provider": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Provider"
          },
          "ci_repo": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Repo"
          },
          "ci_run_url": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Run Url"
          },
          "commit_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Hash"
          },
          "commit_range": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SuppliedCommit"
                },
                "type": "array"
              },
              {
                "$ref": "#/components/schemas/SuppliedCommitRange"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Range"
          },
          "environment": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          },
          "framework": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Framework"
          },
          "jenkins_job": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jenkins Job"
          },
          "pr_number": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pr Number"
          },
          "project_id": {
            "description": "Project UUID",
            "title": "Project Id",
            "type": "string"
          },
          "release_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Name"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/IngestTestResult"
            },
            "maxItems": 50000,
            "minItems": 1,
            "title": "Results",
            "type": "array"
          },
          "run_ai": {
            "default": true,
            "description": "False skips the AI analysis and the suite comparison for this run.",
            "title": "Run Ai",
            "type": "boolean"
          },
          "run_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "api",
            "title": "Trigger Source"
          }
        },
        "required": [
          "project_id",
          "build_number",
          "results"
        ],
        "title": "IngestPayload",
        "type": "object"
      },
      "IngestResponse": {
        "description": "Response for accepted ingest request.",
        "properties": {
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "status": {
            "default": "accepted",
            "title": "Status",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          },
          "total_results": {
            "title": "Total Results",
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "task_id",
          "total_results"
        ],
        "title": "IngestResponse",
        "type": "object"
      },
      "IngestTestResult": {
        "description": "A single test result in a JSON batch ingest.",
        "properties": {
          "call_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Ms"
          },
          "class_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "duration_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "http_exchanges": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/HttpExchangeIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Http Exchanges"
          },
          "http_exchanges_dropped": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Http Exchanges Dropped"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "service_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "setup_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "stack_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stack Trace"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "pattern": "^(PASSED|FAILED|SKIPPED|BROKEN)$",
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "test_name": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Test Name",
            "type": "string"
          },
          "worker_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "required": [
          "test_name",
          "status"
        ],
        "title": "IngestTestResult",
        "type": "object"
      },
      "InsightDetectorStatus": {
        "properties": {
          "evaluated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluated At"
          },
          "firing": {
            "default": 0,
            "title": "Firing",
            "type": "integer"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "subjects_measured": {
            "default": 0,
            "title": "Subjects Measured",
            "type": "integer"
          }
        },
        "required": [
          "kind"
        ],
        "title": "InsightDetectorStatus",
        "type": "object"
      },
      "InsightItem": {
        "properties": {
          "detection_count": {
            "default": 1,
            "title": "Detection Count",
            "type": "integer"
          },
          "dismissed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dismissed At"
          },
          "dismissed_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dismissed By Name"
          },
          "evidence": {
            "additionalProperties": true,
            "title": "Evidence",
            "type": "object"
          },
          "first_seen_at": {
            "format": "date-time",
            "title": "First Seen At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "link": {
            "$ref": "#/components/schemas/InsightLink"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "resolved_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved Reason"
          },
          "run_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Path"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "status": {
            "default": "open",
            "title": "Status",
            "type": "string"
          },
          "subject_label": {
            "default": "",
            "title": "Subject Label",
            "type": "string"
          },
          "title": {
            "default": "",
            "title": "Title",
            "type": "string"
          },
          "window_key": {
            "default": "",
            "title": "Window Key",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "severity",
          "first_seen_at",
          "last_seen_at"
        ],
        "title": "InsightItem",
        "type": "object"
      },
      "InsightLink": {
        "properties": {
          "label": {
            "default": "",
            "title": "Label",
            "type": "string"
          },
          "path": {
            "default": "",
            "title": "Path",
            "type": "string"
          }
        },
        "title": "InsightLink",
        "type": "object"
      },
      "InsightListResponse": {
        "properties": {
          "detectors": {
            "items": {
              "$ref": "#/components/schemas/InsightDetectorStatus"
            },
            "title": "Detectors",
            "type": "array"
          },
          "dismissed_total": {
            "default": 0,
            "title": "Dismissed Total",
            "type": "integer"
          },
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/InsightItem"
            },
            "title": "Items",
            "type": "array"
          },
          "range": {
            "default": "7d",
            "title": "Range",
            "type": "string"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "generated_at"
        ],
        "title": "InsightListResponse",
        "type": "object"
      },
      "InstanceEnablePreviewItem": {
        "properties": {
          "effective_after": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Effective After",
            "type": "object"
          },
          "has_policy_row": {
            "title": "Has Policy Row",
            "type": "boolean"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "runs_past_window": {
            "title": "Runs Past Window",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "name",
          "is_active",
          "has_policy_row",
          "effective_after",
          "runs_past_window"
        ],
        "title": "InstanceEnablePreviewItem",
        "type": "object"
      },
      "InstanceEnablePreviewResponse": {
        "properties": {
          "already_enabled": {
            "title": "Already Enabled",
            "type": "boolean"
          },
          "confirmation_phrase": {
            "title": "Confirmation Phrase",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/InstanceEnablePreviewItem"
            },
            "title": "Items",
            "type": "array"
          },
          "preview_hash": {
            "title": "Preview Hash",
            "type": "string"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "total",
          "truncated",
          "preview_hash",
          "confirmation_phrase",
          "already_enabled"
        ],
        "title": "InstanceEnablePreviewResponse",
        "type": "object"
      },
      "InstanceEnableRequest": {
        "properties": {
          "confirmation": {
            "maxLength": 200,
            "title": "Confirmation",
            "type": "string"
          },
          "preview_hash": {
            "maxLength": 64,
            "minLength": 64,
            "title": "Preview Hash",
            "type": "string"
          }
        },
        "required": [
          "confirmation",
          "preview_hash"
        ],
        "title": "InstanceEnableRequest",
        "type": "object"
      },
      "InstanceRetentionPolicyRead": {
        "description": "GET/PUT ``/api/v1/settings/retention-defaults``. A NULL value = the code default.",
        "properties": {
          "artifacts_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifacts Days"
          },
          "audit_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audit Days"
          },
          "code_defaults": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Code Defaults",
            "type": "object"
          },
          "effective": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Effective",
            "type": "object"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "enabled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled At"
          },
          "enabled_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled By Name"
          },
          "inheriting_projects": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Inheriting Projects",
            "type": "object"
          },
          "keep_last_runs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keep Last Runs"
          },
          "purge_window_start_utc": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purge Window Start Utc"
          },
          "raw_events_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw Events Days"
          },
          "runs_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs Days"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "enabled",
          "code_defaults",
          "effective",
          "inheriting_projects"
        ],
        "title": "InstanceRetentionPolicyRead",
        "type": "object"
      },
      "InstanceRetentionPolicyWrite": {
        "description": "PUT body. ``enabled: true`` is refused (422 ``enable_via_flow``); ``false`` switches it off.",
        "properties": {
          "artifacts_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifacts Days"
          },
          "audit_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 365.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audit Days"
          },
          "clear": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 6,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clear"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "keep_last_runs": {
            "anyOf": [
              {
                "maximum": 1000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keep Last Runs"
          },
          "purge_window_start_utc": {
            "anyOf": [
              {
                "maximum": 23.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purge Window Start Utc"
          },
          "raw_events_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw Events Days"
          },
          "runs_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 30.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs Days"
          }
        },
        "title": "InstanceRetentionPolicyWrite",
        "type": "object"
      },
      "IntegrationHealthRow": {
        "properties": {
          "breaker_threshold": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Breaker Threshold"
          },
          "consecutive_failures": {
            "default": 0,
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "kind": {
            "default": "global",
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "last_checked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "probed": {
            "default": true,
            "title": "Probed",
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "response_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Ms"
          },
          "scope_key": {
            "default": "",
            "title": "Scope Key",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          }
        },
        "required": [
          "provider",
          "status"
        ],
        "title": "IntegrationHealthRow",
        "type": "object"
      },
      "IntegrationsConfigRead": {
        "description": "External integrations configuration (no tokens).",
        "properties": {
          "environment_fields": {
            "items": {
              "type": "string"
            },
            "title": "Environment Fields",
            "type": "array"
          },
          "github_repo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Github Repo"
          },
          "github_token_set": {
            "title": "Github Token Set",
            "type": "boolean"
          },
          "jira_default_project_key": {
            "title": "Jira Default Project Key",
            "type": "string"
          },
          "jira_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Domain"
          },
          "jira_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Email"
          },
          "jira_enabled": {
            "title": "Jira Enabled",
            "type": "boolean"
          },
          "jira_token_set": {
            "title": "Jira Token Set",
            "type": "boolean"
          },
          "ocp_api_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Api Url"
          },
          "ocp_default_namespace": {
            "title": "Ocp Default Namespace",
            "type": "string"
          },
          "ocp_enabled": {
            "title": "Ocp Enabled",
            "type": "boolean"
          },
          "ocp_token_set": {
            "title": "Ocp Token Set",
            "type": "boolean"
          },
          "prometheus_base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prometheus Base Url"
          },
          "prometheus_enabled": {
            "default": false,
            "title": "Prometheus Enabled",
            "type": "boolean"
          },
          "prometheus_metric_templates": {
            "items": {
              "$ref": "#/components/schemas/PrometheusMetricTemplate"
            },
            "title": "Prometheus Metric Templates",
            "type": "array"
          },
          "prometheus_templates_source": {
            "default": "default",
            "title": "Prometheus Templates Source",
            "type": "string"
          },
          "prometheus_token_set": {
            "default": false,
            "title": "Prometheus Token Set",
            "type": "boolean"
          },
          "slack_default_channel": {
            "deprecated": true,
            "title": "Slack Default Channel",
            "type": "string"
          },
          "slack_enabled": {
            "title": "Slack Enabled",
            "type": "boolean"
          },
          "slack_webhook_set": {
            "title": "Slack Webhook Set",
            "type": "boolean"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url"
          },
          "splunk_base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Base Url"
          },
          "splunk_enabled": {
            "title": "Splunk Enabled",
            "type": "boolean"
          },
          "splunk_token_set": {
            "title": "Splunk Token Set",
            "type": "boolean"
          },
          "teams_enabled": {
            "title": "Teams Enabled",
            "type": "boolean"
          },
          "teams_webhook_set": {
            "title": "Teams Webhook Set",
            "type": "boolean"
          },
          "teams_webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teams Webhook Url"
          },
          "vault_fields": {
            "items": {
              "type": "string"
            },
            "title": "Vault Fields",
            "type": "array"
          }
        },
        "required": [
          "jira_enabled",
          "jira_domain",
          "jira_email",
          "jira_token_set",
          "jira_default_project_key",
          "splunk_enabled",
          "splunk_base_url",
          "splunk_token_set",
          "ocp_enabled",
          "ocp_api_url",
          "ocp_token_set",
          "ocp_default_namespace",
          "slack_enabled",
          "slack_webhook_set",
          "slack_default_channel",
          "teams_enabled",
          "teams_webhook_set",
          "github_repo",
          "github_token_set"
        ],
        "title": "IntegrationsConfigRead",
        "type": "object"
      },
      "IntegrationsConfigUpdate": {
        "description": "Payload for updating integrations. None = keep existing.",
        "properties": {
          "github_repo": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Github Repo"
          },
          "github_token": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Github Token"
          },
          "jira_api_token": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Api Token"
          },
          "jira_default_project_key": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Default Project Key"
          },
          "jira_domain": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Domain"
          },
          "jira_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Email"
          },
          "jira_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Enabled"
          },
          "ocp_api_url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Api Url"
          },
          "ocp_default_namespace": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Default Namespace"
          },
          "ocp_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Enabled"
          },
          "ocp_sa_token": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Sa Token"
          },
          "prometheus_base_url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prometheus Base Url"
          },
          "prometheus_bearer_token": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prometheus Bearer Token"
          },
          "prometheus_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prometheus Enabled"
          },
          "prometheus_metric_templates": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PrometheusMetricTemplateIn"
                },
                "maxItems": 12,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prometheus Metric Templates"
          },
          "slack_default_channel": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "title": "Slack Default Channel"
          },
          "slack_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Enabled"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url"
          },
          "splunk_api_token": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Api Token"
          },
          "splunk_base_url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Base Url"
          },
          "splunk_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Enabled"
          },
          "teams_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teams Enabled"
          },
          "teams_webhook_url": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teams Webhook Url"
          }
        },
        "title": "IntegrationsConfigUpdate",
        "type": "object"
      },
      "InvestigatorActConfig": {
        "additionalProperties": false,
        "description": "W15 AGT-03 (D16): the action types Act may run in this project, each opt-in.\n\nInert outside Act (kept when the mode is lowered, so re-entering Act\nrestores the ticks). A missing block on a stored document = ``[]``.",
        "properties": {
          "allowed_action_types": {
            "items": {
              "type": "string"
            },
            "maxItems": 8,
            "title": "Allowed Action Types",
            "type": "array"
          }
        },
        "title": "InvestigatorActConfig",
        "type": "object"
      },
      "InvestigatorConfigExtension": {
        "additionalProperties": false,
        "properties": {
          "act": {
            "$ref": "#/components/schemas/InvestigatorActConfig"
          },
          "budgets": {
            "$ref": "#/components/schemas/InvestigatorPolicyBudgets"
          },
          "promotion_note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Promotion Note"
          },
          "shadow_runs_completed": {
            "default": 0,
            "minimum": 0.0,
            "title": "Shadow Runs Completed",
            "type": "integer"
          }
        },
        "title": "InvestigatorConfigExtension",
        "type": "object"
      },
      "InvestigatorPolicyBudgets": {
        "additionalProperties": false,
        "description": "The complete legacy Investigator budget contract preserved by E4.4.",
        "properties": {
          "max_active_cluster_children_per_project": {
            "default": 2,
            "maximum": 20.0,
            "minimum": 0.0,
            "title": "Max Active Cluster Children Per Project",
            "type": "integer"
          },
          "max_cluster_child_cost_usd_per_parent": {
            "default": 2.0,
            "maximum": 1000000.0,
            "minimum": 0.0,
            "title": "Max Cluster Child Cost Usd Per Parent",
            "type": "number"
          },
          "max_cluster_child_llm_calls_per_parent": {
            "default": 6,
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Max Cluster Child Llm Calls Per Parent",
            "type": "integer"
          },
          "max_cluster_child_seconds_per_parent": {
            "default": 180,
            "maximum": 86400.0,
            "minimum": 0.0,
            "title": "Max Cluster Child Seconds Per Parent",
            "type": "integer"
          },
          "max_cluster_child_tokens_per_parent": {
            "default": 12000,
            "maximum": 10000000.0,
            "minimum": 0.0,
            "title": "Max Cluster Child Tokens Per Parent",
            "type": "integer"
          },
          "max_cluster_children_per_day": {
            "default": 20,
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Max Cluster Children Per Day",
            "type": "integer"
          },
          "max_cluster_children_per_run": {
            "default": 1,
            "maximum": 20.0,
            "minimum": 0.0,
            "title": "Max Cluster Children Per Run",
            "type": "integer"
          },
          "max_cluster_members_per_child": {
            "default": 50,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Max Cluster Members Per Child",
            "type": "integer"
          },
          "max_cost_usd_per_run": {
            "default": 5.0,
            "maximum": 1000000.0,
            "minimum": 0.0,
            "title": "Max Cost Usd Per Run",
            "type": "number"
          },
          "max_llm_calls_per_run": {
            "default": 30,
            "maximum": 100000.0,
            "minimum": 0.0,
            "title": "Max Llm Calls Per Run",
            "type": "integer"
          },
          "max_runs_per_day": {
            "default": 10,
            "maximum": 10000.0,
            "minimum": 0.0,
            "title": "Max Runs Per Day",
            "type": "integer"
          },
          "max_seconds_per_run": {
            "default": 300,
            "maximum": 86400.0,
            "minimum": 0.0,
            "title": "Max Seconds Per Run",
            "type": "integer"
          },
          "max_tokens_per_run": {
            "default": 60000,
            "maximum": 100000000.0,
            "minimum": 0.0,
            "title": "Max Tokens Per Run",
            "type": "integer"
          }
        },
        "title": "InvestigatorPolicyBudgets",
        "type": "object"
      },
      "InvitationMembershipView": {
        "properties": {
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "role": {
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "role"
        ],
        "title": "InvitationMembershipView",
        "type": "object"
      },
      "InvitationPreviewResponse": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "invited_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invited By Name"
          },
          "project_names": {
            "items": {
              "type": "string"
            },
            "title": "Project Names",
            "type": "array"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "sso_required": {
            "default": false,
            "title": "Sso Required",
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "role",
          "expires_at"
        ],
        "title": "InvitationPreviewResponse",
        "type": "object"
      },
      "InvitationSummary": {
        "description": "W17b ADM-01: one row of the Pending invitations tab. Never carries a token.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "invited_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invited By Name"
          },
          "project_memberships": {
            "items": {
              "$ref": "#/components/schemas/InvitationMembershipView"
            },
            "title": "Project Memberships",
            "type": "array"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used At"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "status",
          "expires_at"
        ],
        "title": "InvitationSummary",
        "type": "object"
      },
      "InvitationTokenRequest": {
        "properties": {
          "token": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "InvitationTokenRequest",
        "type": "object"
      },
      "InviteProjectMembership": {
        "description": "W17b ADM-01: a project the invitee joins on accept, with its project role.",
        "properties": {
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "QA_ENGINEER"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "InviteProjectMembership",
        "type": "object"
      },
      "InviteUserRequest": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "project_memberships": {
            "items": {
              "$ref": "#/components/schemas/InviteProjectMembership"
            },
            "maxItems": 50,
            "title": "Project Memberships",
            "type": "array"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "QA_ENGINEER"
          }
        },
        "required": [
          "email"
        ],
        "title": "InviteUserRequest",
        "type": "object"
      },
      "InviteUserResponse": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "email_sent": {
            "default": false,
            "title": "Email Sent",
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "invitation_link": {
            "title": "Invitation Link",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "expires_at",
          "invitation_link"
        ],
        "title": "InviteUserResponse",
        "type": "object"
      },
      "JiraDefectContext": {
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "ci_run_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Run Url"
          }
        },
        "title": "JiraDefectContext",
        "type": "object"
      },
      "JiraDefectCreateRequest": {
        "description": "Body for POST /projects/{project_id}/defects/jira.\n\nExactly one of ``fingerprint`` / ``cluster_id`` identifies the failure.\n``target`` picks the delivery: \"jira\" calls the Jira REST API, \"webhook\"\nemits the ``defect.create_requested`` outbound-webhook event instead\n(US-6.3).",
        "properties": {
          "assignee": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee"
          },
          "cluster_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Id"
          },
          "confirm_not_filed": {
            "default": false,
            "title": "Confirm Not Filed",
            "type": "boolean"
          },
          "extra_comment": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Comment"
          },
          "fingerprint": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fingerprint"
          },
          "issue_type": {
            "default": "Bug",
            "maxLength": 100,
            "title": "Issue Type",
            "type": "string"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "target": {
            "default": "jira",
            "pattern": "^(jira|webhook)$",
            "title": "Target",
            "type": "string"
          }
        },
        "title": "JiraDefectCreateRequest",
        "type": "object"
      },
      "JiraDefectCreateResponse": {
        "properties": {
          "deduplicated": {
            "default": false,
            "title": "Deduplicated",
            "type": "boolean"
          },
          "defect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Id"
          },
          "external_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Status"
          },
          "jira_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Key"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "recurrence_comment_posted": {
            "default": false,
            "title": "Recurrence Comment Posted",
            "type": "boolean"
          },
          "recurrence_count": {
            "default": 0,
            "title": "Recurrence Count",
            "type": "integer"
          },
          "subscriptions_notified": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscriptions Notified"
          },
          "target": {
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "target"
        ],
        "title": "JiraDefectCreateResponse",
        "type": "object"
      },
      "JiraDefectExistingLink": {
        "properties": {
          "defect_id": {
            "title": "Defect Id",
            "type": "string"
          },
          "external_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Status"
          },
          "jira_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Key"
          },
          "jira_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Url"
          }
        },
        "required": [
          "defect_id"
        ],
        "title": "JiraDefectExistingLink",
        "type": "object"
      },
      "JiraDefectMetadataResponse": {
        "description": "Dialog-picker metadata. ``available=false`` + ``reason`` instead of\nan HTTP error when Jira is offline-gated/unconfigured/unreachable —\nthe UI uses it to disable the action with a tooltip.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "default_project_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Project Key"
          },
          "issue_types": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Issue Types",
            "type": "array"
          },
          "projects": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/JiraProjectOption"
            },
            "title": "Projects",
            "type": "array"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "webhook_available": {
            "default": false,
            "title": "Webhook Available",
            "type": "boolean"
          }
        },
        "required": [
          "available"
        ],
        "title": "JiraDefectMetadataResponse",
        "type": "object"
      },
      "JiraDefectOccurrences": {
        "properties": {
          "failing_runs": {
            "default": 0,
            "title": "Failing Runs",
            "type": "integer"
          },
          "first_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seen"
          },
          "last_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          }
        },
        "title": "JiraDefectOccurrences",
        "type": "object"
      },
      "JiraDefectPreviewResponse": {
        "description": "Pre-filled payload shown (read-only) in the create dialog.",
        "properties": {
          "ai_analysis": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Analysis"
          },
          "cluster_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Id"
          },
          "context": {
            "$ref": "#/components/schemas/JiraDefectContext"
          },
          "deep_link": {
            "title": "Deep Link",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "existing_defect": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JiraDefectExistingLink"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run Id"
          },
          "occurrences": {
            "$ref": "#/components/schemas/JiraDefectOccurrences"
          },
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          }
        },
        "required": [
          "signature",
          "summary",
          "description",
          "occurrences",
          "context",
          "deep_link"
        ],
        "title": "JiraDefectPreviewResponse",
        "type": "object"
      },
      "JiraIssueRequest": {
        "properties": {
          "ai_summary": {
            "title": "Ai Summary",
            "type": "string"
          },
          "project_key": {
            "title": "Project Key",
            "type": "string"
          },
          "recommended_action": {
            "title": "Recommended Action",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          }
        },
        "required": [
          "project_key",
          "test_case_id",
          "test_name",
          "run_id",
          "ai_summary",
          "recommended_action"
        ],
        "title": "JiraIssueRequest",
        "type": "object"
      },
      "JiraIssueResponse": {
        "properties": {
          "approval_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approval Status"
          },
          "defect_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Id"
          },
          "mutating_action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mutating Action"
          },
          "policy_reasons": {
            "items": {
              "type": "string"
            },
            "title": "Policy Reasons",
            "type": "array"
          },
          "requires_approval": {
            "default": false,
            "title": "Requires Approval",
            "type": "boolean"
          },
          "ticket_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticket Id"
          },
          "ticket_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticket Key"
          },
          "ticket_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticket Url"
          }
        },
        "title": "JiraIssueResponse",
        "type": "object"
      },
      "JiraProjectOption": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "required": [
          "key"
        ],
        "title": "JiraProjectOption",
        "type": "object"
      },
      "KnowledgeDomainAllowlistUpdate": {
        "properties": {
          "domains": {
            "description": "FQDN list, e.g. ['confluence.corp.com', 'jira.corp.com']",
            "items": {
              "type": "string"
            },
            "title": "Domains",
            "type": "array"
          }
        },
        "required": [
          "domains"
        ],
        "title": "KnowledgeDomainAllowlistUpdate",
        "type": "object"
      },
      "KnowledgeSourceCreate": {
        "properties": {
          "canonical_url": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Canonical Url",
            "type": "string"
          },
          "classification": {
            "default": "internal",
            "maxLength": 20,
            "title": "Classification",
            "type": "string"
          },
          "external_id": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "source_type": {
            "maxLength": 30,
            "title": "Source Type",
            "type": "string"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "source_type",
          "title",
          "canonical_url"
        ],
        "title": "KnowledgeSourceCreate",
        "type": "object"
      },
      "KnowledgeSourceFreshnessResponse": {
        "properties": {
          "active_chunk_count": {
            "title": "Active Chunk Count",
            "type": "integer"
          },
          "content_changed_on_last_sync": {
            "title": "Content Changed On Last Sync",
            "type": "boolean"
          },
          "hours_since_sync": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hours Since Sync"
          },
          "is_stale": {
            "title": "Is Stale",
            "type": "boolean"
          },
          "last_sync_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync Status"
          },
          "source_id": {
            "format": "uuid",
            "title": "Source Id",
            "type": "string"
          },
          "stale_since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stale Since"
          },
          "staleness_threshold_hours": {
            "title": "Staleness Threshold Hours",
            "type": "integer"
          },
          "sync_event_count": {
            "title": "Sync Event Count",
            "type": "integer"
          }
        },
        "required": [
          "source_id",
          "is_stale",
          "staleness_threshold_hours",
          "content_changed_on_last_sync",
          "active_chunk_count",
          "sync_event_count"
        ],
        "title": "KnowledgeSourceFreshnessResponse",
        "type": "object"
      },
      "KnowledgeSourceListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeSourceResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size"
        ],
        "title": "KnowledgeSourceListResponse",
        "type": "object"
      },
      "KnowledgeSourceResponse": {
        "properties": {
          "canonical_url": {
            "title": "Canonical Url",
            "type": "string"
          },
          "classification": {
            "title": "Classification",
            "type": "string"
          },
          "content_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Hash"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_archived": {
            "title": "Is Archived",
            "type": "boolean"
          },
          "last_synced_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced At"
          },
          "owner_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "source_type": {
            "title": "Source Type",
            "type": "string"
          },
          "storage_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Path"
          },
          "sync_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sync Error"
          },
          "sync_status": {
            "title": "Sync Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "project_id",
          "source_type",
          "title",
          "canonical_url",
          "sync_status",
          "classification",
          "is_archived",
          "created_at"
        ],
        "title": "KnowledgeSourceResponse",
        "type": "object"
      },
      "KnowledgeSourceSyncResponse": {
        "properties": {
          "source_id": {
            "format": "uuid",
            "title": "Source Id",
            "type": "string"
          },
          "sync_status": {
            "title": "Sync Status",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "source_id",
          "task_id",
          "sync_status"
        ],
        "title": "KnowledgeSourceSyncResponse",
        "type": "object"
      },
      "KnowledgeSourceUpdate": {
        "properties": {
          "classification": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Classification"
          },
          "is_archived": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Archived"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "KnowledgeSourceUpdate",
        "type": "object"
      },
      "KnowledgeSyncEventResponse": {
        "properties": {
          "chunk_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Count"
          },
          "content_changed": {
            "title": "Content Changed",
            "type": "boolean"
          },
          "content_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Hash"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "previous_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Hash"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "source_id": {
            "format": "uuid",
            "title": "Source Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "trigger": {
            "title": "Trigger",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source_id",
          "project_id",
          "trigger",
          "status",
          "content_changed",
          "created_at"
        ],
        "title": "KnowledgeSyncEventResponse",
        "type": "object"
      },
      "LibraryCaseList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LibraryCaseRow"
            },
            "title": "Items",
            "type": "array"
          },
          "measured": {
            "default": true,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "items"
        ],
        "title": "LibraryCaseList",
        "type": "object"
      },
      "LibraryCaseRow": {
        "properties": {
          "age_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age Days"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "status"
        ],
        "title": "LibraryCaseRow",
        "type": "object"
      },
      "LibraryHealthComponent": {
        "properties": {
          "denominator": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Denominator"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "numerator": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Numerator"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "key",
          "label",
          "weight",
          "measured",
          "detail"
        ],
        "title": "LibraryHealthComponent",
        "type": "object"
      },
      "LibraryHealthResponse": {
        "properties": {
          "active_cases": {
            "title": "Active Cases",
            "type": "integer"
          },
          "automated_cases": {
            "title": "Automated Cases",
            "type": "integer"
          },
          "automation_target_pct": {
            "title": "Automation Target Pct",
            "type": "integer"
          },
          "avg_age_days": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Age Days"
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/LibraryHealthComponent"
            },
            "title": "Components",
            "type": "array"
          },
          "computed_at": {
            "format": "date-time",
            "title": "Computed At",
            "type": "string"
          },
          "flaky_active": {
            "$ref": "#/components/schemas/LibraryCaseList"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "no_owner": {
            "$ref": "#/components/schemas/LibraryCaseList"
          },
          "older_than_180_days": {
            "default": 0,
            "title": "Older Than 180 Days",
            "type": "integer"
          },
          "older_than_180_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Older Than 180 Pct"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "requirements": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RequirementCoverageSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "retired_cases": {
            "title": "Retired Cases",
            "type": "integer"
          },
          "retired_in_open_plans": {
            "title": "Retired In Open Plans",
            "type": "integer"
          },
          "review_queue": {
            "$ref": "#/components/schemas/ReviewQueueSummary"
          },
          "score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "stale_drafts": {
            "title": "Stale Drafts",
            "type": "integer"
          },
          "strategy_gaps": {
            "items": {
              "$ref": "#/components/schemas/StrategyGapRead"
            },
            "title": "Strategy Gaps",
            "type": "array"
          },
          "suite_names": {
            "items": {
              "type": "string"
            },
            "title": "Suite Names",
            "type": "array"
          },
          "suite_names_total": {
            "title": "Suite Names Total",
            "type": "integer"
          },
          "tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tag"
          },
          "total_cases": {
            "title": "Total Cases",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "computed_at",
          "measured",
          "total_cases",
          "active_cases",
          "retired_cases",
          "automated_cases",
          "automation_target_pct",
          "stale_drafts",
          "retired_in_open_plans",
          "components",
          "review_queue",
          "strategy_gaps",
          "flaky_active",
          "no_owner",
          "suite_names",
          "suite_names_total"
        ],
        "title": "LibraryHealthResponse",
        "type": "object"
      },
      "LikelyAffectedTest": {
        "properties": {
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "reason": {
            "$ref": "#/components/schemas/LikelyAffectedTestReason"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "status_in_run": {
            "title": "Status In Run",
            "type": "string"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          }
        },
        "required": [
          "test_fingerprint",
          "test_name",
          "status_in_run",
          "score",
          "reason"
        ],
        "title": "LikelyAffectedTest",
        "type": "object"
      },
      "LikelyAffectedTestReason": {
        "properties": {
          "co_failure_runs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Co Failure Runs"
          },
          "history_runs_considered": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "History Runs Considered"
          },
          "known_flaky": {
            "default": false,
            "title": "Known Flaky",
            "type": "boolean"
          },
          "overlap_score": {
            "title": "Overlap Score",
            "type": "number"
          },
          "overlapping_paths": {
            "items": {
              "type": "string"
            },
            "title": "Overlapping Paths",
            "type": "array"
          }
        },
        "required": [
          "overlap_score"
        ],
        "title": "LikelyAffectedTestReason",
        "type": "object"
      },
      "LikelyAffectedTestsHistory": {
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "insufficient_data_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Insufficient Data Reason"
          },
          "runs_considered": {
            "default": 0,
            "title": "Runs Considered",
            "type": "integer"
          },
          "scan_capped": {
            "default": false,
            "title": "Scan Capped",
            "type": "boolean"
          },
          "usable_runs": {
            "default": 0,
            "title": "Usable Runs",
            "type": "integer"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "available",
          "window_days"
        ],
        "title": "LikelyAffectedTestsHistory",
        "type": "object"
      },
      "LikelyAffectedTestsResponse": {
        "properties": {
          "advisory": {
            "const": true,
            "default": true,
            "title": "Advisory",
            "type": "boolean"
          },
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "base_anchor_is_strong": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Anchor Is Strong"
          },
          "base_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Source"
          },
          "caveat": {
            "title": "Caveat",
            "type": "string"
          },
          "changed_files_count": {
            "default": 0,
            "title": "Changed Files Count",
            "type": "integer"
          },
          "file_detail_coverage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Detail Coverage"
          },
          "history": {
            "$ref": "#/components/schemas/LikelyAffectedTestsHistory"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "no_commit_range",
                  "no_changed_files"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "tests": {
            "items": {
              "$ref": "#/components/schemas/LikelyAffectedTest"
            },
            "title": "Tests",
            "type": "array"
          },
          "total_candidates": {
            "default": 0,
            "title": "Total Candidates",
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "project_id",
          "available",
          "caveat",
          "history"
        ],
        "title": "LikelyAffectedTestsResponse",
        "type": "object"
      },
      "LinkRunRequest": {
        "properties": {
          "phase_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase Id"
          },
          "test_run_id": {
            "title": "Test Run Id",
            "type": "string"
          }
        },
        "required": [
          "test_run_id"
        ],
        "title": "LinkRunRequest",
        "type": "object"
      },
      "LiveEvent": {
        "description": "A single test execution event from a client machine.",
        "properties": {
          "call_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The test body's own time, ms (0..24 h).",
            "title": "Call Ms"
          },
          "class_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "duration_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "event_type": {
            "description": "run_start | test_start | test_result | log | metric | run_complete | live_heartbeat. live_heartbeat is a no-op refresh emitted by SDK clients during long inter-test gaps — it only bumps the Redis last_event_at field so the reaper doesn't close the session as idle.",
            "title": "Event Type",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fixture / before-hook time of this test, ms (0..24 h).",
            "title": "Setup Ms"
          },
          "stack_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stack Trace"
          },
          "started_at_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Client epoch ms when the test started (its setup included), sent on test_result.",
            "title": "Started At Ms"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "PASSED | FAILED | SKIPPED | BROKEN",
            "title": "Status"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fixture / after-hook time of this test, ms (0..24 h).",
            "title": "Teardown Ms"
          },
          "test_name": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "timestamp_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp Ms"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The parallel worker / runner slot that ran the test (at most 64 characters).",
            "title": "Worker Id"
          }
        },
        "required": [
          "event_type"
        ],
        "title": "LiveEvent",
        "type": "object"
      },
      "LiveEventBatch": {
        "description": "A batch of events sent from a client machine.\nBatching amortises HTTP overhead — 50–1000 events per call is recommended.",
        "properties": {
          "batch_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Client-generated identity for this batch. The same value must be reused for every HTTP retry; omitted for legacy callers.",
            "title": "Batch Id"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/LiveEvent"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "run_id": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Run Id",
            "type": "string"
          },
          "session_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Session Id",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "run_id",
          "events"
        ],
        "title": "LiveEventBatch",
        "type": "object"
      },
      "LiveEventBatchResponse": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          }
        },
        "required": [
          "accepted",
          "run_id",
          "session_id"
        ],
        "title": "LiveEventBatchResponse",
        "type": "object"
      },
      "LiveHttpExchangesIn": {
        "description": "Body of POST /api/v1/stream/http-exchanges (§3.1 — no path id, on purpose): one test's exchanges\nof a live session, posted once by the reporter after the test's result.",
        "properties": {
          "class_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "exchanges": {
            "items": {
              "$ref": "#/components/schemas/HttpExchangeIn"
            },
            "maxItems": 20,
            "title": "Exchanges",
            "type": "array"
          },
          "exchanges_dropped": {
            "default": 0,
            "minimum": 0.0,
            "title": "Exchanges Dropped",
            "type": "integer"
          },
          "run_id": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Run Id",
            "type": "string"
          },
          "session_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Session Id",
            "type": "string"
          },
          "test_name": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Test Name",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "run_id",
          "test_name",
          "exchanges"
        ],
        "title": "LiveHttpExchangesIn",
        "type": "object"
      },
      "LiveHttpExchangesResponse": {
        "properties": {
          "dropped": {
            "title": "Dropped",
            "type": "integer"
          },
          "stored": {
            "title": "Stored",
            "type": "integer"
          },
          "test_case_id": {
            "title": "Test Case Id",
            "type": "string"
          },
          "truncated": {
            "title": "Truncated",
            "type": "integer"
          }
        },
        "required": [
          "stored",
          "truncated",
          "dropped",
          "test_case_id"
        ],
        "title": "LiveHttpExchangesResponse",
        "type": "object"
      },
      "LiveSessionCreate": {
        "description": "Request body to register a new live execution session.\n\n``project_id`` accepts either a project UUID *or* a human-readable project\nname (case-insensitive exact match). The server resolves it to a real UUID\nin ``stream_service.create_session``. Keeping the field name ``project_id``\npreserves wire compatibility with SDK callers that already map their\n``testlookup.project`` config (conventionally a name, à la\n``rp.project``) onto this field.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "ci_actor": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Actor"
          },
          "ci_provider": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Provider"
          },
          "ci_repo": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Repo"
          },
          "ci_run_url": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ci Run Url"
          },
          "client_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Client Name",
            "type": "string"
          },
          "commit_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Hash"
          },
          "commit_range": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SuppliedCommit"
                },
                "type": "array"
              },
              {
                "$ref": "#/components/schemas/SuppliedCommitRange"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Range"
          },
          "framework": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Framework"
          },
          "launch_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Launch Name"
          },
          "machine_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Machine Id"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "pr_number": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pr Number"
          },
          "project_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Project Id",
            "type": "string"
          },
          "release_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Name"
          },
          "run_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "total_tests": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tests"
          }
        },
        "required": [
          "project_id",
          "client_name"
        ],
        "title": "LiveSessionCreate",
        "type": "object"
      },
      "LiveSessionResponse": {
        "description": "Response returned when a session is created.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "session_token": {
            "title": "Session Token",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "session_token",
          "run_id",
          "project_id",
          "expires_in",
          "created_at"
        ],
        "title": "LiveSessionResponse",
        "type": "object"
      },
      "LiveSessionState": {
        "description": "Live state of an active or recently completed session.",
        "properties": {
          "broken": {
            "title": "Broken",
            "type": "integer"
          },
          "build_number": {
            "title": "Build Number",
            "type": "string"
          },
          "client_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Name"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "current_test": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Test"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "last_event_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Event At"
          },
          "launch_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Launch Name"
          },
          "pass_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Rate"
          },
          "passed": {
            "title": "Passed",
            "type": "integer"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "release_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Name"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "run_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Seq"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Run Id"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "project_id",
          "build_number",
          "status",
          "total",
          "passed",
          "failed",
          "skipped",
          "broken"
        ],
        "title": "LiveSessionState",
        "type": "object"
      },
      "LiveStreamIngestRequest": {
        "description": "API-key-authenticated streaming ingest. Server auto-manages the session.\n\nA client-chosen ``run_id`` (any stable identifier — CI build id, UUID, etc.)\nkeys the live session along with the API key's bound project. The first\ncall for a given ``(project_id, run_id)`` pair auto-creates the session;\nsubsequent calls reuse it. Clients never call ``/sessions`` themselves.",
        "properties": {
          "batch_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Client-generated identity for this batch. The same value must be reused for every HTTP retry; omitted for legacy callers.",
            "title": "Batch Id"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/LiveEvent"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LiveStreamMeta"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "events"
        ],
        "title": "LiveStreamIngestRequest",
        "type": "object"
      },
      "LiveStreamIngestResponse": {
        "properties": {
          "accepted": {
            "title": "Accepted",
            "type": "integer"
          },
          "created_session": {
            "title": "Created Session",
            "type": "boolean"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          }
        },
        "required": [
          "accepted",
          "run_id",
          "session_id",
          "created_session"
        ],
        "title": "LiveStreamIngestResponse",
        "type": "object"
      },
      "LiveStreamMeta": {
        "description": "Optional CI/run metadata that enriches the auto-created session.\n\nAll fields are optional — when omitted the server falls back to the API\nkey's name (for client_name) and the run_id (for build_number).",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "commit_hash": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Hash"
          },
          "framework": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Framework"
          },
          "launch_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Launch Name"
          },
          "machine_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Machine Id"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "release_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Name"
          },
          "run_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_tests": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tests"
          }
        },
        "title": "LiveStreamMeta",
        "type": "object"
      },
      "LlmQuotaRead": {
        "properties": {
          "at_cap_action": {
            "default": "AUTO_DOWNGRADE_TO_ML",
            "pattern": "^(SOFT_WARN|AUTO_DOWNGRADE_TO_ML|AUTO_DOWNGRADE_TO_RULES|HARD_BLOCK)$",
            "title": "At Cap Action",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "hard_cap_usd": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Hard Cap Usd",
            "type": "number"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "included_usd": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Included Usd",
            "type": "number"
          },
          "overage_rate_usd": {
            "default": 1.0,
            "minimum": 0.0,
            "title": "Overage Rate Usd",
            "type": "number"
          },
          "period_type": {
            "default": "MONTHLY",
            "pattern": "^(MONTHLY)$",
            "title": "Period Type",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "soft_warn_threshold_pct": {
            "default": 100,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Soft Warn Threshold Pct",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By User Id"
          }
        },
        "required": [
          "id",
          "project_id",
          "created_at",
          "updated_at"
        ],
        "title": "LlmQuotaRead",
        "type": "object"
      },
      "LlmQuotaWrite": {
        "description": "Admin-editable billing config for a project.",
        "properties": {
          "at_cap_action": {
            "default": "AUTO_DOWNGRADE_TO_ML",
            "pattern": "^(SOFT_WARN|AUTO_DOWNGRADE_TO_ML|AUTO_DOWNGRADE_TO_RULES|HARD_BLOCK)$",
            "title": "At Cap Action",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "hard_cap_usd": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Hard Cap Usd",
            "type": "number"
          },
          "included_usd": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Included Usd",
            "type": "number"
          },
          "overage_rate_usd": {
            "default": 1.0,
            "minimum": 0.0,
            "title": "Overage Rate Usd",
            "type": "number"
          },
          "period_type": {
            "default": "MONTHLY",
            "pattern": "^(MONTHLY)$",
            "title": "Period Type",
            "type": "string"
          },
          "soft_warn_threshold_pct": {
            "default": 100,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Soft Warn Threshold Pct",
            "type": "integer"
          }
        },
        "title": "LlmQuotaWrite",
        "type": "object"
      },
      "LlmUsageHistoryEntry": {
        "properties": {
          "cap_hits": {
            "title": "Cap Hits",
            "type": "integer"
          },
          "period_end": {
            "format": "date-time",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "title": "Period Start",
            "type": "string"
          },
          "total_cost_usd": {
            "title": "Total Cost Usd",
            "type": "number"
          },
          "total_llm_calls": {
            "title": "Total Llm Calls",
            "type": "integer"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "total_cost_usd",
          "total_llm_calls",
          "cap_hits"
        ],
        "title": "LlmUsageHistoryEntry",
        "type": "object"
      },
      "LlmUsageRead": {
        "properties": {
          "cap_hits": {
            "title": "Cap Hits",
            "type": "integer"
          },
          "covered_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Covered Usd"
          },
          "hard_cap_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hard Cap Usd"
          },
          "included_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Included Usd"
          },
          "overage_charge_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage Charge Usd"
          },
          "overage_rate_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage Rate Usd"
          },
          "overage_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage Usd"
          },
          "period_end": {
            "format": "date-time",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "title": "Period Start",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "projected_overage_charge_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projected Overage Charge Usd"
          },
          "projected_overage_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projected Overage Usd"
          },
          "projected_period_cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projected Period Cost Usd"
          },
          "projection_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projection Basis"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "total_cost_usd": {
            "title": "Total Cost Usd",
            "type": "number"
          },
          "total_input_tokens": {
            "title": "Total Input Tokens",
            "type": "integer"
          },
          "total_llm_calls": {
            "title": "Total Llm Calls",
            "type": "integer"
          },
          "total_output_tokens": {
            "title": "Total Output Tokens",
            "type": "integer"
          },
          "utilization_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utilization Pct"
          }
        },
        "required": [
          "project_id",
          "period_start",
          "period_end",
          "total_cost_usd",
          "total_input_tokens",
          "total_output_tokens",
          "total_llm_calls",
          "cap_hits"
        ],
        "title": "LlmUsageRead",
        "type": "object"
      },
      "MLLastRun": {
        "description": "The outcome of the most recent training attempt (``ml:retrain:last``).",
        "properties": {
          "accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accuracy"
          },
          "finished_at": {
            "format": "date-time",
            "title": "Finished At",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "sample_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sample Count"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "triggered_by": {
            "title": "Triggered By",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "status",
          "finished_at",
          "triggered_by"
        ],
        "title": "MLLastRun",
        "type": "object"
      },
      "MLRetrainAccepted": {
        "description": "``202`` of ``POST /settings/ai/ml/retrain``.",
        "properties": {
          "already_running": {
            "title": "Already Running",
            "type": "boolean"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "task_id",
          "state",
          "already_running"
        ],
        "title": "MLRetrainAccepted",
        "type": "object"
      },
      "MLStatusRead": {
        "description": "What the Settings > AI ML card shows (QA lead and above).",
        "properties": {
          "accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accuracy"
          },
          "available_samples": {
            "title": "Available Samples",
            "type": "integer"
          },
          "can_train": {
            "title": "Can Train",
            "type": "boolean"
          },
          "cannot_train_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cannot Train Message"
          },
          "cannot_train_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cannot Train Reason"
          },
          "deps_installed": {
            "title": "Deps Installed",
            "type": "boolean"
          },
          "human_label_floor": {
            "title": "Human Label Floor",
            "type": "integer"
          },
          "human_labels": {
            "title": "Human Labels",
            "type": "integer"
          },
          "last_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MLLastRun"
              },
              {
                "type": "null"
              }
            ]
          },
          "maturity": {
            "title": "Maturity",
            "type": "string"
          },
          "min_training_samples": {
            "title": "Min Training Samples",
            "type": "integer"
          },
          "model_available": {
            "title": "Model Available",
            "type": "boolean"
          },
          "model_sample_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Sample Count"
          },
          "retrain_enabled": {
            "title": "Retrain Enabled",
            "type": "boolean"
          },
          "trained_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trained At"
          },
          "training": {
            "$ref": "#/components/schemas/MLTrainingState"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "model_available",
          "available_samples",
          "min_training_samples",
          "human_labels",
          "human_label_floor",
          "maturity",
          "deps_installed",
          "retrain_enabled",
          "can_train",
          "training"
        ],
        "title": "MLStatusRead",
        "type": "object"
      },
      "MLTrainingState": {
        "description": "Whether a training job holds the retrain lock right now.",
        "properties": {
          "queued_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queued At"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id"
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By"
          }
        },
        "required": [
          "state"
        ],
        "title": "MLTrainingState",
        "type": "object"
      },
      "ManagedTestCaseCreate": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "automation_status": {
            "default": "not_automated",
            "title": "Automation Status",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "estimated_duration_minutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Duration Minutes"
          },
          "expected_result": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Result"
          },
          "feature_area": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature Area"
          },
          "is_automated": {
            "default": false,
            "title": "Is Automated",
            "type": "boolean"
          },
          "objective": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "parameters": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseParameterSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "preconditions": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preconditions"
          },
          "priority": {
            "default": "medium",
            "title": "Priority",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "severity": {
            "default": "major",
            "title": "Severity",
            "type": "string"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseStepSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_data": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Data"
          },
          "test_type": {
            "default": "functional",
            "title": "Test Type",
            "type": "string"
          },
          "title": {
            "maxLength": 500,
            "minLength": 3,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "title"
        ],
        "title": "ManagedTestCaseCreate",
        "type": "object"
      },
      "ManagedTestCaseListResponse": {
        "properties": {
          "automation_rows_excluded": {
            "default": false,
            "title": "Automation Rows Excluded",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ManagedTestCaseResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "ManagedTestCaseListResponse",
        "type": "object"
      },
      "ManagedTestCaseResponse": {
        "properties": {
          "ai_generated": {
            "title": "Ai Generated",
            "type": "boolean"
          },
          "ai_quality_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Quality Score"
          },
          "ai_review_notes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Review Notes"
          },
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "approved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By Id"
          },
          "archived_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          },
          "archived_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived By Id"
          },
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "author_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Id"
          },
          "automation_status": {
            "title": "Automation Status",
            "type": "string"
          },
          "canonical_test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Test Case Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deprecated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deprecated At"
          },
          "deprecated_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deprecated By Id"
          },
          "deprecation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deprecation Reason"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "edited_after_approval": {
            "default": false,
            "title": "Edited After Approval",
            "type": "boolean"
          },
          "edited_since_approval_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edited Since Approval Version"
          },
          "estimated_duration_minutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Duration Minutes"
          },
          "expected_result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Result"
          },
          "feature_area": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature Area"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_automated": {
            "title": "Is Automated",
            "type": "boolean"
          },
          "last_executed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Executed At"
          },
          "last_execution_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Execution Status"
          },
          "latest_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run Id"
          },
          "latest_test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Test Case Id"
          },
          "lifecycle_state_changed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle State Changed At"
          },
          "needs_update_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Needs Update Reason"
          },
          "objective": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "parameters": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseParameterSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "preconditions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preconditions"
          },
          "priority": {
            "title": "Priority",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason_required_actions": {
            "items": {
              "type": "string"
            },
            "title": "Reason Required Actions",
            "type": "array"
          },
          "review_required": {
            "default": false,
            "title": "Review Required",
            "type": "boolean"
          },
          "reviewer_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewer Id"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "source": {
            "default": "managed",
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseStepSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Data"
          },
          "test_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Fingerprint"
          },
          "test_suite_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Suite Id"
          },
          "test_type": {
            "title": "Test Type",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "title",
          "test_type",
          "priority",
          "severity",
          "status",
          "version",
          "is_automated",
          "automation_status",
          "ai_generated",
          "created_at",
          "updated_at"
        ],
        "title": "ManagedTestCaseResponse",
        "type": "object"
      },
      "ManagedTestCaseUpdate": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "automation_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Status"
          },
          "change_summary": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Summary"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "estimated_duration_minutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Duration Minutes"
          },
          "expected_result": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Result"
          },
          "expected_version": {
            "minimum": 1.0,
            "title": "Expected Version",
            "type": "integer"
          },
          "feature_area": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature Area"
          },
          "is_automated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Automated"
          },
          "objective": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "parameters": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseParameterSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "preconditions": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preconditions"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseStepSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_data": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Data"
          },
          "test_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Type"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "expected_version"
        ],
        "title": "ManagedTestCaseUpdate",
        "type": "object"
      },
      "MemoryReference": {
        "description": "Canonical pointer from generated output back to an auditable memory row.",
        "properties": {
          "entity_id": {
            "title": "Entity Id",
            "type": "string"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "evidence_refs": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Evidence Refs",
            "type": "array"
          },
          "memory_entry_id": {
            "format": "uuid",
            "title": "Memory Entry Id",
            "type": "string"
          },
          "memory_reference_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Reference Id"
          },
          "payload_sha256": {
            "title": "Payload Sha256",
            "type": "string"
          },
          "retrieval_audit": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retrieval Audit"
          },
          "retrieval_audit_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retrieval Audit Sha256"
          },
          "source_snapshot_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Snapshot Id"
          }
        },
        "required": [
          "memory_entry_id",
          "entity_type",
          "entity_id",
          "payload_sha256"
        ],
        "title": "MemoryReference",
        "type": "object"
      },
      "MemoryTimelineResponse": {
        "description": "Timeline of memory entries for a run, grouped by entity type.",
        "properties": {
          "entries_by_type": {
            "additionalProperties": true,
            "title": "Entries By Type",
            "type": "object"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "total_entries": {
            "title": "Total Entries",
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "project_id",
          "entries_by_type",
          "total_entries"
        ],
        "title": "MemoryTimelineResponse",
        "type": "object"
      },
      "MfaChallengeResponse": {
        "description": "Password accepted; a second factor is required to finish.\n\n``challenge_token`` is NOT an access token — it carries ``type:\n\"mfa_challenge\"`` and is rejected by ``get_current_user`` at the decode\nlayer. It is only accepted by ``POST /auth/mfa/verify``.",
        "properties": {
          "challenge_token": {
            "title": "Challenge Token",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "methods": {
            "items": {
              "type": "string"
            },
            "title": "Methods",
            "type": "array"
          },
          "mfa_required": {
            "const": true,
            "default": true,
            "title": "Mfa Required",
            "type": "boolean"
          }
        },
        "required": [
          "challenge_token",
          "expires_in"
        ],
        "title": "MfaChallengeResponse",
        "type": "object"
      },
      "MfaDisableRequest": {
        "description": "Disabling requires the password *and* a live second factor.\n\nPassword alone would let anyone holding a stolen session strip the factor\nthat session was supposed to be protected by.",
        "properties": {
          "code": {
            "anyOf": [
              {
                "maxLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "password": {
            "maxLength": 128,
            "title": "Password",
            "type": "string"
          },
          "recovery_code": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recovery Code"
          }
        },
        "required": [
          "password"
        ],
        "title": "MfaDisableRequest",
        "type": "object"
      },
      "MfaEnrollConfirmRequest": {
        "properties": {
          "code": {
            "maxLength": 12,
            "title": "Code",
            "type": "string"
          },
          "enrollment_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrollment Token"
          }
        },
        "required": [
          "code"
        ],
        "title": "MfaEnrollConfirmRequest",
        "type": "object"
      },
      "MfaEnrollConfirmResponse": {
        "properties": {
          "enabled": {
            "const": true,
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "recovery_codes": {
            "items": {
              "type": "string"
            },
            "title": "Recovery Codes",
            "type": "array"
          },
          "tokens": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokenResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "recovery_codes"
        ],
        "title": "MfaEnrollConfirmResponse",
        "type": "object"
      },
      "MfaEnrollStartRequest": {
        "properties": {
          "enrollment_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrollment Token"
          }
        },
        "title": "MfaEnrollStartRequest",
        "type": "object"
      },
      "MfaEnrollStartResponse": {
        "properties": {
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "digits": {
            "title": "Digits",
            "type": "integer"
          },
          "issuer": {
            "title": "Issuer",
            "type": "string"
          },
          "otpauth_uri": {
            "title": "Otpauth Uri",
            "type": "string"
          },
          "period_seconds": {
            "title": "Period Seconds",
            "type": "integer"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "secret",
          "otpauth_uri",
          "issuer",
          "account_name",
          "digits",
          "period_seconds"
        ],
        "title": "MfaEnrollStartResponse",
        "type": "object"
      },
      "MfaEnrollmentRequiredResponse": {
        "description": "Password accepted; workspace policy requires MFA and the user has none.\n\n``enrollment_token`` carries ``type: \"mfa_enroll\"`` and is accepted only by\nthe two enrollment endpoints.",
        "properties": {
          "enrollment_token": {
            "title": "Enrollment Token",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "mfa_enrollment_required": {
            "const": true,
            "default": true,
            "title": "Mfa Enrollment Required",
            "type": "boolean"
          },
          "required_for_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required For Role"
          }
        },
        "required": [
          "enrollment_token",
          "expires_in"
        ],
        "title": "MfaEnrollmentRequiredResponse",
        "type": "object"
      },
      "MfaPolicyRead": {
        "properties": {
          "lockout_duration_minutes": {
            "title": "Lockout Duration Minutes",
            "type": "integer"
          },
          "lockout_enabled": {
            "title": "Lockout Enabled",
            "type": "boolean"
          },
          "lockout_threshold": {
            "title": "Lockout Threshold",
            "type": "integer"
          },
          "require_mfa": {
            "title": "Require Mfa",
            "type": "boolean"
          },
          "required_for_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "require_mfa",
          "lockout_enabled",
          "lockout_threshold",
          "lockout_duration_minutes"
        ],
        "title": "MfaPolicyRead",
        "type": "object"
      },
      "MfaPolicyUpdate": {
        "properties": {
          "clear_required_for_role": {
            "default": false,
            "title": "Clear Required For Role",
            "type": "boolean"
          },
          "lockout_duration_minutes": {
            "anyOf": [
              {
                "maximum": 1440.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lockout Duration Minutes"
          },
          "lockout_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lockout Enabled"
          },
          "lockout_threshold": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 3.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lockout Threshold"
          },
          "require_mfa": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Require Mfa"
          },
          "required_for_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "MfaPolicyUpdate",
        "type": "object"
      },
      "MfaRecoveryCodesRequest": {
        "properties": {
          "code": {
            "anyOf": [
              {
                "maxLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "password": {
            "maxLength": 128,
            "title": "Password",
            "type": "string"
          },
          "recovery_code": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recovery Code"
          }
        },
        "required": [
          "password"
        ],
        "title": "MfaRecoveryCodesRequest",
        "type": "object"
      },
      "MfaRecoveryCodesResponse": {
        "properties": {
          "recovery_codes": {
            "items": {
              "type": "string"
            },
            "title": "Recovery Codes",
            "type": "array"
          }
        },
        "required": [
          "recovery_codes"
        ],
        "title": "MfaRecoveryCodesResponse",
        "type": "object"
      },
      "MfaStatusResponse": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "enrolled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrolled At"
          },
          "recovery_codes_remaining": {
            "default": 0,
            "title": "Recovery Codes Remaining",
            "type": "integer"
          },
          "required_by_policy": {
            "default": false,
            "title": "Required By Policy",
            "type": "boolean"
          },
          "secret_unreadable": {
            "default": false,
            "title": "Secret Unreadable",
            "type": "boolean"
          },
          "sso_managed": {
            "default": false,
            "title": "Sso Managed",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "MfaStatusResponse",
        "type": "object"
      },
      "MfaVerifyRequest": {
        "properties": {
          "challenge_token": {
            "title": "Challenge Token",
            "type": "string"
          },
          "code": {
            "anyOf": [
              {
                "maxLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "recovery_code": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recovery Code"
          }
        },
        "required": [
          "challenge_token"
        ],
        "title": "MfaVerifyRequest",
        "type": "object"
      },
      "ModelConfig": {
        "additionalProperties": false,
        "properties": {
          "escalation": {
            "$ref": "#/components/schemas/EscalationConfig"
          },
          "llm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelEndpointConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "slm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelEndpointConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "tier": {
            "default": "auto",
            "enum": [
              "auto",
              "deterministic",
              "slm",
              "llm"
            ],
            "title": "Tier",
            "type": "string"
          }
        },
        "title": "ModelConfig",
        "type": "object"
      },
      "ModelEndpointConfig": {
        "additionalProperties": false,
        "description": "One tier's model. Provider endpoints come only from the environment.",
        "properties": {
          "max_tokens": {
            "default": 1024,
            "maximum": 200000.0,
            "minimum": 1.0,
            "title": "Max Tokens",
            "type": "integer"
          },
          "model": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "provider": {
            "maxLength": 40,
            "minLength": 1,
            "title": "Provider",
            "type": "string"
          },
          "temperature": {
            "default": 0.0,
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "type": "number"
          }
        },
        "required": [
          "provider",
          "model"
        ],
        "title": "ModelEndpointConfig",
        "type": "object"
      },
      "MutationClass": {
        "enum": [
          "wrong_label",
          "missing_required_field",
          "unsupported_claim",
          "unsupported_causal_claim",
          "plausible_wrong_category",
          "correct_numbers_wrong_conclusion"
        ],
        "title": "MutationClass",
        "type": "string"
      },
      "MyFailureItem": {
        "description": "A single auto-assigned failure surfaced on the calling user's inbox.\n\nCarries enough context to render a triage row without a follow-up fetch:\ntest name + suite + run identity + project label + relative age. The\n``navigation_url`` is the canonical deep link to the run-detail page's\ntest-case drawer.",
        "properties": {
          "assignment_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignment Reason"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "failure_count": {
            "default": 1,
            "title": "Failure Count",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_failure_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure Step"
          },
          "navigation_url": {
            "title": "Navigation Url",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "run_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Seq"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "status": {
            "$ref": "#/components/schemas/TestStatus"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "triage_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triage Notes"
          },
          "triage_status": {
            "default": "PENDING_REVIEW",
            "title": "Triage Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "test_name",
          "status",
          "created_at",
          "test_run_id",
          "project_id",
          "navigation_url"
        ],
        "title": "MyFailureItem",
        "type": "object"
      },
      "MyFailureListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MyFailureItem"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "unresolved_total": {
            "title": "Unresolved Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "size",
          "pages",
          "unresolved_total"
        ],
        "title": "MyFailureListResponse",
        "type": "object"
      },
      "NotificationChannel": {
        "enum": [
          "email",
          "slack",
          "teams"
        ],
        "title": "NotificationChannel",
        "type": "string"
      },
      "NotificationLogResponse": {
        "properties": {
          "body": {
            "title": "Body",
            "type": "string"
          },
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_read": {
            "title": "Is Read",
            "type": "boolean"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "channel",
          "event_type",
          "title",
          "body",
          "status",
          "is_read",
          "sent_at",
          "created_at"
        ],
        "title": "NotificationLogResponse",
        "type": "object"
      },
      "NotificationPreferenceCreate": {
        "description": "Create or replace a single channel preference.",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/NotificationChannel"
          },
          "email_override": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Override"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "events": {
            "description": "List of NotificationEventType values",
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "failure_rate_threshold": {
            "default": 80.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Failure Rate Threshold",
            "type": "number"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url"
          },
          "teams_webhook_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teams Webhook Url"
          }
        },
        "required": [
          "channel"
        ],
        "title": "NotificationPreferenceCreate",
        "type": "object"
      },
      "NotificationPreferenceResponse": {
        "properties": {
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Override"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "failure_rate_threshold": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Rate Threshold"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url"
          },
          "teams_webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teams Webhook Url"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "project_id",
          "channel",
          "enabled",
          "events",
          "failure_rate_threshold",
          "email_override",
          "slack_webhook_url",
          "teams_webhook_url",
          "created_at"
        ],
        "title": "NotificationPreferenceResponse",
        "type": "object"
      },
      "NotificationTransitionPolicyResponse": {
        "properties": {
          "consecutive_failure_threshold": {
            "title": "Consecutive Failure Threshold",
            "type": "integer"
          },
          "enabled_events": {
            "items": {
              "type": "string"
            },
            "title": "Enabled Events",
            "type": "array"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "per_run_events_enabled": {
            "title": "Per Run Events Enabled",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "transitions_enabled": {
            "title": "Transitions Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "project_id",
          "transitions_enabled",
          "per_run_events_enabled",
          "enabled_events",
          "consecutive_failure_threshold"
        ],
        "title": "NotificationTransitionPolicyResponse",
        "type": "object"
      },
      "NotificationTransitionPolicyUpdate": {
        "description": "Per-project transition-notification policy (PMF US-7.1).",
        "properties": {
          "consecutive_failure_threshold": {
            "default": 2,
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Consecutive Failure Threshold",
            "type": "integer"
          },
          "enabled_events": {
            "description": "Transition NotificationEventType values enabled for the project",
            "items": {
              "type": "string"
            },
            "title": "Enabled Events",
            "type": "array"
          },
          "per_run_events_enabled": {
            "default": false,
            "title": "Per Run Events Enabled",
            "type": "boolean"
          },
          "transitions_enabled": {
            "default": true,
            "title": "Transitions Enabled",
            "type": "boolean"
          }
        },
        "title": "NotificationTransitionPolicyUpdate",
        "type": "object"
      },
      "NotifyTestOwnerRequest": {
        "description": "POST body for /api/v1/analytics/notify-owner — fires an email at the\nsuite owner of the test that's been failing repeatedly.",
        "properties": {
          "days": {
            "default": 30,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Days",
            "type": "integer"
          },
          "fail_count": {
            "anyOf": [
              {
                "maximum": 10000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fail Count"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "test_name": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Test Name",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "test_name"
        ],
        "title": "NotifyTestOwnerRequest",
        "type": "object"
      },
      "NotifyTestOwnerResponse": {
        "properties": {
          "is_fallback_owner": {
            "default": false,
            "title": "Is Fallback Owner",
            "type": "boolean"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "queued": {
            "title": "Queued",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "sent_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent To"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          }
        },
        "required": [
          "queued"
        ],
        "title": "NotifyTestOwnerResponse",
        "type": "object"
      },
      "OutboxRequeueRequest": {
        "description": "Which failed run-outbox intents to put back.",
        "properties": {
          "dry_run": {
            "default": true,
            "description": "List what would be requeued, and change nothing. The default.",
            "title": "Dry Run",
            "type": "boolean"
          },
          "last_error": {
            "description": "Only intents that failed with exactly this error, for example broker_TypeError. Required: a requeue without it re-ran every failed intent of the operation, including notifications and webhooks that had executed and failed for their own reasons (code review round 3).",
            "maxLength": 200,
            "minLength": 1,
            "title": "Last Error",
            "type": "string"
          },
          "limit": {
            "default": 100,
            "description": "At most this many, oldest first.",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "operation": {
            "description": "The post-ingestion operation, for example agent_pipeline.",
            "title": "Operation",
            "type": "string"
          },
          "run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only this run's intents.",
            "title": "Run Id"
          }
        },
        "required": [
          "operation",
          "last_error"
        ],
        "title": "OutboxRequeueRequest",
        "type": "object"
      },
      "OverrideAuditEntry": {
        "description": "Single entry in the override audit trail.",
        "properties": {
          "actor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Name"
          },
          "after_recommendation": {
            "title": "After Recommendation",
            "type": "string"
          },
          "before_recommendation": {
            "title": "Before Recommendation",
            "type": "string"
          },
          "before_risk_score": {
            "title": "Before Risk Score",
            "type": "integer"
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Id"
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Version"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "timestamp": {
            "title": "Timestamp",
            "type": "string"
          }
        },
        "required": [
          "timestamp",
          "before_recommendation",
          "before_risk_score",
          "after_recommendation",
          "reason"
        ],
        "title": "OverrideAuditEntry",
        "type": "object"
      },
      "OverridePolicyConfig": {
        "additionalProperties": false,
        "properties": {
          "allow_retry_decrease": {
            "default": true,
            "title": "Allow Retry Decrease",
            "type": "boolean"
          },
          "allow_tier_downgrade": {
            "default": true,
            "title": "Allow Tier Downgrade",
            "type": "boolean"
          },
          "allow_tool_narrowing": {
            "default": true,
            "title": "Allow Tool Narrowing",
            "type": "boolean"
          }
        },
        "title": "OverridePolicyConfig",
        "type": "object"
      },
      "OwnershipBulkImportItem": {
        "description": "Single item for bulk import.",
        "properties": {
          "match_pattern": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Match Pattern",
            "type": "string"
          },
          "match_type": {
            "pattern": "^(suite_name|component|package|path|label)$",
            "title": "Match Type",
            "type": "string"
          },
          "priority": {
            "default": 0,
            "title": "Priority",
            "type": "integer"
          },
          "service_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Service Name",
            "type": "string"
          },
          "team_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Contact"
          },
          "team_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Team Name",
            "type": "string"
          }
        },
        "required": [
          "match_type",
          "match_pattern",
          "service_name",
          "team_name"
        ],
        "title": "OwnershipBulkImportItem",
        "type": "object"
      },
      "OwnershipBulkImportRequest": {
        "description": "Bulk import of ownership rules.",
        "properties": {
          "replace_existing": {
            "default": false,
            "title": "Replace Existing",
            "type": "boolean"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/OwnershipBulkImportItem"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Rules",
            "type": "array"
          }
        },
        "required": [
          "rules"
        ],
        "title": "OwnershipBulkImportRequest",
        "type": "object"
      },
      "OwnershipResolution": {
        "description": "Result of resolving ownership for a test/cluster.",
        "properties": {
          "confidence": {
            "default": "none",
            "title": "Confidence",
            "type": "string"
          },
          "fallback_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Reason"
          },
          "match_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Source"
          },
          "matched_rule_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Rule Id"
          },
          "service_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "team_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Contact"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          }
        },
        "title": "OwnershipResolution",
        "type": "object"
      },
      "OwnershipRuleCreate": {
        "description": "Create a new ownership rule.",
        "properties": {
          "match_pattern": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Match Pattern",
            "type": "string"
          },
          "match_type": {
            "pattern": "^(suite_name|component|package|path|label)$",
            "title": "Match Type",
            "type": "string"
          },
          "priority": {
            "default": 0,
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Priority",
            "type": "integer"
          },
          "service_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Service Name",
            "type": "string"
          },
          "team_contact": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Contact"
          },
          "team_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Team Name",
            "type": "string"
          }
        },
        "required": [
          "match_type",
          "match_pattern",
          "service_name",
          "team_name"
        ],
        "title": "OwnershipRuleCreate",
        "type": "object"
      },
      "OwnershipRuleResponse": {
        "description": "Ownership rule response.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "match_pattern": {
            "title": "Match Pattern",
            "type": "string"
          },
          "match_type": {
            "title": "Match Type",
            "type": "string"
          },
          "priority": {
            "title": "Priority",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "service_name": {
            "title": "Service Name",
            "type": "string"
          },
          "team_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Contact"
          },
          "team_name": {
            "title": "Team Name",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "project_id",
          "match_type",
          "match_pattern",
          "service_name",
          "team_name",
          "priority",
          "is_active",
          "created_at"
        ],
        "title": "OwnershipRuleResponse",
        "type": "object"
      },
      "OwnershipRuleUpdate": {
        "description": "Partial update for an ownership rule.",
        "properties": {
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "match_pattern": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Pattern"
          },
          "match_type": {
            "anyOf": [
              {
                "pattern": "^(suite_name|component|package|path|label)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Type"
          },
          "priority": {
            "anyOf": [
              {
                "maximum": 1000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "service_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "team_contact": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Contact"
          },
          "team_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          }
        },
        "title": "OwnershipRuleUpdate",
        "type": "object"
      },
      "PasswordResetLinkResponse": {
        "description": "W17b ADM-02: an admin-issued reset link. The admin never sees or sets the password.",
        "properties": {
          "email_sent": {
            "default": false,
            "title": "Email Sent",
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "link": {
            "title": "Link",
            "type": "string"
          }
        },
        "required": [
          "link",
          "expires_at"
        ],
        "title": "PasswordResetLinkResponse",
        "type": "object"
      },
      "PendingDefectItem": {
        "description": "One defect awaiting approval (GET /deep-investigate/defects/pending-review).",
        "properties": {
          "ai_confidence_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Confidence Score"
          },
          "cluster_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Id"
          },
          "component": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "defect_id": {
            "title": "Defect Id",
            "type": "string"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "owner_team": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Team"
          },
          "policy_reasons": {
            "items": {
              "type": "string"
            },
            "title": "Policy Reasons",
            "type": "array"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "defect_id",
          "project_id"
        ],
        "title": "PendingDefectItem",
        "type": "object"
      },
      "PendingDefectList": {
        "description": "A page of the approval queue. ``total`` is a COUNT over the same scope, not ``len(items)``.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PendingDefectItem"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size"
        ],
        "title": "PendingDefectList",
        "type": "object"
      },
      "PerTestRouting": {
        "properties": {
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "confidence_adjustments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Adjustments"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "fallback_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback From"
          },
          "fallback_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Reason"
          },
          "mode_requested": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode Requested"
          },
          "retry_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Count"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          },
          "threshold_check": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThresholdCheck"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "test_case_id"
        ],
        "title": "PerTestRouting",
        "type": "object"
      },
      "PhaseDraft": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "exit_criteria_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Criteria Text"
          },
          "heading": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heading"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phase_type": {
            "title": "Phase Type",
            "type": "string"
          },
          "planned_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Days"
          }
        },
        "required": [
          "name",
          "phase_type"
        ],
        "title": "PhaseDraft",
        "type": "object"
      },
      "PhaseDraftResponse": {
        "properties": {
          "fallback_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Reason"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "phases": {
            "items": {
              "$ref": "#/components/schemas/PhaseDraft"
            },
            "title": "Phases",
            "type": "array"
          },
          "release_id": {
            "format": "uuid",
            "title": "Release Id",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "text_chars": {
            "title": "Text Chars",
            "type": "integer"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "release_id",
          "source",
          "phases",
          "text_chars"
        ],
        "title": "PhaseDraftResponse",
        "type": "object"
      },
      "PhaseIn": {
        "properties": {
          "actual_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual End"
          },
          "actual_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Start"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "exit_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Criteria"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "order_index": {
            "default": 0,
            "title": "Order Index",
            "type": "integer"
          },
          "phase_type": {
            "default": "qa_testing",
            "title": "Phase Type",
            "type": "string"
          },
          "planned_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned End"
          },
          "planned_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Start"
          },
          "status": {
            "default": "pending",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "PhaseIn",
        "type": "object"
      },
      "PhaseUpdate": {
        "properties": {
          "actual_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual End"
          },
          "actual_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Start"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "exit_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Criteria"
          },
          "gate_override_reason": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gate Override Reason"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "order_index": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Index"
          },
          "phase_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase Type"
          },
          "planned_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned End"
          },
          "planned_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Start"
          },
          "skip_reason": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skip Reason"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "PhaseUpdate",
        "type": "object"
      },
      "PipelineCompareResponse": {
        "properties": {
          "a": {
            "$ref": "#/components/schemas/PipelineCompareSide"
          },
          "b": {
            "$ref": "#/components/schemas/PipelineCompareSide"
          },
          "changed_stages": {
            "title": "Changed Stages",
            "type": "integer"
          },
          "output": {
            "title": "Output",
            "type": "string"
          },
          "same_test_run": {
            "title": "Same Test Run",
            "type": "boolean"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/PipelineCompareStageRow"
            },
            "title": "Stages",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "a",
          "b",
          "same_test_run",
          "output",
          "changed_stages",
          "total",
          "stages"
        ],
        "title": "PipelineCompareResponse",
        "type": "object"
      },
      "PipelineCompareSide": {
        "properties": {
          "analysis_mode_resolved": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode Resolved"
          },
          "attempt": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attempt"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "pipeline_run_id": {
            "format": "uuid",
            "title": "Pipeline Run Id",
            "type": "string"
          },
          "public_status": {
            "title": "Public Status",
            "type": "string"
          },
          "release_verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Verdict"
          },
          "rerun_of": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rerun Of"
          },
          "stages_truncated": {
            "default": false,
            "title": "Stages Truncated",
            "type": "boolean"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "total_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tokens"
          },
          "workflow_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Ref"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "required": [
          "pipeline_run_id",
          "test_run_id",
          "workflow_type",
          "status",
          "public_status"
        ],
        "title": "PipelineCompareSide",
        "type": "object"
      },
      "PipelineCompareStageCell": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "confidence_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Score"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "execution_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Path"
          },
          "fallback_used": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Used"
          },
          "output_checksum_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Checksum Sha256"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "total_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tokens"
          }
        },
        "required": [
          "status"
        ],
        "title": "PipelineCompareStageCell",
        "type": "object"
      },
      "PipelineCompareStageRow": {
        "properties": {
          "a": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PipelineCompareStageCell"
              },
              {
                "type": "null"
              }
            ]
          },
          "b": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PipelineCompareStageCell"
              },
              {
                "type": "null"
              }
            ]
          },
          "changed": {
            "items": {
              "type": "string"
            },
            "title": "Changed",
            "type": "array"
          },
          "cost_delta_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Delta Usd"
          },
          "duration_delta_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Delta Seconds"
          },
          "output_checksum_equal": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Checksum Equal"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          },
          "tokens_delta": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens Delta"
          }
        },
        "required": [
          "stage_name"
        ],
        "title": "PipelineCompareStageRow",
        "type": "object"
      },
      "PipelineEventLogHealthResponse": {
        "properties": {
          "dead_letter_count": {
            "default": 0,
            "title": "Dead Letter Count",
            "type": "integer"
          },
          "dead_letter_limit": {
            "default": 0,
            "title": "Dead Letter Limit",
            "type": "integer"
          },
          "recent_dead_letters": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Recent Dead Letters",
            "type": "array"
          },
          "status": {
            "default": "healthy",
            "title": "Status",
            "type": "string"
          },
          "write_failure_count": {
            "default": 0,
            "title": "Write Failure Count",
            "type": "integer"
          }
        },
        "title": "PipelineEventLogHealthResponse",
        "type": "object"
      },
      "PipelineReplayAuditGaps": {
        "properties": {
          "missing_checkpoints": {
            "items": {
              "type": "string"
            },
            "title": "Missing Checkpoints",
            "type": "array"
          },
          "missing_final_state_checksum": {
            "default": false,
            "title": "Missing Final State Checksum",
            "type": "boolean"
          },
          "missing_replay_checksums": {
            "items": {
              "type": "string"
            },
            "title": "Missing Replay Checksums",
            "type": "array"
          },
          "missing_start_events": {
            "items": {
              "type": "string"
            },
            "title": "Missing Start Events",
            "type": "array"
          },
          "missing_terminal_events": {
            "items": {
              "type": "string"
            },
            "title": "Missing Terminal Events",
            "type": "array"
          }
        },
        "title": "PipelineReplayAuditGaps",
        "type": "object"
      },
      "PipelineReplayEventResponse": {
        "properties": {
          "detail": {
            "additionalProperties": true,
            "title": "Detail",
            "type": "object"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "stage_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Name"
          },
          "test_case_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Case Id"
          },
          "timestamp": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Timestamp"
          }
        },
        "required": [
          "event_type"
        ],
        "title": "PipelineReplayEventResponse",
        "type": "object"
      },
      "PipelineReplayIntegritySummary": {
        "properties": {
          "audit_gaps": {
            "$ref": "#/components/schemas/PipelineReplayAuditGaps"
          },
          "replayable": {
            "default": false,
            "title": "Replayable",
            "type": "boolean"
          }
        },
        "title": "PipelineReplayIntegritySummary",
        "type": "object"
      },
      "PipelineReplayResponse": {
        "properties": {
          "analysis_mode_requested": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode Requested"
          },
          "analysis_mode_resolution": {
            "additionalProperties": true,
            "title": "Analysis Mode Resolution",
            "type": "object"
          },
          "analysis_mode_resolved": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode Resolved"
          },
          "audit_gaps": {
            "$ref": "#/components/schemas/PipelineReplayAuditGaps"
          },
          "completed_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "event_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Event Counts",
            "type": "object"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/PipelineReplayEventResponse"
            },
            "title": "Events",
            "type": "array"
          },
          "final_state_checksum_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final State Checksum Sha256"
          },
          "memory_references": {
            "items": {
              "$ref": "#/components/schemas/MemoryReference"
            },
            "title": "Memory References",
            "type": "array"
          },
          "pipeline_run_id": {
            "format": "uuid",
            "title": "Pipeline Run Id",
            "type": "string"
          },
          "replayable": {
            "default": false,
            "title": "Replayable",
            "type": "boolean"
          },
          "route_decisions": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Route Decisions",
            "type": "array"
          },
          "runtime_versions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Runtime Versions",
            "type": "object"
          },
          "schema_version": {
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "stage_replay": {
            "items": {
              "$ref": "#/components/schemas/PipelineReplayStageResponse"
            },
            "title": "Stage Replay",
            "type": "array"
          },
          "started_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "workflow_plan": {
            "additionalProperties": true,
            "title": "Workflow Plan",
            "type": "object"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          },
          "workflow_verification": {
            "additionalProperties": true,
            "title": "Workflow Verification",
            "type": "object"
          }
        },
        "required": [
          "pipeline_run_id",
          "test_run_id",
          "workflow_type",
          "status"
        ],
        "title": "PipelineReplayResponse",
        "type": "object"
      },
      "PipelineReplayStageResponse": {
        "properties": {
          "checkpoint_available": {
            "default": false,
            "title": "Checkpoint Available",
            "type": "boolean"
          },
          "completed_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "decision_count": {
            "default": 0,
            "title": "Decision Count",
            "type": "integer"
          },
          "input_checksum_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Checksum Sha256"
          },
          "output_checksum_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Checksum Sha256"
          },
          "restored_from_checkpoint": {
            "default": false,
            "title": "Restored From Checkpoint",
            "type": "boolean"
          },
          "runtime_versions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Runtime Versions",
            "type": "object"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "stage_name",
          "status"
        ],
        "title": "PipelineReplayStageResponse",
        "type": "object"
      },
      "PipelineTimelineEventResponse": {
        "properties": {
          "detail": {
            "additionalProperties": true,
            "title": "Detail",
            "type": "object"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "stage_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Name"
          },
          "test_case_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Case Id"
          },
          "timestamp": {
            "format": "date-time",
            "title": "Timestamp",
            "type": "string"
          }
        },
        "required": [
          "event_type",
          "timestamp"
        ],
        "title": "PipelineTimelineEventResponse",
        "type": "object"
      },
      "PipelineTimelineResponse": {
        "properties": {
          "agent_observability": {
            "additionalProperties": true,
            "title": "Agent Observability",
            "type": "object"
          },
          "alerts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Alerts",
            "type": "array"
          },
          "completed_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cost_summary": {
            "additionalProperties": true,
            "title": "Cost Summary",
            "type": "object"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/PipelineTimelineEventResponse"
            },
            "title": "Events",
            "type": "array"
          },
          "pipeline_run_id": {
            "format": "uuid",
            "title": "Pipeline Run Id",
            "type": "string"
          },
          "replay_integrity": {
            "$ref": "#/components/schemas/PipelineReplayIntegritySummary"
          },
          "schema_version": {
            "default": 2,
            "title": "Schema Version",
            "type": "integer"
          },
          "stages": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Stages",
            "type": "array"
          },
          "started_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "summary": {
            "$ref": "#/components/schemas/PipelineTimelineSummary"
          },
          "workflow_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Ref"
          },
          "workflow_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Source"
          },
          "workflow_type": {
            "title": "Workflow Type",
            "type": "string"
          }
        },
        "required": [
          "pipeline_run_id",
          "workflow_type",
          "status"
        ],
        "title": "PipelineTimelineResponse",
        "type": "object"
      },
      "PipelineTimelineSummary": {
        "properties": {
          "completed_stages": {
            "default": 0,
            "title": "Completed Stages",
            "type": "integer"
          },
          "failed_stages": {
            "default": 0,
            "title": "Failed Stages",
            "type": "integer"
          },
          "pending_stages": {
            "default": 0,
            "title": "Pending Stages",
            "type": "integer"
          },
          "progress_percent": {
            "default": 0.0,
            "title": "Progress Percent",
            "type": "number"
          },
          "running_stages": {
            "default": 0,
            "title": "Running Stages",
            "type": "integer"
          },
          "skipped_stages": {
            "default": 0,
            "title": "Skipped Stages",
            "type": "integer"
          },
          "total_stages": {
            "default": 0,
            "title": "Total Stages",
            "type": "integer"
          }
        },
        "title": "PipelineTimelineSummary",
        "type": "object"
      },
      "PolicyDimensionWeights": {
        "description": "Weights for 7-dimension risk scoring (should sum to 1.0).",
        "properties": {
          "blast_radius": {
            "default": 0.15,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Blast Radius",
            "type": "number"
          },
          "diagnosis_conf": {
            "default": 0.05,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Diagnosis Conf",
            "type": "number"
          },
          "env_sensitivity": {
            "default": 0.1,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Env Sensitivity",
            "type": "number"
          },
          "hist_recurrence": {
            "default": 0.1,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Hist Recurrence",
            "type": "number"
          },
          "regression_likely": {
            "default": 0.2,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Regression Likely",
            "type": "number"
          },
          "reproducibility": {
            "default": 0.15,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Reproducibility",
            "type": "number"
          },
          "user_impact": {
            "default": 0.25,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "User Impact",
            "type": "number"
          }
        },
        "title": "PolicyDimensionWeights",
        "type": "object"
      },
      "PolicyDocument": {
        "description": "The full policy rule document stored as JSON in release_gate_policies.rules.",
        "properties": {
          "dimension_weights": {
            "$ref": "#/components/schemas/PolicyDimensionWeights"
          },
          "hard_caps": {
            "$ref": "#/components/schemas/PolicyHardCaps"
          },
          "kind_rules": {
            "$ref": "#/components/schemas/PolicyKindRules"
          },
          "pass_rate_bands": {
            "$ref": "#/components/schemas/PolicyPassRateBands"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PolicyRule"
            },
            "title": "Rules",
            "type": "array"
          },
          "schema_version": {
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "thresholds": {
            "$ref": "#/components/schemas/PolicyThresholds"
          }
        },
        "title": "PolicyDocument",
        "type": "object"
      },
      "PolicyHardCaps": {
        "description": "Hard caps that downgrade the pass-rate band before the verdict map.\n\nEach cap is a (count) threshold. **Breaching any cap pins the band to red\nand forces NO_GO**, regardless of how green the pass rate was — a hard cap\nis a hard blocker, not a one-step downgrade. ``downgrades`` records which\ncaps fired.\n\n**Zero does not mean the same thing for every cap**, and the difference is\nload-bearing, so it is stated per field below rather than summarised here.\n``max_p0_defects=0`` means \"no P0 defects allowed\" and blocks on the first\none; ``max_flaky_count=0`` and ``max_new_failures_24h=0`` *disable* their\ncaps, because a literal zero would over-fire on real projects. That\nasymmetry is deliberate and pinned by\n``tests/test_classify_with_policy.py``.",
        "properties": {
          "max_flaky_count": {
            "default": 10,
            "description": "Flaky tests allowed before the gate blocks. 0 DISABLES this cap (any flaky count passes) rather than forbidding flakiness — set 1 to block on the first flaky test.",
            "minimum": 0.0,
            "title": "Max Flaky Count",
            "type": "integer"
          },
          "max_new_failures_24h": {
            "default": 20,
            "description": "New failures in the last 24h allowed before the gate blocks. 0 DISABLES this cap rather than forbidding new failures — set 1 to block on the first one.",
            "minimum": 0.0,
            "title": "Max New Failures 24H",
            "type": "integer"
          },
          "max_p0_defects": {
            "default": 0,
            "description": "Active P0 defects allowed before the gate blocks. 0 means NONE allowed — one open P0 forces red/NO_GO. This cap cannot be disabled by setting it to 0; raise it to permit P0 defects.",
            "minimum": 0.0,
            "title": "Max P0 Defects",
            "type": "integer"
          }
        },
        "title": "PolicyHardCaps",
        "type": "object"
      },
      "PolicyKindBudget": {
        "description": "Failure budget for one excludable failure kind (US-9.3).\n\n``max_failures`` is the count of failures of this kind the gate will\nexcuse from the NO_GO trigger. ``downgrade_to`` is deliberately a\nsingle-value Literal: a NO_GO may be softened at most to CONDITIONAL_GO —\nnever to GO — so the schema itself makes the hard rule unrepresentable.\n\n``min_confidence_to_excuse`` (AI-4, optional): when set, a failure only\ncounts toward this kind's excusable budget if its per-failure kind\nconfidence (the evidence-checklist confidence, falling back to the\nclassifier confidence) is at or above the floor. Below-floor and\nunknown-confidence failures count as product — conservative. ``None``\n(the default) applies no floor: verdicts are byte-identical to the\npre-AI-4 US-9.3 behaviour (pinned by tests/test_kind_gate_policy.py).",
        "properties": {
          "downgrade_to": {
            "const": "CONDITIONAL_GO",
            "default": "CONDITIONAL_GO",
            "title": "Downgrade To",
            "type": "string"
          },
          "max_failures": {
            "default": 0,
            "minimum": 0.0,
            "title": "Max Failures",
            "type": "integer"
          },
          "min_confidence_to_excuse": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Confidence To Excuse"
          }
        },
        "title": "PolicyKindBudget",
        "type": "object"
      },
      "PolicyKindRules": {
        "description": "Opt-in failure-kind weighting for the release gate (US-9.3).\n\nSTRICTLY OPT-IN: ``enabled`` defaults to False and the evaluator treats\na disabled/absent block as byte-identical to today's behaviour (pinned by\n``tests/test_kind_gate_policy.py``). Kinds come from the derived triad in\n``app/services/failure_kind.py`` (AI-classified — never ground truth).\n\nOnly ``infrastructure`` and ``test_code`` may carry budgets. ``product``\nfailures always count and ``unknown`` failures are conservatively counted\nas product — neither is representable here on purpose.",
        "properties": {
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          },
          "infrastructure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PolicyKindBudget"
              },
              {
                "type": "null"
              }
            ]
          },
          "test_code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PolicyKindBudget"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "PolicyKindRules",
        "type": "object"
      },
      "PolicyPassRateBands": {
        "description": "Project-level 4-band classification for the build colour and verdict.\n\nBands are defined by the *lower* edge of each colour and must be strictly\nincreasing: ``orange_min < yellow_min < green_min``. A pass rate below\n``orange_min`` is red; ``[orange_min, yellow_min)`` is orange;\n``[yellow_min, green_min)`` is yellow; ``>= green_min`` is green.\n\nDefaults match the user-requested levels (red <90, orange 90-95,\nyellow 95-99, green >=99). Verdict mapping is fixed: green = GO,\nyellow = GO with watch, orange = CONDITIONAL, red = NO_GO.\n\nA breached hard cap (``PolicyHardCaps``) does **not** step the band down\none or two notches — it pins the band straight to red and forces NO_GO,\nwhatever the pass rate was. The stepped behaviour was abandoned because\nyellow still mapped to GO, which made a \"hard cap\" advisory at best.",
        "properties": {
          "green_min": {
            "default": 99.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Green Min",
            "type": "number"
          },
          "orange_min": {
            "default": 90.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Orange Min",
            "type": "number"
          },
          "yellow_min": {
            "default": 95.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Yellow Min",
            "type": "number"
          }
        },
        "title": "PolicyPassRateBands",
        "type": "object"
      },
      "PolicyRule": {
        "description": "A single rule within a release gate policy.",
        "properties": {
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "params": {
            "additionalProperties": true,
            "title": "Params",
            "type": "object"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "title": "PolicyRule",
        "type": "object"
      },
      "PolicySimulateRequest": {
        "description": "Simulate a draft policy against a past run.",
        "properties": {
          "policy_document": {
            "$ref": "#/components/schemas/PolicyDocument"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "policy_document"
        ],
        "title": "PolicySimulateRequest",
        "type": "object"
      },
      "PolicySimulateResponse": {
        "description": "Side-by-side comparison: original vs simulated policy result.",
        "properties": {
          "diff_summary": {
            "title": "Diff Summary",
            "type": "string"
          },
          "original_composite": {
            "title": "Original Composite",
            "type": "number"
          },
          "original_recommendation": {
            "title": "Original Recommendation",
            "type": "string"
          },
          "rule_evaluations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RuleEvaluationResponse"
            },
            "title": "Rule Evaluations",
            "type": "array"
          },
          "simulated_composite": {
            "title": "Simulated Composite",
            "type": "number"
          },
          "simulated_recommendation": {
            "title": "Simulated Recommendation",
            "type": "string"
          }
        },
        "required": [
          "original_recommendation",
          "simulated_recommendation",
          "original_composite",
          "simulated_composite",
          "diff_summary"
        ],
        "title": "PolicySimulateResponse",
        "type": "object"
      },
      "PolicyThresholds": {
        "description": "Risk score thresholds for GO/NO_GO classification.",
        "properties": {
          "go_threshold": {
            "default": 20.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Go Threshold",
            "type": "number"
          },
          "no_go_threshold": {
            "default": 55.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "No Go Threshold",
            "type": "number"
          },
          "pass_rate_hard_floor_factor": {
            "default": 0.7,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Pass Rate Hard Floor Factor",
            "type": "number"
          },
          "pass_rate_minimum": {
            "default": 90.0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Pass Rate Minimum",
            "type": "number"
          }
        },
        "title": "PolicyThresholds",
        "type": "object"
      },
      "PreReleaseGateRequest": {
        "properties": {
          "agent_name": {
            "default": "AnalysisAgent",
            "title": "Agent Name",
            "type": "string"
          },
          "candidate_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Candidate Run Id"
          },
          "dataset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Id"
          },
          "task_type": {
            "default": "classification",
            "title": "Task Type",
            "type": "string"
          }
        },
        "title": "PreReleaseGateRequest",
        "type": "object"
      },
      "PreScanGroup": {
        "properties": {
          "cluster_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Id"
          },
          "cluster_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Label"
          },
          "member_result_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Member Result Ids",
            "type": "array"
          },
          "members": {
            "title": "Members",
            "type": "integer"
          },
          "members_truncated": {
            "default": false,
            "title": "Members Truncated",
            "type": "boolean"
          },
          "representative_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Representative Error"
          },
          "signature_id": {
            "title": "Signature Id",
            "type": "string"
          },
          "suites": {
            "items": {
              "type": "string"
            },
            "title": "Suites",
            "type": "array"
          }
        },
        "required": [
          "signature_id",
          "members",
          "member_result_ids"
        ],
        "title": "PreScanGroup",
        "type": "object"
      },
      "ProjectCreate": {
        "properties": {
          "component_owner_map": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component Owner Map"
          },
          "default_qa_lead_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Qa Lead User Id"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "jenkins_job_pattern": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored only; TestLookup does not use it (W10 D22).",
            "title": "Jenkins Job Pattern"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "ocp_namespace": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Namespace"
          },
          "slug": {
            "maxLength": 100,
            "minLength": 2,
            "pattern": "^[a-z0-9-]+$",
            "title": "Slug",
            "type": "string"
          },
          "splunk_index": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Index"
          }
        },
        "required": [
          "name",
          "slug"
        ],
        "title": "ProjectCreate",
        "type": "object"
      },
      "ProjectDataError": {
        "description": "A W24 refusal: also the 4xx ``detail`` shape ``{code, message}`` (ERROR_SENTENCES).",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ProjectDataError",
        "type": "object"
      },
      "ProjectDataHistoryReport": {
        "description": "Inside ``ProjectDataImportReport.history``.",
        "properties": {
          "documents": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Documents",
            "type": "object"
          },
          "newest_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Newest Run At"
          },
          "object_bytes": {
            "default": 0,
            "title": "Object Bytes",
            "type": "integer"
          },
          "objects": {
            "default": 0,
            "title": "Objects",
            "type": "integer"
          },
          "oldest_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Run At"
          },
          "recent_runs": {
            "default": 0,
            "title": "Recent Runs",
            "type": "integer"
          },
          "retention_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retention Days"
          },
          "retention_paused_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retention Paused Until"
          },
          "runs": {
            "title": "Runs",
            "type": "integer"
          },
          "runs_past_retention": {
            "default": 0,
            "title": "Runs Past Retention",
            "type": "integer"
          },
          "search_reindex": {
            "title": "Search Reindex",
            "type": "string"
          },
          "skipped": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ProjectDataSkip"
            },
            "title": "Skipped",
            "type": "array"
          },
          "test_cases": {
            "title": "Test Cases",
            "type": "integer"
          }
        },
        "required": [
          "runs",
          "test_cases",
          "search_reindex"
        ],
        "title": "ProjectDataHistoryReport",
        "type": "object"
      },
      "ProjectDataImportReport": {
        "properties": {
          "cleared": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ProjectDataSkip"
            },
            "title": "Cleared",
            "type": "array"
          },
          "exported_at": {
            "format": "date-time",
            "title": "Exported At",
            "type": "string"
          },
          "history": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectDataHistoryReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "inserted": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Inserted",
            "type": "object"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "title": "Project Name",
            "type": "string"
          },
          "project_slug": {
            "title": "Project Slug",
            "type": "string"
          },
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "skipped": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ProjectDataSkip"
            },
            "title": "Skipped",
            "type": "array"
          },
          "source_app_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source App Version"
          },
          "source_project_name": {
            "title": "Source Project Name",
            "type": "string"
          },
          "switched_off": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Switched Off",
            "type": "object"
          }
        },
        "required": [
          "project_id",
          "project_name",
          "project_slug",
          "inserted",
          "signature",
          "source_project_name",
          "exported_at"
        ],
        "title": "ProjectDataImportReport",
        "type": "object"
      },
      "ProjectDataJobList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectDataJobRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "ProjectDataJobList",
        "type": "object"
      },
      "ProjectDataJobRead": {
        "description": "One export / import job. ``storage_key`` is NEVER part of it.",
        "properties": {
          "bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Counts",
            "type": "object"
          },
          "download_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Path"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectDataError"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "file_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Count"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "import_report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectDataImportReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "manifest_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manifest Sha256"
          },
          "options": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectDataOptions"
              },
              {
                "type": "null"
              }
            ]
          },
          "progress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectDataProgress"
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "requested_at": {
            "format": "date-time",
            "title": "Requested At",
            "type": "string"
          },
          "requested_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By Name"
          },
          "schema_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schema Version"
          },
          "signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "upload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectDataUpload"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "requested_at"
        ],
        "title": "ProjectDataJobRead",
        "type": "object"
      },
      "ProjectDataOptions": {
        "description": "Echoed on an export job: what was asked for.",
        "properties": {
          "history_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "History Days"
          },
          "include_history": {
            "default": false,
            "title": "Include History",
            "type": "boolean"
          },
          "max_runs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Runs"
          }
        },
        "title": "ProjectDataOptions",
        "type": "object"
      },
      "ProjectDataProgress": {
        "properties": {
          "done": {
            "minimum": 0.0,
            "title": "Done",
            "type": "integer"
          },
          "phase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase"
          },
          "phase_done": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase Done"
          },
          "phase_total": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase Total"
          },
          "total": {
            "minimum": 0.0,
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "done",
          "total"
        ],
        "title": "ProjectDataProgress",
        "type": "object"
      },
      "ProjectDataSkip": {
        "properties": {
          "column": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Column"
          },
          "count": {
            "minimum": 1.0,
            "title": "Count",
            "type": "integer"
          },
          "entity": {
            "title": "Entity",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "entity",
          "reason",
          "count"
        ],
        "title": "ProjectDataSkip",
        "type": "object"
      },
      "ProjectDataUpload": {
        "description": "A parted import upload's state (import jobs in \"uploading\").",
        "properties": {
          "bytes": {
            "title": "Bytes",
            "type": "integer"
          },
          "parts": {
            "title": "Parts",
            "type": "integer"
          },
          "received": {
            "default": [],
            "items": {
              "type": "integer"
            },
            "title": "Received",
            "type": "array"
          },
          "received_bytes": {
            "default": 0,
            "title": "Received Bytes",
            "type": "integer"
          }
        },
        "required": [
          "parts",
          "bytes"
        ],
        "title": "ProjectDataUpload",
        "type": "object"
      },
      "ProjectExportEstimate": {
        "description": "``GET /projects/{id}/export-estimate``: counts only. A store that could not be read → its counts None and\n``measured[store] = False`` (absence is not health — never 0).",
        "properties": {
          "documents": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documents"
          },
          "estimated_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Bytes"
          },
          "history_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "History Days"
          },
          "include_history": {
            "title": "Include History",
            "type": "boolean"
          },
          "measured": {
            "additionalProperties": {
              "type": "boolean"
            },
            "title": "Measured",
            "type": "object"
          },
          "object_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Object Bytes"
          },
          "objects": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objects"
          },
          "over_limit": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Over Limit"
          },
          "runs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs"
          },
          "runs_in_progress": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs In Progress"
          },
          "runs_over_cap": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs Over Cap"
          },
          "test_cases": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Cases"
          }
        },
        "required": [
          "include_history",
          "measured"
        ],
        "title": "ProjectExportEstimate",
        "type": "object"
      },
      "ProjectExportRequest": {
        "additionalProperties": false,
        "description": "The OPTIONAL JSON body of ``POST /projects/{id}/export``. No body (every phase-1 caller) or\n``include_history: false`` == the phase-1 export, schema 1.",
        "properties": {
          "history_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 90,
            "title": "History Days"
          },
          "include_history": {
            "default": false,
            "title": "Include History",
            "type": "boolean"
          },
          "max_runs": {
            "default": 2000,
            "maximum": 2000.0,
            "minimum": 1.0,
            "title": "Max Runs",
            "type": "integer"
          }
        },
        "title": "ProjectExportRequest",
        "type": "object"
      },
      "ProjectImportPartReceipt": {
        "description": "The answer of ``PUT /project-imports/uploads/{data_job_id}/parts/{part_number}``.",
        "properties": {
          "bytes": {
            "title": "Bytes",
            "type": "integer"
          },
          "complete": {
            "title": "Complete",
            "type": "boolean"
          },
          "part": {
            "title": "Part",
            "type": "integer"
          },
          "received": {
            "items": {
              "type": "integer"
            },
            "title": "Received",
            "type": "array"
          }
        },
        "required": [
          "part",
          "bytes",
          "received",
          "complete"
        ],
        "title": "ProjectImportPartReceipt",
        "type": "object"
      },
      "ProjectImportUploadStart": {
        "additionalProperties": false,
        "description": "Body of ``POST /project-imports/uploads``: every part but the last is exactly IMPORT_PART_MAX_BYTES.",
        "properties": {
          "bytes": {
            "maximum": 2147483648.0,
            "minimum": 1.0,
            "title": "Bytes",
            "type": "integer"
          },
          "client_token": {
            "format": "uuid",
            "title": "Client Token",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "parts": {
            "maximum": 64.0,
            "minimum": 1.0,
            "title": "Parts",
            "type": "integer"
          },
          "sha256": {
            "pattern": "^[0-9a-f]{64}$",
            "title": "Sha256",
            "type": "string"
          }
        },
        "required": [
          "client_token",
          "bytes",
          "parts",
          "sha256"
        ],
        "title": "ProjectImportUploadStart",
        "type": "object"
      },
      "ProjectMemberResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_service_account": {
            "default": false,
            "title": "Is Service Account",
            "type": "boolean"
          },
          "is_synthetic": {
            "default": false,
            "title": "Is Synthetic",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "project_id",
          "role",
          "created_at",
          "email",
          "username"
        ],
        "title": "ProjectMemberResponse",
        "type": "object"
      },
      "ProjectResetRequest": {
        "description": "Destructive reset payload. ``mode`` selects the wipe scope; the\nbackend rejects any request whose ``confirmation_name`` doesn't\nexactly equal the project's ``name`` — a typed-confirmation guard\nagainst autopilot clicks. See services/project_reset_service.py for\nthe table list per mode.",
        "properties": {
          "confirmation_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Confirmation Name",
            "type": "string"
          },
          "mode": {
            "enum": [
              "runs",
              "full"
            ],
            "title": "Mode",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "confirmation_name"
        ],
        "title": "ProjectResetRequest",
        "type": "object"
      },
      "ProjectResetResponse": {
        "properties": {
          "deleted": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Deleted",
            "type": "object"
          },
          "documents": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documents"
          },
          "mode": {
            "enum": [
              "runs",
              "full"
            ],
            "title": "Mode",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "deleted"
        ],
        "title": "ProjectResetResponse",
        "type": "object"
      },
      "ProjectResponse": {
        "properties": {
          "archived_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          },
          "archived_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived By Name"
          },
          "archived_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived By User Id"
          },
          "automation_target_pct": {
            "default": 60,
            "title": "Automation Target Pct",
            "type": "integer"
          },
          "cluster_epic_suggestions": {
            "default": false,
            "title": "Cluster Epic Suggestions",
            "type": "boolean"
          },
          "component_owner_map": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component Owner Map"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "default_qa_lead_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Qa Lead User Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "jenkins_job_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jenkins Job Pattern"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "manager_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manager User Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "ocp_namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Namespace"
          },
          "require_case_review": {
            "default": false,
            "title": "Require Case Review",
            "type": "boolean"
          },
          "retention_status": {
            "anyOf": [
              {
                "enum": [
                  "enabled",
                  "disabled",
                  "unconfigured"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retention Status"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "splunk_index": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Index"
          },
          "start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "created_at",
          "id",
          "name",
          "slug",
          "is_active"
        ],
        "title": "ProjectResponse",
        "type": "object"
      },
      "ProjectRestoreResponse": {
        "description": "W17 ADM-04: a restored project and what deliberately stayed revoked.",
        "properties": {
          "api_keys_still_revoked": {
            "title": "Api Keys Still Revoked",
            "type": "integer"
          },
          "default_qa_lead_reactivated": {
            "default": false,
            "title": "Default Qa Lead Reactivated",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "restored": {
            "default": true,
            "title": "Restored",
            "type": "boolean"
          }
        },
        "required": [
          "project_id",
          "api_keys_still_revoked"
        ],
        "title": "ProjectRestoreResponse",
        "type": "object"
      },
      "ProjectStorageResponse": {
        "properties": {
          "computed_at": {
            "format": "date-time",
            "title": "Computed At",
            "type": "string"
          },
          "fully_measured": {
            "default": true,
            "title": "Fully Measured",
            "type": "boolean"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "stores": {
            "items": {
              "$ref": "#/components/schemas/StoreFootprintResponse"
            },
            "title": "Stores",
            "type": "array"
          },
          "total_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Bytes"
          },
          "total_is_estimate": {
            "default": false,
            "title": "Total Is Estimate",
            "type": "boolean"
          }
        },
        "required": [
          "project_id",
          "computed_at",
          "stores"
        ],
        "title": "ProjectStorageResponse",
        "type": "object"
      },
      "ProjectUpdate": {
        "description": "Partial update for project attributes. None = keep existing.",
        "properties": {
          "automation_target_pct": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Target Pct"
          },
          "cluster_epic_suggestions": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cluster Epic Suggestions"
          },
          "component_owner_map": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component Owner Map"
          },
          "default_qa_lead_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Qa Lead User Id"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "jenkins_job_pattern": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored only; TestLookup does not use it (W10 D22).",
            "title": "Jenkins Job Pattern"
          },
          "jira_project_key": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "manager_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manager User Id"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "ocp_namespace": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocp Namespace"
          },
          "require_case_review": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Require Case Review"
          },
          "splunk_index": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Splunk Index"
          },
          "start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "title": "ProjectUpdate",
        "type": "object"
      },
      "PrometheusMetricTemplate": {
        "additionalProperties": false,
        "description": "One admin-defined metric template; the server substitutes ``{service}`` (escaped) — never model PromQL.",
        "properties": {
          "id": {
            "pattern": "^[a-z][a-z0-9_]{1,39}$",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "promql": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Promql",
            "type": "string"
          },
          "unit": {
            "default": "count",
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "promql"
        ],
        "title": "PrometheusMetricTemplate",
        "type": "object"
      },
      "PrometheusMetricTemplateIn": {
        "additionalProperties": false,
        "description": "A template as an ADMIN saves it (IntegrationsConfigUpdate): the placeholder, control characters and\nthe unit are checked per item, so a 422's loc is ``prometheus_metric_templates.N.<field>``.",
        "properties": {
          "id": {
            "pattern": "^[a-z][a-z0-9_]{1,39}$",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "promql": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Promql",
            "type": "string"
          },
          "unit": {
            "default": "count",
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "promql"
        ],
        "title": "PrometheusMetricTemplateIn",
        "type": "object"
      },
      "PromoteModelRequest": {
        "properties": {
          "baseline_accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Accuracy"
          },
          "eval_accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eval Accuracy"
          },
          "model_name": {
            "title": "Model Name",
            "type": "string"
          },
          "track": {
            "title": "Track",
            "type": "string"
          }
        },
        "required": [
          "track",
          "model_name"
        ],
        "title": "PromoteModelRequest",
        "type": "object"
      },
      "QuarantineDecisionRequest": {
        "description": "Body for approve / reject / release endpoints.",
        "properties": {
          "notes": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "quarantine_duration_days": {
            "anyOf": [
              {
                "maximum": 90.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quarantine Duration Days"
          }
        },
        "title": "QuarantineDecisionRequest",
        "type": "object"
      },
      "QuarantineLifecyclePolicyResponse": {
        "properties": {
          "auto_create_defect": {
            "title": "Auto Create Defect",
            "type": "boolean"
          },
          "auto_promote": {
            "title": "Auto Promote",
            "type": "boolean"
          },
          "detection_flip_rate_threshold": {
            "title": "Detection Flip Rate Threshold",
            "type": "number"
          },
          "detection_min_runs": {
            "title": "Detection Min Runs",
            "type": "integer"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "max_active_quarantined": {
            "default": 8,
            "title": "Max Active Quarantined",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "promote_after_passes": {
            "title": "Promote After Passes",
            "type": "integer"
          },
          "sla_days": {
            "title": "Sla Days",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "sla_days",
          "auto_create_defect",
          "auto_promote",
          "promote_after_passes",
          "detection_flip_rate_threshold",
          "detection_min_runs"
        ],
        "title": "QuarantineLifecyclePolicyResponse",
        "type": "object"
      },
      "QuarantineLifecyclePolicyUpdate": {
        "description": "Per-project quarantine lifecycle policy (PMF US-5.4 / US-5.5 / US-5.6).",
        "properties": {
          "auto_create_defect": {
            "default": false,
            "title": "Auto Create Defect",
            "type": "boolean"
          },
          "auto_promote": {
            "default": false,
            "title": "Auto Promote",
            "type": "boolean"
          },
          "detection_flip_rate_threshold": {
            "default": 0.2,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Detection Flip Rate Threshold",
            "type": "number"
          },
          "detection_min_runs": {
            "default": 10,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Detection Min Runs",
            "type": "integer"
          },
          "max_active_quarantined": {
            "default": 8,
            "maximum": 1000.0,
            "minimum": 0.0,
            "title": "Max Active Quarantined",
            "type": "integer"
          },
          "promote_after_passes": {
            "default": 20,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Promote After Passes",
            "type": "integer"
          },
          "sla_days": {
            "default": 14,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Sla Days",
            "type": "integer"
          }
        },
        "title": "QuarantineLifecyclePolicyUpdate",
        "type": "object"
      },
      "QuarantineManifestEntry": {
        "description": "One currently-quarantined test in the CI manifest (US-5.1).\n\nIdentity tuple for CI-side matching: ``fingerprint`` (primary key —\n``sha256(class_name::test_name)[:16]``, same formula as ingestion's\n``make_test_fingerprint``) plus the human-readable ``test_name`` /\n``suite_name`` / ``class_name`` for name-based fallback matching.",
        "properties": {
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "fingerprint": {
            "title": "Fingerprint",
            "type": "string"
          },
          "quarantined_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quarantined At"
          },
          "ready_to_promote": {
            "default": false,
            "title": "Ready To Promote",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "stale": {
            "default": false,
            "title": "Stale",
            "type": "boolean"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          }
        },
        "required": [
          "fingerprint",
          "status"
        ],
        "title": "QuarantineManifestEntry",
        "type": "object"
      },
      "QuarantineManifestResponse": {
        "description": "Versioned quarantine manifest consumed by CI (``testlookup ci-verdict``).\n\nContains ONLY currently-effective quarantines (QUARANTINED /\nRECHECK_SCHEDULED / RE_QUARANTINED) — released, rejected, and expired\nrows never appear, nor do un-reviewed proposals.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/QuarantineManifestEntry"
            },
            "title": "Entries",
            "type": "array"
          },
          "etag": {
            "title": "Etag",
            "type": "string"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "version": {
            "default": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "generated_at",
          "etag",
          "count",
          "entries"
        ],
        "title": "QuarantineManifestResponse",
        "type": "object"
      },
      "QuarantineProposeRequest": {
        "description": "Manual proposal — rarely used. Detection agent is the primary path.",
        "properties": {
          "detection_method": {
            "default": "manual",
            "maxLength": 50,
            "title": "Detection Method",
            "type": "string"
          },
          "fail_count": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fail Count"
          },
          "flip_rate": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flip Rate"
          },
          "flip_window_size": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flip Window Size"
          },
          "pass_count": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Count"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "quarantine_duration_days": {
            "default": 14,
            "maximum": 90.0,
            "minimum": 1.0,
            "title": "Quarantine Duration Days",
            "type": "integer"
          },
          "rationale": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rationale"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          }
        },
        "required": [
          "project_id",
          "test_fingerprint"
        ],
        "title": "QuarantineProposeRequest",
        "type": "object"
      },
      "QuarantineStatsResponse": {
        "description": "Counts per status for the /quarantine page header tiles.",
        "properties": {
          "approved": {
            "default": 0,
            "title": "Approved",
            "type": "integer"
          },
          "detected": {
            "default": 0,
            "title": "Detected",
            "type": "integer"
          },
          "expired": {
            "default": 0,
            "title": "Expired",
            "type": "integer"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          },
          "proposed": {
            "default": 0,
            "title": "Proposed",
            "type": "integer"
          },
          "quarantined": {
            "default": 0,
            "title": "Quarantined",
            "type": "integer"
          },
          "re_quarantined": {
            "default": 0,
            "title": "Re Quarantined",
            "type": "integer"
          },
          "recheck_scheduled": {
            "default": 0,
            "title": "Recheck Scheduled",
            "type": "integer"
          },
          "rejected": {
            "default": 0,
            "title": "Rejected",
            "type": "integer"
          },
          "released": {
            "default": 0,
            "title": "Released",
            "type": "integer"
          },
          "total_live": {
            "default": 0,
            "title": "Total Live",
            "type": "integer"
          }
        },
        "title": "QuarantineStatsResponse",
        "type": "object"
      },
      "RagCaseAcceptEdits": {
        "additionalProperties": false,
        "description": "Content fields a reviewer may change while accepting generated work.",
        "properties": {
          "automation_status": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Status"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "estimated_duration_minutes": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Duration Minutes"
          },
          "expected_result": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Result"
          },
          "feature_area": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature Area"
          },
          "is_automated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Automated"
          },
          "objective": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "parameters": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseParameterSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "preconditions": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preconditions"
          },
          "priority": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "severity": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseStepSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_data": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Data"
          },
          "test_type": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Type"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "RagCaseAcceptEdits",
        "type": "object"
      },
      "RagGenerateRequest": {
        "properties": {
          "generation_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generation Config"
          },
          "persist": {
            "default": false,
            "title": "Persist",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "prompt_text": {
            "default": "",
            "maxLength": 10000,
            "title": "Prompt Text",
            "type": "string"
          },
          "source_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Source Ids",
            "type": "array"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "RagGenerateRequest",
        "type": "object"
      },
      "RagGenerateResponse": {
        "properties": {
          "batch_id": {
            "format": "uuid",
            "title": "Batch Id",
            "type": "string"
          },
          "citations": {
            "items": {
              "$ref": "#/components/schemas/CitationSchema"
            },
            "title": "Citations",
            "type": "array"
          },
          "coverage_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Summary"
          },
          "created_ids": {
            "items": {
              "type": "string"
            },
            "title": "Created Ids",
            "type": "array"
          },
          "gaps_noted": {
            "items": {
              "type": "string"
            },
            "title": "Gaps Noted",
            "type": "array"
          },
          "generation_mode": {
            "title": "Generation Mode",
            "type": "string"
          },
          "test_cases": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Test Cases",
            "type": "array"
          }
        },
        "required": [
          "batch_id",
          "generation_mode",
          "test_cases",
          "citations"
        ],
        "title": "RagGenerateResponse",
        "type": "object"
      },
      "RagRetrieveRequest": {
        "properties": {
          "min_score": {
            "default": 0.0,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Min Score",
            "type": "number"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "query_text": {
            "maxLength": 5000,
            "minLength": 1,
            "title": "Query Text",
            "type": "string"
          },
          "source_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Ids"
          },
          "top_k": {
            "default": 10,
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Top K",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "query_text"
        ],
        "title": "RagRetrieveRequest",
        "type": "object"
      },
      "RagRetrieveResponse": {
        "properties": {
          "chunks": {
            "items": {
              "$ref": "#/components/schemas/RetrievedChunkSchema"
            },
            "title": "Chunks",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "chunks",
          "total"
        ],
        "title": "RagRetrieveResponse",
        "type": "object"
      },
      "RagStatusResponse": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "feature_flag": {
            "default": "KNOWLEDGE_RAG_ENABLED",
            "title": "Feature Flag",
            "type": "string"
          },
          "total_batches": {
            "default": 0,
            "title": "Total Batches",
            "type": "integer"
          },
          "total_chunks": {
            "default": 0,
            "title": "Total Chunks",
            "type": "integer"
          },
          "total_sources": {
            "default": 0,
            "title": "Total Sources",
            "type": "integer"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "RagStatusResponse",
        "type": "object"
      },
      "RecentSearchRead": {
        "properties": {
          "counts_exact": {
            "default": true,
            "title": "Counts Exact",
            "type": "boolean"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "q": {
            "title": "Q",
            "type": "string"
          },
          "result_count": {
            "title": "Result Count",
            "type": "integer"
          },
          "scope": {
            "title": "Scope",
            "type": "string"
          },
          "ts": {
            "format": "date-time",
            "title": "Ts",
            "type": "string"
          }
        },
        "required": [
          "q",
          "scope",
          "mode",
          "result_count",
          "ts"
        ],
        "title": "RecentSearchRead",
        "type": "object"
      },
      "RecentSearchesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RecentSearchRead"
            },
            "title": "Items",
            "type": "array"
          },
          "max": {
            "title": "Max",
            "type": "integer"
          },
          "retention_days": {
            "title": "Retention Days",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "max",
          "retention_days"
        ],
        "title": "RecentSearchesResponse",
        "type": "object"
      },
      "RedeemResetLinkRequest": {
        "properties": {
          "new_password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "New Password",
            "type": "string"
          },
          "token": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "new_password"
        ],
        "title": "RedeemResetLinkRequest",
        "type": "object"
      },
      "ReferenceBrokenRead": {
        "description": "A link a deletion breaks (a SET NULL foreign key to ``test_runs``) — a warning, never a block.",
        "properties": {
          "column": {
            "title": "Column",
            "type": "string"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "table": {
            "title": "Table",
            "type": "string"
          }
        },
        "required": [
          "table",
          "column",
          "count",
          "label"
        ],
        "title": "ReferenceBrokenRead",
        "type": "object"
      },
      "RefreshRequest": {
        "properties": {
          "refresh_token": {
            "title": "Refresh Token",
            "type": "string"
          }
        },
        "required": [
          "refresh_token"
        ],
        "title": "RefreshRequest",
        "type": "object"
      },
      "RejectCaseRequest": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "title": "RejectCaseRequest",
        "type": "object"
      },
      "RejectReviewRequest": {
        "properties": {
          "notes": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "reason_code": {
            "enum": [
              "wrong_category",
              "unsupported_claim",
              "missing_evidence",
              "contradiction",
              "stale_data",
              "other"
            ],
            "title": "Reason Code",
            "type": "string"
          }
        },
        "required": [
          "reason_code"
        ],
        "title": "RejectReviewRequest",
        "type": "object"
      },
      "ReleaseCouncilOverrideRequest": {
        "description": "Override request with enhanced audit fields.",
        "properties": {
          "override_recommendation": {
            "title": "Override Recommendation",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "override_recommendation",
          "reason"
        ],
        "title": "ReleaseCouncilOverrideRequest",
        "type": "object"
      },
      "ReleaseCouncilResponse": {
        "description": "Extended release decision with council context.",
        "properties": {
          "band_downgrades": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Band Downgrades",
            "type": "array"
          },
          "band_policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Band Policy Id"
          },
          "band_policy_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Band Policy Level"
          },
          "band_policy_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Band Policy Version"
          },
          "baseline_diff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BaselineDiff"
              },
              {
                "type": "null"
              }
            ]
          },
          "blocking_issues": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Blocking Issues",
            "type": "array"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "cluster_insights": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ClusterInsightResponse"
            },
            "title": "Cluster Insights",
            "type": "array"
          },
          "composite_risk": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composite Risk"
          },
          "conditions_for_go": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Conditions For Go",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "dimension_scores": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/DimensionScore"
            },
            "title": "Dimension Scores",
            "type": "array"
          },
          "draft_recommendation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draft Recommendation"
          },
          "human_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Human Override"
          },
          "input_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Snapshot"
          },
          "open_defects_by_component": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Open Defects By Component",
            "type": "array"
          },
          "original_recommendation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Recommendation"
          },
          "original_risk_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Risk Score"
          },
          "overridden_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overridden By"
          },
          "override_audit": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/OverrideAuditEntry"
            },
            "title": "Override Audit",
            "type": "array"
          },
          "pass_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Rate"
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Id"
          },
          "policy_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Level"
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Version"
          },
          "reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning"
          },
          "recommendation": {
            "title": "Recommendation",
            "type": "string"
          },
          "release_readiness_band": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Readiness Band"
          },
          "requires_human_review": {
            "default": false,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "review_gate_enforced": {
            "default": false,
            "title": "Review Gate Enforced",
            "type": "boolean"
          },
          "risk_score": {
            "title": "Risk Score",
            "type": "integer"
          },
          "rule_evaluations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RuleEvaluationResponse"
            },
            "title": "Rule Evaluations",
            "type": "array"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "score_model_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Model Version"
          },
          "synthesized": {
            "default": false,
            "title": "Synthesized",
            "type": "boolean"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "run_id",
          "recommendation",
          "risk_score"
        ],
        "title": "ReleaseCouncilResponse",
        "type": "object"
      },
      "ReleaseGatePolicyCreate": {
        "description": "Create a new draft policy.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "rules": {
            "$ref": "#/components/schemas/PolicyDocument"
          }
        },
        "required": [
          "name"
        ],
        "title": "ReleaseGatePolicyCreate",
        "type": "object"
      },
      "ReleaseGatePolicyResponse": {
        "description": "Policy summary response.",
        "properties": {
          "activated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "activated_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated By"
          },
          "activated_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated By Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "format": "uuid",
            "title": "Created By",
            "type": "string"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_draft": {
            "title": "Is Draft",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "rules": {
            "additionalProperties": true,
            "title": "Rules",
            "type": "object"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version",
          "name",
          "rules",
          "is_active",
          "is_draft",
          "created_by",
          "created_at"
        ],
        "title": "ReleaseGatePolicyResponse",
        "type": "object"
      },
      "ReleaseGatePolicyUpdate": {
        "description": "Update a draft policy (fails if already published).",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "rules": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PolicyDocument"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ReleaseGatePolicyUpdate",
        "type": "object"
      },
      "ReleaseIn": {
        "properties": {
          "baseline_release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Release Id"
          },
          "cutoff_end_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cutoff End At"
          },
          "cutoff_start_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cutoff Start At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "phases": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PhaseIn"
            },
            "title": "Phases",
            "type": "array"
          },
          "planned_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Date"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "release_type": {
            "anyOf": [
              {
                "enum": [
                  "major",
                  "minor",
                  "patch",
                  "hotfix",
                  "rc"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Type"
          },
          "status": {
            "default": "planning",
            "title": "Status",
            "type": "string"
          },
          "target_environment": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Environment"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "project_id",
          "name"
        ],
        "title": "ReleaseIn",
        "type": "object"
      },
      "ReleaseOutcomeIn": {
        "additionalProperties": false,
        "description": "A production outcome reported by a release owner for G5 drift.",
        "properties": {
          "outcome": {
            "enum": [
              "incident",
              "rollback"
            ],
            "title": "Outcome",
            "type": "string"
          },
          "reason": {
            "maxLength": 2000,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "outcome",
          "reason"
        ],
        "title": "ReleaseOutcomeIn",
        "type": "object"
      },
      "ReleasePhaseBulkItem": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "exit_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Criteria"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "phase_type": {
            "default": "qa_testing",
            "maxLength": 50,
            "title": "Phase Type",
            "type": "string"
          },
          "planned_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned End"
          },
          "planned_start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Start"
          }
        },
        "required": [
          "name"
        ],
        "title": "ReleasePhaseBulkItem",
        "type": "object"
      },
      "ReleasePhasesBulkRequest": {
        "additionalProperties": false,
        "properties": {
          "model_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "phases": {
            "items": {
              "$ref": "#/components/schemas/ReleasePhaseBulkItem"
            },
            "maxItems": 30,
            "minItems": 1,
            "title": "Phases",
            "type": "array"
          },
          "source": {
            "default": "manual",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "phases"
        ],
        "title": "ReleasePhasesBulkRequest",
        "type": "object"
      },
      "ReleasePhasesCloneRequest": {
        "additionalProperties": false,
        "properties": {
          "from_release_id": {
            "format": "uuid",
            "title": "From Release Id",
            "type": "string"
          },
          "shift_to": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shift To"
          }
        },
        "required": [
          "from_release_id"
        ],
        "title": "ReleasePhasesCloneRequest",
        "type": "object"
      },
      "ReleasePhasesCreatedResponse": {
        "properties": {
          "created": {
            "title": "Created",
            "type": "integer"
          },
          "phases": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Phases",
            "type": "array"
          },
          "release_id": {
            "format": "uuid",
            "title": "Release Id",
            "type": "string"
          },
          "shifted_by_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shifted By Days"
          },
          "source_release_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Release Id"
          }
        },
        "required": [
          "release_id",
          "created",
          "phases"
        ],
        "title": "ReleasePhasesCreatedResponse",
        "type": "object"
      },
      "ReleasePortfolioTotals": {
        "properties": {
          "conditional_go": {
            "title": "Conditional Go",
            "type": "integer"
          },
          "evaluated": {
            "title": "Evaluated",
            "type": "integer"
          },
          "go": {
            "title": "Go",
            "type": "integer"
          },
          "no_go": {
            "title": "No Go",
            "type": "integer"
          },
          "not_evaluated": {
            "title": "Not Evaluated",
            "type": "integer"
          },
          "released": {
            "title": "Released",
            "type": "integer"
          },
          "released_with_pack": {
            "title": "Released With Pack",
            "type": "integer"
          }
        },
        "required": [
          "evaluated",
          "go",
          "conditional_go",
          "no_go",
          "not_evaluated",
          "released",
          "released_with_pack"
        ],
        "title": "ReleasePortfolioTotals",
        "type": "object"
      },
      "ReleasePortfolioTrend": {
        "properties": {
          "approximated": {
            "items": {
              "type": "string"
            },
            "title": "Approximated",
            "type": "array"
          },
          "blocked": {
            "items": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Blocked",
            "type": "array"
          },
          "evaluated_in_week": {
            "items": {
              "type": "integer"
            },
            "title": "Evaluated In Week",
            "type": "array"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "go_in_week": {
            "items": {
              "type": "integer"
            },
            "title": "Go In Week",
            "type": "array"
          },
          "in_progress": {
            "items": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "In Progress",
            "type": "array"
          },
          "points_at": {
            "items": {
              "format": "date-time",
              "type": "string"
            },
            "title": "Points At",
            "type": "array"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "ready_to_ship": {
            "items": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Ready To Ship",
            "type": "array"
          },
          "released_30d": {
            "items": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Released 30D",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/ReleasePortfolioTotals"
          },
          "weeks": {
            "title": "Weeks",
            "type": "integer"
          }
        },
        "required": [
          "weeks",
          "points_at",
          "in_progress",
          "ready_to_ship",
          "blocked",
          "released_30d",
          "evaluated_in_week",
          "go_in_week",
          "totals",
          "approximated",
          "generated_at"
        ],
        "title": "ReleasePortfolioTrend",
        "type": "object"
      },
      "ReleaseSyncIn": {
        "properties": {
          "jira_project_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Project Key"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "source": {
            "enum": [
              "github",
              "jira",
              "gitlab"
            ],
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "source"
        ],
        "title": "ReleaseSyncIn",
        "type": "object"
      },
      "ReleaseUpdate": {
        "properties": {
          "baseline_release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Release Id"
          },
          "cutoff_end_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cutoff End At"
          },
          "cutoff_start_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cutoff Start At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "planned_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Date"
          },
          "release_type": {
            "anyOf": [
              {
                "enum": [
                  "major",
                  "minor",
                  "patch",
                  "hotfix",
                  "rc"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Type"
          },
          "released_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Released At"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "target_environment": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Environment"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "title": "ReleaseUpdate",
        "type": "object"
      },
      "ReportEvalCycleRequest": {
        "properties": {
          "authorized_evidence_ids": {
            "items": {
              "type": "string"
            },
            "maxItems": 5000,
            "title": "Authorized Evidence Ids",
            "type": "array"
          },
          "corpus_version": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Corpus Version",
            "type": "string"
          },
          "cycle_key": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cycle Key"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "reports": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "maxItems": 200,
            "title": "Reports",
            "type": "array"
          },
          "test_run_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "title": "Test Run Ids",
            "type": "array"
          }
        },
        "required": [
          "corpus_version"
        ],
        "title": "ReportEvalCycleRequest",
        "type": "object"
      },
      "ReportExportOut": {
        "description": "VIZ-607: one background report export.",
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Url"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "format": {
            "enum": [
              "pdf",
              "xlsx"
            ],
            "title": "Format",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "params": {
            "additionalProperties": true,
            "title": "Params",
            "type": "object"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "requested_at": {
            "format": "date-time",
            "title": "Requested At",
            "type": "string"
          },
          "retryable": {
            "title": "Retryable",
            "type": "boolean"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "format",
          "status",
          "attempts",
          "params",
          "requested_at",
          "expires_at",
          "retryable"
        ],
        "title": "ReportExportOut",
        "type": "object"
      },
      "ReportExportRequestOut": {
        "description": "VIZ-607: what ``POST /exports`` decided.",
        "properties": {
          "delivery": {
            "enum": [
              "download",
              "background"
            ],
            "title": "Delivery",
            "type": "string"
          },
          "dispatched": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dispatched"
          },
          "estimated_tests": {
            "title": "Estimated Tests",
            "type": "integer"
          },
          "export": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportExportOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "delivery",
          "estimated_tests"
        ],
        "title": "ReportExportRequestOut",
        "type": "object"
      },
      "RequiredModel": {
        "description": "One model the effective configuration depends on.",
        "properties": {
          "in_use": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Use"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "present": {
            "title": "Present",
            "type": "boolean"
          },
          "purpose": {
            "title": "Purpose",
            "type": "string"
          },
          "remedy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remedy"
          }
        },
        "required": [
          "name",
          "purpose",
          "present"
        ],
        "title": "RequiredModel",
        "type": "object"
      },
      "RequirementCoverageSchema": {
        "properties": {
          "batch_id": {
            "format": "uuid",
            "title": "Batch Id",
            "type": "string"
          },
          "coverage_status": {
            "title": "Coverage Status",
            "type": "string"
          },
          "covered_by_case_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Covered By Case Ids"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "requirement_id": {
            "title": "Requirement Id",
            "type": "string"
          },
          "requirement_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requirement Text"
          }
        },
        "required": [
          "id",
          "batch_id",
          "project_id",
          "requirement_id",
          "coverage_status",
          "created_at"
        ],
        "title": "RequirementCoverageSchema",
        "type": "object"
      },
      "RequirementCoverageSummary": {
        "properties": {
          "gaps": {
            "title": "Gaps",
            "type": "integer"
          },
          "known": {
            "title": "Known",
            "type": "integer"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "partly_verified": {
            "title": "Partly Verified",
            "type": "integer"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "top_gaps": {
            "items": {
              "$ref": "#/components/schemas/RequirementGapRead"
            },
            "title": "Top Gaps",
            "type": "array"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          },
          "verified": {
            "title": "Verified",
            "type": "integer"
          }
        },
        "required": [
          "measured",
          "known",
          "verified",
          "partly_verified",
          "gaps"
        ],
        "title": "RequirementCoverageSummary",
        "type": "object"
      },
      "RequirementGapRead": {
        "properties": {
          "batch_claimed_cases": {
            "default": 0,
            "title": "Batch Claimed Cases",
            "type": "integer"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "linked_cases": {
            "default": 0,
            "title": "Linked Cases",
            "type": "integer"
          },
          "normalized_key": {
            "title": "Normalized Key",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "required": [
          "key",
          "normalized_key",
          "reason",
          "sources"
        ],
        "title": "RequirementGapRead",
        "type": "object"
      },
      "RequirementLinkCreate": {
        "properties": {
          "link_type": {
            "default": "verifies",
            "maxLength": 20,
            "title": "Link Type",
            "type": "string"
          },
          "requirement_key": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Requirement Key",
            "type": "string"
          },
          "requirement_title": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requirement Title"
          }
        },
        "required": [
          "requirement_key"
        ],
        "title": "RequirementLinkCreate",
        "type": "object"
      },
      "RequirementLinkListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RequirementLinkRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "RequirementLinkListResponse",
        "type": "object"
      },
      "RequirementLinkRead": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "link_type": {
            "title": "Link Type",
            "type": "string"
          },
          "normalized_key": {
            "title": "Normalized Key",
            "type": "string"
          },
          "requirement_key": {
            "title": "Requirement Key",
            "type": "string"
          },
          "requirement_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requirement Title"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "test_case_id",
          "requirement_key",
          "normalized_key",
          "link_type",
          "created_at"
        ],
        "title": "RequirementLinkRead",
        "type": "object"
      },
      "ResetLinkRequest": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "ResetLinkRequest",
        "type": "object"
      },
      "RetentionCriteria": {
        "additionalProperties": false,
        "description": "What to delete. Every field is optional; at least one must be given.\n\n``suite_match`` decides what \"in this suite\" means for a run that contains\nseveral. ``only`` — the default — matches the run's own suite label and is\nthe conservative reading: it will not delete a multi-suite run because one\nof its suites was selected. ``any`` matches a run with any test case in the\nsuite, and is the destructive reading, so it is opt-in.",
        "properties": {
          "branches": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branches"
          },
          "date_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "environments": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environments"
          },
          "older_than_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Older Than Days"
          },
          "run_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Ids"
          },
          "statuses": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Statuses"
          },
          "suite_match": {
            "default": "only",
            "enum": [
              "only",
              "any"
            ],
            "title": "Suite Match",
            "type": "string"
          },
          "suite_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Names"
          }
        },
        "title": "RetentionCriteria",
        "type": "object"
      },
      "RetentionHoldCreate": {
        "description": "POST ``/projects/{id}/retention-holds`` body.",
        "properties": {
          "entity_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "reason": {
            "maxLength": 2000,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "entity_type",
          "reason"
        ],
        "title": "RetentionHoldCreate",
        "type": "object"
      },
      "RetentionHoldListResponse": {
        "properties": {
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Counts",
            "type": "object"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/RetentionHoldRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "RetentionHoldListResponse",
        "type": "object"
      },
      "RetentionHoldRead": {
        "description": "One hold; ``state`` (live / expired / released) is computed by the service for ``now``.",
        "properties": {
          "entity_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id"
          },
          "entity_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Label"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "placed_at": {
            "format": "date-time",
            "title": "Placed At",
            "type": "string"
          },
          "placed_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Placed By Name"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "release_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Reason"
          },
          "released_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Released At"
          },
          "released_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Released By Name"
          },
          "state": {
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "entity_type",
          "reason",
          "state",
          "placed_at"
        ],
        "title": "RetentionHoldRead",
        "type": "object"
      },
      "RetentionHoldRelease": {
        "description": "POST ``/projects/{id}/retention-holds/{hold_id}/release`` body.",
        "properties": {
          "reason": {
            "maxLength": 2000,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "RetentionHoldRelease",
        "type": "object"
      },
      "RetentionLastPurge": {
        "description": "Latest execute-mode purge, parsed from the settings_audit_log\npurge-audit rows (``setting_key = \"retention_purge:{project_id}\"``).",
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "counts": {
            "additionalProperties": true,
            "title": "Counts",
            "type": "object"
          },
          "mode": {
            "default": "execute",
            "title": "Mode",
            "type": "string"
          }
        },
        "required": [
          "at"
        ],
        "title": "RetentionLastPurge",
        "type": "object"
      },
      "RetentionPolicyRead": {
        "description": "GET/PUT response — the EFFECTIVE policy plus its source\n(``default`` = no row, ``custom`` = project row exists).",
        "properties": {
          "ai_versions_per_run": {
            "default": 20,
            "title": "Ai Versions Per Run",
            "type": "integer"
          },
          "ai_versions_per_test": {
            "default": 10,
            "title": "Ai Versions Per Test",
            "type": "integer"
          },
          "artifacts_days": {
            "title": "Artifacts Days",
            "type": "integer"
          },
          "audit_days": {
            "title": "Audit Days",
            "type": "integer"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "field_sources": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Field Sources",
            "type": "object"
          },
          "inherit_values": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Inherit Values",
            "type": "object"
          },
          "keep_last_runs": {
            "default": 10,
            "title": "Keep Last Runs",
            "type": "integer"
          },
          "last_purge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetentionLastPurge"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_scheduled_purge_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Scheduled Purge At"
          },
          "purge_paused_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purge Paused Until"
          },
          "purge_window_start_utc": {
            "default": 2,
            "title": "Purge Window Start Utc",
            "type": "integer"
          },
          "raw_events_days": {
            "title": "Raw Events Days",
            "type": "integer"
          },
          "runs_days": {
            "title": "Runs Days",
            "type": "integer"
          },
          "source": {
            "default": "default",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "raw_events_days",
          "runs_days",
          "artifacts_days",
          "audit_days"
        ],
        "title": "RetentionPolicyRead",
        "type": "object"
      },
      "RetentionPolicyWrite": {
        "description": "PUT body for ``/projects/{id}/retention-policy``.\n\nAll fields optional — omitted fields keep their current (or default)\nvalue. Per-field bounds 422 here; the cross-field ``audit_days >=\nruns_days`` check runs in the service on the MERGED values (a partial\nbody can't be validated field-locally).",
        "properties": {
          "ai_versions_per_run": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Versions Per Run"
          },
          "ai_versions_per_test": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Versions Per Test"
          },
          "artifacts_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifacts Days"
          },
          "audit_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 365.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audit Days"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "inherit": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 7,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inherit"
          },
          "keep_last_runs": {
            "anyOf": [
              {
                "maximum": 1000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keep Last Runs"
          },
          "pause_days": {
            "anyOf": [
              {
                "maximum": 90.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pause Days"
          },
          "purge_window_start_utc": {
            "anyOf": [
              {
                "maximum": 23.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purge Window Start Utc"
          },
          "raw_events_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 7.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw Events Days"
          },
          "resume": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resume"
          },
          "runs_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 30.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs Days"
          }
        },
        "title": "RetentionPolicyWrite",
        "type": "object"
      },
      "RetentionPreviewCandidates": {
        "description": "Per-class candidate counts a purge WOULD delete right now.\n\n**Every class ``run_purge`` counts must have a field here.** FastAPI\nfilters the handler's return through this model, so a class the service\ncounts but the model omits is dropped from the response *silently* — no\nerror, no warning, just a smaller object.\n\nThat happened: the service computed twelve counts and this model declared\neight, so ``evidence_artifact_rows``, ``analysis_cache_entries``,\n``memory_entries_expired`` and ``search_index_documents`` never reached\nthe operator. The preview is what an ADMIN authorises an irreversible\ncross-store purge from, so under-reporting it is not cosmetic — four\ncategories of data were deleted by execute without ever appearing in the\ndry run.",
        "properties": {
          "ai_history_versions": {
            "default": 0,
            "title": "Ai History Versions",
            "type": "integer"
          },
          "analysis_cache_entries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Cache Entries"
          },
          "audit_rows": {
            "title": "Audit Rows",
            "type": "integer"
          },
          "compliance_packs_expired": {
            "title": "Compliance Packs Expired",
            "type": "integer"
          },
          "event_archive_rows": {
            "title": "Event Archive Rows",
            "type": "integer"
          },
          "evidence_artifact_rows": {
            "default": 0,
            "title": "Evidence Artifact Rows",
            "type": "integer"
          },
          "export_archives_expired": {
            "default": 0,
            "title": "Export Archives Expired",
            "type": "integer"
          },
          "memory_entries_expired": {
            "default": 0,
            "title": "Memory Entries Expired",
            "type": "integer"
          },
          "minio_objects": {
            "title": "Minio Objects",
            "type": "integer"
          },
          "mongo_docs": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Mongo Docs",
            "type": "object"
          },
          "revoked_share_links": {
            "default": 0,
            "title": "Revoked Share Links",
            "type": "integer"
          },
          "runs": {
            "title": "Runs",
            "type": "integer"
          },
          "search_index_documents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Index Documents"
          },
          "search_usage_rows": {
            "default": 0,
            "title": "Search Usage Rows",
            "type": "integer"
          },
          "shadow_pairs_unlabelled": {
            "default": 0,
            "title": "Shadow Pairs Unlabelled",
            "type": "integer"
          },
          "test_cases": {
            "title": "Test Cases",
            "type": "integer"
          }
        },
        "required": [
          "runs",
          "test_cases",
          "minio_objects",
          "event_archive_rows",
          "audit_rows",
          "compliance_packs_expired"
        ],
        "title": "RetentionPreviewCandidates",
        "type": "object"
      },
      "RetentionPreviewFloor": {
        "properties": {
          "keep_last_runs": {
            "title": "Keep Last Runs",
            "type": "integer"
          },
          "latest_passed_kept": {
            "title": "Latest Passed Kept",
            "type": "boolean"
          },
          "runs_kept": {
            "title": "Runs Kept",
            "type": "integer"
          },
          "suites_kept": {
            "title": "Suites Kept",
            "type": "integer"
          }
        },
        "required": [
          "keep_last_runs",
          "runs_kept",
          "latest_passed_kept",
          "suites_kept"
        ],
        "title": "RetentionPreviewFloor",
        "type": "object"
      },
      "RetentionPreviewHold": {
        "properties": {
          "entity_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id"
          },
          "entity_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Label"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "hold_id": {
            "format": "uuid",
            "title": "Hold Id",
            "type": "string"
          },
          "packs_kept": {
            "default": 0,
            "title": "Packs Kept",
            "type": "integer"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "runs_kept": {
            "default": 0,
            "title": "Runs Kept",
            "type": "integer"
          }
        },
        "required": [
          "hold_id",
          "entity_type",
          "reason"
        ],
        "title": "RetentionPreviewHold",
        "type": "object"
      },
      "RetentionPreviewHolds": {
        "properties": {
          "active": {
            "items": {
              "$ref": "#/components/schemas/RetentionPreviewHold"
            },
            "title": "Active",
            "type": "array"
          },
          "packs_kept": {
            "default": 0,
            "title": "Packs Kept",
            "type": "integer"
          },
          "project_held": {
            "default": false,
            "title": "Project Held",
            "type": "boolean"
          },
          "runs_kept": {
            "default": 0,
            "title": "Runs Kept",
            "type": "integer"
          }
        },
        "title": "RetentionPreviewHolds",
        "type": "object"
      },
      "RetentionPreviewResponse": {
        "description": "POST ``.../retention-policy/preview`` — dry-run, writes nothing.",
        "properties": {
          "candidates": {
            "$ref": "#/components/schemas/RetentionPreviewCandidates"
          },
          "cutoffs": {
            "additionalProperties": {
              "format": "date-time",
              "type": "string"
            },
            "title": "Cutoffs",
            "type": "object"
          },
          "floor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetentionPreviewFloor"
              },
              {
                "type": "null"
              }
            ]
          },
          "holds": {
            "$ref": "#/components/schemas/RetentionPreviewHolds"
          },
          "references_broken": {
            "items": {
              "$ref": "#/components/schemas/ReferenceBrokenRead"
            },
            "title": "References Broken",
            "type": "array"
          },
          "references_measured": {
            "default": true,
            "title": "References Measured",
            "type": "boolean"
          },
          "unmeasured": {
            "items": {
              "type": "string"
            },
            "title": "Unmeasured",
            "type": "array"
          }
        },
        "required": [
          "cutoffs",
          "candidates"
        ],
        "title": "RetentionPreviewResponse",
        "type": "object"
      },
      "RetentionPurgeQueued": {
        "description": "202 body — the execute-mode purge was enqueued to Celery.",
        "properties": {
          "queued": {
            "default": true,
            "title": "Queued",
            "type": "boolean"
          }
        },
        "title": "RetentionPurgeQueued",
        "type": "object"
      },
      "RetentionPurgeRequest": {
        "description": "POST ``.../retention-policy/purge`` — typed-name confirmation\n(``project_reset`` convention): must equal the project name exactly.",
        "properties": {
          "confirmation_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Confirmation Name",
            "type": "string"
          }
        },
        "required": [
          "confirmation_name"
        ],
        "title": "RetentionPurgeRequest",
        "type": "object"
      },
      "RetireCompliancePackRequest": {
        "description": "Bring a pack's retention window forward to now.\n\nTyped confirmation rather than a checkbox: a pack is audit evidence, and\nretiring it early hands it to the next nightly purge.",
        "properties": {
          "confirmation_id": {
            "description": "Must equal the pack id exactly.",
            "maxLength": 64,
            "minLength": 1,
            "title": "Confirmation Id",
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "confirmation_id",
          "reason"
        ],
        "title": "RetireCompliancePackRequest",
        "type": "object"
      },
      "RetrievedChunkSchema": {
        "properties": {
          "canonical_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Url"
          },
          "chunk_text": {
            "title": "Chunk Text",
            "type": "string"
          },
          "relevance_score": {
            "title": "Relevance Score",
            "type": "number"
          },
          "requirement_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requirement Id"
          },
          "section_heading": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Section Heading"
          },
          "source_id": {
            "format": "uuid",
            "title": "Source Id",
            "type": "string"
          },
          "source_title": {
            "title": "Source Title",
            "type": "string"
          },
          "vector_id": {
            "title": "Vector Id",
            "type": "string"
          }
        },
        "required": [
          "vector_id",
          "source_id",
          "source_title",
          "chunk_text",
          "relevance_score"
        ],
        "title": "RetrievedChunkSchema",
        "type": "object"
      },
      "RetryConfig": {
        "additionalProperties": false,
        "properties": {
          "base_seconds": {
            "minimum": 1.0,
            "title": "Base Seconds",
            "type": "integer"
          },
          "cap_seconds": {
            "minimum": 1.0,
            "title": "Cap Seconds",
            "type": "integer"
          },
          "jitter": {
            "default": 0.2,
            "exclusiveMaximum": 1.0,
            "minimum": 0.0,
            "title": "Jitter",
            "type": "number"
          },
          "max_attempts": {
            "minimum": 1.0,
            "title": "Max Attempts",
            "type": "integer"
          },
          "retry_on": {
            "items": {
              "type": "string"
            },
            "title": "Retry On",
            "type": "array"
          }
        },
        "title": "RetryConfig",
        "type": "object"
      },
      "ReviewActionRequest": {
        "properties": {
          "action": {
            "enum": [
              "approve",
              "reject",
              "request_changes"
            ],
            "title": "Action",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "required": [
          "action"
        ],
        "title": "ReviewActionRequest",
        "type": "object"
      },
      "ReviewBlock": {
        "description": "Human-review status of an AI report (architecture section 8.2, E8.3).\n\nCarries WHETHER and WHEN a report was reviewed, never WHO: reviewer identity\nstays in-app, out of API and export payloads.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "review_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Id"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "state": {
            "description": "pending_review: a draft until a human accepts it (also used when no review was ever recorded). not_applicable: the content was not AI-generated.",
            "enum": [
              "pending_review",
              "accepted",
              "rejected",
              "superseded",
              "not_applicable"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state",
          "message"
        ],
        "title": "ReviewBlock",
        "type": "object"
      },
      "ReviewConfig": {
        "additionalProperties": false,
        "properties": {
          "auto_reviewer": {
            "default": false,
            "title": "Auto Reviewer",
            "type": "boolean"
          },
          "policy": {
            "default": "human_required",
            "enum": [
              "human_required",
              "human_required_plus_auto_reviewer"
            ],
            "title": "Policy",
            "type": "string"
          },
          "second_model_check": {
            "default": false,
            "title": "Second Model Check",
            "type": "boolean"
          }
        },
        "title": "ReviewConfig",
        "type": "object"
      },
      "ReviewGateRead": {
        "description": "GET/PUT ``/api/v1/settings/review-gate``. Writes nothing on GET.",
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/GatedChannel"
            },
            "title": "Channels",
            "type": "array"
          },
          "enforced": {
            "title": "Enforced",
            "type": "boolean"
          },
          "enforced_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enforced From"
          },
          "env_override": {
            "title": "Env Override",
            "type": "boolean"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "would_refuse": {
            "$ref": "#/components/schemas/WouldRefuseSummary"
          }
        },
        "required": [
          "enforced",
          "source",
          "env_override",
          "would_refuse",
          "channels"
        ],
        "title": "ReviewGateRead",
        "type": "object"
      },
      "ReviewGateWrite": {
        "additionalProperties": false,
        "description": "PUT body. ``None`` clears (back to audit only); a naive datetime is the route's 422 ``naive_datetime``.",
        "properties": {
          "enforced_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enforced From"
          }
        },
        "title": "ReviewGateWrite",
        "type": "object"
      },
      "ReviewQueueSummary": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LibraryCaseRow"
            },
            "title": "Items",
            "type": "array"
          },
          "measured": {
            "default": true,
            "title": "Measured",
            "type": "boolean"
          },
          "oldest_age_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Age Days"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "items"
        ],
        "title": "ReviewQueueSummary",
        "type": "object"
      },
      "ReviewResponse": {
        "description": "A review request as clients see it. No reviewer identity (section 8.2).",
        "properties": {
          "ai_disclaimer": {
            "title": "Ai Disclaimer",
            "type": "string"
          },
          "ai_disclaimer_version": {
            "title": "Ai Disclaimer Version",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "evidence_bundle_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Bundle Sha256"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code"
          },
          "requires_human_review": {
            "default": true,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "reviewed": {
            "title": "Reviewed",
            "type": "boolean"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "state": {
            "enum": [
              "pending_review",
              "accepted",
              "rejected",
              "superseded"
            ],
            "title": "State",
            "type": "string"
          },
          "subject_id": {
            "title": "Subject Id",
            "type": "string"
          },
          "subject_type": {
            "title": "Subject Type",
            "type": "string"
          },
          "superseded_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Superseded By"
          },
          "test_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Run Id"
          },
          "workflow_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Type"
          }
        },
        "required": [
          "id",
          "project_id",
          "kind",
          "subject_type",
          "subject_id",
          "state",
          "reviewed",
          "created_at",
          "ai_disclaimer",
          "ai_disclaimer_version"
        ],
        "title": "ReviewResponse",
        "type": "object"
      },
      "ReviewerCleanObservation": {
        "additionalProperties": false,
        "properties": {
          "flagged_families": {
            "items": {
              "type": "integer"
            },
            "title": "Flagged Families",
            "type": "array",
            "uniqueItems": true
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "sample_id": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Sample Id",
            "type": "string"
          }
        },
        "required": [
          "sample_id",
          "observed_at"
        ],
        "title": "ReviewerCleanObservation",
        "type": "object"
      },
      "ReviewerHumanOutcome": {
        "additionalProperties": false,
        "properties": {
          "human_rejected": {
            "title": "Human Rejected",
            "type": "boolean"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "review_id": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Review Id",
            "type": "string"
          },
          "reviewer_passed": {
            "title": "Reviewer Passed",
            "type": "boolean"
          }
        },
        "required": [
          "review_id",
          "reviewer_passed",
          "human_rejected",
          "observed_at"
        ],
        "title": "ReviewerHumanOutcome",
        "type": "object"
      },
      "ReviewerMutationObservation": {
        "additionalProperties": false,
        "properties": {
          "detected_families": {
            "items": {
              "type": "integer"
            },
            "title": "Detected Families",
            "type": "array",
            "uniqueItems": true
          },
          "mutation_class": {
            "$ref": "#/components/schemas/MutationClass"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "sample_id": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Sample Id",
            "type": "string"
          }
        },
        "required": [
          "sample_id",
          "mutation_class",
          "observed_at"
        ],
        "title": "ReviewerMutationObservation",
        "type": "object"
      },
      "ReviewerQualityRequest": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "default": "agent.reviewer.v1",
            "maxLength": 80,
            "minLength": 1,
            "title": "Agent Id",
            "type": "string"
          },
          "auto_disable": {
            "default": true,
            "title": "Auto Disable",
            "type": "boolean"
          },
          "clean": {
            "items": {
              "$ref": "#/components/schemas/ReviewerCleanObservation"
            },
            "maxItems": 10000,
            "title": "Clean",
            "type": "array"
          },
          "human_outcomes": {
            "items": {
              "$ref": "#/components/schemas/ReviewerHumanOutcome"
            },
            "maxItems": 10000,
            "title": "Human Outcomes",
            "type": "array"
          },
          "mutations": {
            "items": {
              "$ref": "#/components/schemas/ReviewerMutationObservation"
            },
            "maxItems": 10000,
            "title": "Mutations",
            "type": "array"
          },
          "persist": {
            "default": true,
            "title": "Persist",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "ReviewerQualityRequest",
        "type": "object"
      },
      "ReviewerQualityRunListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReviewerQualityRunRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "ReviewerQualityRunListResponse",
        "type": "object"
      },
      "ReviewerQualityRunRead": {
        "description": "An ``AIEvalReviewerQuality`` row WITHOUT its observation arrays (W16).",
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "auto_disable_applied": {
            "title": "Auto Disable Applied",
            "type": "boolean"
          },
          "auto_disable_eligible": {
            "title": "Auto Disable Eligible",
            "type": "boolean"
          },
          "clean_sample_count": {
            "title": "Clean Sample Count",
            "type": "integer"
          },
          "deterministic_recall": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deterministic Recall"
          },
          "evaluated_at": {
            "format": "date-time",
            "title": "Evaluated At",
            "type": "string"
          },
          "false_flag_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Flag Rate"
          },
          "false_omission_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Omission Rate"
          },
          "human_outcome_count": {
            "title": "Human Outcome Count",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metrics": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Metrics",
            "type": "array"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "recall_delta": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recall Delta"
          },
          "regressions": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Regressions",
            "type": "array"
          },
          "second_model_recall": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Second Model Recall"
          },
          "semantic_sample_counts": {
            "additionalProperties": true,
            "title": "Semantic Sample Counts",
            "type": "object"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "window_ended_at": {
            "format": "date-time",
            "title": "Window Ended At",
            "type": "string"
          },
          "window_started_at": {
            "format": "date-time",
            "title": "Window Started At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "agent_id",
          "source",
          "status",
          "window_started_at",
          "window_ended_at",
          "evaluated_at",
          "metrics",
          "regressions",
          "semantic_sample_counts",
          "clean_sample_count",
          "human_outcome_count",
          "auto_disable_eligible",
          "auto_disable_applied"
        ],
        "title": "ReviewerQualityRunRead",
        "type": "object"
      },
      "RoleActions": {
        "description": "Role-aware recommended actions generated by the ReAct agent.",
        "properties": {
          "developer": {
            "default": "",
            "title": "Developer",
            "type": "string"
          },
          "qa": {
            "default": "",
            "title": "Qa",
            "type": "string"
          },
          "release_manager": {
            "default": "",
            "title": "Release Manager",
            "type": "string"
          },
          "sre": {
            "default": "",
            "title": "Sre",
            "type": "string"
          }
        },
        "title": "RoleActions",
        "type": "object"
      },
      "RuleEvaluationResponse": {
        "description": "Result of evaluating a single policy rule.",
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "actual_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Value"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "passed": {
            "title": "Passed",
            "type": "boolean"
          },
          "rule_id": {
            "title": "Rule Id",
            "type": "string"
          },
          "rule_name": {
            "title": "Rule Name",
            "type": "string"
          },
          "rule_type": {
            "title": "Rule Type",
            "type": "string"
          },
          "threshold_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold Value"
          }
        },
        "required": [
          "rule_id",
          "rule_name",
          "rule_type",
          "passed",
          "action",
          "message"
        ],
        "title": "RuleEvaluationResponse",
        "type": "object"
      },
      "RunBranchItem": {
        "properties": {
          "branch": {
            "title": "Branch",
            "type": "string"
          },
          "last_run_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "runs": {
            "title": "Runs",
            "type": "integer"
          }
        },
        "required": [
          "branch",
          "runs"
        ],
        "title": "RunBranchItem",
        "type": "object"
      },
      "RunBranchListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunBranchItem"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          },
          "window_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Window Days"
          }
        },
        "required": [
          "items",
          "total",
          "truncated"
        ],
        "title": "RunBranchListResponse",
        "type": "object"
      },
      "RunBrief": {
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "primary_suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Suite Name"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "run_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Seq"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "RunBrief",
        "type": "object"
      },
      "RunCadenceCreate": {
        "additionalProperties": false,
        "properties": {
          "cron": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cron"
          },
          "expected_by": {
            "anyOf": [
              {
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected By"
          },
          "grace_minutes": {
            "default": 60,
            "maximum": 720.0,
            "minimum": 0.0,
            "title": "Grace Minutes",
            "type": "integer"
          },
          "mode": {
            "default": "weekly",
            "title": "Mode",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "timezone": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Timezone",
            "type": "string"
          },
          "weekdays": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 7,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekdays"
          }
        },
        "required": [
          "timezone"
        ],
        "title": "RunCadenceCreate",
        "type": "object"
      },
      "RunCadenceList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunCadenceRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "RunCadenceList",
        "type": "object"
      },
      "RunCadencePatch": {
        "additionalProperties": false,
        "description": "Every field optional; an empty PATCH changes nothing.",
        "properties": {
          "clear_suite": {
            "default": false,
            "title": "Clear Suite",
            "type": "boolean"
          },
          "cron": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cron"
          },
          "expected_by": {
            "anyOf": [
              {
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected By"
          },
          "grace_minutes": {
            "anyOf": [
              {
                "maximum": 720.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grace Minutes"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "weekdays": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 7,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekdays"
          }
        },
        "title": "RunCadencePatch",
        "type": "object"
      },
      "RunCadencePauseRequest": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "maxLength": 200,
            "title": "Reason",
            "type": "string"
          },
          "until": {
            "format": "date-time",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "until",
          "reason"
        ],
        "title": "RunCadencePauseRequest",
        "type": "object"
      },
      "RunCadenceRead": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "cron": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cron"
          },
          "effective_from": {
            "format": "date-time",
            "title": "Effective From",
            "type": "string"
          },
          "expected_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected By"
          },
          "grace_minutes": {
            "default": 60,
            "title": "Grace Minutes",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "default": "weekly",
            "title": "Mode",
            "type": "string"
          },
          "next_deadline": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Deadline"
          },
          "paused": {
            "default": false,
            "title": "Paused",
            "type": "boolean"
          },
          "paused_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At"
          },
          "paused_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused By Name"
          },
          "paused_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused Reason"
          },
          "paused_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused Until"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "summary": {
            "default": "",
            "title": "Summary",
            "type": "string"
          },
          "timezone": {
            "default": "UTC",
            "title": "Timezone",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "weekdays": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekdays"
          }
        },
        "required": [
          "id",
          "project_id",
          "effective_from",
          "created_at",
          "updated_at"
        ],
        "title": "RunCadenceRead",
        "type": "object"
      },
      "RunCadenceStatusItem": {
        "properties": {
          "cadence": {
            "$ref": "#/components/schemas/RunCadenceRead"
          },
          "expected": {
            "default": 0,
            "title": "Expected",
            "type": "integer"
          },
          "last_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "met": {
            "default": 0,
            "title": "Met",
            "type": "integer"
          },
          "missed": {
            "default": 0,
            "title": "Missed",
            "type": "integer"
          },
          "missed_windows": {
            "items": {
              "$ref": "#/components/schemas/CadenceWindowStatus"
            },
            "title": "Missed Windows",
            "type": "array"
          },
          "paused": {
            "default": 0,
            "title": "Paused",
            "type": "integer"
          },
          "pending": {
            "default": 0,
            "title": "Pending",
            "type": "integer"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "cadence"
        ],
        "title": "RunCadenceStatusItem",
        "type": "object"
      },
      "RunCadenceStatusResponse": {
        "properties": {
          "configured": {
            "default": false,
            "title": "Configured",
            "type": "boolean"
          },
          "days": {
            "default": 14,
            "title": "Days",
            "type": "integer"
          },
          "expected": {
            "default": 0,
            "title": "Expected",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunCadenceStatusItem"
            },
            "title": "Items",
            "type": "array"
          },
          "met": {
            "default": 0,
            "title": "Met",
            "type": "integer"
          },
          "missed": {
            "default": 0,
            "title": "Missed",
            "type": "integer"
          },
          "paused": {
            "default": 0,
            "title": "Paused",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "window_end": {
            "format": "date-time",
            "title": "Window End",
            "type": "string"
          },
          "window_start": {
            "format": "date-time",
            "title": "Window Start",
            "type": "string"
          }
        },
        "required": [
          "window_start",
          "window_end"
        ],
        "title": "RunCadenceStatusResponse",
        "type": "object"
      },
      "RunCompareAIReport": {
        "properties": {
          "ai_changes": {
            "items": {
              "type": "string"
            },
            "title": "Ai Changes",
            "type": "array"
          },
          "confidence": {
            "default": 0,
            "title": "Confidence",
            "type": "integer"
          },
          "confidence_reason": {
            "default": "",
            "title": "Confidence Reason",
            "type": "string"
          },
          "duration_concerns": {
            "items": {
              "type": "string"
            },
            "title": "Duration Concerns",
            "type": "array"
          },
          "executive_summary": {
            "default": "",
            "title": "Executive Summary",
            "type": "string"
          },
          "fallback_used": {
            "default": false,
            "title": "Fallback Used",
            "type": "boolean"
          },
          "key_differences": {
            "items": {
              "type": "string"
            },
            "title": "Key Differences",
            "type": "array"
          },
          "markdown_report": {
            "default": "",
            "title": "Markdown Report",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "new_risks": {
            "items": {
              "type": "string"
            },
            "title": "New Risks",
            "type": "array"
          },
          "recommended_actions": {
            "items": {
              "type": "string"
            },
            "title": "Recommended Actions",
            "type": "array"
          },
          "resolved_risks": {
            "items": {
              "type": "string"
            },
            "title": "Resolved Risks",
            "type": "array"
          },
          "risk_level": {
            "default": "LOW",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ],
            "title": "Risk Level",
            "type": "string"
          },
          "status": {
            "default": "ready",
            "enum": [
              "ready",
              "queued",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "title": "RunCompareAIReport",
        "type": "object"
      },
      "RunCompareResponse": {
        "properties": {
          "ai_analysis_diff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIAnalysisDiffBrief"
              },
              {
                "type": "null"
              }
            ]
          },
          "ai_report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunCompareAIReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "delta_broken": {
            "default": 0,
            "title": "Delta Broken",
            "type": "integer"
          },
          "delta_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta Duration Ms"
          },
          "delta_failed": {
            "default": 0,
            "title": "Delta Failed",
            "type": "integer"
          },
          "delta_pass_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta Pass Rate"
          },
          "delta_passed": {
            "default": 0,
            "title": "Delta Passed",
            "type": "integer"
          },
          "delta_skipped": {
            "default": 0,
            "title": "Delta Skipped",
            "type": "integer"
          },
          "delta_total": {
            "default": 0,
            "title": "Delta Total",
            "type": "integer"
          },
          "duration_spikes": {
            "default": 0,
            "title": "Duration Spikes",
            "type": "integer"
          },
          "fixed": {
            "default": 0,
            "title": "Fixed",
            "type": "integer"
          },
          "improved": {
            "default": 0,
            "title": "Improved",
            "type": "integer"
          },
          "left": {
            "$ref": "#/components/schemas/RunCompareSummary"
          },
          "new_failures": {
            "default": 0,
            "title": "New Failures",
            "type": "integer"
          },
          "new_tests": {
            "default": 0,
            "title": "New Tests",
            "type": "integer"
          },
          "regressed": {
            "default": 0,
            "title": "Regressed",
            "type": "integer"
          },
          "removed_tests": {
            "default": 0,
            "title": "Removed Tests",
            "type": "integer"
          },
          "renamed": {
            "default": 0,
            "title": "Renamed",
            "type": "integer"
          },
          "right": {
            "$ref": "#/components/schemas/RunCompareSummary"
          },
          "scope": {
            "default": "run",
            "enum": [
              "run",
              "suite"
            ],
            "title": "Scope",
            "type": "string"
          },
          "selection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunCompareSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "still_failing": {
            "default": 0,
            "title": "Still Failing",
            "type": "integer"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_deltas": {
            "items": {
              "$ref": "#/components/schemas/RunCompareTestDelta"
            },
            "title": "Test Deltas",
            "type": "array"
          },
          "transitions": {
            "items": {
              "$ref": "#/components/schemas/RunCompareTransition"
            },
            "title": "Transitions",
            "type": "array"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "left",
          "right"
        ],
        "title": "RunCompareResponse",
        "type": "object"
      },
      "RunCompareSelection": {
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "branch_mismatch": {
            "default": false,
            "title": "Branch Mismatch",
            "type": "boolean"
          },
          "mode": {
            "default": "explicit",
            "enum": [
              "latest_vs_previous",
              "explicit"
            ],
            "title": "Mode",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "release_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Name"
          },
          "scope": {
            "default": "run",
            "enum": [
              "run",
              "suite"
            ],
            "title": "Scope",
            "type": "string"
          },
          "selection_reason": {
            "default": "",
            "title": "Selection Reason",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          }
        },
        "required": [
          "project_id"
        ],
        "title": "RunCompareSelection",
        "type": "object"
      },
      "RunCompareSummary": {
        "description": "One side of the compare view — the subset of TestRun fields used\nby the diff UI. Kept tiny so the JSON payload is fast even on big runs.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "broken_tests": {
            "default": 0,
            "title": "Broken Tests",
            "type": "integer"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "commit_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit Hash"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "end_time": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "failed_tests": {
            "default": 0,
            "title": "Failed Tests",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "pass_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pass Rate"
          },
          "passed_tests": {
            "default": 0,
            "title": "Passed Tests",
            "type": "integer"
          },
          "primary_suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Suite Name"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "skipped_tests": {
            "default": 0,
            "title": "Skipped Tests",
            "type": "integer"
          },
          "start_time": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Time"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "suite_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Names"
          },
          "total_tests": {
            "default": 0,
            "title": "Total Tests",
            "type": "integer"
          },
          "unknown_tests": {
            "default": 0,
            "title": "Unknown Tests",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id"
        ],
        "title": "RunCompareSummary",
        "type": "object"
      },
      "RunCompareTestDelta": {
        "description": "A single test whose status or duration differed between the two runs.",
        "properties": {
          "classification": {
            "title": "Classification",
            "type": "string"
          },
          "delta_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta Duration Ms"
          },
          "left_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Left Duration Ms"
          },
          "left_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Left Status"
          },
          "paired_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paired By"
          },
          "previous_test_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Test Fingerprint"
          },
          "previous_test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Test Name"
          },
          "right_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Right Duration Ms"
          },
          "right_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Right Status"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          }
        },
        "required": [
          "test_fingerprint",
          "classification"
        ],
        "title": "RunCompareTestDelta",
        "type": "object"
      },
      "RunCompareTransition": {
        "description": "VIZ-507: how many tests went from one status to another between the runs.\n\n``absent`` on a side means the test is not in that run (new / removed).\nEvery test is in exactly one transition: the counts add up to each run's\ntest count, which is what makes the Sankey's flows conserve.",
        "properties": {
          "after": {
            "enum": [
              "passed",
              "failed",
              "broken",
              "skipped",
              "unknown",
              "absent"
            ],
            "title": "After",
            "type": "string"
          },
          "before": {
            "enum": [
              "passed",
              "failed",
              "broken",
              "skipped",
              "unknown",
              "absent"
            ],
            "title": "Before",
            "type": "string"
          },
          "count": {
            "minimum": 1.0,
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "before",
          "after",
          "count"
        ],
        "title": "RunCompareTransition",
        "type": "object"
      },
      "RunContext": {
        "description": "``run_context`` on ``IngestPayload`` / ``LiveSessionCreate`` / ``LiveStreamMeta`` and the\n``/ingest/file`` form (W23b FAIL-13). An unknown future SECTION is dropped, never stored;\ninside a section the rules are strict. Keys are compared EXACTLY (``ENV_ALLOWLIST`` is\ncase-sensitive, as environments are on Linux). ``model_dump(exclude_none=True)`` is the\nstored form (env values already redacted).",
        "properties": {
          "dependency_fingerprints": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dependency Fingerprints"
          },
          "env": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env"
          },
          "image_digests": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Digests"
          },
          "runtime": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime"
          },
          "v": {
            "default": 1,
            "title": "V",
            "type": "integer"
          }
        },
        "title": "RunContext",
        "type": "object"
      },
      "RunSignatureBatchResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunSignatureItem"
            },
            "title": "Items",
            "type": "array"
          },
          "max_ids": {
            "title": "Max Ids",
            "type": "integer"
          },
          "rows_per_run_cap": {
            "title": "Rows Per Run Cap",
            "type": "integer"
          },
          "unavailable": {
            "items": {
              "type": "string"
            },
            "title": "Unavailable",
            "type": "array"
          }
        },
        "required": [
          "items",
          "unavailable",
          "max_ids",
          "rows_per_run_cap"
        ],
        "title": "RunSignatureBatchResponse",
        "type": "object"
      },
      "RunSignatureEntry": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "test_count": {
            "title": "Test Count",
            "type": "integer"
          },
          "tests": {
            "items": {
              "type": "string"
            },
            "title": "Tests",
            "type": "array"
          }
        },
        "required": [
          "signature",
          "label",
          "count",
          "test_count",
          "tests"
        ],
        "title": "RunSignatureEntry",
        "type": "object"
      },
      "RunSignatureItem": {
        "properties": {
          "capped": {
            "title": "Capped",
            "type": "boolean"
          },
          "dominant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant"
          },
          "failing_tests": {
            "title": "Failing Tests",
            "type": "integer"
          },
          "read": {
            "title": "Read",
            "type": "integer"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "signatures": {
            "items": {
              "$ref": "#/components/schemas/RunSignatureEntry"
            },
            "title": "Signatures",
            "type": "array"
          }
        },
        "required": [
          "run_id",
          "failing_tests",
          "read",
          "capped",
          "signatures"
        ],
        "title": "RunSignatureItem",
        "type": "object"
      },
      "RunTimeline": {
        "description": "Tests with a start and a finish, for the waterfall. When more than\n``limit`` qualify, the ``limit`` LONGEST are kept (``truncated``).",
        "properties": {
          "end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunTimelineItem"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "origin": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "limit"
        ],
        "title": "RunTimeline",
        "type": "object"
      },
      "RunTimelineItem": {
        "properties": {
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "finished_at": {
            "format": "date-time",
            "title": "Finished At",
            "type": "string"
          },
          "offset_ms": {
            "title": "Offset Ms",
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_id": {
            "format": "uuid",
            "title": "Test Id",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "required": [
          "test_id",
          "test_name",
          "status",
          "started_at",
          "finished_at",
          "offset_ms"
        ],
        "title": "RunTimelineItem",
        "type": "object"
      },
      "RunTimingFigures": {
        "description": "The run's own figures (EXEC-02 columns on ``test_runs``).",
        "properties": {
          "duration_count": {
            "default": 0,
            "title": "Duration Count",
            "type": "integer"
          },
          "exec_finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exec Finished At"
          },
          "exec_started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exec Started At"
          },
          "parallelism": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallelism"
          },
          "summed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed Ms"
          },
          "test_count": {
            "default": 0,
            "title": "Test Count",
            "type": "integer"
          },
          "timed_count": {
            "default": 0,
            "title": "Timed Count",
            "type": "integer"
          },
          "timing_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Source"
          },
          "wall_clock_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Clock Ms"
          }
        },
        "title": "RunTimingFigures",
        "type": "object"
      },
      "RunTimingLane": {
        "description": "One worker lane: the timed tests one worker ran.",
        "properties": {
          "busy_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Busy Ms"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "span_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span Ms"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "test_count": {
            "default": 0,
            "title": "Test Count",
            "type": "integer"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "title": "RunTimingLane",
        "type": "object"
      },
      "RunTimingPhases": {
        "description": "Setup / test body / teardown totals over the run's tests.",
        "properties": {
          "call_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Ms"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "setup_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Share"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "teardown_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Share"
          },
          "tests_with_phases": {
            "default": 0,
            "title": "Tests With Phases",
            "type": "integer"
          }
        },
        "title": "RunTimingPhases",
        "type": "object"
      },
      "RunTimingResponse": {
        "description": "GET /api/v1/runs/{run_id}/timing.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "duration_findings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DurationRegressionsResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "phases": {
            "$ref": "#/components/schemas/RunTimingPhases"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "run": {
            "$ref": "#/components/schemas/RunTimingFigures"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "slowest": {
            "$ref": "#/components/schemas/RunTimingSlowest"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suites": {
            "$ref": "#/components/schemas/RunTimingSuites"
          },
          "timeline": {
            "$ref": "#/components/schemas/RunTimeline"
          },
          "workers": {
            "$ref": "#/components/schemas/RunTimingWorkers"
          }
        },
        "required": [
          "run_id",
          "project_id",
          "status",
          "run",
          "phases",
          "suites",
          "slowest",
          "workers",
          "timeline"
        ],
        "title": "RunTimingResponse",
        "type": "object"
      },
      "RunTimingSlowest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunTimingTestResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "limit"
        ],
        "title": "RunTimingSlowest",
        "type": "object"
      },
      "RunTimingSuites": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SuiteExecutionResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "title": "RunTimingSuites",
        "type": "object"
      },
      "RunTimingTestResponse": {
        "description": "One test of the run, as the slowest list shows it.",
        "properties": {
          "baseline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TestDurationBaselineResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "baseline_ratio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Ratio"
          },
          "call_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Ms"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "test_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Fingerprint"
          },
          "test_id": {
            "format": "uuid",
            "title": "Test Id",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "timing_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Source"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "required": [
          "test_id",
          "test_name",
          "status"
        ],
        "title": "RunTimingTestResponse",
        "type": "object"
      },
      "RunTimingWorkers": {
        "properties": {
          "lanes": {
            "items": {
              "$ref": "#/components/schemas/RunTimingLane"
            },
            "title": "Lanes",
            "type": "array"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "title": "RunTimingWorkers",
        "type": "object"
      },
      "RunVerdictBatchResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunVerdictItem"
            },
            "title": "Items",
            "type": "array"
          },
          "max_ids": {
            "title": "Max Ids",
            "type": "integer"
          },
          "unavailable": {
            "items": {
              "type": "string"
            },
            "title": "Unavailable",
            "type": "array"
          }
        },
        "required": [
          "items",
          "unavailable",
          "max_ids"
        ],
        "title": "RunVerdictBatchResponse",
        "type": "object"
      },
      "RunVerdictItem": {
        "description": "One run of ``GET /runs/ai-verdicts``: what its AI-verdict pill is computed from.",
        "properties": {
          "analysed": {
            "title": "Analysed",
            "type": "boolean"
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "review": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "snapshot": {
            "title": "Snapshot",
            "type": "boolean"
          },
          "stale": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stale"
          },
          "verdict_inputs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict Inputs"
          }
        },
        "required": [
          "run_id",
          "snapshot",
          "analysed"
        ],
        "title": "RunVerdictItem",
        "type": "object"
      },
      "SCIMEmail": {
        "properties": {
          "primary": {
            "default": false,
            "title": "Primary",
            "type": "boolean"
          },
          "type": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "work",
            "title": "Type"
          },
          "value": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "title": "SCIMEmail",
        "type": "object"
      },
      "SCIMGroup": {
        "properties": {
          "display": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display"
          },
          "value": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "title": "SCIMGroup",
        "type": "object"
      },
      "SCIMName": {
        "properties": {
          "familyName": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Familyname"
          },
          "formatted": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Formatted"
          },
          "givenName": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Givenname"
          }
        },
        "title": "SCIMName",
        "type": "object"
      },
      "SCIMPatchOp": {
        "properties": {
          "op": {
            "title": "Op",
            "type": "string"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path"
          },
          "value": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "op"
        ],
        "title": "SCIMPatchOp",
        "type": "object"
      },
      "SCIMPatchRequestPayload": {
        "description": "Inbound PATCH payload; the protocol schemas member is required.",
        "properties": {
          "Operations": {
            "items": {
              "$ref": "#/components/schemas/SCIMPatchOp"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Operations",
            "type": "array"
          },
          "schemas": {
            "items": {
              "type": "string"
            },
            "title": "Schemas",
            "type": "array"
          }
        },
        "required": [
          "schemas",
          "Operations"
        ],
        "title": "SCIMPatchRequestPayload",
        "type": "object"
      },
      "SCIMTokenCreate": {
        "description": "Create a new SCIM bearer token.",
        "properties": {
          "expires_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires Days"
          },
          "name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "sso_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Config Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "SCIMTokenCreate",
        "type": "object"
      },
      "SCIMTokenCreatedResponse": {
        "description": "Returned once at creation — includes the plaintext token.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "raw_token": {
            "title": "Raw Token",
            "type": "string"
          },
          "sso_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Config Id"
          },
          "token_hint": {
            "title": "Token Hint",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "token_hint",
          "is_active",
          "created_at",
          "raw_token"
        ],
        "title": "SCIMTokenCreatedResponse",
        "type": "object"
      },
      "SCIMTokenResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "sso_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Config Id"
          },
          "token_hint": {
            "title": "Token Hint",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "token_hint",
          "is_active",
          "created_at"
        ],
        "title": "SCIMTokenResponse",
        "type": "object"
      },
      "SCIMUserRequest": {
        "description": "Inbound SCIM user payload; the protocol schemas member is required.",
        "properties": {
          "active": {
            "default": true,
            "title": "Active",
            "type": "boolean"
          },
          "displayName": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "emails": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SCIMEmail"
            },
            "maxItems": 100,
            "title": "Emails",
            "type": "array"
          },
          "externalId": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "groups": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SCIMGroup"
            },
            "maxItems": 1000,
            "title": "Groups",
            "type": "array"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          },
          "name": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SCIMName"
              },
              {
                "type": "null"
              }
            ]
          },
          "schemas": {
            "items": {
              "type": "string"
            },
            "title": "Schemas",
            "type": "array"
          },
          "userName": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "schemas",
          "userName"
        ],
        "title": "SCIMUserRequest",
        "type": "object"
      },
      "SSOConfigCreate": {
        "description": "Create a new SSO configuration.\n\nW20 ADM-08b: a SAML config needs the IdP entity id / SSO URL / certificate and\nthe SP entity id / ACS URL; an OIDC config needs the issuer, client id and client\nsecret (write-only — stored in ``secret_refs``, never returned).",
        "properties": {
          "audience": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audience"
          },
          "default_role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "VIEWER"
          },
          "display_name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Display Name",
            "type": "string"
          },
          "enforcement_mode": {
            "$ref": "#/components/schemas/SSOEnforcementMode",
            "default": "OPTIONAL"
          },
          "group_attribute": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Attribute"
          },
          "idp_certificate": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Certificate"
          },
          "idp_entity_id": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Entity Id"
          },
          "idp_slo_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Slo Url"
          },
          "idp_sso_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Sso Url"
          },
          "oidc_client_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Client Id"
          },
          "oidc_client_secret": {
            "anyOf": [
              {
                "maxLength": 4000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Client Secret"
          },
          "oidc_groups_claim": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Groups Claim"
          },
          "oidc_issuer": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Issuer"
          },
          "oidc_scopes": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Scopes"
          },
          "provider_type": {
            "$ref": "#/components/schemas/SSOProviderType",
            "default": "SAML"
          },
          "role_mapping": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Mapping"
          },
          "sp_acs_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sp Acs Url"
          },
          "sp_entity_id": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sp Entity Id"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "SSOConfigCreate",
        "type": "object"
      },
      "SSOConfigResponse": {
        "description": "SSO configuration response (certificate is masked).",
        "properties": {
          "audience": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audience"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "default_role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "enforcement_mode": {
            "$ref": "#/components/schemas/SSOEnforcementMode"
          },
          "group_attribute": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Attribute"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "idp_certificate_fingerprint": {
            "default": "",
            "title": "Idp Certificate Fingerprint",
            "type": "string"
          },
          "idp_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Entity Id"
          },
          "idp_slo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Slo Url"
          },
          "idp_sso_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Sso Url"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_test_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Test At"
          },
          "last_test_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Test Error"
          },
          "last_test_success": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Test Success"
          },
          "oidc_client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Client Id"
          },
          "oidc_client_secret_set": {
            "default": false,
            "title": "Oidc Client Secret Set",
            "type": "boolean"
          },
          "oidc_groups_claim": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Groups Claim"
          },
          "oidc_issuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Issuer"
          },
          "oidc_redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Redirect Uri"
          },
          "oidc_scopes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Scopes"
          },
          "provider_type": {
            "$ref": "#/components/schemas/SSOProviderType"
          },
          "role_mapping": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Mapping"
          },
          "sp_acs_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sp Acs Url"
          },
          "sp_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sp Entity Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "display_name",
          "provider_type",
          "default_role",
          "enforcement_mode",
          "is_active",
          "created_at"
        ],
        "title": "SSOConfigResponse",
        "type": "object"
      },
      "SSOConfigUpdate": {
        "description": "Partial update of SSO configuration.",
        "properties": {
          "audience": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audience"
          },
          "default_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "enforcement_mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SSOEnforcementMode"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_attribute": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Attribute"
          },
          "idp_certificate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Certificate"
          },
          "idp_entity_id": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Entity Id"
          },
          "idp_slo_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Slo Url"
          },
          "idp_sso_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Sso Url"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "oidc_client_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Client Id"
          },
          "oidc_client_secret": {
            "anyOf": [
              {
                "maxLength": 4000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Client Secret"
          },
          "oidc_groups_claim": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Groups Claim"
          },
          "oidc_issuer": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Issuer"
          },
          "oidc_scopes": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oidc Scopes"
          },
          "role_mapping": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Mapping"
          },
          "sp_acs_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sp Acs Url"
          },
          "sp_entity_id": {
            "anyOf": [
              {
                "maxLength": 1000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sp Entity Id"
          }
        },
        "title": "SSOConfigUpdate",
        "type": "object"
      },
      "SSOEnforcementMode": {
        "enum": [
          "OPTIONAL",
          "SSO_REQUIRED"
        ],
        "title": "SSOEnforcementMode",
        "type": "string"
      },
      "SSOExchangeRequest": {
        "description": "The one-time code the ACS hands the browser after an SSO sign-in.",
        "properties": {
          "code": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "title": "SSOExchangeRequest",
        "type": "object"
      },
      "SSOLoginResponse": {
        "description": "Token response after successful SSO authentication.",
        "properties": {
          "access_token": {
            "title": "Access Token",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "is_new_user": {
            "default": false,
            "title": "Is New User",
            "type": "boolean"
          },
          "refresh_token": {
            "title": "Refresh Token",
            "type": "string"
          },
          "token_type": {
            "default": "bearer",
            "title": "Token Type",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserResponse"
          }
        },
        "required": [
          "access_token",
          "refresh_token",
          "expires_in",
          "user"
        ],
        "title": "SSOLoginResponse",
        "type": "object"
      },
      "SSOProviderType": {
        "enum": [
          "SAML",
          "OIDC"
        ],
        "title": "SSOProviderType",
        "type": "string"
      },
      "SSORolePreviewRequest": {
        "description": "W20 ADM-08a: preview the role a user in ``groups`` gets. ``role_mapping`` / ``default_role`` preview an\nunsaved edit; omitted, the stored configuration answers.",
        "properties": {
          "default_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Role"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "title": "Groups",
            "type": "array"
          },
          "role_mapping": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Mapping"
          }
        },
        "title": "SSORolePreviewRequest",
        "type": "object"
      },
      "SSORolePreviewResponse": {
        "properties": {
          "ceiling": {
            "title": "Ceiling",
            "type": "string"
          },
          "clamped": {
            "title": "Clamped",
            "type": "boolean"
          },
          "matched_groups": {
            "items": {
              "type": "string"
            },
            "title": "Matched Groups",
            "type": "array"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "source": {
            "enum": [
              "mapping",
              "default"
            ],
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "role",
          "matched_groups",
          "source",
          "ceiling",
          "clamped"
        ],
        "title": "SSORolePreviewResponse",
        "type": "object"
      },
      "SSOTestConnectionResponse": {
        "description": "Result of testing SSO configuration.",
        "properties": {
          "certificate_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Certificate Expires At"
          },
          "certificate_valid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Certificate Valid"
          },
          "idp_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Entity Id"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "SSOTestConnectionResponse",
        "type": "object"
      },
      "SavedViewCreate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "filters": {
            "additionalProperties": true,
            "title": "Filters",
            "type": "object"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "is_shared": {
            "default": false,
            "title": "Is Shared",
            "type": "boolean"
          },
          "name": {
            "maxLength": 255,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "page": {
            "anyOf": [
              {
                "enum": [
                  "dashboard",
                  "trends",
                  "coverage",
                  "defects",
                  "failures",
                  "summary_report",
                  "explore",
                  "search",
                  "test_management"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "SavedViewCreate",
        "type": "object"
      },
      "SavedViewRelease": {
        "description": "Whether THIS reader may apply the release stored in a view (S5-3f-ii).\n\nA saved view outlives the state it was saved in, and a shared view is read\nby people who did not save it — so the stored id is an id somebody else\nsupplied. The verdict is reported rather than the view being refused:\nlosing one filter is recoverable, refusing to open a view because one field\nwent stale is not. ``reason`` is what lets the UI say the result set is\nwider than the view's author intended.",
        "properties": {
          "applied": {
            "default": false,
            "title": "Applied",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          }
        },
        "title": "SavedViewRelease",
        "type": "object"
      },
      "SavedViewResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "filters": {
            "additionalProperties": true,
            "title": "Filters",
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "title": "Is Default",
            "type": "boolean"
          },
          "is_shared": {
            "title": "Is Shared",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "page": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SavedViewRelease"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "name",
          "filters",
          "is_shared",
          "is_default",
          "created_at"
        ],
        "title": "SavedViewResponse",
        "type": "object"
      },
      "SavedViewUpdate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters"
          },
          "is_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Default"
          },
          "is_shared": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Shared"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "page": {
            "anyOf": [
              {
                "enum": [
                  "dashboard",
                  "trends",
                  "coverage",
                  "defects",
                  "failures",
                  "summary_report",
                  "explore",
                  "search",
                  "test_management"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          }
        },
        "title": "SavedViewUpdate",
        "type": "object"
      },
      "SearchSuggestion": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "q": {
            "title": "Q",
            "type": "string"
          },
          "scope": {
            "title": "Scope",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "label",
          "q",
          "scope"
        ],
        "title": "SearchSuggestion",
        "type": "object"
      },
      "SearchSuggestionsResponse": {
        "properties": {
          "active_release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SearchSuggestion"
              },
              {
                "type": "null"
              }
            ]
          },
          "failing_tests": {
            "items": {
              "$ref": "#/components/schemas/SearchSuggestion"
            },
            "title": "Failing Tests",
            "type": "array"
          },
          "open_defects": {
            "items": {
              "$ref": "#/components/schemas/SearchSuggestion"
            },
            "title": "Open Defects",
            "type": "array"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "window_days",
          "failing_tests",
          "open_defects"
        ],
        "title": "SearchSuggestionsResponse",
        "type": "object"
      },
      "SearchUsageRead": {
        "properties": {
          "days": {
            "title": "Days",
            "type": "integer"
          },
          "fallback_searches": {
            "default": 0,
            "title": "Fallback Searches",
            "type": "integer"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "p50_latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Latency Ms"
          },
          "p95_latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Latency Ms"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "retention_days": {
            "title": "Retention Days",
            "type": "integer"
          },
          "searches": {
            "title": "Searches",
            "type": "integer"
          },
          "since": {
            "format": "date-time",
            "title": "Since",
            "type": "string"
          },
          "zero_result_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zero Result Rate"
          },
          "zero_result_searches": {
            "title": "Zero Result Searches",
            "type": "integer"
          }
        },
        "required": [
          "days",
          "since",
          "measured",
          "searches",
          "zero_result_searches",
          "retention_days"
        ],
        "title": "SearchUsageRead",
        "type": "object"
      },
      "SelfUpdateProfileRequest": {
        "description": "Fields a user can update about themselves (no role/status changes).",
        "properties": {
          "avatar_color": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Color"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          }
        },
        "title": "SelfUpdateProfileRequest",
        "type": "object"
      },
      "SendMessageRequest": {
        "properties": {
          "message": {
            "maxLength": 4000,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          }
        },
        "required": [
          "message"
        ],
        "title": "SendMessageRequest",
        "type": "object"
      },
      "SendMessageResponse": {
        "properties": {
          "reply": {
            "title": "Reply",
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "sources": {
            "default": [],
            "items": {},
            "title": "Sources",
            "type": "array"
          },
          "suggested_actions": {
            "default": [],
            "items": {},
            "title": "Suggested Actions",
            "type": "array"
          },
          "tool_trace": {
            "default": [],
            "items": {},
            "title": "Tool Trace",
            "type": "array"
          }
        },
        "required": [
          "session_id",
          "reply"
        ],
        "title": "SendMessageResponse",
        "type": "object"
      },
      "SetBaselineRequest": {
        "properties": {
          "agent_name": {
            "default": "AnalysisAgent",
            "title": "Agent Name",
            "type": "string"
          },
          "dataset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Id"
          },
          "eval_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eval Run Id"
          },
          "max_regression_pct": {
            "default": 5.0,
            "title": "Max Regression Pct",
            "type": "number"
          },
          "min_accuracy": {
            "default": 0.8,
            "title": "Min Accuracy",
            "type": "number"
          },
          "min_f1": {
            "default": 0.75,
            "title": "Min F1",
            "type": "number"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "prompt_version": {
            "default": "v1",
            "title": "Prompt Version",
            "type": "string"
          },
          "task_type": {
            "default": "classification",
            "title": "Task Type",
            "type": "string"
          }
        },
        "title": "SetBaselineRequest",
        "type": "object"
      },
      "ShadowConfig": {
        "additionalProperties": false,
        "properties": {
          "daily_token_budget": {
            "default": 200000,
            "minimum": 0.0,
            "title": "Daily Token Budget",
            "type": "integer"
          },
          "sample_rate": {
            "default": 0.1,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Sample Rate",
            "type": "number"
          }
        },
        "title": "ShadowConfig",
        "type": "object"
      },
      "ShadowPairLabelRequest": {
        "additionalProperties": false,
        "properties": {
          "failure_category": {
            "anyOf": [
              {
                "maxLength": 40,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "verdict": {
            "maxLength": 20,
            "minLength": 3,
            "title": "Verdict",
            "type": "string"
          }
        },
        "required": [
          "verdict"
        ],
        "title": "ShadowPairLabelRequest",
        "type": "object"
      },
      "ShadowPairListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ShadowPairRead"
            },
            "title": "Items",
            "type": "array"
          },
          "live_tier_pairs_seen": {
            "title": "Live Tier Pairs Seen",
            "type": "boolean"
          },
          "pending_total": {
            "title": "Pending Total",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "pending_total",
          "live_tier_pairs_seen"
        ],
        "title": "ShadowPairListResponse",
        "type": "object"
      },
      "ShadowPairRead": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "agent_label": {
            "title": "Agent Label",
            "type": "string"
          },
          "candidate_output": {
            "additionalProperties": true,
            "title": "Candidate Output",
            "type": "object"
          },
          "candidate_tier": {
            "title": "Candidate Tier",
            "type": "string"
          },
          "candidate_tokens": {
            "title": "Candidate Tokens",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "incumbent_output": {
            "additionalProperties": true,
            "title": "Incumbent Output",
            "type": "object"
          },
          "incumbent_tier": {
            "title": "Incumbent Tier",
            "type": "string"
          },
          "incumbent_tokens": {
            "title": "Incumbent Tokens",
            "type": "integer"
          },
          "label": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "label_status": {
            "title": "Label Status",
            "type": "string"
          },
          "labelled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labelled At"
          },
          "labelled_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labelled By Name"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "sample_key": {
            "title": "Sample Key",
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ShadowPairSource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "project_id",
          "agent_id",
          "agent_label",
          "sample_key",
          "incumbent_tier",
          "candidate_tier",
          "incumbent_output",
          "candidate_output",
          "incumbent_tokens",
          "candidate_tokens",
          "label_status"
        ],
        "title": "ShadowPairRead",
        "type": "object"
      },
      "ShadowPairSource": {
        "properties": {
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "href": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Href"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "title": "ShadowPairSource",
        "type": "object"
      },
      "ShareLinkResponse": {
        "properties": {
          "access_count": {
            "default": 0,
            "title": "Access Count",
            "type": "integer"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_revoked": {
            "default": false,
            "title": "Is Revoked",
            "type": "boolean"
          },
          "report_layout": {
            "title": "Report Layout",
            "type": "string"
          },
          "share_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Share Url"
          },
          "snapshot_ready": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Ready"
          },
          "token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token"
          },
          "warning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warning"
          }
        },
        "required": [
          "id",
          "report_layout",
          "expires_at",
          "created_at"
        ],
        "title": "ShareLinkResponse",
        "type": "object"
      },
      "SimilarMemoryRecallRequest": {
        "description": "Request body for semantic similarity recall.",
        "properties": {
          "entity_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Type"
          },
          "error_signature": {
            "maxLength": 5000,
            "minLength": 5,
            "title": "Error Signature",
            "type": "string"
          },
          "limit": {
            "default": 10,
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          }
        },
        "required": [
          "error_signature"
        ],
        "title": "SimilarMemoryRecallRequest",
        "type": "object"
      },
      "SimilarMemoryRecallResponse": {
        "description": "Response with ranked similar memories.",
        "properties": {
          "query_signature": {
            "title": "Query Signature",
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SimilarMemoryResponse"
            },
            "title": "Results",
            "type": "array"
          },
          "retrieval_audit": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retrieval Audit"
          },
          "total_found": {
            "title": "Total Found",
            "type": "integer"
          }
        },
        "required": [
          "query_signature",
          "results",
          "total_found"
        ],
        "title": "SimilarMemoryRecallResponse",
        "type": "object"
      },
      "SimilarMemoryResponse": {
        "description": "A memory entry with a similarity score from vector recall.",
        "properties": {
          "memory": {
            "$ref": "#/components/schemas/AgentMemoryEntryResponse"
          },
          "memory_reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "retrieval_audit": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retrieval Audit"
          },
          "similarity": {
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Similarity",
            "type": "number"
          }
        },
        "required": [
          "memory",
          "similarity"
        ],
        "title": "SimilarMemoryResponse",
        "type": "object"
      },
      "SmtpConfigRead": {
        "description": "SMTP server configuration returned to the client (no password).",
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "from_address": {
            "title": "From Address",
            "type": "string"
          },
          "host": {
            "title": "Host",
            "type": "string"
          },
          "implicit_tls": {
            "description": "When True, implicit TLS (SSL/TLS on connect, typically port 465) is used. When False, STARTTLS (upgrade after connect, typically port 587) is used. Plain (unencrypted) SMTP is not supported.",
            "title": "Implicit Tls",
            "type": "boolean"
          },
          "password_set": {
            "title": "Password Set",
            "type": "boolean"
          },
          "port": {
            "title": "Port",
            "type": "integer"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          }
        },
        "required": [
          "enabled",
          "host",
          "port",
          "user",
          "from_address",
          "implicit_tls",
          "password_set"
        ],
        "title": "SmtpConfigRead",
        "type": "object"
      },
      "SmtpConfigUpdate": {
        "description": "Payload for updating SMTP server configuration.",
        "properties": {
          "enabled": {
            "default": false,
            "title": "Enabled",
            "type": "boolean"
          },
          "from_address": {
            "default": "noreply@testlookup.io",
            "maxLength": 255,
            "title": "From Address",
            "type": "string"
          },
          "host": {
            "default": "localhost",
            "maxLength": 255,
            "title": "Host",
            "type": "string"
          },
          "implicit_tls": {
            "default": true,
            "description": "When True, implicit TLS (SSL/TLS on connect, typically port 465) is used. When False, STARTTLS (upgrade after connect, typically port 587) is used. Plain (unencrypted) SMTP is not supported.",
            "title": "Implicit Tls",
            "type": "boolean"
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "port": {
            "default": 587,
            "maximum": 65535.0,
            "minimum": 1.0,
            "title": "Port",
            "type": "integer"
          },
          "user": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          }
        },
        "title": "SmtpConfigUpdate",
        "type": "object"
      },
      "SmtpTestResult": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "SmtpTestResult",
        "type": "object"
      },
      "SourceRoot": {
        "additionalProperties": false,
        "properties": {
          "prefix": {
            "default": "",
            "maxLength": 255,
            "title": "Prefix",
            "type": "string"
          },
          "root": {
            "maxLength": 500,
            "title": "Root",
            "type": "string"
          }
        },
        "required": [
          "root"
        ],
        "title": "SourceRoot",
        "type": "object"
      },
      "SourceRootsPreview": {
        "properties": {
          "examples": {
            "default": [],
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Examples",
            "type": "array"
          },
          "java_frames": {
            "title": "Java Frames",
            "type": "integer"
          },
          "located": {
            "title": "Located",
            "type": "integer"
          },
          "lookback_days": {
            "title": "Lookback Days",
            "type": "integer"
          },
          "matched": {
            "title": "Matched",
            "type": "integer"
          },
          "sampled": {
            "title": "Sampled",
            "type": "integer"
          }
        },
        "required": [
          "sampled",
          "java_frames",
          "located",
          "matched",
          "lookback_days"
        ],
        "title": "SourceRootsPreview",
        "type": "object"
      },
      "SourceRootsResponse": {
        "properties": {
          "max_roots": {
            "default": 20,
            "title": "Max Roots",
            "type": "integer"
          },
          "roots": {
            "items": {
              "$ref": "#/components/schemas/SourceRoot"
            },
            "title": "Roots",
            "type": "array"
          }
        },
        "required": [
          "roots"
        ],
        "title": "SourceRootsResponse",
        "type": "object"
      },
      "SourceRootsUpdate": {
        "additionalProperties": false,
        "properties": {
          "roots": {
            "items": {
              "$ref": "#/components/schemas/SourceRoot"
            },
            "title": "Roots",
            "type": "array"
          }
        },
        "title": "SourceRootsUpdate",
        "type": "object"
      },
      "StageDecisionSummary": {
        "properties": {
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "confidence_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Score"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "decision_log": {
            "items": {
              "$ref": "#/components/schemas/DecisionLogEntry"
            },
            "title": "Decision Log",
            "type": "array"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "error_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Category"
          },
          "evidence_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Count"
          },
          "execution_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Path"
          },
          "fallback_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Reason"
          },
          "fallback_used": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Used"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          },
          "route_rationale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Route Rationale"
          },
          "skipped_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skipped Reason"
          },
          "stage_name": {
            "title": "Stage Name",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "stage_name",
          "status"
        ],
        "title": "StageDecisionSummary",
        "type": "object"
      },
      "StepAction": {
        "properties": {
          "step_key": {
            "title": "Step Key",
            "type": "string"
          }
        },
        "required": [
          "step_key"
        ],
        "title": "StepAction",
        "type": "object"
      },
      "StorageConfigRead": {
        "description": "Data & storage configuration returned to the client.\nInfrastructure connection details are masked to prevent credential/topology disclosure.",
        "properties": {
          "active_collection_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Collection Prefix"
          },
          "chroma_collection": {
            "title": "Chroma Collection",
            "type": "string"
          },
          "chroma_host": {
            "title": "Chroma Host",
            "type": "string"
          },
          "chroma_port": {
            "title": "Chroma Port",
            "type": "integer"
          },
          "collection_prefix": {
            "default": "",
            "title": "Collection Prefix",
            "type": "string"
          },
          "collection_prefix_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collection Prefix Note"
          },
          "minio_bucket_name": {
            "title": "Minio Bucket Name",
            "type": "string"
          },
          "minio_endpoint": {
            "title": "Minio Endpoint",
            "type": "string"
          },
          "minio_use_ssl": {
            "title": "Minio Use Ssl",
            "type": "boolean"
          },
          "mongo_connected": {
            "title": "Mongo Connected",
            "type": "boolean"
          },
          "postgres_connected": {
            "title": "Postgres Connected",
            "type": "boolean"
          },
          "redis_connected": {
            "title": "Redis Connected",
            "type": "boolean"
          },
          "storage_backend": {
            "title": "Storage Backend",
            "type": "string"
          }
        },
        "required": [
          "storage_backend",
          "postgres_connected",
          "mongo_connected",
          "redis_connected",
          "minio_endpoint",
          "minio_bucket_name",
          "minio_use_ssl",
          "chroma_host",
          "chroma_port",
          "chroma_collection"
        ],
        "title": "StorageConfigRead",
        "type": "object"
      },
      "StorageConfigUpdate": {
        "description": "Payload for updating storage config. None = keep existing.",
        "properties": {
          "chroma_collection": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 0,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chroma Collection"
          },
          "chroma_host": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chroma Host"
          },
          "chroma_port": {
            "anyOf": [
              {
                "maximum": 65535.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chroma Port"
          },
          "minio_bucket_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minio Bucket Name"
          },
          "minio_endpoint": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minio Endpoint"
          },
          "minio_use_ssl": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minio Use Ssl"
          },
          "storage_backend": {
            "anyOf": [
              {
                "enum": [
                  "minio",
                  "s3",
                  "local"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Backend"
          }
        },
        "title": "StorageConfigUpdate",
        "type": "object"
      },
      "StoreFootprintResponse": {
        "description": "One store's contribution to a project's storage footprint.\n\n``measured=False`` means the store could not be reached — ``bytes`` and\n``items`` are then ``None``, never ``0``. Zero and unreachable are opposite\nfindings and must not render alike.\n\n``exact=False`` means the byte figure is a proportional estimate over a\nstore shared with other projects; ``estimate_basis`` says how.",
        "properties": {
          "bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "complete": {
            "default": true,
            "title": "Complete",
            "type": "boolean"
          },
          "estimate_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimate Basis"
          },
          "exact": {
            "title": "Exact",
            "type": "boolean"
          },
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "store": {
            "title": "Store",
            "type": "string"
          },
          "unreachable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unreachable Reason"
          }
        },
        "required": [
          "store",
          "measured",
          "exact"
        ],
        "title": "StoreFootprintResponse",
        "type": "object"
      },
      "StrategyGapRead": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "pill": {
            "title": "Pill",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "severity",
          "title",
          "detail",
          "count",
          "pill"
        ],
        "title": "StrategyGapRead",
        "type": "object"
      },
      "StreamMessageRequest": {
        "description": "One streamed chat turn: a new question, or ``retry`` to answer the\nsession's unanswered (or stopped) last question again.",
        "properties": {
          "message": {
            "anyOf": [
              {
                "maxLength": 4000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "retry": {
            "default": false,
            "title": "Retry",
            "type": "boolean"
          }
        },
        "title": "StreamMessageRequest",
        "type": "object"
      },
      "StreamTicketResponse": {
        "properties": {
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Links",
            "type": "object"
          },
          "ticket": {
            "title": "Ticket",
            "type": "string"
          }
        },
        "required": [
          "ticket",
          "expires_in",
          "links"
        ],
        "title": "StreamTicketResponse",
        "type": "object"
      },
      "SubjectJobList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SubjectJobRead"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "SubjectJobList",
        "type": "object"
      },
      "SubjectJobRead": {
        "description": "One personal-data export / erasure job. ``storage_key`` is NEVER part of it.",
        "properties": {
          "bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "count_labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Count Labels"
          },
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Counts",
            "type": "object"
          },
          "download_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Path"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubjectRightsError"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "file_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Count"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "manifest_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manifest Sha256"
          },
          "phase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phase"
          },
          "requested_at": {
            "format": "date-time",
            "title": "Requested At",
            "type": "string"
          },
          "requested_by_display": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By Display"
          },
          "signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subject_display": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Display"
          },
          "subject_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject User Id"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "source",
          "requested_at"
        ],
        "title": "SubjectJobRead",
        "type": "object"
      },
      "SubjectRightsError": {
        "description": "Also the 4xx ``detail`` shape ``{code, message}`` (``subject_rights_vocab.ERROR_SENTENCES``).",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "SubjectRightsError",
        "type": "object"
      },
      "SuiteDurationRegressionResponse": {
        "description": "A suite whose median over its last 5 runs is >= 1.5x the 20 before.",
        "properties": {
          "baseline_median_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Median Ms"
          },
          "baseline_runs": {
            "default": 0,
            "title": "Baseline Runs",
            "type": "integer"
          },
          "metric": {
            "default": "summed",
            "title": "Metric",
            "type": "string"
          },
          "new": {
            "default": false,
            "title": "New",
            "type": "boolean"
          },
          "observed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed Ms"
          },
          "ratio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ratio"
          },
          "recent_median_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recent Median Ms"
          },
          "recent_runs": {
            "default": 0,
            "title": "Recent Runs",
            "type": "integer"
          },
          "suite_key": {
            "title": "Suite Key",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "was_slow_before": {
            "default": false,
            "title": "Was Slow Before",
            "type": "boolean"
          }
        },
        "required": [
          "suite_key"
        ],
        "title": "SuiteDurationRegressionResponse",
        "type": "object"
      },
      "SuiteExecutionHistoryResponse": {
        "description": "GET /api/v1/analytics/execution/suite-history.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "days": {
            "title": "Days",
            "type": "integer"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "meta": {
            "additionalProperties": true,
            "title": "Meta",
            "type": "object"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/SuiteHistoryPoint"
            },
            "title": "Points",
            "type": "array"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "stats": {
            "$ref": "#/components/schemas/SuiteHistoryStats"
          },
          "suite_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Key"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "days",
          "limit"
        ],
        "title": "SuiteExecutionHistoryResponse",
        "type": "object"
      },
      "SuiteExecutionResponse": {
        "description": "One ``suite_executions`` row: how long one suite of one run took.",
        "properties": {
          "broken": {
            "default": 0,
            "title": "Broken",
            "type": "integer"
          },
          "failed": {
            "default": 0,
            "title": "Failed",
            "type": "integer"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "parallelism": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallelism"
          },
          "passed": {
            "default": 0,
            "title": "Passed",
            "type": "integer"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "skipped": {
            "default": 0,
            "title": "Skipped",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "suite_key": {
            "title": "Suite Key",
            "type": "string"
          },
          "suite_name": {
            "title": "Suite Name",
            "type": "string"
          },
          "summed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed Ms"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "test_count": {
            "default": 0,
            "title": "Test Count",
            "type": "integer"
          },
          "timed_count": {
            "default": 0,
            "title": "Timed Count",
            "type": "integer"
          },
          "unknown": {
            "default": 0,
            "title": "Unknown",
            "type": "integer"
          },
          "wall_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Ms"
          }
        },
        "required": [
          "suite_name",
          "suite_key",
          "source"
        ],
        "title": "SuiteExecutionResponse",
        "type": "object"
      },
      "SuiteHistoryPoint": {
        "description": "One run of the suite.",
        "properties": {
          "branch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Branch"
          },
          "broken": {
            "default": 0,
            "title": "Broken",
            "type": "integer"
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "failed": {
            "default": 0,
            "title": "Failed",
            "type": "integer"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "parallelism": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallelism"
          },
          "passed": {
            "default": 0,
            "title": "Passed",
            "type": "integer"
          },
          "run_created_at": {
            "format": "date-time",
            "title": "Run Created At",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "run_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Status"
          },
          "skipped": {
            "default": 0,
            "title": "Skipped",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "summed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summed Ms"
          },
          "test_count": {
            "default": 0,
            "title": "Test Count",
            "type": "integer"
          },
          "timed_count": {
            "default": 0,
            "title": "Timed Count",
            "type": "integer"
          },
          "unknown": {
            "default": 0,
            "title": "Unknown",
            "type": "integer"
          },
          "wall_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Ms"
          }
        },
        "required": [
          "run_id",
          "run_created_at",
          "source"
        ],
        "title": "SuiteHistoryPoint",
        "type": "object"
      },
      "SuiteHistoryStats": {
        "description": "Window percentiles over EVERY execution in the window (not only the\nreturned points).",
        "properties": {
          "parallelism_p50": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallelism P50"
          },
          "summed": {
            "$ref": "#/components/schemas/ExecutionPercentiles"
          },
          "wall": {
            "$ref": "#/components/schemas/ExecutionPercentiles"
          }
        },
        "title": "SuiteHistoryStats",
        "type": "object"
      },
      "SuiteOwnerResponse": {
        "properties": {
          "is_fallback": {
            "default": false,
            "title": "Is Fallback",
            "type": "boolean"
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email"
          },
          "owner_full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Full Name"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "suite_name": {
            "title": "Suite Name",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "suite_name"
        ],
        "title": "SuiteOwnerResponse",
        "type": "object"
      },
      "SuiteOwnerUpdate": {
        "description": "PUT body for setting/clearing a suite's explicit owner.",
        "properties": {
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          }
        },
        "title": "SuiteOwnerUpdate",
        "type": "object"
      },
      "SuiteParityCutover": {
        "properties": {
          "cut_over_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cut Over At"
          },
          "cut_over_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cut Over By Name"
          },
          "legacy_writes": {
            "title": "Legacy Writes",
            "type": "boolean"
          },
          "streak_days_at_cutover": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Streak Days At Cutover"
          }
        },
        "required": [
          "legacy_writes"
        ],
        "title": "SuiteParityCutover",
        "type": "object"
      },
      "SuiteParityCutoverResult": {
        "description": "``POST /api/v1/admin/maintenance/suite-membership-cutover`` → 200.",
        "properties": {
          "cut_over_at": {
            "format": "date-time",
            "title": "Cut Over At",
            "type": "string"
          },
          "streak_days": {
            "title": "Streak Days",
            "type": "integer"
          }
        },
        "required": [
          "cut_over_at",
          "streak_days"
        ],
        "title": "SuiteParityCutoverResult",
        "type": "object"
      },
      "SuiteParityHistory": {
        "properties": {
          "cutover": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SuiteParityCutover"
              },
              {
                "type": "null"
              }
            ]
          },
          "cutover_ready": {
            "title": "Cutover Ready",
            "type": "boolean"
          },
          "required_days": {
            "default": 7,
            "title": "Required Days",
            "type": "integer"
          },
          "runs": {
            "items": {
              "$ref": "#/components/schemas/SuiteParityRunSummary"
            },
            "title": "Runs",
            "type": "array"
          },
          "streak_days": {
            "title": "Streak Days",
            "type": "integer"
          },
          "window_runs_now": {
            "title": "Window Runs Now",
            "type": "integer"
          }
        },
        "required": [
          "runs",
          "streak_days",
          "cutover_ready",
          "window_runs_now"
        ],
        "title": "SuiteParityHistory",
        "type": "object"
      },
      "SuiteParityProjectLine": {
        "properties": {
          "blocking": {
            "title": "Blocking",
            "type": "integer"
          },
          "expected": {
            "title": "Expected",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          }
        },
        "required": [
          "project_id",
          "blocking",
          "expected"
        ],
        "title": "SuiteParityProjectLine",
        "type": "object"
      },
      "SuiteParityRunDetail": {
        "properties": {
          "blocking_diffs": {
            "title": "Blocking Diffs",
            "type": "integer"
          },
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Counts",
            "type": "object"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "expected_divergences": {
            "title": "Expected Divergences",
            "type": "integer"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keys_compared": {
            "title": "Keys Compared",
            "type": "integer"
          },
          "per_project": {
            "items": {
              "$ref": "#/components/schemas/SuiteParityProjectLine"
            },
            "title": "Per Project",
            "type": "array"
          },
          "projects_checked": {
            "title": "Projects Checked",
            "type": "integer"
          },
          "requested_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By Name"
          },
          "sample": {
            "items": {
              "$ref": "#/components/schemas/SuiteParitySampleRow"
            },
            "title": "Sample",
            "type": "array"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "trigger": {
            "title": "Trigger",
            "type": "string"
          },
          "window_runs": {
            "title": "Window Runs",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "trigger",
          "status",
          "started_at",
          "window_runs",
          "projects_checked",
          "keys_compared",
          "blocking_diffs",
          "expected_divergences",
          "counts",
          "per_project",
          "sample"
        ],
        "title": "SuiteParityRunDetail",
        "type": "object"
      },
      "SuiteParityRunSummary": {
        "description": "One comparison of the legacy suite memberships with the canonical model.",
        "properties": {
          "blocking_diffs": {
            "title": "Blocking Diffs",
            "type": "integer"
          },
          "expected_divergences": {
            "title": "Expected Divergences",
            "type": "integer"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keys_compared": {
            "title": "Keys Compared",
            "type": "integer"
          },
          "projects_checked": {
            "title": "Projects Checked",
            "type": "integer"
          },
          "requested_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By Name"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "trigger": {
            "title": "Trigger",
            "type": "string"
          },
          "window_runs": {
            "title": "Window Runs",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "trigger",
          "status",
          "started_at",
          "window_runs",
          "projects_checked",
          "keys_compared",
          "blocking_diffs",
          "expected_divergences"
        ],
        "title": "SuiteParityRunSummary",
        "type": "object"
      },
      "SuiteParitySampleRow": {
        "properties": {
          "blocking": {
            "title": "Blocking",
            "type": "boolean"
          },
          "canonical": {
            "title": "Canonical",
            "type": "string"
          },
          "fingerprint": {
            "title": "Fingerprint",
            "type": "string"
          },
          "legacy": {
            "title": "Legacy",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "suite": {
            "title": "Suite",
            "type": "string"
          },
          "test_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Name"
          }
        },
        "required": [
          "reason",
          "blocking",
          "project_id",
          "suite",
          "fingerprint",
          "legacy",
          "canonical"
        ],
        "title": "SuiteParitySampleRow",
        "type": "object"
      },
      "SuiteReviewResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "reviewer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewer Email"
          },
          "reviewer_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewer User Id"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "suite_name": {
            "title": "Suite Name",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "suite_name",
          "test_run_id",
          "state",
          "created_at",
          "updated_at"
        ],
        "title": "SuiteReviewResponse",
        "type": "object"
      },
      "SuiteReviewUpdate": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "state": {
            "enum": [
              "pending",
              "confirmed",
              "acknowledged",
              "review_later"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "title": "SuiteReviewUpdate",
        "type": "object"
      },
      "SummaryReportResponse": {
        "properties": {
          "avg_duration_ms": {
            "title": "Avg Duration Ms",
            "type": "integer"
          },
          "flaky_criteria": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlakyCountCriteria"
              },
              {
                "type": "null"
              }
            ]
          },
          "flaky_rate_pct": {
            "title": "Flaky Rate Pct",
            "type": "number"
          },
          "flaky_test_count": {
            "description": "Not scoped by release_id. A test is flaky by its last N executions across the project's history (flaky_criteria) -- a run-count window, not a set of runs -- and the dashboard's flaky count and the release gate's flaky cap read that same project-wide figure; restricting it to one release's runs would be a different metric. Scoped by suite_name.",
            "title": "Flaky Test Count",
            "type": "integer"
          },
          "generated_at": {
            "title": "Generated At",
            "type": "string"
          },
          "last_run_before_window_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Before Window At"
          },
          "latest_run_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run At"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          },
          "mode": {
            "enum": [
              "window",
              "latest"
            ],
            "title": "Mode",
            "type": "string"
          },
          "period_end": {
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "title": "Period Start",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "run_count": {
            "title": "Run Count",
            "type": "integer"
          },
          "runs_per_day": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs Per Day"
          },
          "suites": {
            "items": {
              "$ref": "#/components/schemas/SummarySuiteRow"
            },
            "title": "Suites",
            "type": "array"
          },
          "top_failing_tests": {
            "items": {
              "$ref": "#/components/schemas/SummaryTopFailingTest"
            },
            "title": "Top Failing Tests",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/SummaryTotals"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "window_days",
          "generated_at",
          "period_start",
          "period_end",
          "totals",
          "run_count",
          "avg_duration_ms",
          "flaky_test_count",
          "flaky_rate_pct",
          "suites",
          "top_failing_tests"
        ],
        "title": "SummaryReportResponse",
        "type": "object"
      },
      "SummaryStepBreakdownRow": {
        "description": "One captured granular step for a failing test (Phase 5 enrichment).",
        "properties": {
          "assertion_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assertion Message"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "SummaryStepBreakdownRow",
        "type": "object"
      },
      "SummarySuiteRow": {
        "properties": {
          "broken": {
            "title": "Broken",
            "type": "integer"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "last_run_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "pass_rate_pct": {
            "title": "Pass Rate Pct",
            "type": "number"
          },
          "passed": {
            "title": "Passed",
            "type": "integer"
          },
          "passed_steps": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passed Steps"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          },
          "step_success_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Success Rate"
          },
          "suite_name": {
            "title": "Suite Name",
            "type": "string"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "total_steps": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Steps"
          },
          "weighted_pass_rate_pct": {
            "title": "Weighted Pass Rate Pct",
            "type": "number"
          }
        },
        "required": [
          "suite_name",
          "total",
          "passed",
          "failed",
          "skipped",
          "broken",
          "pass_rate_pct",
          "weighted_pass_rate_pct"
        ],
        "title": "SummarySuiteRow",
        "type": "object"
      },
      "SummaryTopFailingTest": {
        "properties": {
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "failure_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Step"
          },
          "failures": {
            "title": "Failures",
            "type": "integer"
          },
          "step_breakdown": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SummaryStepBreakdownRow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Breakdown"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          }
        },
        "required": [
          "test_name",
          "failures"
        ],
        "title": "SummaryTopFailingTest",
        "type": "object"
      },
      "SummaryTotals": {
        "properties": {
          "broken": {
            "title": "Broken",
            "type": "integer"
          },
          "broken_rate_pct": {
            "title": "Broken Rate Pct",
            "type": "number"
          },
          "evaluated": {
            "title": "Evaluated",
            "type": "integer"
          },
          "fail_rate_pct": {
            "title": "Fail Rate Pct",
            "type": "number"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "pass_rate_basis": {
            "default": "unique_tests",
            "title": "Pass Rate Basis",
            "type": "string"
          },
          "pass_rate_basis_label": {
            "default": "per unique test",
            "title": "Pass Rate Basis Label",
            "type": "string"
          },
          "pass_rate_pct": {
            "title": "Pass Rate Pct",
            "type": "number"
          },
          "passed": {
            "title": "Passed",
            "type": "integer"
          },
          "skip_rate_pct": {
            "title": "Skip Rate Pct",
            "type": "number"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          },
          "total_test_cases": {
            "title": "Total Test Cases",
            "type": "integer"
          },
          "weighted_pass_rate_pct": {
            "title": "Weighted Pass Rate Pct",
            "type": "number"
          }
        },
        "required": [
          "total_test_cases",
          "passed",
          "failed",
          "skipped",
          "broken",
          "evaluated",
          "pass_rate_pct",
          "fail_rate_pct",
          "skip_rate_pct",
          "broken_rate_pct",
          "weighted_pass_rate_pct"
        ],
        "title": "SummaryTotals",
        "type": "object"
      },
      "SuppliedCommit": {
        "description": "One commit in a caller-supplied commit range (US-8.1 air-gapped path).\n\nCI/SDK callers that already know the commits landed since the last green\nrun can push them on ingest so TestLookup needs NO outbound VCS call.\nBounded so a payload can't balloon: ``files`` is capped and the enclosing\n``commit_range`` list is capped on each ingest schema.",
        "properties": {
          "author": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author"
          },
          "committed_at": {
            "anyOf": [
              {
                "maxLength": 40,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed At"
          },
          "files": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Files"
          },
          "message": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "sha": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Sha",
            "type": "string"
          }
        },
        "required": [
          "sha"
        ],
        "title": "SuppliedCommit",
        "type": "object"
      },
      "SuppliedCommitRange": {
        "description": "A caller-supplied commit range WITH its boundary refs.\n\nThe original US-8.1 wire shape for ``commit_range`` was a bare list of\ncommits, which threw away the range's boundary: the backend stored\n``base_commit = NULL`` and nobody downstream could reconstruct what the\nrange was *relative to*. That makes the row useless as test-impact\n(Epic 10) training data. This object form carries the boundary the\ncaller already knows (it ran ``git log base..head`` to build the list).\n\nBoth wire shapes stay accepted — ``commit_range`` is\n``list[SuppliedCommit] | SuppliedCommitRange`` on every ingest schema,\nso existing SDK/CLI callers that push a bare list are unaffected.\nField aliases accept ``base``/``base_commit`` and ``head``/``head_commit``\nso callers do not have to guess which spelling we wanted.",
        "properties": {
          "base": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commit the range starts AFTER (exclusive) — the baseline ref.",
            "title": "Base"
          },
          "commits": {
            "items": {
              "$ref": "#/components/schemas/SuppliedCommit"
            },
            "maxItems": 100,
            "title": "Commits",
            "type": "array"
          },
          "head": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commit the range ends AT (inclusive) — usually this run's commit.",
            "title": "Head"
          }
        },
        "title": "SuppliedCommitRange",
        "type": "object"
      },
      "TaskBudgetV1": {
        "additionalProperties": false,
        "properties": {
          "max_cost_usd": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Cost Usd"
          },
          "max_llm_calls": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Llm Calls"
          },
          "max_retries": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retries"
          },
          "max_seconds": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seconds"
          },
          "max_tokens": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          }
        },
        "title": "TaskBudgetV1",
        "type": "object"
      },
      "TaskUsageV1": {
        "additionalProperties": false,
        "properties": {
          "cost_usd": {
            "default": 0,
            "minimum": 0.0,
            "title": "Cost Usd",
            "type": "number"
          },
          "duration_ms": {
            "default": 0,
            "minimum": 0.0,
            "title": "Duration Ms",
            "type": "integer"
          },
          "input_tokens": {
            "default": 0,
            "minimum": 0.0,
            "title": "Input Tokens",
            "type": "integer"
          },
          "llm_calls": {
            "default": 0,
            "minimum": 0.0,
            "title": "Llm Calls",
            "type": "integer"
          },
          "output_tokens": {
            "default": 0,
            "minimum": 0.0,
            "title": "Output Tokens",
            "type": "integer"
          },
          "total_tokens": {
            "default": 0,
            "minimum": 0.0,
            "title": "Total Tokens",
            "type": "integer"
          }
        },
        "title": "TaskUsageV1",
        "type": "object"
      },
      "TeamChannelResponse": {
        "description": "Team → notification channel mapping (PMF US-7.3).",
        "properties": {
          "channel_type": {
            "title": "Channel Type",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "target": {
            "title": "Target",
            "type": "string"
          },
          "team_name": {
            "title": "Team Name",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "project_id",
          "team_name",
          "channel_type",
          "target",
          "is_active",
          "created_at"
        ],
        "title": "TeamChannelResponse",
        "type": "object"
      },
      "TeamChannelUpsert": {
        "description": "Create/replace the notification channel for one ownership team\n(PMF US-7.3). The team is keyed by name in the URL path.",
        "properties": {
          "channel_type": {
            "pattern": "^(email|slack|teams)$",
            "title": "Channel Type",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "target": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "channel_type",
          "target"
        ],
        "title": "TeamChannelUpsert",
        "type": "object"
      },
      "TerminalOutcomeV1": {
        "additionalProperties": false,
        "properties": {
          "budget_exhausted": {
            "default": false,
            "title": "Budget Exhausted",
            "type": "boolean"
          },
          "budget_stop_reasons": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Budget Stop Reasons",
            "type": "array"
          },
          "decision_report_verification": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decision Report Verification"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "retry_wait",
              "completed",
              "passed",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "workflow_verification": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Verification"
          }
        },
        "required": [
          "status"
        ],
        "title": "TerminalOutcomeV1",
        "type": "object"
      },
      "TestAttachmentResponse": {
        "description": "Index-only attachment metadata (Phase 1 stores refs, not bytes).",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "media_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media Type"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "source_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Ref"
          },
          "source_test_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Test Run Id"
          },
          "test_step_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Step Id"
          }
        },
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "title": "TestAttachmentResponse",
        "type": "object"
      },
      "TestCaseBulkItemResult": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "outcome": {
            "title": "Outcome",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "id",
          "outcome"
        ],
        "title": "TestCaseBulkItemResult",
        "type": "object"
      },
      "TestCaseBulkRequest": {
        "properties": {
          "action": {
            "maxLength": 30,
            "title": "Action",
            "type": "string"
          },
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "case_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Case Ids",
            "type": "array"
          },
          "expected_versions": {
            "additionalProperties": {
              "type": "integer"
            },
            "propertyNames": {
              "format": "uuid"
            },
            "title": "Expected Versions",
            "type": "object"
          },
          "priority": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "transition": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transition"
          }
        },
        "required": [
          "project_id",
          "case_ids",
          "action"
        ],
        "title": "TestCaseBulkRequest",
        "type": "object"
      },
      "TestCaseBulkResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "changed": {
            "title": "Changed",
            "type": "integer"
          },
          "not_found": {
            "title": "Not Found",
            "type": "integer"
          },
          "requested": {
            "title": "Requested",
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/TestCaseBulkItemResult"
            },
            "title": "Results",
            "type": "array"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          },
          "unchanged": {
            "title": "Unchanged",
            "type": "integer"
          }
        },
        "required": [
          "action",
          "requested",
          "changed",
          "unchanged",
          "skipped",
          "not_found",
          "results"
        ],
        "title": "TestCaseBulkResponse",
        "type": "object"
      },
      "TestCaseClassificationSection": {
        "description": "Classification fields supplied by the report or existing catalog.",
        "properties": {
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "component_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Component Name"
          },
          "components": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Components",
            "type": "array"
          },
          "epic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Epic"
          },
          "feature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature"
          },
          "file_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Path"
          },
          "framework": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Framework"
          },
          "labels": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Labels",
            "type": "array"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "package_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Package Name"
          },
          "service": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service"
          },
          "service_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "story": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Story"
          },
          "suite": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          }
        },
        "title": "TestCaseClassificationSection",
        "type": "object"
      },
      "TestCaseCommentCreate": {
        "properties": {
          "comment_type": {
            "default": "general",
            "title": "Comment Type",
            "type": "string"
          },
          "content": {
            "maxLength": 50000,
            "minLength": 1,
            "title": "Content",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "step_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Number"
          }
        },
        "required": [
          "content"
        ],
        "title": "TestCaseCommentCreate",
        "type": "object"
      },
      "TestCaseCommentResponse": {
        "properties": {
          "author_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Id"
          },
          "comment_type": {
            "title": "Comment Type",
            "type": "string"
          },
          "content": {
            "title": "Content",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_resolved": {
            "title": "Is Resolved",
            "type": "boolean"
          },
          "mentions": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/CommentMention"
            },
            "title": "Mentions",
            "type": "array"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "step_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Number"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "test_case_id",
          "content",
          "comment_type",
          "is_resolved",
          "created_at",
          "updated_at"
        ],
        "title": "TestCaseCommentResponse",
        "type": "object"
      },
      "TestCaseDeprecateRequest": {
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "TestCaseDeprecateRequest",
        "type": "object"
      },
      "TestCaseDurationStatsResponse": {
        "description": "EXEC-03: duration percentiles of the test over the history window\n(every execution in the window, not only the 50 points returned).",
        "properties": {
          "max_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Ms"
          },
          "measured": {
            "default": false,
            "title": "Measured",
            "type": "boolean"
          },
          "n": {
            "default": 0,
            "title": "N",
            "type": "integer"
          },
          "p50_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P50 Ms"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "window_days": {
            "default": 30,
            "title": "Window Days",
            "type": "integer"
          }
        },
        "title": "TestCaseDurationStatsResponse",
        "type": "object"
      },
      "TestCaseExecutionSection": {
        "description": "Outcome and bounded execution metadata for the result snapshot.",
        "properties": {
          "call_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Ms"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "has_attachments": {
            "default": false,
            "title": "Has Attachments",
            "type": "boolean"
          },
          "is_flaky_run": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Flaky Run"
          },
          "parameters": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Parameters",
            "type": "array"
          },
          "retry_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Count"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "stack_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stack Trace"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/TestStatus"
          },
          "step_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Count"
          },
          "steps_present": {
            "default": false,
            "title": "Steps Present",
            "type": "boolean"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "timing_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Source"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "required": [
          "status"
        ],
        "title": "TestCaseExecutionSection",
        "type": "object"
      },
      "TestCaseFlakinessResponse": {
        "description": "Computed flakiness for the in-window timeline.\n\n``failure_rate``/``failure_rate_pct`` match ``analytics_service.flaky_tests``;\n``classification`` + ``impact_score`` reuse ``test_health_coach_service``\nthresholds (no new formula).",
        "properties": {
          "classification": {
            "default": "HEALTHY",
            "title": "Classification",
            "type": "string"
          },
          "failed": {
            "default": 0,
            "title": "Failed",
            "type": "integer"
          },
          "failure_rate": {
            "default": 0.0,
            "title": "Failure Rate",
            "type": "number"
          },
          "failure_rate_pct": {
            "default": 0.0,
            "title": "Failure Rate Pct",
            "type": "number"
          },
          "impact_score": {
            "default": 0.0,
            "title": "Impact Score",
            "type": "number"
          },
          "is_flaky": {
            "default": false,
            "title": "Is Flaky",
            "type": "boolean"
          },
          "passed": {
            "default": 0,
            "title": "Passed",
            "type": "integer"
          },
          "total_runs": {
            "default": 0,
            "title": "Total Runs",
            "type": "integer"
          },
          "window_days": {
            "default": 30,
            "title": "Window Days",
            "type": "integer"
          }
        },
        "title": "TestCaseFlakinessResponse",
        "type": "object"
      },
      "TestCaseHistoryPointResponse": {
        "description": "One cross-run point in a logical test's timeline (most-recent-first).",
        "properties": {
          "ai": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TestHistoryAI"
              },
              {
                "type": "null"
              }
            ]
          },
          "build_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build Number"
          },
          "call_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Ms"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "run_label": {
            "title": "Run Label",
            "type": "string"
          },
          "run_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Seq"
          },
          "setup_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Ms"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "teardown_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teardown Ms"
          },
          "timing_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Source"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          }
        },
        "required": [
          "run_label",
          "status"
        ],
        "title": "TestCaseHistoryPointResponse",
        "type": "object"
      },
      "TestCaseHistoryResponse": {
        "description": "Wrapper for GET /runs/{run_id}/tests/{test_id}/history.",
        "properties": {
          "ai_changes": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/TestHistoryAIChange"
            },
            "title": "Ai Changes",
            "type": "array"
          },
          "baseline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TestDurationBaselineResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_stats": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TestCaseDurationStatsResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "flakiness": {
            "$ref": "#/components/schemas/TestCaseFlakinessResponse"
          },
          "history": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/TestCaseHistoryPointResponse"
            },
            "title": "History",
            "type": "array"
          },
          "metadata": {
            "$ref": "#/components/schemas/TestCaseMetadataResponse"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "test_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Fingerprint"
          },
          "test_id": {
            "title": "Test Id",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "test_id",
          "test_name",
          "flakiness",
          "metadata"
        ],
        "title": "TestCaseHistoryResponse",
        "type": "object"
      },
      "TestCaseIdentitySection": {
        "description": "Stable and source-native identifiers for one executed test result.",
        "properties": {
          "canonical_test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Test Case Id"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fingerprint"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "history_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "History Id"
          },
          "source_history_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source History Id"
          },
          "source_test_case_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Test Case Id"
          },
          "source_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Uuid"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "test_fingerprint": {
            "title": "Test Fingerprint",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          }
        },
        "required": [
          "test_case_id",
          "test_run_id",
          "test_fingerprint",
          "test_name"
        ],
        "title": "TestCaseIdentitySection",
        "type": "object"
      },
      "TestCaseImportResponse": {
        "properties": {
          "dry_run": {
            "title": "Dry Run",
            "type": "boolean"
          },
          "file_name": {
            "title": "File Name",
            "type": "string"
          },
          "format": {
            "title": "Format",
            "type": "string"
          },
          "headers": {
            "$ref": "#/components/schemas/ImportHeaderReport"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ImportRowResult"
            },
            "title": "Rows",
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/ImportSummary"
          }
        },
        "required": [
          "project_id",
          "dry_run",
          "file_name",
          "format",
          "headers",
          "summary",
          "rows"
        ],
        "title": "TestCaseImportResponse",
        "type": "object"
      },
      "TestCaseLifecycleState": {
        "description": "Stored lifecycle vocabulary for authored ``ManagedTestCase`` rows.",
        "enum": [
          "draft",
          "review_requested",
          "under_review",
          "approved",
          "active",
          "rejected",
          "needs_update",
          "deprecated",
          "archived"
        ],
        "title": "TestCaseLifecycleState",
        "type": "string"
      },
      "TestCaseListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TestCaseSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "TestCaseListResponse",
        "type": "object"
      },
      "TestCaseMetadataResponse": {
        "description": "Identity metadata: owner, effective suite, first/last seen, timestamps.",
        "properties": {
          "assigned_to_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To User Id"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "feature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature"
          },
          "first_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seen At"
          },
          "first_seen_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seen Run Id"
          },
          "first_seen_run_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seen Run Label"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "last_seen_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen Run Id"
          },
          "last_seen_run_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen Run Label"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "suite": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "title": "TestCaseMetadataResponse",
        "type": "object"
      },
      "TestCaseParameterSchema": {
        "description": "Optional authored input metadata; sensitive values are never required.",
        "properties": {
          "masked": {
            "default": false,
            "title": "Masked",
            "type": "boolean"
          },
          "mode": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name"
        ],
        "title": "TestCaseParameterSchema",
        "type": "object"
      },
      "TestCaseProvenanceSection": {
        "description": "Where the current normalized detail came from.",
        "properties": {
          "field_sources": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Field Sources",
            "type": "object"
          },
          "format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format"
          },
          "minio_s3_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minio S3 Prefix"
          },
          "parser_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parser Format"
          },
          "parser_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parser Version"
          },
          "source_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source File"
          },
          "source_test_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Test Run Id"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "title": "TestCaseProvenanceSection",
        "type": "object"
      },
      "TestCaseRestoreRequest": {
        "properties": {
          "change_summary": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Summary"
          },
          "expected_version": {
            "minimum": 1.0,
            "title": "Expected Version",
            "type": "integer"
          },
          "version": {
            "minimum": 1.0,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "expected_version"
        ],
        "title": "TestCaseRestoreRequest",
        "type": "object"
      },
      "TestCaseReviewResponse": {
        "properties": {
          "ai_quality_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Quality Score"
          },
          "ai_review_completed": {
            "title": "Ai Review Completed",
            "type": "boolean"
          },
          "ai_review_notes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Review Notes"
          },
          "ai_reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Reviewed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "human_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Human Notes"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "requested_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By Id"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "reviewer_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewer Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "test_case_id",
          "status",
          "ai_review_completed",
          "created_at",
          "updated_at"
        ],
        "title": "TestCaseReviewResponse",
        "type": "object"
      },
      "TestCaseStepSchema": {
        "description": "Authored step shape; expected outcomes are optional by design.",
        "properties": {
          "action": {
            "maxLength": 50000,
            "minLength": 1,
            "title": "Action",
            "type": "string"
          },
          "expected_result": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Result"
          },
          "step_number": {
            "minimum": 1.0,
            "title": "Step Number",
            "type": "integer"
          }
        },
        "required": [
          "step_number",
          "action"
        ],
        "title": "TestCaseStepSchema",
        "type": "object"
      },
      "TestCaseSummary": {
        "properties": {
          "assigned_to_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To User Id"
          },
          "class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "failure_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Derived failure-kind triad (US-9.1): product / test_code /\ninfrastructure / unknown. AI-derived from the stored\n``failure_category`` + the FAILED-vs-BROKEN status distinction —\nsee ``app/services/failure_kind.py`` for the mapping rationale.\nNone for non-failing rows (a kind only makes sense for failures).",
            "readOnly": true,
            "title": "Failure Kind"
          },
          "feature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature"
          },
          "has_attachments": {
            "default": false,
            "title": "Has Attachments",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "status": {
            "$ref": "#/components/schemas/TestStatus"
          },
          "step_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Count"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "test_run_id",
          "test_name",
          "status",
          "created_at",
          "failure_kind"
        ],
        "title": "TestCaseSummary",
        "type": "object"
      },
      "TestCaseTimelineResponse": {
        "properties": {
          "automation_linked": {
            "default": false,
            "title": "Automation Linked",
            "type": "boolean"
          },
          "case_id": {
            "format": "uuid",
            "title": "Case Id",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/TimelineEntry"
            },
            "title": "Items",
            "type": "array"
          },
          "kinds": {
            "items": {
              "type": "string"
            },
            "title": "Kinds",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "case_id",
          "kinds",
          "items"
        ],
        "title": "TestCaseTimelineResponse",
        "type": "object"
      },
      "TestCaseTransitionRequest": {
        "properties": {
          "action": {
            "enum": [
              "request_review",
              "claim_review",
              "withdraw_review",
              "unclaim",
              "approve",
              "reject",
              "request_changes",
              "activate",
              "flag_stale",
              "revise",
              "deprecate",
              "reinstate",
              "archive"
            ],
            "title": "Action",
            "type": "string"
          },
          "expected_version": {
            "minimum": 1.0,
            "title": "Expected Version",
            "type": "integer"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "action",
          "expected_version"
        ],
        "title": "TestCaseTransitionRequest",
        "type": "object"
      },
      "TestCaseVersionExecution": {
        "description": "A plan execution recorded against one case version (W28 TCM-05).",
        "properties": {
          "executed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Executed At"
          },
          "execution_status": {
            "title": "Execution Status",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "plan_id": {
            "format": "uuid",
            "title": "Plan Id",
            "type": "string"
          },
          "plan_name": {
            "title": "Plan Name",
            "type": "string"
          }
        },
        "required": [
          "plan_id",
          "plan_name",
          "item_id",
          "execution_status"
        ],
        "title": "TestCaseVersionExecution",
        "type": "object"
      },
      "TestCaseVersionResponse": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "automation_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Status"
          },
          "change_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Summary"
          },
          "change_type": {
            "title": "Change Type",
            "type": "string"
          },
          "changed_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed By Id"
          },
          "changed_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed By Name"
          },
          "changed_fields": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changed Fields"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "estimated_duration_minutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Duration Minutes"
          },
          "executions": {
            "items": {
              "$ref": "#/components/schemas/TestCaseVersionExecution"
            },
            "title": "Executions",
            "type": "array"
          },
          "expected_result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Result"
          },
          "feature_area": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature Area"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_automated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Automated"
          },
          "objective": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "parameters": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseParameterSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "preconditions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preconditions"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TestCaseStepSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "test_data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Data"
          },
          "test_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Fingerprint"
          },
          "test_suite_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Suite Id"
          },
          "test_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Type"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "test_case_id",
          "version",
          "title",
          "status",
          "change_type",
          "created_at"
        ],
        "title": "TestCaseVersionResponse",
        "type": "object"
      },
      "TestDurationBaselineResponse": {
        "description": "A test's running duration statistics (``perf_baselines``).",
        "properties": {
          "last_observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Observed At"
          },
          "last_observed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Observed Ms"
          },
          "mean_ms": {
            "title": "Mean Ms",
            "type": "number"
          },
          "p95_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Ms"
          },
          "sample_count": {
            "default": 0,
            "title": "Sample Count",
            "type": "integer"
          },
          "stddev_ms": {
            "default": 0.0,
            "title": "Stddev Ms",
            "type": "number"
          }
        },
        "required": [
          "mean_ms"
        ],
        "title": "TestDurationBaselineResponse",
        "type": "object"
      },
      "TestExecutionReviewRead": {
        "description": "Current review state for an AI-flagged failure.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "defect_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Link"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reviewed_by_full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By Full Name"
          },
          "reviewed_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By User Id"
          },
          "reviewed_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By Username"
          },
          "state": {
            "enum": [
              "pending_review",
              "reviewed",
              "defect_filed",
              "false_positive",
              "reproducible"
            ],
            "title": "State",
            "type": "string"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          },
          "transitioned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transitioned At"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "test_case_id",
          "project_id",
          "state",
          "created_at"
        ],
        "title": "TestExecutionReviewRead",
        "type": "object"
      },
      "TestExecutionReviewUpdate": {
        "description": "Transition the review state. ``state`` is required; other fields are\noptional context the reviewer can attach (e.g. defect URL on\n``defect_filed``, freeform note explaining the verdict).",
        "properties": {
          "defect_link": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Link"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "state": {
            "enum": [
              "pending_review",
              "reviewed",
              "defect_filed",
              "false_positive",
              "reproducible"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "title": "TestExecutionReviewUpdate",
        "type": "object"
      },
      "TestHealthFinding": {
        "description": "Per-test health finding.",
        "properties": {
          "anti_patterns": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Anti Patterns",
            "type": "array"
          },
          "critical_count": {
            "default": 0,
            "title": "Critical Count",
            "type": "integer"
          },
          "health_score": {
            "title": "Health Score",
            "type": "integer"
          },
          "recommendation": {
            "default": "",
            "title": "Recommendation",
            "type": "string"
          },
          "test_case_id": {
            "title": "Test Case Id",
            "type": "string"
          },
          "test_name": {
            "title": "Test Name",
            "type": "string"
          },
          "violations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/TestHealthViolation"
            },
            "title": "Violations",
            "type": "array"
          },
          "warning_count": {
            "default": 0,
            "title": "Warning Count",
            "type": "integer"
          }
        },
        "required": [
          "test_case_id",
          "test_name",
          "health_score"
        ],
        "title": "TestHealthFinding",
        "type": "object"
      },
      "TestHealthResponse": {
        "description": "Test health findings for a run.",
        "properties": {
          "avg_health_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Health Score"
          },
          "findings": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/TestHealthFinding"
            },
            "title": "Findings",
            "type": "array"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "total_analyzed": {
            "default": 0,
            "title": "Total Analyzed",
            "type": "integer"
          },
          "with_violations": {
            "default": 0,
            "title": "With Violations",
            "type": "integer"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "TestHealthResponse",
        "type": "object"
      },
      "TestHealthViolation": {
        "properties": {
          "occurrences": {
            "default": 1,
            "title": "Occurrences",
            "type": "integer"
          },
          "pattern": {
            "title": "Pattern",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "pattern",
          "severity"
        ],
        "title": "TestHealthViolation",
        "type": "object"
      },
      "TestHistoryAI": {
        "properties": {
          "analysis_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Mode"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "is_flaky": {
            "default": false,
            "title": "Is Flaky",
            "type": "boolean"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "requires_human_review": {
            "default": false,
            "title": "Requires Human Review",
            "type": "boolean"
          },
          "root_cause_excerpt": {
            "default": "",
            "title": "Root Cause Excerpt",
            "type": "string"
          },
          "root_cause_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Root Cause Sha"
          },
          "test_id": {
            "title": "Test Id",
            "type": "string"
          },
          "version_count": {
            "default": 0,
            "title": "Version Count",
            "type": "integer"
          }
        },
        "required": [
          "test_id"
        ],
        "title": "TestHistoryAI",
        "type": "object"
      },
      "TestHistoryAIChange": {
        "properties": {
          "from_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Category"
          },
          "from_confidence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Confidence"
          },
          "kinds": {
            "items": {
              "type": "string"
            },
            "title": "Kinds",
            "type": "array"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "run_label": {
            "title": "Run Label",
            "type": "string"
          },
          "to_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Category"
          },
          "to_confidence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Confidence"
          }
        },
        "required": [
          "run_label"
        ],
        "title": "TestHistoryAIChange",
        "type": "object"
      },
      "TestNotificationRequest": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/NotificationChannel"
          },
          "preference_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preference Id"
          }
        },
        "required": [
          "channel"
        ],
        "title": "TestNotificationRequest",
        "type": "object"
      },
      "TestPlanCreate": {
        "properties": {
          "assigned_to_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To Id"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 500,
            "minLength": 3,
            "title": "Name",
            "type": "string"
          },
          "objective": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "planned_end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned End Date"
          },
          "planned_start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Start Date"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "required": [
          "project_id",
          "name"
        ],
        "title": "TestPlanCreate",
        "type": "object"
      },
      "TestPlanItemCreate": {
        "properties": {
          "order_index": {
            "default": 0,
            "title": "Order Index",
            "type": "integer"
          },
          "priority_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority Override"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          }
        },
        "required": [
          "test_case_id"
        ],
        "title": "TestPlanItemCreate",
        "type": "object"
      },
      "TestPlanItemResponse": {
        "properties": {
          "actual_duration_minutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Duration Minutes"
          },
          "case_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Case Version"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "executed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Executed At"
          },
          "executed_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Executed By Id"
          },
          "executed_case_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Executed Case Version"
          },
          "execution_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Notes"
          },
          "execution_status": {
            "title": "Execution Status",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "order_index": {
            "title": "Order Index",
            "type": "integer"
          },
          "plan_id": {
            "format": "uuid",
            "title": "Plan Id",
            "type": "string"
          },
          "priority_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority Override"
          },
          "test_case_id": {
            "format": "uuid",
            "title": "Test Case Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "plan_id",
          "test_case_id",
          "order_index",
          "execution_status",
          "created_at"
        ],
        "title": "TestPlanItemResponse",
        "type": "object"
      },
      "TestPlanListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TestPlanResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "size",
          "pages"
        ],
        "title": "TestPlanListResponse",
        "type": "object"
      },
      "TestPlanResponse": {
        "properties": {
          "actual_end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual End Date"
          },
          "actual_start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Start Date"
          },
          "ai_generated": {
            "title": "Ai Generated",
            "type": "boolean"
          },
          "assigned_to_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To Id"
          },
          "blocked_cases": {
            "title": "Blocked Cases",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "executed_cases": {
            "title": "Executed Cases",
            "type": "integer"
          },
          "failed_cases": {
            "title": "Failed Cases",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "objective": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "passed_cases": {
            "title": "Passed Cases",
            "type": "integer"
          },
          "planned_end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned End Date"
          },
          "planned_start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Start Date"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "total_cases": {
            "title": "Total Cases",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "status",
          "ai_generated",
          "total_cases",
          "executed_cases",
          "passed_cases",
          "failed_cases",
          "blocked_cases",
          "created_at",
          "updated_at"
        ],
        "title": "TestPlanResponse",
        "type": "object"
      },
      "TestPlanUpdate": {
        "properties": {
          "actual_end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual End Date"
          },
          "actual_start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Start Date"
          },
          "assigned_to_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To Id"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "objective": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "planned_end_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned End Date"
          },
          "planned_start_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Planned Start Date"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "title": "TestPlanUpdate",
        "type": "object"
      },
      "TestStatus": {
        "enum": [
          "PASSED",
          "FAILED",
          "SKIPPED",
          "BROKEN",
          "UNKNOWN"
        ],
        "title": "TestStatus",
        "type": "string"
      },
      "TestStepResponse": {
        "description": "One granular step in a logical test's latest-run snapshot.\n\n``steps`` carries the nested child steps (Allure before/after + sub-steps).",
        "properties": {
          "actual_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Value"
          },
          "assertion_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assertion Message"
          },
          "assertion_trace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assertion Trace"
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/TestAttachmentResponse"
            },
            "title": "Attachments",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "depth": {
            "title": "Depth",
            "type": "integer"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "expected_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Value"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyword": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keyword"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "ordinal": {
            "title": "Ordinal",
            "type": "integer"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "parent_step_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Step Id"
          },
          "start_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Ms"
          },
          "status": {
            "$ref": "#/components/schemas/TestStatus"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/TestStepResponse"
            },
            "title": "Steps",
            "type": "array"
          }
        },
        "required": [
          "id",
          "ordinal",
          "depth",
          "name",
          "status",
          "created_at"
        ],
        "title": "TestStepResponse",
        "type": "object"
      },
      "TestStrategyResponse": {
        "properties": {
          "ai_generated": {
            "title": "Ai Generated",
            "type": "boolean"
          },
          "ai_model_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Model Used"
          },
          "approved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By Id"
          },
          "automation_approach": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Approach"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "defect_management": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Management"
          },
          "entry_criteria": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Criteria"
          },
          "environments": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environments"
          },
          "exit_criteria": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Criteria"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "objective": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "out_of_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Out Of Scope"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "risk_assessment": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Assessment"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "test_approach": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Approach"
          },
          "test_types": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Types"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version_label": {
            "title": "Version Label",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "version_label",
          "status",
          "ai_generated",
          "created_at",
          "updated_at"
        ],
        "title": "TestStrategyResponse",
        "type": "object"
      },
      "TestStrategyUpdate": {
        "properties": {
          "automation_approach": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Approach"
          },
          "defect_management": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Management"
          },
          "entry_criteria": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Criteria"
          },
          "environments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environments"
          },
          "exit_criteria": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Criteria"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "objective": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "out_of_scope": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Out Of Scope"
          },
          "risk_assessment": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk Assessment"
          },
          "scope": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "test_approach": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Approach"
          },
          "test_types": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Types"
          },
          "version_label": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Label"
          }
        },
        "title": "TestStrategyUpdate",
        "type": "object"
      },
      "TestSuiteCreate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "required": [
          "project_id",
          "name"
        ],
        "title": "TestSuiteCreate",
        "type": "object"
      },
      "TestSuiteListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TestSuiteResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "TestSuiteListResponse",
        "type": "object"
      },
      "TestSuiteResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "test_case_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Case Count"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "created_at",
          "id",
          "project_id",
          "name",
          "is_default"
        ],
        "title": "TestSuiteResponse",
        "type": "object"
      },
      "TestSuiteUpdate": {
        "description": "None = keep existing value.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "title": "TestSuiteUpdate",
        "type": "object"
      },
      "ThresholdCheck": {
        "description": "US-15.2 — the recorded confidence-gate evaluation for one AI output.\n\nPersisted verbatim in ``AIAnalysis.routing_metadata[\"threshold_check\"]``\nand ``Defect.policy_evaluation[\"threshold_check\"]``. Built by\n``services.confidence_gate.build_threshold_check`` — keep the shapes in\nsync (four keys, no more).",
        "properties": {
          "observed_confidence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed Confidence"
          },
          "passed": {
            "title": "Passed",
            "type": "boolean"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "threshold": {
            "title": "Threshold",
            "type": "integer"
          }
        },
        "required": [
          "threshold",
          "passed",
          "source"
        ],
        "title": "ThresholdCheck",
        "type": "object"
      },
      "ThresholdsConfig": {
        "additionalProperties": false,
        "properties": {
          "confidence_min": {
            "default": 80,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Confidence Min",
            "type": "integer"
          },
          "degraded_ratio": {
            "default": 0.3,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Degraded Ratio",
            "type": "number"
          },
          "max_failures_analyzed": {
            "default": 50,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Max Failures Analyzed",
            "type": "integer"
          }
        },
        "title": "ThresholdsConfig",
        "type": "object"
      },
      "TierComparisonRequest": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Agent Id",
            "type": "string"
          },
          "candidate_tier": {
            "pattern": "^(deterministic|slm|llm|auto)$",
            "title": "Candidate Tier",
            "type": "string"
          },
          "capability": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Capability",
            "type": "string"
          },
          "delta": {
            "default": 0.05,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Delta",
            "type": "number"
          },
          "include_live_labels": {
            "default": false,
            "title": "Include Live Labels",
            "type": "boolean"
          },
          "incumbent_tier": {
            "pattern": "^(deterministic|slm|llm|auto)$",
            "title": "Incumbent Tier",
            "type": "string"
          },
          "pairs": {
            "items": {
              "$ref": "#/components/schemas/TierOutputPairRequest"
            },
            "maxItems": 1000,
            "title": "Pairs",
            "type": "array"
          },
          "persist": {
            "default": true,
            "title": "Persist",
            "type": "boolean"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "agent_id",
          "capability",
          "incumbent_tier",
          "candidate_tier"
        ],
        "title": "TierComparisonRequest",
        "type": "object"
      },
      "TierOutputPairRequest": {
        "additionalProperties": false,
        "properties": {
          "candidate_cost_usd": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Candidate Cost Usd",
            "type": "number"
          },
          "candidate_latency_ms": {
            "default": 0,
            "minimum": 0.0,
            "title": "Candidate Latency Ms",
            "type": "integer"
          },
          "candidate_output": {
            "title": "Candidate Output"
          },
          "candidate_tokens": {
            "default": 0,
            "minimum": 0.0,
            "title": "Candidate Tokens",
            "type": "integer"
          },
          "incumbent_cost_usd": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Incumbent Cost Usd",
            "type": "number"
          },
          "incumbent_latency_ms": {
            "default": 0,
            "minimum": 0.0,
            "title": "Incumbent Latency Ms",
            "type": "integer"
          },
          "incumbent_output": {
            "title": "Incumbent Output"
          },
          "incumbent_tokens": {
            "default": 0,
            "minimum": 0.0,
            "title": "Incumbent Tokens",
            "type": "integer"
          },
          "sample_id": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Sample Id",
            "type": "string"
          }
        },
        "required": [
          "sample_id",
          "incumbent_output",
          "candidate_output"
        ],
        "title": "TierOutputPairRequest",
        "type": "object"
      },
      "TimelineEntry": {
        "properties": {
          "actor_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Name"
          },
          "actor_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Source"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "link": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimelineLink"
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "id",
          "kind",
          "occurred_at",
          "title"
        ],
        "title": "TimelineEntry",
        "type": "object"
      },
      "TimelineLink": {
        "properties": {
          "defect_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Id"
          },
          "jira_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jira Key"
          },
          "plan_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Id"
          },
          "run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "test_case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Case Id"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "TimelineLink",
        "type": "object"
      },
      "TimelineNoteCreate": {
        "additionalProperties": false,
        "properties": {
          "ends_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends On"
          },
          "starts_on": {
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "text": {
            "maxLength": 280,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "starts_on",
          "text"
        ],
        "title": "TimelineNoteCreate",
        "type": "object"
      },
      "TimelineNoteList": {
        "properties": {
          "end": {
            "title": "End",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/TimelineNoteResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "start": {
            "title": "Start",
            "type": "string"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "total",
          "truncated",
          "start",
          "end"
        ],
        "title": "TimelineNoteList",
        "type": "object"
      },
      "TimelineNoteResponse": {
        "properties": {
          "can_edit": {
            "title": "Can Edit",
            "type": "boolean"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "ends_on": {
            "title": "Ends On",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "starts_on": {
            "title": "Starts On",
            "type": "string"
          },
          "suite_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "project_id",
          "starts_on",
          "ends_on",
          "text",
          "can_edit"
        ],
        "title": "TimelineNoteResponse",
        "type": "object"
      },
      "TimelineNoteUpdate": {
        "additionalProperties": false,
        "description": "Only the fields SENT are applied (``model_fields_set``).",
        "properties": {
          "ends_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends On"
          },
          "starts_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts On"
          },
          "suite_name": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suite Name"
          },
          "text": {
            "anyOf": [
              {
                "maxLength": 280,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "title": "TimelineNoteUpdate",
        "type": "object"
      },
      "TokenResponse": {
        "properties": {
          "access_token": {
            "title": "Access Token",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "must_change_password": {
            "default": false,
            "title": "Must Change Password",
            "type": "boolean"
          },
          "refresh_token": {
            "title": "Refresh Token",
            "type": "string"
          },
          "token_type": {
            "default": "bearer",
            "title": "Token Type",
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "refresh_token",
          "expires_in"
        ],
        "title": "TokenResponse",
        "type": "object"
      },
      "ToolsConfig": {
        "additionalProperties": false,
        "properties": {
          "allowlist": {
            "items": {
              "type": "string"
            },
            "title": "Allowlist",
            "type": "array"
          }
        },
        "title": "ToolsConfig",
        "type": "object"
      },
      "TraceabilityGapsResponse": {
        "properties": {
          "cases_without_requirements": {
            "items": {
              "$ref": "#/components/schemas/LibraryCaseRow"
            },
            "title": "Cases Without Requirements",
            "type": "array"
          },
          "cases_without_requirements_total": {
            "title": "Cases Without Requirements Total",
            "type": "integer"
          },
          "gaps": {
            "items": {
              "$ref": "#/components/schemas/RequirementGapRead"
            },
            "title": "Gaps",
            "type": "array"
          },
          "gaps_total": {
            "title": "Gaps Total",
            "type": "integer"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "summary": {
            "$ref": "#/components/schemas/RequirementCoverageSummary"
          }
        },
        "required": [
          "project_id",
          "summary",
          "gaps",
          "gaps_total",
          "page",
          "size",
          "cases_without_requirements_total",
          "cases_without_requirements"
        ],
        "title": "TraceabilityGapsResponse",
        "type": "object"
      },
      "TrackEventRequest": {
        "properties": {
          "event_name": {
            "title": "Event Name",
            "type": "string"
          },
          "payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          }
        },
        "required": [
          "event_name"
        ],
        "title": "TrackEventRequest",
        "type": "object"
      },
      "TriageStatusUpdate": {
        "description": "Body of ``PUT /api/v1/me/assigned-failures/{id}/triage``.\n\n``status`` is validated against the ``TriageStatus`` enum at the\nservice layer (the regex form here keeps the OpenAPI schema readable\nwhile still rejecting arbitrary strings; we don't gain anything\nfrom using a Pydantic Enum directly because the service maps to the\ncanonical enum anyway).",
        "properties": {
          "notes": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Free-form context. Typically a defect link for DEFECT_CREATED or a rationale for WONT_FIX / REVIEWED_APPROVED.",
            "title": "Notes"
          },
          "status": {
            "description": "New triage status. Any value other than PENDING_REVIEW drops the row from the assignee's /my-failures inbox.",
            "pattern": "^(PENDING_REVIEW|REVIEWED_APPROVED|DEFECT_CREATED|WONT_FIX|AUTOMATION_SCRIPT_ISSUE|FLAKY_TEST)$",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "TriageStatusUpdate",
        "type": "object"
      },
      "TriggerDeepRequest": {
        "properties": {
          "evidence_sources": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 64,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Sources"
          },
          "failure_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 500,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Ids"
          },
          "max_failures_analyzed": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Failures Analyzed"
          },
          "mode": {
            "default": "deep",
            "title": "Mode",
            "type": "string"
          },
          "model_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Tier"
          }
        },
        "title": "TriggerDeepRequest",
        "type": "object"
      },
      "TriggerDeepResponse": {
        "properties": {
          "already_in_progress": {
            "default": false,
            "title": "Already In Progress",
            "type": "boolean"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Run Id"
          },
          "run_configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeepRunConfigurationRead"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id"
          }
        },
        "required": [
          "message",
          "run_id"
        ],
        "title": "TriggerDeepResponse",
        "type": "object"
      },
      "TriggerPipelineRequest": {
        "properties": {
          "test_run_id": {
            "format": "uuid",
            "title": "Test Run Id",
            "type": "string"
          },
          "workflow_id": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 3,
                "pattern": "^(?:wf\\.[a-z0-9_.-]+|offline|deep|live)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Id"
          },
          "workflow_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Version"
          }
        },
        "required": [
          "test_run_id"
        ],
        "title": "TriggerPipelineRequest",
        "type": "object"
      },
      "UIDismissalCreate": {
        "description": "Dismiss a UI prompt for the authenticated user.\n\n``dismissal_key`` is validated against a closed allowlist in\n``services/ui_dismissal_service.KNOWN_DISMISSAL_KEYS`` rather than by a\nPydantic enum here: a strict enum over a ``String(100)`` column silently\n422s when the vocabularies drift, and the UI shows nothing at all.",
        "properties": {
          "dismissal_key": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Dismissal Key",
            "type": "string"
          }
        },
        "required": [
          "dismissal_key"
        ],
        "title": "UIDismissalCreate",
        "type": "object"
      },
      "UIDismissalListResponse": {
        "properties": {
          "dismissed": {
            "items": {
              "type": "string"
            },
            "title": "Dismissed",
            "type": "array"
          }
        },
        "title": "UIDismissalListResponse",
        "type": "object"
      },
      "UpdateProjectMemberRoleRequest": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        },
        "required": [
          "role"
        ],
        "title": "UpdateProjectMemberRoleRequest",
        "type": "object"
      },
      "UpdateUserProfileRequest": {
        "description": "Editable user attributes. Only non-None fields are applied.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "anyOf": [
              {
                "maxLength": 50,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username"
          }
        },
        "title": "UpdateUserProfileRequest",
        "type": "object"
      },
      "UpdateUserRoleRequest": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        },
        "required": [
          "role"
        ],
        "title": "UpdateUserRoleRequest",
        "type": "object"
      },
      "UpdateUserStatusRequest": {
        "properties": {
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          }
        },
        "required": [
          "is_active"
        ],
        "title": "UpdateUserStatusRequest",
        "type": "object"
      },
      "UploadStatusResponse": {
        "description": "Async status of an uploaded report (GET /api/v1/ingest/uploads/{task_id}).\n\nstate: pending | parsing | ingesting | succeeded | failed.",
        "properties": {
          "error": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "progress": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "task_id",
          "state"
        ],
        "title": "UploadStatusResponse",
        "type": "object"
      },
      "UserCreate": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "username": {
            "maxLength": 50,
            "minLength": 3,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "email",
          "username",
          "password"
        ],
        "title": "UserCreate",
        "type": "object"
      },
      "UserListResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "erased_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Erased At"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_erased": {
            "default": false,
            "title": "Is Erased",
            "type": "boolean"
          },
          "is_service_account": {
            "default": false,
            "title": "Is Service Account",
            "type": "boolean"
          },
          "is_synthetic": {
            "default": false,
            "title": "Is Synthetic",
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "username",
          "role",
          "is_active",
          "created_at"
        ],
        "title": "UserListResponse",
        "type": "object"
      },
      "UserResponse": {
        "properties": {
          "avatar_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Color"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "must_change_password": {
            "default": false,
            "title": "Must Change Password",
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "id",
          "email",
          "username",
          "role",
          "is_active"
        ],
        "title": "UserResponse",
        "type": "object"
      },
      "UserRole": {
        "enum": [
          "VIEWER",
          "TESTER",
          "QA_ENGINEER",
          "QA_LEAD",
          "ADMIN"
        ],
        "title": "UserRole",
        "type": "string"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "ValueMetricAssumptionsRead": {
        "description": "GET/PUT response — the EFFECTIVE assumptions plus their source\n(``default`` = no row, ``custom`` = project row exists).",
        "properties": {
          "blocked_run_wait_minutes": {
            "title": "Blocked Run Wait Minutes",
            "type": "number"
          },
          "defect_filing_minutes": {
            "title": "Defect Filing Minutes",
            "type": "number"
          },
          "source": {
            "default": "default",
            "title": "Source",
            "type": "string"
          },
          "triage_minutes_per_failure": {
            "title": "Triage Minutes Per Failure",
            "type": "number"
          }
        },
        "required": [
          "triage_minutes_per_failure",
          "blocked_run_wait_minutes",
          "defect_filing_minutes"
        ],
        "title": "ValueMetricAssumptionsRead",
        "type": "object"
      },
      "ValueMetricAssumptionsWrite": {
        "description": "PUT body for ``/projects/{id}/value-metrics/assumptions`` (US-12.1).\n\nAll fields optional — omitted fields keep their current (or default)\nvalue. Bounds: 0 < x <= 480 minutes; anything outside 422s.",
        "properties": {
          "blocked_run_wait_minutes": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 480.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked Run Wait Minutes"
          },
          "defect_filing_minutes": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 480.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defect Filing Minutes"
          },
          "triage_minutes_per_failure": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 480.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triage Minutes Per Failure"
          }
        },
        "title": "ValueMetricAssumptionsWrite",
        "type": "object"
      },
      "WebVitalReport": {
        "properties": {
          "delta": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "rating": {
            "title": "Rating",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "number"
          }
        },
        "required": [
          "name",
          "value",
          "rating",
          "url"
        ],
        "title": "WebVitalReport",
        "type": "object"
      },
      "WebhookDeliveryRead": {
        "properties": {
          "attempt_count": {
            "title": "Attempt Count",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "event_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Payload"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Http Status"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "response_preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Preview"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subscription_id": {
            "format": "uuid",
            "title": "Subscription Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "subscription_id",
          "event_type",
          "status",
          "attempt_count",
          "created_at"
        ],
        "title": "WebhookDeliveryRead",
        "type": "object"
      },
      "WebhookDeliveryReplayResponse": {
        "description": "Result of POST /webhooks/{sub_id}/deliveries/{delivery_id}/replay.",
        "properties": {
          "delivery_id": {
            "format": "uuid",
            "title": "Delivery Id",
            "type": "string"
          },
          "status": {
            "default": "PENDING",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "delivery_id"
        ],
        "title": "WebhookDeliveryReplayResponse",
        "type": "object"
      },
      "WebhookEventCatalogEntry": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          }
        },
        "required": [
          "event_type",
          "description"
        ],
        "title": "WebhookEventCatalogEntry",
        "type": "object"
      },
      "WebhookEventCatalogResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventCatalogEntry"
            },
            "title": "Events",
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "title": "WebhookEventCatalogResponse",
        "type": "object"
      },
      "WebhookSubscriptionRead": {
        "properties": {
          "breaker_threshold": {
            "default": 10,
            "title": "Breaker Threshold",
            "type": "integer"
          },
          "consecutive_failures": {
            "default": 0,
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "disabled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled At"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "failure_count": {
            "title": "Failure Count",
            "type": "integer"
          },
          "has_secret": {
            "title": "Has Secret",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered At"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "max_retries": {
            "title": "Max Retries",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "target_url": {
            "title": "Target Url",
            "type": "string"
          },
          "total_delivered": {
            "title": "Total Delivered",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "target_url",
          "events",
          "enabled",
          "has_secret",
          "max_retries",
          "failure_count",
          "total_delivered",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookSubscriptionRead",
        "type": "object"
      },
      "WebhookSubscriptionWrite": {
        "properties": {
          "breaker_threshold": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Breaker Threshold"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "max_retries": {
            "default": 5,
            "maximum": 10.0,
            "minimum": 0.0,
            "title": "Max Retries",
            "type": "integer"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "secret": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "target_url": {
            "maxLength": 1000,
            "minLength": 8,
            "pattern": "^https?://",
            "title": "Target Url",
            "type": "string"
          }
        },
        "required": [
          "name",
          "target_url",
          "events"
        ],
        "title": "WebhookSubscriptionWrite",
        "type": "object"
      },
      "WebhookTestResponse": {
        "properties": {
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Code"
          },
          "success": {
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "WebhookTestResponse",
        "type": "object"
      },
      "WorkflowBodyV1": {
        "additionalProperties": false,
        "properties": {
          "base": {
            "enum": [
              "offline",
              "deep",
              "live"
            ],
            "title": "Base",
            "type": "string"
          },
          "deadline_seconds": {
            "default": 1500,
            "maximum": 86400.0,
            "minimum": 1.0,
            "title": "Deadline Seconds",
            "type": "integer"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "edges": {
            "items": {
              "$ref": "#/components/schemas/WorkflowEdgeV1"
            },
            "maxItems": 300,
            "title": "Edges",
            "type": "array"
          },
          "loops": {
            "items": {
              "$ref": "#/components/schemas/WorkflowLoopV1"
            },
            "maxItems": 50,
            "title": "Loops",
            "type": "array"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "retry_policy": {
            "$ref": "#/components/schemas/WorkflowRetryPolicyV1"
          },
          "review_policy": {
            "default": "human_required",
            "enum": [
              "human_required",
              "human_required_plus_auto_reviewer"
            ],
            "title": "Review Policy",
            "type": "string"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/WorkflowStepV1"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Steps",
            "type": "array"
          },
          "workflow_id": {
            "maxLength": 80,
            "minLength": 3,
            "pattern": "^(?:wf\\.[a-z0-9_.-]+|offline|deep|live)$",
            "title": "Workflow Id",
            "type": "string"
          }
        },
        "required": [
          "workflow_id",
          "name",
          "base",
          "steps"
        ],
        "title": "WorkflowBodyV1",
        "type": "object"
      },
      "WorkflowDecisionEvent": {
        "properties": {
          "alternatives": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alternatives"
          },
          "at": {
            "title": "At",
            "type": "string"
          },
          "chosen": {
            "title": "Chosen",
            "type": "string"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "decision_point": {
            "title": "Decision Point",
            "type": "string"
          },
          "rationale": {
            "title": "Rationale",
            "type": "string"
          }
        },
        "required": [
          "at",
          "decision_point",
          "chosen",
          "rationale"
        ],
        "title": "WorkflowDecisionEvent",
        "type": "object"
      },
      "WorkflowDefaultRead": {
        "properties": {
          "base": {
            "title": "Base",
            "type": "string"
          },
          "model_stages": {
            "items": {
              "type": "string"
            },
            "title": "Model Stages",
            "type": "array"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "resolved_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved Name"
          },
          "resolved_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved Ref"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "updated_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By"
          },
          "workflow_id": {
            "title": "Workflow Id",
            "type": "string"
          },
          "workflow_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Version"
          }
        },
        "required": [
          "base",
          "source",
          "workflow_id",
          "state"
        ],
        "title": "WorkflowDefaultRead",
        "type": "object"
      },
      "WorkflowDefaultUpdate": {
        "properties": {
          "workflow_id": {
            "maxLength": 80,
            "minLength": 3,
            "pattern": "^wf\\.[a-z0-9_.-]+$",
            "title": "Workflow Id",
            "type": "string"
          },
          "workflow_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Version"
          }
        },
        "required": [
          "workflow_id"
        ],
        "title": "WorkflowDefaultUpdate",
        "type": "object"
      },
      "WorkflowDefaultsResponse": {
        "properties": {
          "defaults": {
            "items": {
              "$ref": "#/components/schemas/WorkflowDefaultRead"
            },
            "title": "Defaults",
            "type": "array"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "defaults"
        ],
        "title": "WorkflowDefaultsResponse",
        "type": "object"
      },
      "WorkflowEdgeV1": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ],
            "title": "From"
          },
          "join": {
            "anyOf": [
              {
                "enum": [
                  "all",
                  "any"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Join"
          },
          "to": {
            "maxLength": 80,
            "minLength": 1,
            "title": "To",
            "type": "string"
          },
          "when": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "When"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "title": "WorkflowEdgeV1",
        "type": "object"
      },
      "WorkflowEvaluateV1": {
        "additionalProperties": false,
        "properties": {
          "sample_limit": {
            "default": 20,
            "maximum": 100.0,
            "minimum": 20.0,
            "title": "Sample Limit",
            "type": "integer"
          },
          "version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "title": "WorkflowEvaluateV1",
        "type": "object"
      },
      "WorkflowForkV1": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "workflow_id": {
            "maxLength": 80,
            "minLength": 3,
            "pattern": "^wf\\.[a-z0-9_.-]+$",
            "title": "Workflow Id",
            "type": "string"
          }
        },
        "required": [
          "workflow_id",
          "name"
        ],
        "title": "WorkflowForkV1",
        "type": "object"
      },
      "WorkflowLoopV1": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "maxLength": 80,
            "minLength": 1,
            "title": "From",
            "type": "string"
          },
          "max_iterations": {
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Max Iterations",
            "type": "integer"
          },
          "to": {
            "maxLength": 80,
            "minLength": 1,
            "title": "To",
            "type": "string"
          },
          "when": {
            "additionalProperties": true,
            "title": "When",
            "type": "object"
          }
        },
        "required": [
          "from",
          "to",
          "when",
          "max_iterations"
        ],
        "title": "WorkflowLoopV1",
        "type": "object"
      },
      "WorkflowPublishV1": {
        "additionalProperties": false,
        "properties": {
          "accept_regression": {
            "default": false,
            "title": "Accept Regression",
            "type": "boolean"
          },
          "definition_sha256": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[0-9a-f]{64}$",
            "title": "Definition Sha256",
            "type": "string"
          },
          "eval_manifest_checksum": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eval Manifest Checksum"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "version": {
            "minimum": 1.0,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "definition_sha256"
        ],
        "title": "WorkflowPublishV1",
        "type": "object"
      },
      "WorkflowRetryPolicyV1": {
        "additionalProperties": false,
        "properties": {
          "base_seconds": {
            "default": 30,
            "maximum": 3600.0,
            "minimum": 0.0,
            "title": "Base Seconds",
            "type": "integer"
          },
          "cap_seconds": {
            "default": 600,
            "maximum": 86400.0,
            "minimum": 1.0,
            "title": "Cap Seconds",
            "type": "integer"
          },
          "max_attempts": {
            "default": 5,
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Max Attempts",
            "type": "integer"
          }
        },
        "title": "WorkflowRetryPolicyV1",
        "type": "object"
      },
      "WorkflowStepV1": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Agent Id",
            "type": "string"
          },
          "config_ref": {
            "anyOf": [
              {
                "maxLength": 80,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config Ref"
          },
          "id": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9_]*$",
            "title": "Id",
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "reviews": {
            "items": {
              "type": "string"
            },
            "maxItems": 64,
            "title": "Reviews",
            "type": "array"
          },
          "tools": {
            "items": {
              "type": "string"
            },
            "maxItems": 64,
            "title": "Tools",
            "type": "array"
          }
        },
        "required": [
          "id",
          "agent_id"
        ],
        "title": "WorkflowStepV1",
        "type": "object"
      },
      "WouldRefuseChannel": {
        "properties": {
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "decisions": {
            "minimum": 0.0,
            "title": "Decisions",
            "type": "integer"
          }
        },
        "required": [
          "channel",
          "decisions"
        ],
        "title": "WouldRefuseChannel",
        "type": "object"
      },
      "WouldRefuseSummary": {
        "description": "The ``ai_report.distribution_would_refuse`` audit rows of the last 30 days.\n\nAbsence is not health: ``measured`` is False when the audit read failed or\ntimed out, and then every number below is None (never 0).",
        "properties": {
          "by_channel": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WouldRefuseChannel"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "By Channel"
          },
          "decisions": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decisions"
          },
          "measured": {
            "title": "Measured",
            "type": "boolean"
          },
          "runs": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs"
          },
          "since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Since"
          },
          "window_days": {
            "default": 30,
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "measured"
        ],
        "title": "WouldRefuseSummary",
        "type": "object"
      },
      "_BudgetPatch": {
        "additionalProperties": false,
        "properties": {
          "max_cost_usd_per_run": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Cost Usd Per Run"
          },
          "max_llm_calls_per_run": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Llm Calls Per Run"
          },
          "max_runs_per_day": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Runs Per Day"
          },
          "max_tokens_per_run": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens Per Run"
          }
        },
        "title": "_BudgetPatch",
        "type": "object"
      },
      "_RetryPatch": {
        "additionalProperties": false,
        "properties": {
          "max_attempts": {
            "minimum": 1.0,
            "title": "Max Attempts",
            "type": "integer"
          }
        },
        "required": [
          "max_attempts"
        ],
        "title": "_RetryPatch",
        "type": "object"
      },
      "_ReviewPatch": {
        "additionalProperties": false,
        "properties": {
          "add_auto_reviewer": {
            "default": false,
            "title": "Add Auto Reviewer",
            "type": "boolean"
          }
        },
        "title": "_ReviewPatch",
        "type": "object"
      },
      "_ThresholdsPatch": {
        "additionalProperties": false,
        "properties": {
          "max_failures_analyzed": {
            "minimum": 1.0,
            "title": "Max Failures Analyzed",
            "type": "integer"
          }
        },
        "required": [
          "max_failures_analyzed"
        ],
        "title": "_ThresholdsPatch",
        "type": "object"
      },
      "_TierPatch": {
        "additionalProperties": false,
        "properties": {
          "tier": {
            "enum": [
              "auto",
              "deterministic",
              "slm",
              "llm"
            ],
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "tier"
        ],
        "title": "_TierPatch",
        "type": "object"
      },
      "_ToolsPatch": {
        "additionalProperties": false,
        "properties": {
          "allowlist": {
            "items": {
              "type": "string"
            },
            "title": "Allowlist",
            "type": "array"
          }
        },
        "required": [
          "allowlist"
        ],
        "title": "_ToolsPatch",
        "type": "object"
      },
      "app__models__schemas__FeatureFlagUpdate": {
        "description": "Partial update.\n\nOmitted fields keep their value. Explicit null clears project/role\nallow-lists; for the scalar fields null is ignored.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled_global": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Global"
          },
          "enabled_projects": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Projects"
          },
          "enabled_roles": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled Roles"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "rollout_percent": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rollout Percent"
          }
        },
        "title": "FeatureFlagUpdate",
        "type": "object"
      },
      "app__routers__app_settings__FeatureFlagUpdate": {
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "scope": {
            "default": "global",
            "title": "Scope",
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "FeatureFlagUpdate",
        "type": "object"
      }
    },
    "securitySchemes": {
      "JWT": {
        "flows": {
          "password": {
            "scopes": {},
            "tokenUrl": "/api/v1/auth/login"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "description": "360° AI-Powered Software Testing Intelligence Platform",
    "title": "TestLookup",
    "version": "0.0.1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/": {
      "get": {
        "operationId": "root__get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Root",
        "tags": [
          "System"
        ]
      }
    },
    "/api/v1/activity/event-types": {
      "get": {
        "description": "Feeds the filter UI. Not project-scoped: the vocabulary is global.",
        "operationId": "list_event_types_api_v1_activity_event_types_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Event Types Api V1 Activity Event Types Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "The activity event registry, grouped by category",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/activity/mine": {
      "get": {
        "description": "The caller's own rows and the rows involving them (Inbox › Activity).\n\nEvery role. The QUERY ``project_id`` is authorized by\n``resolve_project_scope`` (a non-member's id → 403) BEFORE any ledger read;\nwithout it the read covers every project the caller can reach (ADMIN:\nall; a project-bound key: its project). Part B (mentions) never reads\nbeyond the caller's OWN memberships. A read: nothing is written.",
        "operationId": "list_my_activity_api_v1_activity_mine_get",
        "parameters": [
          {
            "description": "Pin one project (the Inbox's active project)",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Pin one project (the Inbox's active project)",
              "title": "Project Id"
            }
          },
          {
            "description": "all|mine|involving (default all)",
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "all|mine|involving (default all)",
              "title": "View"
            }
          },
          {
            "description": "Default 7 days ago; at most 90",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Default 7 days ago; at most 90",
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "description": "1-100 (default 50)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "1-100 (default 50)",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque keyset cursor from a previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque keyset cursor from a previous page",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List My Activity Api V1 Activity Mine Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "What I did and what involves me, across my projects (keyset paginated)",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/admin/dlq": {
      "get": {
        "description": "List newest dead letters from both existing Redis stores.",
        "operationId": "list_dead_letters_api_v1_admin_dlq_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Dead Letters",
        "tags": [
          "Admin DLQ"
        ]
      }
    },
    "/api/v1/admin/dlq/{entry_id}/replay": {
      "post": {
        "description": "Replay one allowlisted Celery entry after the broker accepts it.",
        "operationId": "replay_dead_letter_api_v1_admin_dlq__entry_id__replay_post",
        "parameters": [
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "title": "Entry Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Replay Dead Letter",
        "tags": [
          "Admin DLQ"
        ]
      }
    },
    "/api/v1/admin/maintenance/ai-cache": {
      "get": {
        "description": "The AI similarity cache's health, and what the pre-M15 shared collection holds.\n\nRe-audit M15, code review: ``legacy_unscoped_documents`` -- entries written\nto the old collection every tenant shared, which may belong to any tenant --\nwas computed by ``get_semantic_cache_stats`` and returned by nothing, so\nthe signal to purge that collection could not be seen. Instance admins\nonly: the counts span tenants. A cache that cannot be read is a 503, never\na page of zeros.",
        "operationId": "read_ai_cache_stats_api_v1_admin_maintenance_ai_cache_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Read Ai Cache Stats",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/backfill-placeholder-test-cases": {
      "post": {
        "description": "Fire ``worker.tasks.backfill_placeholder_test_cases`` immediately.\n\nSynthesizes placeholder ``TestCase`` rows for every historical\n``TestRun`` where ``failed_tests + broken_tests > 0`` but no\n``test_cases`` exist (the Phase 4.5 live-stream buffer-eviction\nscenario). Beat schedule fires this hourly at :10 — use this\nendpoint right after a deploy if you don't want to wait.\n\nIdempotent — subsequent calls produce zero rows once the first run\nhas filled the gaps. Returns the Celery task id so the caller can\ncorrelate with worker logs.",
        "operationId": "trigger_placeholder_backfill_api_v1_admin_maintenance_backfill_placeholder_test_cases_post",
        "parameters": [
          {
            "in": "query",
            "name": "max_runs_per_project",
            "required": false,
            "schema": {
              "default": 500,
              "title": "Max Runs Per Project",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Placeholder Backfill",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/backfill-unassigned-failures": {
      "post": {
        "description": "Fire ``worker.tasks.backfill_unassigned_failures`` immediately.\n\nPass 1 provisions a default QA-lead user on every project missing\none (see ``default_qa_lead_service``). Pass 2 walks recent\nFAILED/BROKEN ``TestCase`` rows whose ``assigned_to_user_id`` is\nNULL and runs the suite-owner resolver across them. The result is\nthat ``/my-failures`` populates without having to wait for the\nnext 15-minute beat tick.\n\nIdempotent — only writes to NULL rows, only provisions missing\nleads, never over-writes a manual reassignment.",
        "operationId": "trigger_unassigned_failures_backfill_api_v1_admin_maintenance_backfill_unassigned_failures_post",
        "parameters": [
          {
            "in": "query",
            "name": "max_runs_per_project",
            "required": false,
            "schema": {
              "default": 200,
              "title": "Max Runs Per Project",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Unassigned Failures Backfill",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/dlq": {
      "get": {
        "description": "Newest entries of both dead-letter stores (re-audit M2).\n\nBoth stores were write-only: ``/health/ingestion`` counted one and nothing\ncounted the other, so an operator could learn that work had permanently\nfailed, but never what. Instance admins only -- the entries are\ncross-tenant (run and project ids, error text, sanitized event payloads).\nA store that cannot be read is a 503, never an empty list.",
        "operationId": "read_dead_letters_api_v1_admin_maintenance_dlq_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Read Dead Letters",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/drain-active-live-sessions": {
      "post": {
        "description": "Fire ``worker.tasks.drain_active_live_sessions`` immediately.\n\nNormally runs every 30s. Useful when an operator wants to confirm\nthe drain is functional after a deploy without waiting for the\nnext tick.",
        "operationId": "trigger_drain_active_sessions_api_v1_admin_maintenance_drain_active_live_sessions_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Drain Active Sessions",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/outbox/requeue": {
      "post": {
        "description": "Put failed post-ingestion work back in the run outbox (re-audit N23).\n\nA finished run's follow-up work -- notifications, the completion webhook,\nsuite comparisons, the AI pipeline -- is published from a durable outbox,\nand an intent that keeps failing is marked ``failed`` and never retried.\nUntil N23 every ``agent_pipeline`` intent failed that way with\n``broker_TypeError``, so the fix alone would not have analysed one of those\nruns. List them with this call (it is a dry run unless ``dry_run`` is\nfalse), then requeue them in slices of at most 500, oldest first. Each\nrequeued ``agent_pipeline`` intent starts one AI pipeline.\n\nRequeue a stranded N27 intent only after its pipeline is marked failed: a\npipeline left ``running`` refuses the retry until the stale-pipeline reaper\n(every 10 minutes, after 30) has failed it.",
        "operationId": "requeue_failed_outbox_operations_api_v1_admin_maintenance_outbox_requeue_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutboxRequeueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Requeue Failed Outbox Operations",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/suite-membership-cutover": {
      "post": {
        "description": "Stop writing (and reading) the legacy suite-membership tables: turn ``suite_membership_legacy_writes`` OFF.\n\nRefused (409, fixed sentences, never an exception text) when it is already\noff, while a fresh comparison is running, or unless the SAME readiness the\nhistory GET shows says ``cutover_ready`` (seven clean UTC days). Under the\nflag service's own lock the row is re-read, so two clicks make one change.\nThe flag's ``settings_audit_log`` row (actor + reason, no names in the\nreason) is the record; ONE commit; then the flag cache is dropped and every\nproject's analytics epoch is bumped (the coverage map's ``needs_review``\nsource changes) — best effort, a Redis error is logged by TYPE and never\nfails the POST. The body is ignored. Reversible until F-W25-2: turning the\nflag back ON at /settings/feature-flags resumes legacy reads and writes.",
        "operationId": "cut_over_suite_membership_api_v1_admin_maintenance_suite_membership_cutover_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuiteParityCutoverResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cut Over Suite Membership",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/suite-membership-parity": {
      "get": {
        "description": "The comparisons started in the last 14 UTC days (newest first) and the clean-day streak.\n\n``cutover_ready`` is true on the 7th consecutive UTC day whose LAST finished\ncomparison is clean. A day with no finished comparison breaks the streak\n(absence is not health); today without one does not, until it is over. An\nempty ``runs`` list means no comparison has run yet — never \"0 differences\".\n\nW25d: ``cutover`` is the derived cut-over state. After a cutover the window\nENDS at ``cutover.cut_over_at`` (the 14 UTC days ending on that date, runs\nstarted before it), so the evidence stays readable and the dates after the\ncutover never read as missed days. Before it the answer is today's.",
        "operationId": "read_suite_membership_parity_api_v1_admin_maintenance_suite_membership_parity_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuiteParityHistory"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Read Suite Membership Parity",
        "tags": [
          "Admin Maintenance"
        ]
      },
      "post": {
        "description": "\"Compare now\": enqueue one read-only comparison on the worker.\n\n409 once cut over (W25d: the old tables are no longer written, so the\ncomparison is retired — checked first). 409 while a comparison started less\nthan ``RUN_STALE_MINUTES`` ago is still running (read before enqueueing;\nthe runner's unique claim is the real guard). 503 when the broker refuses\nthe task — its exception TYPE is logged, never echoed.",
        "operationId": "trigger_suite_membership_parity_api_v1_admin_maintenance_suite_membership_parity_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Trigger Suite Membership Parity Api V1 Admin Maintenance Suite Membership Parity Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Suite Membership Parity",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/maintenance/suite-membership-parity/{parity_run_id}": {
      "get": {
        "description": "One comparison: its counts per reason, the projects with differences and the sample.\n\nProject names are resolved at read time (None for a project deleted since).",
        "operationId": "read_suite_membership_parity_run_api_v1_admin_maintenance_suite_membership_parity__parity_run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "parity_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Parity Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuiteParityRunDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Read Suite Membership Parity Run",
        "tags": [
          "Admin Maintenance"
        ]
      }
    },
    "/api/v1/admin/storage/deleted-projects": {
      "get": {
        "description": "What deleted projects still cost, and what will never reclaim it.\n\nDeleting a project sets ``is_active = False`` and revokes its credentials;\nnothing reconciles the data. Because retention defaults to off (the\nproject's ``enabled`` and the instance default alike), a project deleted\nwithout retention turned on is purged by **nothing, ever** — across all\nfive stores, invisible on every other screen.\n\n``reachable_by_retention`` is the distinction that matters: the scheduled\nbeat selects on the EFFECTIVE ``enabled`` alone (the project's own, else\nthe instance default — W22b) and does **not** filter ``is_active``, so a\nproject that opted in before deletion (or inherits an enabled instance\ndefault) still gets swept. One that did not is stranded, and\n``unreachable_by_retention`` counts those.\n\nDeployment-wide, so it is ADMIN-only and not project-scoped — there is no\n``{project_id}`` here to guard, and a per-project footprint already exists\nat ``GET /api/v1/projects/{project_id}/storage``.\n\nBounded by ``limit``: each footprint costs at least one paginated\nobject-store listing. ``truncated`` and ``projects_measured`` say when the\nanswer is partial, so a capped total cannot quietly understate the number\nthis endpoint exists to surface.",
        "operationId": "get_deleted_project_storage_api_v1_admin_storage_deleted_projects_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedProjectsStorageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Deleted Project Storage",
        "tags": [
          "Admin Storage"
        ]
      }
    },
    "/api/v1/agents/active-runs": {
      "get": {
        "description": "Get all currently monitored live test runs.\n\nEnriches each Redis-state row with ``run_seq`` (per-(project,\nprimary_suite_name) human-readable run number) by resolving each\nrun's canonical TestRun.id. ``run_seq`` is null when the run's\nTestRun row doesn't exist yet — the Phase 4.5 incremental drain\ncreates it within ~30s of the first event, so very-new active\nsessions fall through to the SDK ``build_number`` on the UI.\n\nTenant-scoped: a non-ADMIN caller only sees live runs whose project\nthey can access. ``RedisLiveRunState`` stores ``project_id`` on every\nstate row, so the filter is in-memory (no DB round trip). Without this,\nthe endpoint leaked every tenant's live run (slug, build number, counts,\ntiming) to any authenticated user — the ``/active-runs/{run_id}`` sibling\nalready gates on ``require_run_access`` but the list did not.",
        "operationId": "get_active_live_runs_api_v1_agents_active_runs_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Active Live Runs",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/active-runs/{run_id}": {
      "get": {
        "description": "Get the current state for a single live test run.",
        "operationId": "get_live_run_state_api_v1_agents_active_runs__run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Live Run State",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/catalog": {
      "get": {
        "description": "Discover the agents (E1.1): every capability in the registry.\n\nClients read agent ids here instead of hard-coding stage names. Declared\nfirst in this router: the planned ``/agents/{agent_id}/invoke`` route must\ncome after every literal ``/agents/...`` path (architecture section 3.5).",
        "operationId": "list_agent_catalog_api_v1_agents_catalog_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AgentCatalogEntry"
                  },
                  "title": "Response List Agent Catalog Api V1 Agents Catalog Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Agent Catalog",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/catalog/{agent_id}": {
      "get": {
        "description": "One agent, with its generated input wrapper and JSON Schemas (E1.1).",
        "operationId": "get_agent_catalog_entry_api_v1_agents_catalog__agent_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCatalogDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Agent Catalog Entry",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/defect-command": {
      "post": {
        "description": "Run the Defect Commander on a failure cluster.\nScores the cluster on 7 criticality dimensions, generates a Jira-ready\ndefect description, and optionally creates a Jira ticket.",
        "operationId": "defect_command_api_v1_agents_defect_command_post",
        "parameters": [
          {
            "in": "query",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "title": "Cluster Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Key"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Defect Command",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/event-log/health": {
      "get": {
        "description": "Return write-health details for the pipeline audit event log.",
        "operationId": "get_pipeline_event_log_health_api_v1_agents_event_log_health_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineEventLogHealthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Pipeline Event Log Health",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/invocations/{invocation_id}": {
      "get": {
        "description": "Poll one invocation: status, attempts, output and review state, read from its run.",
        "operationId": "get_invocation_api_v1_agents_invocations__invocation_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "invocation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invocation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInvocationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Invocation",
        "tags": [
          "Agent Invocations"
        ]
      }
    },
    "/api/v1/agents/invocations/{invocation_id}/cancel": {
      "post": {
        "description": "Cancel an invocation cooperatively, exactly as its pipeline run is cancelled.\n\nA run with no live worker stops now; a running one is asked to stop and\nterminalises at its next stage boundary. Cancellation is sticky: an\nautomatic retry never brings it back. Cancellation before the worker\ncreates a run is stored on the invocation and rechecked under a row lock.",
        "operationId": "cancel_invocation_api_v1_agents_invocations__invocation_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "invocation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invocation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInvocationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cancel Invocation",
        "tags": [
          "Agent Invocations"
        ]
      }
    },
    "/api/v1/agents/invocations/{invocation_id}/events": {
      "get": {
        "description": "Progress of one invocation as server-sent events, until its run finishes.",
        "operationId": "stream_invocation_events_api_v1_agents_invocations__invocation_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "invocation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invocation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ticket",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "title": "Ticket",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stream Invocation Events",
        "tags": [
          "Agent Invocations"
        ]
      }
    },
    "/api/v1/agents/invocations/{invocation_id}/events/ticket": {
      "post": {
        "description": "A single-use ticket for ``GET .../events`` (EventSource cannot send Authorization).",
        "operationId": "issue_invocation_stream_ticket_api_v1_agents_invocations__invocation_id__events_ticket_post",
        "parameters": [
          {
            "in": "path",
            "name": "invocation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invocation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamTicketResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Issue Invocation Stream Ticket",
        "tags": [
          "Agent Invocations"
        ]
      }
    },
    "/api/v1/agents/invocations/{invocation_id}/retry": {
      "post": {
        "description": "Retry a failed invocation: a new attempt of the same invocation (E1.2).\n\nThe pipeline retry rules apply to the invocation's run. It is refused with\n409 while the run is in progress, after a clean finish or review rejection,\nor at the attempt ceiling; the last three carry ``links.rerun`` to invoke\nthe agent again. Review rejection is terminal even if configuration changed.\n\nA retry resumes the SAME run, so the frozen plan (this agent and its\ndependencies only) is kept. When the agent configuration changed since the\nrun started, resuming would replay work authorised under the old\nconfiguration, and a rerun needs a new run -- which is a new invocation --\nso that is 409 with ``links.rerun`` too. An invocation whose run never\nstarted is dispatched again.",
        "operationId": "retry_invocation_api_v1_agents_invocations__invocation_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "invocation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invocation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInvocationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Retry Invocation",
        "tags": [
          "Agent Invocations"
        ]
      }
    },
    "/api/v1/agents/pipelines": {
      "get": {
        "description": "List agent pipeline runs, optionally filtered by test run, project, or status.",
        "operationId": "list_pipelines_api_v1_agents_pipelines_get",
        "parameters": [
          {
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run Id"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AgentPipelineResponse"
                  },
                  "title": "Response List Pipelines Api V1 Agents Pipelines Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Pipelines",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/bulk-jobs/{bulk_job_id}": {
      "get": {
        "description": "A bulk job's request facts and its progress, COUNTED from the pipeline\nrows on this read (restricted to the caller's current projects). Without\nthe request record (expired / flushed) only the caller's own rows are\ncounted and ``counters_source`` says ``postgres``. Writes nothing.",
        "operationId": "get_bulk_job_api_v1_agents_pipelines_bulk_jobs__bulk_job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "bulk_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Bulk Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Bulk Job",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/bulk-jobs/{bulk_job_id}/cancel": {
      "post": {
        "description": "Cancel a bulk job: its tasks that have NOT started return at their first\nline without creating a pipeline; running pipelines keep their own Stop.\nIdempotent (an already-cancelled job answers 200 and records nothing new);\na finished job is a 409. One ``analysis.bulk_cancelled`` per project.",
        "operationId": "cancel_bulk_job_api_v1_agents_pipelines_bulk_jobs__bulk_job_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "bulk_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Bulk Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cancel Bulk Job",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/bulk-trigger": {
      "post": {
        "description": "Queue the agent pipeline for many runs in one HTTP call.\n\nBacks the /runs bulk-action UI (\"Trigger all FAILED\", multi-row select).\nReplaces the previous client-side fan-out — for a 500-run trigger this\nis one round-trip instead of 500. Tasks are queued in batches of 25 with\na tiny inter-batch sleep so the Celery broker isn't slammed in a single\nburst.\n\nW14 AGT-12: the runs are ``run_ids`` OR the Runs list's own filter\n(``run_filter``, resolved by the list's predicates, newest 2,000); a run\nwhose pipeline is still in progress is skipped and counted (the worker's\nadmission keys never held a person's trigger); the answer carries a\n``bulk_job_id`` whose progress ``GET /pipelines/bulk-jobs/{id}`` counts\nfrom the pipeline rows. ``client_token`` makes a retry queue nothing twice.",
        "operationId": "bulk_trigger_pipelines_api_v1_agents_pipelines_bulk_trigger_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkTriggerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkTriggerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Bulk Trigger Pipelines",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/compare": {
      "get": {
        "description": "Compare two pipeline runs of one project stage by stage (W14 AGT-05).\n\nDeclared BEFORE ``get_pipeline``: FastAPI matches in registration order,\nand the UUID route would otherwise read ``compare`` as a pipeline id.\nBOTH query ids pass the same 404 / 403 gate as ``/pipelines/{id}``.\nWrites nothing.",
        "operationId": "compare_pipelines_api_v1_agents_pipelines_compare_get",
        "parameters": [
          {
            "in": "query",
            "name": "a",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "A",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "b",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "B",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineCompareResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Compare Pipelines",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/trigger": {
      "post": {
        "description": "Manually trigger the agent pipeline for an existing test run.\nReturns 202 Accepted — pipeline runs asynchronously via Celery.",
        "operationId": "trigger_pipeline_api_v1_agents_pipelines_trigger_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerPipelineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Pipeline",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}": {
      "get": {
        "description": "Get a single pipeline run with all stage results.",
        "operationId": "get_pipeline_api_v1_agents_pipelines__pipeline_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPipelineResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Pipeline",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}/agentic-runtime": {
      "get": {
        "description": "Return the versioned unified-runtime projection for one pipeline.\n\nThis additive adapter keeps the established timeline API stable while\nexposing selected/skipped capabilities, parent-child task identity,\nallocated budgets, actual usage and terminal stop reasons in one model.",
        "operationId": "get_agentic_runtime_api_v1_agents_pipelines__pipeline_id__agentic_runtime_get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgenticRunV1"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Agentic Runtime",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}/cancel": {
      "post": {
        "description": "Cancel a pipeline run (E7.4).\n\nA ``pending`` or ``retry_wait`` run has no live worker and stops here and\nnow. A ``running`` run is *asked* to stop: the flag is set and the worker\nterminalises itself at its next stage boundary, so its in-flight writes\nland coherently instead of being orphaned under a row the API already\ndeclared dead.\n\nCancellation is sticky either way — an automatic retry can never bring a\ncancelled run back. See ``app/services/pipeline_cancellation.py`` for why\nboth orderings of the cancel-vs-retry race end ``failed``.",
        "operationId": "cancel_pipeline_api_v1_agents_pipelines__pipeline_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cancel Pipeline",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}/replay": {
      "get": {
        "description": "Return a deterministic replay document for audit reconstruction.",
        "operationId": "get_pipeline_replay_api_v1_agents_pipelines__pipeline_id__replay_get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineReplayResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Pipeline Replay",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}/retry": {
      "post": {
        "description": "Retry a finished-but-unsuccessful pipeline run (E7.4).\n\nTwo outcomes, decided by configuration rather than by the caller:\n\n* **resume** — the configuration this run froze at start still matches the\n  live one, so the same row is replayed and its completed stages are kept.\n* **rerun** — the configuration changed (a narrowed tool allowlist, a\n  different model, an ``AI_OFFLINE_MODE`` flip), so a NEW run starts with\n  ``rerun_of`` pointing here. Replaying checkpoints authorised under the old\n  configuration could re-enter a tool the new one forbids, and the operator\n  who changed the config is retrying precisely because they want the change\n  to take effect.\n\nRefuses (409) when the run is still in progress, when it finished\nsuccessfully, was rejected in review, or is at its attempt ceiling. A\nreview rejection is terminal, even if configuration changed; start a new\nrun explicitly to produce a fresh proposal. The rejection and ceiling responses\ncarry ``links.rerun`` so the caller can deliberately start a fresh run\nrather than being told only \"no\".",
        "operationId": "retry_pipeline_api_v1_agents_pipelines__pipeline_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Retry Pipeline",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}/stages": {
      "get": {
        "description": "Get detailed stage results for a pipeline run.",
        "operationId": "get_pipeline_stages_api_v1_agents_pipelines__pipeline_id__stages_get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "title": "Response Get Pipeline Stages Api V1 Agents Pipelines  Pipeline Id  Stages Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Pipeline Stages",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/pipelines/{pipeline_id}/timeline": {
      "get": {
        "description": "Get the full agent timeline with per-stage observability data:\ntokens, cost, latency, confidence, evidence count, route rationale,\nerror taxonomy, fallback status, and alerts.",
        "operationId": "get_pipeline_timeline_api_v1_agents_pipelines__pipeline_id__timeline_get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineTimelineResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Pipeline Timeline",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/regression-watch": {
      "post": {
        "description": "Run the Regression Watchman on an existing test run.\nReturns classification of each failure cluster as:\n  - new_regression | known_flaky_recurrence | environmental_anomaly",
        "operationId": "regression_watch_api_v1_agents_regression_watch_post",
        "parameters": [
          {
            "in": "query",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Regression Watch",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/runs/{run_id}/pipeline-status": {
      "get": {
        "description": "WF-1: Return the latest pipeline execution status for a run and workflow type.\n\nEnables the frontend to know when deep/offline analysis ran, whether it\ncompleted fully, partially, or failed, without scanning the full timeline.",
        "operationId": "get_pipeline_status_api_v1_agents_runs__run_id__pipeline_status_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workflow_type",
            "required": false,
            "schema": {
              "default": "deep",
              "pattern": "^(offline|deep|live)$",
              "title": "Workflow Type",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Pipeline Status",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/runs/{run_id}/summary": {
      "get": {
        "description": "Retrieve the AI-generated markdown summary for a test run (all 4 layers if available).\n\nCarries the human-review envelope (E8.3): ``requires_human_review``,\n``review`` and the ``X-TestLookup-AI-Generated`` / ``X-TestLookup-Review-State``\nheaders. A deterministic fallback is ``not_applicable``: no AI wrote it.",
        "operationId": "get_run_summary_api_v1_agents_runs__run_id__summary_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunSummaryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Summary",
        "tags": [
          "Agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/invoke": {
      "post": {
        "description": "Invoke one agent on a stored test run.\n\n``mode=async`` (the default) answers 202 with a poll link. ``mode=sync`` on a\nsync-eligible agent waits up to ``AGENT_INVOKE_SYNC_WAIT_SECONDS`` for the run\nto finish: 200 with the result if it did, 202 if it is still going. A full\npool of sync slots is 503 with ``Retry-After``. ``mode=sync`` on any other\nagent runs async.\n\nThe project is derived from the test run; ``project_id`` in the body is an\nassertion that must match it. An invocation of the same agent on the same\nrun that is still in progress is returned as-is with 200. With an\n``Idempotency-Key``, a repeated request returns the invocation it created\n(E1.3).\n\n``inline_input`` (agents with ``inline_input_supported`` in the catalog):\nthe stored run in ``input.payload`` anchors it and must belong to\n``project_id`` (else one 404 ``anchor_run_not_found``); larger than 262144\nbytes is 413; secrets are redacted before it is stored; the output is a\ndraft kept out of the run's report, gates, notifications and digests.",
        "operationId": "invoke_agent_api_v1_agents__agent_id__invoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "Client-generated key (UUID or ULID). The same key with the same request returns the invocation it created (200); with a different request, 422; while the first request is still being handled, 409. Scoped to your user, project, and agent route.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "minLength": 8,
                  "pattern": "^[A-Za-z0-9._:-]+$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated key (UUID or ULID). The same key with the same request returns the invocation it created (200); with a different request, 422; while the first request is still being handled, 409. Scoped to your user, project, and agent route.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentInvokeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInvocationResponse"
                }
              }
            },
            "description": "Completed sync result or idempotent replay"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInvocationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Unknown agent or test run; for inline_input, anchor_run_not_found for every wrong anchor"
          },
          "409": {
            "description": "Invocation conflict or request still in flight"
          },
          "413": {
            "description": "inline_input is larger than 262144 bytes (inline_input_too_large)"
          },
          "422": {
            "description": "Invalid input or Idempotency-Key reuse"
          },
          "503": {
            "description": "Synchronous invocation capacity is full; Retry-After is returned",
            "headers": {
              "Retry-After": {
                "description": "Seconds before retrying the request",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Invoke Agent",
        "tags": [
          "Agent Invocations"
        ]
      }
    },
    "/api/v1/ai-eval/agent-stack-release-gate": {
      "post": {
        "description": "Run the release gate for prompt/model/routing changes across the agent stack.\n\nThe returned manifest checksum makes the gated change set auditable.",
        "operationId": "run_agent_stack_release_gate_api_v1_ai_eval_agent_stack_release_gate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentStackReleaseGateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Agent Stack Release Gate",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/agent-stack-release-gate/runs": {
      "get": {
        "description": "List historical agent-stack release gate decisions, newest first, with ``total``.\n\nAgent-stack rows only (``gate_type IS NULL``): the project-scoped G2 tier\ncomparisons share the table and are read per project through\n``GET /tier-comparison/runs`` -- listing them here showed every QA lead\nother projects' tier verdicts (W16 contract §0.4).",
        "operationId": "list_agent_stack_gate_runs_api_v1_ai_eval_agent_stack_release_gate_runs_get",
        "parameters": [
          {
            "in": "query",
            "name": "change_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Change Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalGateRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Agent Stack Gate Runs",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/baselines": {
      "get": {
        "description": "List active evaluation baselines.",
        "operationId": "list_baselines_api_v1_ai_eval_baselines_get",
        "parameters": [
          {
            "in": "query",
            "name": "task_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Task Type"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Baselines",
        "tags": [
          "AI Evaluation"
        ]
      },
      "post": {
        "description": "Set a baseline from a dataset evaluation (ADMIN only).\n\nComputes metrics and stores them as the active baseline for the\nspecified agent/task_type. Deactivates any prior baseline.",
        "operationId": "set_baseline_api_v1_ai_eval_baselines_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetBaselineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Set Baseline",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/candidate-options": {
      "get": {
        "description": "The tiers a candidate evaluation may replay, with the reason a tier is unavailable.\n\nADMIN (the Evaluate form is admin-only). Reads the effective AI config on\nthis request's session and the ML model's metadata; writes nothing.",
        "operationId": "get_candidate_options_api_v1_ai_eval_candidate_options_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CandidateOptionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Candidate Options",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/dashboard": {
      "get": {
        "description": "Get the AI quality dashboard: agreement, drift, recent evals, model history.",
        "operationId": "get_quality_dashboard_api_v1_ai_eval_dashboard_get",
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQualityDashboardResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Quality Dashboard",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/datasets": {
      "get": {
        "description": "List evaluation datasets.",
        "operationId": "list_datasets_api_v1_ai_eval_datasets_get",
        "parameters": [
          {
            "in": "query",
            "name": "task_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Task Type"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AIEvalDatasetResponse"
                  },
                  "title": "Response List Datasets Api V1 Ai Eval Datasets Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Datasets",
        "tags": [
          "AI Evaluation"
        ]
      },
      "post": {
        "description": "Create a new evaluation dataset (ADMIN only).",
        "operationId": "create_dataset_api_v1_ai_eval_datasets_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIEvalDatasetCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalDatasetResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Dataset",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/datasets/from-feedback": {
      "post": {
        "description": "Auto-generate a labeled dataset from existing human feedback (ADMIN only).",
        "operationId": "create_dataset_from_feedback_api_v1_ai_eval_datasets_from_feedback_post",
        "parameters": [
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "default": "Auto-generated from feedback",
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "task_type",
            "required": false,
            "schema": {
              "default": "classification",
              "title": "Task Type",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalDatasetResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Dataset From Feedback",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/datasets/{dataset_id}": {
      "delete": {
        "description": "Delete an evaluation dataset (ADMIN only).",
        "operationId": "delete_dataset_api_v1_ai_eval_datasets__dataset_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Dataset",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/drift": {
      "get": {
        "description": "Detect AI quality drift by comparing current vs previous eval windows.",
        "operationId": "get_drift_api_v1_ai_eval_drift_get",
        "parameters": [
          {
            "in": "query",
            "name": "task_type",
            "required": false,
            "schema": {
              "default": "classification",
              "title": "Task Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "window_days",
            "required": false,
            "schema": {
              "default": 7,
              "maximum": 30,
              "minimum": 1,
              "title": "Window Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Drift",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/gates/{checksum}": {
      "get": {
        "description": "Resolve the immutable eval manifest stamped on an agent pipeline run.",
        "operationId": "get_eval_manifest_api_v1_ai_eval_gates__checksum__get",
        "parameters": [
          {
            "in": "path",
            "name": "checksum",
            "required": true,
            "schema": {
              "title": "Checksum",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalManifestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Eval Manifest",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/golden-datasets/seed": {
      "post": {
        "description": "Seed the golden reference datasets for all evaluation categories (ADMIN only).\n\nCreates 4 golden datasets (classification, root_cause, duplicate_detection,\nrelease_decision) if they don't already exist.",
        "operationId": "seed_golden_datasets_api_v1_ai_eval_golden_datasets_seed_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Seed Golden Datasets",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/label-health": {
      "get": {
        "description": "Human-label coverage of the ML training pool (AI-F1).\n\nReports live counts per label-provenance bucket (human_direct /\nhuman_indirect / llm_pseudo), the human-label floor, and the provenance\ncomposition the deployed model was actually trained on — so the \"learning\nloop\" claim is verifiable instead of implied.",
        "operationId": "get_training_label_health_api_v1_ai_eval_label_health_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Training Label Health",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/pre-release-gate": {
      "post": {
        "description": "Run the pre-release evaluation gate for an agent.\n\nCompares current metrics against baseline thresholds. Returns pass, fail,\nor insufficient_samples\nwith per-rule results. Prompt, model, or routing changes should not ship\nif the gate returns FAIL.",
        "operationId": "run_pre_release_gate_api_v1_ai_eval_pre_release_gate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreReleaseGateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Pre Release Gate",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/report-cycles": {
      "get": {
        "description": "List durable report-level evaluation evidence.",
        "operationId": "list_report_eval_cycles_api_v1_ai_eval_report_cycles_get",
        "parameters": [
          {
            "in": "query",
            "name": "corpus_version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 120,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Corpus Version"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Report Eval Cycles",
        "tags": [
          "AI Evaluation"
        ]
      },
      "post": {
        "description": "Evaluate and persist one bounded report corpus cycle (ADMIN only).",
        "operationId": "create_report_eval_cycle_api_v1_ai_eval_report_cycles_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportEvalCycleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Report Eval Cycle",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/report-cycles/readiness": {
      "get": {
        "description": "Return the fail-closed representative-corpus pilot readiness gate.",
        "operationId": "get_report_eval_readiness_api_v1_ai_eval_report_cycles_readiness_get",
        "parameters": [
          {
            "in": "query",
            "name": "corpus_version",
            "required": true,
            "schema": {
              "maxLength": 120,
              "minLength": 1,
              "title": "Corpus Version",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Report Eval Readiness",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/reviewer-quality": {
      "post": {
        "description": "Run G3 and apply its guarded second-model retirement decision.",
        "operationId": "run_reviewer_quality_api_v1_ai_eval_reviewer_quality_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewerQualityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Reviewer Quality",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/reviewer-quality/runs": {
      "get": {
        "description": "The project's G3 reviewer-quality history, newest first, with ``total`` (W16).\n\nREAD-ONLY (the page never posts ``/reviewer-quality``, whose default\n``auto_disable`` can retire the second model). The observation arrays are\nnever selected. Writes nothing.",
        "operationId": "list_reviewer_quality_runs_api_v1_ai_eval_reviewer_quality_runs_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewerQualityRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Reviewer Quality Runs",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/runs": {
      "get": {
        "description": "List evaluation runs, newest first, with the ``total`` of the filtered set.\n\nW16: ``{items, total}`` (was a bare list no client read); ``metric_kind``\n(legacy label agreement / replay) and ``status`` filter. Writes nothing.",
        "operationId": "list_eval_runs_api_v1_ai_eval_runs_get",
        "parameters": [
          {
            "in": "query",
            "name": "dataset_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Dataset Id"
            }
          },
          {
            "in": "query",
            "name": "task_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Task Type"
            }
          },
          {
            "in": "query",
            "name": "metric_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metric Kind"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Eval Runs",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/runs/evaluate/{dataset_id}": {
      "post": {
        "description": "Run evaluation against a dataset (ADMIN only).\n\nNo body: the LEGACY label-agreement evaluation, synchronous, 201 with the\nrun (unchanged). A ``candidate`` body (W16 AGT-09): a queued REPLAY of the\ncandidate through the real engine, 202 ``{run_id, status: \"queued\"}``.",
        "operationId": "run_evaluation_api_v1_ai_eval_runs_evaluate__dataset_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Dataset Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CandidateEvaluationRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CandidateEvaluationAccepted"
                }
              }
            },
            "description": "Accepted"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Evaluation",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/runs/{eval_run_id}": {
      "get": {
        "description": "One evaluation run (legacy or replay) with its aggregate scores. Writes nothing.",
        "operationId": "get_eval_run_api_v1_ai_eval_runs__eval_run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "eval_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Eval Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Eval Run",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/runs/{eval_run_id}/items": {
      "get": {
        "description": "A replay run's per-item outputs in stored order (ADMIN only, contract D-4).\n\nItems carry dataset text that a feedback-built dataset draws from every\nproject, so QA leads see aggregates only. Inputs, expected values and\noutputs are re-sanitized here. A legacy run stored no items. Writes nothing.",
        "operationId": "list_eval_run_items_api_v1_ai_eval_runs__eval_run_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "eval_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Eval Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalItemListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Eval Run Items",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/shadow-pairs": {
      "get": {
        "description": "The project's live shadow pairs, newest first (QA lead+, interactive login only).\n\nThe QUERY project is checked before anything is read; ``agent_id`` and\n``label_status`` (``all`` = every status) filter INSIDE it. Outputs are\nre-sanitized; each pair's source is resolved inside its project. Writes nothing.",
        "operationId": "list_shadow_pairs_api_v1_ai_eval_shadow_pairs_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 80,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "label_status",
            "required": false,
            "schema": {
              "default": "pending",
              "maxLength": 20,
              "title": "Label Status",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShadowPairListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Shadow Pairs",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/shadow-pairs/{shadow_pair_id}/label": {
      "post": {
        "description": "Label one live shadow pair with a person's verdict (QA lead+, interactive login only).\n\nEvery check runs before anything is written; the label, ``labelled_by``\nand the activity row share ONE commit. A label is final (no relabel).",
        "operationId": "label_shadow_pair_api_v1_ai_eval_shadow_pairs__shadow_pair_id__label_post",
        "parameters": [
          {
            "in": "path",
            "name": "shadow_pair_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shadow Pair Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShadowPairLabelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShadowPairRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Label Shadow Pair",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/tier-comparison": {
      "post": {
        "description": "Run G2 against paired golden outputs and optionally retain the decision.",
        "operationId": "run_tier_comparison_api_v1_ai_eval_tier_comparison_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TierComparisonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Tier Comparison",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/ai-eval/tier-comparison/runs": {
      "get": {
        "description": "The project's recorded G2 tier comparisons, newest first, with ``total`` (W16).\n\nThe QUERY project is checked like a body project before anything is read;\n``agent_id`` filters INSIDE that project. Writes nothing.",
        "operationId": "list_tier_comparison_runs_api_v1_ai_eval_tier_comparison_runs_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 80,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIEvalGateRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Tier Comparison Runs",
        "tags": [
          "AI Evaluation"
        ]
      }
    },
    "/api/v1/analytics/ai-summary": {
      "get": {
        "description": "Return summary of AI analysis results for the project.\n\nVIZ-202: ``release_id`` / ``suite_name`` (repeatable) count the analyses\nof executions in those releases (run's primary release) and suites\n(effective suite).",
        "operationId": "ai_analysis_summary_api_v1_analytics_ai_summary_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Analysis Summary",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/chart-data": {
      "get": {
        "description": "A metric over up to two dimensions, as contract C3 ``chart_series``.\n\nSeries are keyed by the second ``group_by`` and zero-filled over the first,\nso the table view and CSV export need no transformation. Each point carries\n``y`` and ``n`` (the sample behind it); a rate with nothing evaluated is\n``y: null`` with ``measured: false`` and a reason, never 0.\n\n``facet_dimension`` + ``facet_value`` (W08 TRND-13) make the chart one\npanel of the Explorer's small multiples; ``meta.definitions.facet`` states\nit.",
        "operationId": "chart_data_api_v1_analytics_chart_data_get",
        "parameters": [
          {
            "description": "What to measure. One of: broken, duration_p50, duration_p95, duration_total, executions, failed, failure_rate, failures, flaky_tests, pass_rate, passed, retried_tests, run_count, skipped, unique_tests, unknown, wall_clock_p50, wall_clock_p95, wall_clock_total",
            "in": "query",
            "name": "metric",
            "required": false,
            "schema": {
              "default": "executions",
              "description": "What to measure. One of: broken, duration_p50, duration_p95, duration_total, executions, failed, failure_rate, failures, flaky_tests, pass_rate, passed, retried_tests, run_count, skipped, unique_tests, unknown, wall_clock_p50, wall_clock_p95, wall_clock_total",
              "title": "Metric",
              "type": "string"
            }
          },
          {
            "description": "The axis, and optionally a second dimension to key the series by (at most two, the time dimension first). One of: branch, day, environment, failure_category, ingestion_source, project, release, status, suite, test, week",
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The axis, and optionally a second dimension to key the series by (at most two, the time dimension first). One of: branch, day, environment, failure_category, ingestion_source, project, release, status, suite, test, week",
              "title": "Group By"
            }
          },
          {
            "description": "Keep the largest N keys and merge the rest into an 'other' bucket. Required for group_by=test outside a single suite.",
            "in": "query",
            "name": "top_n",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Keep the largest N keys and merge the rest into an 'other' bucket. Required for group_by=test outside a single suite.",
              "title": "Top N"
            }
          },
          {
            "description": "With facet_value: draw one panel of a small multiple, counting only the executions whose value of this dimension is facet_value. One of: branch, environment, status, failure_category, ingestion_source. run_count with status or failure_category is refused (facet_metric_grain).",
            "in": "query",
            "name": "facet_dimension",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "With facet_value: draw one panel of a small multiple, counting only the executions whose value of this dimension is facet_value. One of: branch, environment, status, failure_category, ingestion_source. run_count with status or failure_category is refused (facet_metric_grain).",
              "title": "Facet Dimension"
            }
          },
          {
            "description": "The panel's KEY as the chart buckets it (a branch, an environment lower-cased, a status of passed/failed/broken/skipped/unknown, a failure category lower-cased, an ingestion source). Sent with facet_dimension.",
            "in": "query",
            "name": "facet_value",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The panel's KEY as the chart buckets it (a branch, an environment lower-cased, a status of passed/failed/broken/skipped/unknown, a failure category lower-cased, an ingestion source). Sent with facet_dimension.",
              "title": "Facet Value"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Chart Data",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/chart-data/rows": {
      "get": {
        "description": "One page of the test executions behind a chart mark, newest first.\n\n``reconciliation`` names the mark field these rows add up to (``y`` for a\ncount, ``n`` for a rate or a duration) and the number to compare with it;\n``meta.definitions.chart_grain`` says when the chart counted run\naggregates, which can hold runs with no per-test rows.",
        "operationId": "chart_data_rows_api_v1_analytics_chart_data_rows_get",
        "parameters": [
          {
            "description": "The chart's metric; it decides which executions count. One of: broken, duration_p50, duration_p95, duration_total, executions, failed, failure_rate, failures, flaky_tests, pass_rate, passed, retried_tests, run_count, skipped, unique_tests, unknown, wall_clock_p50, wall_clock_p95, wall_clock_total",
            "in": "query",
            "name": "metric",
            "required": false,
            "schema": {
              "default": "executions",
              "description": "The chart's metric; it decides which executions count. One of: broken, duration_p50, duration_p95, duration_total, executions, failed, failure_rate, failures, flaky_tests, pass_rate, passed, retried_tests, run_count, skipped, unique_tests, unknown, wall_clock_p50, wall_clock_p95, wall_clock_total",
              "title": "Metric",
              "type": "string"
            }
          },
          {
            "description": "The chart's dimensions (at most two). One of: day, week, project, release, suite, status, failure_category, branch, environment, ingestion_source, test, error_signature",
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's dimensions (at most two). One of: day, week, project, release, suite, status, failure_category, branch, environment, ingestion_source, test, error_signature",
              "title": "Group By"
            }
          },
          {
            "description": "The chart's top_n, when it had one.",
            "in": "query",
            "name": "top_n",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's top_n, when it had one.",
              "title": "Top N"
            }
          },
          {
            "description": "The chart's key for the selected day bucket. Allowed only when day is in group_by.",
            "in": "query",
            "name": "bucket_day",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected day bucket. Allowed only when day is in group_by.",
              "title": "Bucket Day"
            }
          },
          {
            "description": "The chart's key for the selected week bucket. Allowed only when week is in group_by.",
            "in": "query",
            "name": "bucket_week",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected week bucket. Allowed only when week is in group_by.",
              "title": "Bucket Week"
            }
          },
          {
            "description": "The chart's key for the selected project bucket. Allowed only when project is in group_by.",
            "in": "query",
            "name": "bucket_project",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected project bucket. Allowed only when project is in group_by.",
              "title": "Bucket Project"
            }
          },
          {
            "description": "The chart's key for the selected release bucket. Allowed only when release is in group_by.",
            "in": "query",
            "name": "bucket_release",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected release bucket. Allowed only when release is in group_by.",
              "title": "Bucket Release"
            }
          },
          {
            "description": "The chart's key for the selected suite bucket. Allowed only when suite is in group_by.",
            "in": "query",
            "name": "bucket_suite",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected suite bucket. Allowed only when suite is in group_by.",
              "title": "Bucket Suite"
            }
          },
          {
            "description": "The chart's key for the selected status bucket. Allowed only when status is in group_by.",
            "in": "query",
            "name": "bucket_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected status bucket. Allowed only when status is in group_by.",
              "title": "Bucket Status"
            }
          },
          {
            "description": "The chart's key for the selected failure_category bucket. Allowed only when failure_category is in group_by.",
            "in": "query",
            "name": "bucket_failure_category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected failure_category bucket. Allowed only when failure_category is in group_by.",
              "title": "Bucket Failure Category"
            }
          },
          {
            "description": "The chart's key for the selected branch bucket. Allowed only when branch is in group_by.",
            "in": "query",
            "name": "bucket_branch",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected branch bucket. Allowed only when branch is in group_by.",
              "title": "Bucket Branch"
            }
          },
          {
            "description": "The chart's key for the selected environment bucket. Allowed only when environment is in group_by.",
            "in": "query",
            "name": "bucket_environment",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected environment bucket. Allowed only when environment is in group_by.",
              "title": "Bucket Environment"
            }
          },
          {
            "description": "The chart's key for the selected ingestion_source bucket. Allowed only when ingestion_source is in group_by.",
            "in": "query",
            "name": "bucket_ingestion_source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected ingestion_source bucket. Allowed only when ingestion_source is in group_by.",
              "title": "Bucket Ingestion Source"
            }
          },
          {
            "description": "The chart's key for the selected test bucket. Allowed only when test is in group_by.",
            "in": "query",
            "name": "bucket_test",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected test bucket. Allowed only when test is in group_by.",
              "title": "Bucket Test"
            }
          },
          {
            "description": "The chart's key for the selected error_signature bucket. Allowed only when error_signature is in group_by.",
            "in": "query",
            "name": "bucket_error_signature",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The chart's key for the selected error_signature bucket. Allowed only when error_signature is in group_by.",
              "title": "Bucket Error Signature"
            }
          },
          {
            "description": "From 1.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "From 1.",
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "1-200; (page - 1) x size <= 10000.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "1-200; (page - 1) x size <= 10000.",
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Chart Data Rows",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/classify-uncategorized": {
      "post": {
        "description": "Assign ``payload.category`` to every failing test case in the project's\nwindow that's currently unlabelled (``failure_category IS NULL`` or\n``UNKNOWN``). Mirrors ``AIAnalysis.failure_category`` for any AI rows\nbacking those test cases.\n\nUsed by the Failures page \"Classify\" CTA when the AI classifier left a\nlarge chunk of failures uncategorized — lets the user tag them all in\none shot rather than per-test.",
        "operationId": "classify_uncategorized_failures_api_v1_analytics_classify_uncategorized_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyUncategorizedRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassifyUncategorizedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Classify Uncategorized Failures",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/coverage": {
      "get": {
        "description": "Return test suite coverage stats aggregated over the period.",
        "operationId": "coverage_stats_api_v1_analytics_coverage_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Coverage Stats",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/coverage-map": {
      "get": {
        "description": "One level of the coverage map as contract C3 ``tree``: the parent as the\nsingle root, its children (at most 499, the rest in one \"Other (n)\" node,\nwhich ``other_page`` opens), each with the ``stats`` block (W08:\n``needs_review_count`` in one project). Test-execution coverage, not code\ncoverage.",
        "operationId": "coverage_map_api_v1_analytics_coverage_map_get",
        "parameters": [
          {
            "description": "1: the suites. 2: the classes (or files) of one suite. 3: the tests of one class.",
            "in": "query",
            "name": "depth",
            "required": false,
            "schema": {
              "default": 1,
              "description": "1: the suites. 2: the classes (or files) of one suite. 3: the tests of one class.",
              "title": "Depth",
              "type": "integer"
            }
          },
          {
            "description": "depth 2 and 3: the suite KEY, as the level-1 node id carries it after its 's:' prefix. Echoed, never parsed.",
            "in": "query",
            "name": "suite",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "depth 2 and 3: the suite KEY, as the level-1 node id carries it after its 's:' prefix. Echoed, never parsed.",
              "title": "Suite"
            }
          },
          {
            "description": "depth 3: the class KEY, as the level-2 node id carries it after 'c:<suite key>␟' ('__none__' for tests with no class).",
            "in": "query",
            "name": "class_key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "depth 3: the class KEY, as the level-2 node id carries it after 'c:<suite key>␟' ('__none__' for tests with no class).",
              "title": "Class Key"
            }
          },
          {
            "description": "Open the level's 'Other (n)' node: page 2 is the next 498 children of the same parent, page 3 the ones after, ... Absent is the first page.",
            "in": "query",
            "name": "other_page",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 50,
                  "minimum": 2,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Open the level's 'Other (n)' node: page 2 is the next 498 children of the same parent, page 3 the ones after, ... Absent is the first page.",
              "title": "Other Page"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Coverage Map",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/coverage/history": {
      "get": {
        "description": "W08 TRND-07 -- the project's daily coverage snapshots over the window:\ntests in the catalogue, tests exercised in the 30 days ending each day\n(and their share), suites exercised. One point per stored day, ascending;\na day with no snapshot is absent (a gap). ``measured: false`` before the\nproject's first snapshot. Release and suite are declared ignored: a\nsnapshot is project-wide.",
        "operationId": "coverage_history_api_v1_analytics_coverage_history_get",
        "parameters": [
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 90,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Coverage History",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/coverage/untagged-tests": {
      "get": {
        "description": "W08 TRND-07 -- the tests behind the Coverage page's Untagged executions\ncallout: the distinct tests whose executions in the window carry no suite\nlabel, busiest first, each with its current catalogue suite (the Fix\ntagging panel). ``total`` is the count beyond this page.",
        "operationId": "coverage_untagged_tests_api_v1_analytics_coverage_untagged_tests_get",
        "parameters": [
          {
            "description": "The page, from 1.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "The page, from 1.",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Tests per page (1-200).",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Tests per page (1-200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-90.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-90.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Coverage Untagged Tests",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/defects": {
      "get": {
        "description": "Return defects for a project with optional resolution status filter.\n\nVIZ-202: ``release_id`` / ``suite_name`` (repeatable) keep the defects\nwhose originating execution ran in one of the releases (the run's primary\nrelease) and suites (effective suite). A defect with no linked execution\ncannot be placed and is left out while either filter is set. The list has\nno time window (``meta.ignored_filters``): open defects of any age.\n\nW06: ``resolution_status=ACTIVE`` lists every live defect (OPEN and\nIN_PROGRESS). ``release_match=affects`` places a defect in a release by\nthe release gate's own rule instead (asserted impact, else where it was\nfound), so the page and the gate count the same set; the suite filter\nstill places it through its execution.",
        "operationId": "list_defects_api_v1_analytics_defects_get",
        "parameters": [
          {
            "in": "query",
            "name": "resolution_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Resolution Status"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "release_match",
            "required": false,
            "schema": {
              "default": "found_in",
              "pattern": "^(found_in|affects)$",
              "title": "Release Match",
              "type": "string"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Defects",
        "tags": [
          "Analytics"
        ]
      },
      "post": {
        "description": "Manual Defect Intake. Creates an OPEN defect for the project,\nbest-effort attaching to the most-recent matching TestCase when\n``test_name`` (and optionally ``suite_name``) are supplied.",
        "operationId": "create_defect_api_v1_analytics_defects_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefectIntakeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefectIntakeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Defect",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/defects/escape-rate": {
      "get": {
        "description": "The share of the window's defects that were filed after a release they\naffect had shipped, among those that affect a shipped release.\n\n``measured`` is false (and ``rate`` null, never 0) below\n``ESCAPE_RATE_MIN_SAMPLE`` attributed defects, with the reason. Not cached\non purpose: marking a release shipped bumps no analytics epoch. The suite\nfilter does not apply (declared in ``meta.ignored_filters``).",
        "operationId": "defect_escape_rate_api_v1_analytics_defects_escape_rate_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Defect Escape Rate",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/defects/trend": {
      "get": {
        "description": "One point per UTC day of the window: defects opened, closed, the open\nbacklog at the end of the day, the P0/P1 part of it, and a 7-day rolling\nmean time to resolve; plus totals over EVERY defect in scope (no row cap).\n\n``points[-1].open_backlog == totals.open``. Closed rows without a\n``resolved_at`` (legacy INVALID closes) cannot be placed on a day: they are\nin no point and counted in ``totals.closed_without_time``. Release, suite\nand ``release_match`` scope it exactly as the defect list.",
        "operationId": "defect_trend_api_v1_analytics_defects_trend_get",
        "parameters": [
          {
            "in": "query",
            "name": "release_match",
            "required": false,
            "schema": {
              "default": "found_in",
              "pattern": "^(found_in|affects)$",
              "title": "Release Match",
              "type": "string"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Defect Trend",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/execution-metrics": {
      "get": {
        "description": "EXEC-03: the project's execution time per UTC day (wall clock and summed), p50/p95 per suite against the\nprevious window, the biggest suite regressions (median of the last 5 runs >= 1.5x the 20 before, same branch)\nand test regressions (window p50 vs the duration baseline, >= 10 samples), the slowest tests (by p95) and the\nduration histogram. ``suite_name`` (repeatable) narrows every block and switches ``per_day`` to the suite\ngrain.",
        "operationId": "get_execution_metrics_api_v1_analytics_execution_metrics_get",
        "parameters": [
          {
            "description": "Only runs of this branch (exact, case-sensitive, 1-255 characters). Absent or empty: every branch.",
            "in": "query",
            "name": "branch",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only runs of this branch (exact, case-sensitive, 1-255 characters). Absent or empty: every branch.",
              "title": "Branch"
            }
          },
          {
            "description": "Size of slowest_tests and of each regressions list, 1-100.",
            "in": "query",
            "name": "top",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Size of slowest_tests and of each regressions list, 1-100.",
              "title": "Top",
              "type": "integer"
            }
          },
          {
            "description": "Size of the per-suite table, 1-200.",
            "in": "query",
            "name": "suite_limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Size of the per-suite table, 1-200.",
              "title": "Suite Limit",
              "type": "integer"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionMetricsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Execution Metrics",
        "tags": [
          "Execution Metrics",
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/execution-metrics.csv": {
      "get": {
        "description": "EXEC-06: the per-suite table of ``GET /analytics/execution-metrics`` as\nCSV -- wall clock and summed test time p50/p95 (ms) for the window and the\nprevious window of the same length, and their change in percent. Same\n``project_id`` / ``release_id`` / ``suite_name`` / ``days`` / ``branch``\nas that route. A project the caller cannot read gets the header and no\nrows. A suite whose runs carried no wall clock has empty wall cells, never\n0. ``X-Truncated`` says whether ``suite_limit`` cut the table.",
        "operationId": "export_execution_metrics_csv_api_v1_analytics_execution_metrics_csv_get",
        "parameters": [
          {
            "description": "Only runs of this branch (exact, case-sensitive, 1-255 characters). Absent or empty: every branch.",
            "in": "query",
            "name": "branch",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only runs of this branch (exact, case-sensitive, 1-255 characters). Absent or empty: every branch.",
              "title": "Branch"
            }
          },
          {
            "description": "Suites in the file, 1-200 (default: all of them, up to 200).",
            "in": "query",
            "name": "suite_limit",
            "required": false,
            "schema": {
              "default": 200,
              "description": "Suites in the file, 1-200 (default: all of them, up to 200).",
              "title": "Suite Limit",
              "type": "integer"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {}
            },
            "description": "One row per suite."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Execution Metrics Csv",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/execution/suite-history": {
      "get": {
        "description": "EXEC-03: one suite's wall clock and summed test time per run over the window (oldest first), with window\np50/p95 over every execution in it. ``suite_name`` is required and single-valued here (matched trimmed and\ncase-insensitively); ``release_id`` filters the runs.",
        "operationId": "get_suite_execution_history_api_v1_analytics_execution_suite_history_get",
        "parameters": [
          {
            "description": "Only runs of this branch (exact, case-sensitive, 1-255 characters). Absent or empty: every branch.",
            "in": "query",
            "name": "branch",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only runs of this branch (exact, case-sensitive, 1-255 characters). Absent or empty: every branch.",
              "title": "Branch"
            }
          },
          {
            "description": "Max points, 1-500 (the newest are kept).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max points, 1-500 (the newest are kept).",
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 90,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuiteExecutionHistoryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite Execution History",
        "tags": [
          "Execution Metrics",
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/failure-categories": {
      "get": {
        "description": "Return distribution of failure categories for AI-analysed test cases.",
        "operationId": "failure_categories_api_v1_analytics_failure_categories_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Failure Categories",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/failure-groups": {
      "get": {
        "description": "Failing executions grouped by error signature, as contract C3 ``graph``.\n\n``nodes`` are the largest groups (size = failures, ``group`` = dominant\nfailure category); ``groups`` carries their counts, share, categories,\ntrend and top tests in rank order; ``no_message`` and ``singletons`` are\nroll-ups, not nodes. ``edges`` is empty unless ``include=edges``. Labels\nare raw error text: untrusted, render as text.",
        "operationId": "failure_groups_api_v1_analytics_failure_groups_get",
        "parameters": [
          {
            "description": "Optional parts of the answer (repeatable). One of: edges. 'edges' links groups that fail in the same tests.",
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional parts of the answer (repeatable). One of: edges. 'edges' links groups that fail in the same tests.",
              "title": "Include"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Failure Groups",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/flake-load": {
      "get": {
        "description": "What share of recent runs carried at least one retried test?\n\nThis is deliberately a **load**, not a debt burndown. Flaky-test insertion\nrate tracks the fix rate even under sustained investment, so a \"remaining\"\ncount trending to zero is a promise that will never be kept — it will sit\nnear a floor forever and teach users the tool is broken rather than that\nthe target was wrong. A load has no implied zero: it is read against a\nbudget the team chooses, like an error budget.\n\nReturns ``flake_load: null`` with a reason below the minimum run count,\nsince a share computed from three runs is noise wearing a percentage sign.",
        "operationId": "flake_load_api_v1_analytics_flake_load_get",
        "parameters": [
          {
            "description": "Project to measure — load is never a fleet average",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to measure — load is never a fleet average",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 7,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Flake Load",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/flaky-scores": {
      "get": {
        "description": "Continuous 0–1 flakiness scores for this project, most flaky first.\n\nEach row carries its **component breakdown and the weights used**, so the\nnumber can be decomposed and recomputed — a score nobody can audit is one\nusers are asked to trust on faith.\n\n``confidence`` is separate from ``score`` on purpose. A test seen 5 times\nand one seen 500 can both produce 0.5; collapsing that distinction is how a\nthin-history guess starts looking like a measurement. Fingerprints below the\nevidence floor are not scored at all and simply do not appear here.\n\nThe response also carries this project's **suppression decision**: measured\nclassifier specificity swings from 100% to no-better-than-random across\nprojects, so how much authority a flaky verdict carries is a per-project\nquestion. It is never \"may act\" — see the ``policy`` field.",
        "operationId": "flaky_scores_api_v1_analytics_flaky_scores_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Flaky Scores",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/flaky-tests": {
      "get": {
        "description": "Return tests with highest flakiness rate (intermittent pass/fail pattern).",
        "operationId": "flaky_tests_api_v1_analytics_flaky_tests_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Flaky Tests",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/heatmap": {
      "get": {
        "description": "A two-dimensional read as contract C3 ``matrix``.\n\nRate kinds carry the pass rate in percentage points (``unit: \"percent\"``),\nwith the five status counts behind each cell; a cell with nothing\nevaluated is ``null``, never 0. ``test_run`` carries each execution's\nstatus. Rows and columns beyond the caps are dropped and counted in\n``meta.truncated_axes``.",
        "operationId": "heatmap_api_v1_analytics_heatmap_get",
        "parameters": [
          {
            "description": "Which matrix. One of: suite_day, test_run, suite_environment, suite_release. kind=suite_release and kind=test_run answer for one project: without project_id they are refused with 422 'project_required'. The other kinds take All Projects.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Which matrix. One of: suite_day, test_run, suite_environment, suite_release. kind=suite_release and kind=test_run answer for one project: without project_id they are refused with 422 'project_required'. The other kinds take All Projects.",
              "title": "Kind"
            }
          },
          {
            "description": "Rows to keep, worst first (default 40, 1-60).",
            "in": "query",
            "name": "rows",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Rows to keep, worst first (default 40, 1-60).",
              "title": "Rows"
            }
          },
          {
            "description": "kind=test_run only: the last N runs as columns (default 30, 1-90).",
            "in": "query",
            "name": "runs",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "kind=test_run only: the last N runs as columns (default 30, 1-90).",
              "title": "Runs"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Heatmap",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/kind-evidence": {
      "get": {
        "description": "Evidence-checklist record backing the AI-classified failure kind\n(AI-4) — for the kind-badge popovers. Two lookup modes:\n\n* ``project_id`` + ``test_fingerprint`` (the /failures aggregates carry\n  fingerprints): resolves the fingerprint's most recent analyzed failure\n  in the project.\n* ``test_case_id`` (run-detail rows carry the id directly).\n\nUses the stored ``routing_metadata.kind_evidence`` blob when the\npipeline persisted one, computing on demand otherwise (no backfill).\nReturns ``{found: false}`` when no analyzed failure matches — the UI\nrenders the plain badge then.",
        "operationId": "kind_evidence_api_v1_analytics_kind_evidence_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "test_fingerprint",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Test Fingerprint"
            }
          },
          {
            "in": "query",
            "name": "test_case_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Test Case Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Kind Evidence",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/notify-owner": {
      "post": {
        "description": "Fire an email at the suite owner of ``payload.test_name`` so they can\ntriage the recurring failure. Resolution chain mirrors the suite-owner\nreview feature: explicit ``test_suite_owners`` row → ``Project.manager_user_id``.\nReturns ``{queued: false, reason}`` when no owner can be resolved instead\nof erroring, so the UI can show a clear actionable message.",
        "operationId": "notify_suite_owner_api_v1_analytics_notify_owner_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotifyTestOwnerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotifyTestOwnerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Notify Suite Owner",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/suite-detail": {
      "get": {
        "description": "Return detailed breakdown for a test suite (several ``suite_name`` values\nreturn their union, and ``suite_name`` in the response is then the list):\n  - Summary KPIs (unique tests, executions, pass rate, avg duration)\n  - Per-test-case aggregates with flakiness flag\n  - Last 10 test runs that included this suite\nNo ``suite_name`` matches nothing (``suite_name: \"\"``), as before.",
        "operationId": "suite_detail_api_v1_analytics_suite_detail_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Suite Detail",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/systemic-clusters": {
      "get": {
        "description": "Tests that fail TOGETHER across runs, with the shared cause named.\n\nMost flaky failures are systemic rather than independent, so the useful\ntriage unit is the cluster: \"these 14 tests flip together and it smells\nlike an external dependency\" is one investigation where 14 individual\nflags are 14.\n\n**An empty list is a normal, frequent answer.** In the source study only 10\nof 22 projects containing flaky tests contained any cluster at all. Callers\nmust render \"no clusters\" as a real result — never lower the bar until\nsomething appears, and never present a weak grouping as a cluster, which\nwould send someone hunting a pattern that is not there.\n\n``cause_family`` may be ``unknown``: a cluster is still actionable without\na named cause, and inventing one would be worse than admitting we cannot\ntell from the failure text.\n\nVIZ-202: ``release_id`` / ``suite_name`` (repeatable) select the MEMBERS\nthat ran in scope -- a member is kept when it has an execution in one of\nthe releases and suites -- and a cluster with no member left is dropped.\nThe cluster's own statistics (size, cohesion, co-failure runs) are\nproject-level and are not recomputed; ``scope`` in the response says so.\nClusters have no time window (``meta.ignored_filters``).",
        "operationId": "systemic_clusters_api_v1_analytics_systemic_clusters_get",
        "parameters": [
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Systemic Clusters",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/test-scatter": {
      "get": {
        "description": "p95 duration (ms, log x) x failure rate (%, y) x executions (size), one\npoint per test; tests that cannot be placed are counted in ``excluded``.",
        "operationId": "get_test_scatter_api_v1_analytics_test_scatter_get",
        "parameters": [
          {
            "description": "Tests with fewer executions in scope are left out and counted (1-1000).",
            "in": "query",
            "name": "min_executions",
            "required": false,
            "schema": {
              "default": 5,
              "description": "Tests with fewer executions in scope are left out and counted (1-1000).",
              "title": "Min Executions",
              "type": "integer"
            }
          },
          {
            "description": "At most this many points (1-5000).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 2000,
              "description": "At most this many points (1-5000).",
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Which tests are kept when more qualify: failures, volume",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "default": "failures",
              "description": "Which tests are kept when more qualify: failures, volume",
              "title": "Order",
              "type": "string"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Scatter",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/time-to-fix": {
      "get": {
        "description": "The median time from a test's first failure to its next pass, over the\nwindow; tests flagged flaky (a live quarantine request or a human\n``FLAKY_TEST`` triage) and tests that recovered 3+ times are left out and\ncounted. Below 5 fixes ``measured`` is false and ``median_hours`` null,\nwith the reason (never 0).",
        "operationId": "time_to_fix_api_v1_analytics_time_to_fix_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-90.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-90.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Time To Fix",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/top-failing": {
      "get": {
        "description": "Return tests with the highest total failure count in the period.",
        "operationId": "top_failing_tests_api_v1_analytics_top_failing_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 15,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Top Failing Tests",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analytics/trend-summary": {
      "get": {
        "description": "The trend verdict (``HEALTHY`` / ``MIXED`` / ``INSUFFICIENT`` /\n``DECLINING`` / ``PENDING``), the 0-100 confidence score and its four\nweighted dimensions, the variance of the daily pass rate, and the longest\nrun of days without executions in the window. ``null`` = not measured.",
        "operationId": "get_trend_summary_api_v1_analytics_trend_summary_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-90.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 14,
              "description": "Window in days, 1-90.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Trend Summary",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/api/v1/analyze": {
      "post": {
        "description": "Trigger the LangChain ReAct agent to investigate a failed test case.\nReturns a structured root-cause analysis with confidence scoring, role-aware\nrecommended actions, and a 'confidence_why' breakdown showing the evidence basis.",
        "operationId": "analyze_test_case_api_v1_analyze_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Analyze Test Case",
        "tags": [
          "AI Analysis"
        ]
      }
    },
    "/api/v1/analyze/{test_case_id}": {
      "get": {
        "description": "Return the previously stored AI analysis for a test case without triggering\na new LLM run.  Returns 404 if no analysis has been run yet.",
        "operationId": "get_existing_analysis_api_v1_analyze__test_case_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Fetch existing AI analysis for a test case (no re-run)",
        "tags": [
          "AI Analysis"
        ]
      }
    },
    "/api/v1/audit-dashboard/categories": {
      "get": {
        "description": "List available audit event categories.",
        "operationId": "list_categories_api_v1_audit_dashboard_categories_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Categories",
        "tags": [
          "Audit Dashboard"
        ]
      }
    },
    "/api/v1/audit-dashboard/events": {
      "get": {
        "description": "Unified audit event query across all audit tables (QA_LEAD+).\n\nTenant isolation: non-admin users only see events for their projects.",
        "operationId": "list_audit_events_api_v1_audit_dashboard_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Audit Events",
        "tags": [
          "Audit Dashboard"
        ]
      }
    },
    "/api/v1/audit-dashboard/export": {
      "get": {
        "description": "Export audit events as CSV with redaction applied (ADMIN only).",
        "operationId": "export_audit_events_api_v1_audit_dashboard_export_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Audit Events",
        "tags": [
          "Audit Dashboard"
        ]
      }
    },
    "/api/v1/audit-dashboard/observability/{project_id}": {
      "get": {
        "description": "Get tenant-scoped observability metrics for a project (QA_LEAD+).",
        "operationId": "get_project_observability_api_v1_audit_dashboard_observability__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "maximum": 90,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Project Observability",
        "tags": [
          "Audit Dashboard"
        ]
      }
    },
    "/api/v1/auth/change-password": {
      "post": {
        "description": "Change the current user's password.",
        "operationId": "change_password_api_v1_auth_change_password_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Change Password",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/dev-login": {
      "post": {
        "description": "Development-only: issue a JWT for a seeded user without credentials.\n\nEnabled only when APP_ENV=development AND DEV_AUTO_LOGIN_ENABLED=true.\nReturns 404 in all other environments so it is invisible in staging/prod.\n\nQuery param:\n  role — one of: admin, qa_lead, qa_engineer, tester, viewer (default: admin)\n  username — optional active username to authenticate as directly\n\nIf the requested user does not exist yet (seed not run), a temporary account\nis created on the fly so developers can always access the UI after `make dev`.",
        "operationId": "dev_login_api_v1_auth_dev_login_post",
        "parameters": [
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "default": "admin",
              "title": "Role",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "username",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Username"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Dev Login",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/first-time-reset": {
      "post": {
        "description": "Forced password reset for self-registered users on first login.\n\n- Requires a valid JWT (user must be authenticated).\n- Only permitted when must_change_password=True on the account.\n- Does NOT require the current/registration password.\n- Clears the must_change_password flag after a successful change.",
        "operationId": "first_time_reset_api_v1_auth_first_time_reset_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirstTimeResetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "First Time Reset",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/invitations/accept": {
      "post": {
        "description": "Redeem an invitation: create the account with the invited role and projects, sign in.\n\nWorks with ``REGISTRATION_ENABLED=false`` — the invitation is the\nauthorisation. Single use under ``SELECT … FOR UPDATE``. When the workspace\nrequires MFA for the role, answers the login flow's enrollment shape instead\nof tokens (an invite never skips the second factor).",
        "operationId": "accept_invitation_api_v1_auth_invitations_accept_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MfaEnrollmentRequiredResponse"
                    }
                  ],
                  "title": "Response Accept Invitation Api V1 Auth Invitations Accept Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Accept Invitation",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/invitations/preview": {
      "post": {
        "description": "Who invited whom, as what — read by the accept page before the form. Public.",
        "operationId": "preview_invitation_api_v1_auth_invitations_preview_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationPreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Invitation",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "description": "Authenticate and return JWT access + refresh tokens.\n\nThree success shapes, all HTTP 200 (see ``models/schemas.py``):\n\n* :class:`TokenResponse` — fully authenticated.\n* :class:`MfaChallengeResponse` — password accepted, second factor owed.\n* :class:`MfaEnrollmentRequiredResponse` — password accepted, workspace\n  policy requires MFA and this account has none yet.\n\nThe last two carry interstitial tokens with their own ``type`` claim. They\nare **not** access tokens and are rejected by ``get_current_user``: see\n``core/security.create_mfa_token`` for why a claim on a real access token\nwould have been a complete bypass.",
        "operationId": "login_api_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_login_api_v1_auth_login_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MfaChallengeResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MfaEnrollmentRequiredResponse"
                    }
                  ],
                  "title": "Response Login Api V1 Auth Login Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Login",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "description": "Server-side logout — revokes the caller's access-token jti until its\nnatural expiry and revokes all live refresh tokens for the user so the\nsession cannot be re-minted via /auth/refresh.",
        "operationId": "logout_api_v1_auth_logout_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Logout",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "description": "Return the authenticated user's profile.",
        "operationId": "get_me_api_v1_auth_me_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Me",
        "tags": [
          "Authentication"
        ]
      },
      "patch": {
        "description": "Self-service profile update — any authenticated user can update their own\nfull_name and avatar_color.  Email and username are read-only here.",
        "operationId": "update_me_api_v1_auth_me_patch",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelfUpdateProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Me",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/me/dismissals": {
      "get": {
        "description": "UI prompts this user has dismissed. Read-only; no project scope — a\ndismissal is a property of the person, not of a project.",
        "operationId": "list_my_dismissals_api_v1_auth_me_dismissals_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UIDismissalListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List My Dismissals",
        "tags": [
          "Authentication"
        ]
      },
      "post": {
        "description": "Dismiss a UI prompt for this user. Idempotent — dismissing twice is a\nno-op and still returns 201 with the full list.",
        "operationId": "dismiss_prompt_api_v1_auth_me_dismissals_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UIDismissalCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UIDismissalListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Dismiss Prompt",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/mfa/disable": {
      "post": {
        "description": "Turn MFA off. Requires the password **and** a live second factor.",
        "operationId": "disable_mfa_api_v1_auth_mfa_disable_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaDisableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Disable Mfa",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/mfa/enroll/confirm": {
      "post": {
        "description": "Verify a code against the staged seed, then enable MFA.\n\nRecovery codes are minted in the same unit of work as the flag flip — an\naccount must never reach ``mfa_enabled=True`` without a way back in. They\nare returned once and only digests are kept.",
        "operationId": "confirm_enrollment_api_v1_auth_mfa_enroll_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaEnrollConfirmRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaEnrollConfirmResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Confirm Enrollment",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/mfa/enroll/start": {
      "post": {
        "description": "Generate a TOTP seed and provisioning URI. Does **not** enable MFA.\n\nThe seed is stored immediately so ``/enroll/confirm`` has something to\nverify against, but ``users.mfa_enabled`` stays false until a code proves\nthe authenticator actually holds it. An abandoned enrollment therefore\nchanges nothing about how the account authenticates.",
        "operationId": "start_enrollment_api_v1_auth_mfa_enroll_start_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaEnrollStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaEnrollStartResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Enrollment",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/mfa/recovery-codes": {
      "post": {
        "description": "Replace the recovery-code set. The previous codes stop working.",
        "operationId": "reissue_recovery_codes_api_v1_auth_mfa_recovery_codes_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaRecoveryCodesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaRecoveryCodesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reissue Recovery Codes",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/mfa/status": {
      "get": {
        "description": "Current MFA state for the caller.\n\nReadable with an API key (unlike the mutating endpoints) so a CI job can\nreport on its owner's posture without being able to change it.",
        "operationId": "mfa_status_api_v1_auth_mfa_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mfa Status",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/mfa/verify": {
      "post": {
        "description": "Exchange a challenge token plus a second factor for a real session.",
        "operationId": "verify_mfa_api_v1_auth_mfa_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Verify Mfa",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/options": {
      "get": {
        "description": "What the sign-in page may offer. Public: it is read before anyone signs in.\n\n``password_reset_email`` (W17b ADM-02) is true when SMTP is configured, so\nthe login page offers the email form; it reveals nothing about any account.",
        "operationId": "auth_options_api_v1_auth_options_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Auth Options Api V1 Auth Options Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Auth Options",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/password/forgot": {
      "post": {
        "description": "Always 202 with the same body. The lookup and the mail run after the response.",
        "operationId": "forgot_password_api_v1_auth_password_forgot_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Forgot Password Api V1 Auth Password Forgot Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forgot Password",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/password/reset": {
      "post": {
        "description": "Redeem a reset link: set the password, clear lockout, sign out everywhere.\n\nMFA is untouched — the next sign-in still asks for the code.",
        "operationId": "reset_password_api_v1_auth_password_reset_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemResetLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reset Password",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "description": "Exchange a valid refresh token for a new access + refresh token pair (rotation).\nThe old refresh token is not reusable after this call.",
        "operationId": "refresh_tokens_api_v1_auth_refresh_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Refresh Tokens",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "description": "Self-service registration, when the deployment allows it.\n\nOff unless ``REGISTRATION_ENABLED`` (an open sign-up lets anyone who can\nreach the server make an account). A new account is a VIEWER -- what the\nsign-up form promises -- with no project membership and\nmust_change_password=True. It used to be QA_ENGINEER, which can create\nAPI keys.",
        "operationId": "register_api_v1_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Register",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/users": {
      "get": {
        "description": "Return active users for assignee dropdowns (bounded).\n\nOnly the people the caller works with: users who share a project with\nthem, and themselves. An admin sees everyone.",
        "operationId": "list_users_api_v1_auth_users_get",
        "parameters": [
          {
            "description": "Max users to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max users to return",
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  },
                  "title": "Response List Users Api V1 Auth Users Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Users",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/billing/overview": {
      "get": {
        "description": "Workspace-wide billing view for the ``/settings/billing`` page.\n\nNon-admin callers see only the projects they're members of; admins\nsee everything. The response is optimised for a single render —\nevery project row already has its cost, cap, utilization, and status\ncomputed so the frontend is a pure table.",
        "operationId": "billing_overview_api_v1_billing_overview_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingOverviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Billing Overview",
        "tags": [
          "LLM Cost Budget"
        ]
      }
    },
    "/api/v1/canonical-test-cases": {
      "get": {
        "operationId": "list_canonical_cases_api_v1_canonical_test_cases_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "suite_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Suite Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Canonical Cases",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/bulk-link": {
      "post": {
        "description": "Move a batch of canonical test cases to a single target suite.\n\nCompanion to the single-id ``/canonical-test-cases/{id}/link`` route —\nunblocks the SuiteCasesPage multi-select bulk-move UX. Same auth and\ncross-project semantics: caller must have access to the target\nsuite's project, and any id from a different project rejects the\nentire batch with 400 (no partial moves).\n\nIds that don't resolve to an existing canonical are surfaced in\n``missing_ids`` so the UI can clear stale rows from its selection\nwithout re-fetching the whole page.",
        "operationId": "bulk_link_canonicals_to_suite_api_v1_canonical_test_cases_bulk_link_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CanonicalTestCaseBulkLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseBulkLinkResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Bulk Link Canonicals To Suite",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/orphaned": {
      "get": {
        "operationId": "list_orphaned_canonical_cases_api_v1_canonical_test_cases_orphaned_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Orphaned Canonical Cases",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/{canonical_id}": {
      "get": {
        "operationId": "get_canonical_case_api_v1_canonical_test_cases__canonical_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "canonical_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Canonical Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Canonical Case",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/{canonical_id}/confirm-retirement": {
      "post": {
        "operationId": "confirm_canonical_retirement_api_v1_canonical_test_cases__canonical_id__confirm_retirement_post",
        "parameters": [
          {
            "in": "path",
            "name": "canonical_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Canonical Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CanonicalRetirementConfirmRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Confirm Canonical Retirement",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/{canonical_id}/link": {
      "post": {
        "description": "Move a canonical test case to a different suite within the same\nproject. Refuses cross-project moves (different project's suites are\nisolated by design).",
        "operationId": "link_canonical_to_suite_api_v1_canonical_test_cases__canonical_id__link_post",
        "parameters": [
          {
            "in": "path",
            "name": "canonical_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Canonical Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CanonicalTestCaseLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Link Canonical To Suite",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/{canonical_id}/managed-link": {
      "delete": {
        "operationId": "unlink_canonical_managed_case_api_v1_canonical_test_cases__canonical_id__managed_link_delete",
        "parameters": [
          {
            "in": "path",
            "name": "canonical_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Canonical Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CanonicalManagedUnlinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Unlink Canonical Managed Case",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/{canonical_id}/promote": {
      "post": {
        "operationId": "promote_canonical_case_api_v1_canonical_test_cases__canonical_id__promote_post",
        "parameters": [
          {
            "in": "path",
            "name": "canonical_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Canonical Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalPromotionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Promote Canonical Case",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/canonical-test-cases/{canonical_id}/runs": {
      "get": {
        "description": "Every per-run ``TestCase`` row currently linked to this canonical.\nNewest run first. Returned as bare dicts (no full RunTestCase schema —\nthat lives in ``runs`` router and would create a cycle here).\n\nCarries the run's environment/branch/build and the per-run retry evidence\nso one screen can answer \"has this test been unstable, on which\nenvironments, and how long has it taken?\" — the question the per-test\nhistory timeline exists to answer (roadmap Phase 1).\n\n``environment`` is resolved, not raw: a run that never recorded one yields\n``None`` with ``environment_source: \"unknown\"`` rather than being folded\ninto a synthetic default group.\n\nAIH-05: each row's ``ai`` is that execution's AI analysis (category,\nconfidence, engine/model, review flag, root-cause excerpt, version count) or\n``None``; only the newest 2,000 rows get it (``ai_truncated``). The case ids\nare this canonical's own, so the project scope is the canonical's.",
        "operationId": "list_canonical_run_history_api_v1_canonical_test_cases__canonical_id__runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "canonical_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Canonical Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Canonical Run History",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/chat/run-summaries": {
      "get": {
        "operationId": "get_run_summaries_api_v1_chat_run_summaries_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 5,
              "maximum": 30,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Summaries",
        "tags": [
          "Chat"
        ]
      }
    },
    "/api/v1/chat/sessions": {
      "get": {
        "description": "The caller's own conversations, newest first; ``project_id`` narrows\nthem to one project (the chat page passes the active project).",
        "operationId": "list_sessions_api_v1_chat_sessions_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ChatSessionResponse"
                  },
                  "title": "Response List Sessions Api V1 Chat Sessions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Sessions",
        "tags": [
          "Chat"
        ]
      },
      "post": {
        "operationId": "create_session_api_v1_chat_sessions_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Session",
        "tags": [
          "Chat"
        ]
      }
    },
    "/api/v1/chat/sessions/{session_id}": {
      "delete": {
        "operationId": "delete_session_api_v1_chat_sessions__session_id__delete",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Session",
        "tags": [
          "Chat"
        ]
      }
    },
    "/api/v1/chat/sessions/{session_id}/messages": {
      "get": {
        "operationId": "get_messages_api_v1_chat_sessions__session_id__messages_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ChatMessageResponse"
                  },
                  "title": "Response Get Messages Api V1 Chat Sessions  Session Id  Messages Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Messages",
        "tags": [
          "Chat"
        ]
      },
      "post": {
        "operationId": "send_message_api_v1_chat_sessions__session_id__messages_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Send Message",
        "tags": [
          "Chat"
        ]
      }
    },
    "/api/v1/chat/sessions/{session_id}/messages/stream": {
      "post": {
        "description": "Ask a question and receive the answer as server-sent events.\n\nEvents, in order: ``start`` (the question was saved), ``status`` (what the\nassistant is looking up), ``delta`` (answer text as it is written), then\n``done`` (the saved answer, its sources, tool trace and timings) or\n``error`` (``code``, ``message``, ``retryable``; no answer was saved).\n``retry: true`` answers the last unanswered or stopped question again.\nClosing the connection stops the answer; text already sent is kept.",
        "operationId": "stream_message_api_v1_chat_sessions__session_id__messages_stream_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StreamMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Stream Message",
        "tags": [
          "Chat"
        ]
      }
    },
    "/api/v1/compliance-packs": {
      "get": {
        "description": "The newest packs in one project, or across every project the caller can\nsee, and how many there are (``total`` is counted, not ``len(items)``).\n\nNot flag-gated, like the per-release list: generating a pack is what\n``release_compliance_pack`` controls. A project-bound API key is confined\nto its project by ``get_accessible_project_ids``.",
        "operationId": "list_project_compliance_packs_api_v1_compliance_packs_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePackListRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Project Compliance Packs",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/signing-keys": {
      "get": {
        "description": "Every signing key's PUBLIC half, newest first, retired ones included\n(they verify the packs they signed). Deployment-wide public data.\n\nA GET never writes: no key is created here. ``active_key_id`` is ``None``\nuntil the first signed pack creates the deployment's key.",
        "operationId": "list_compliance_signing_keys_api_v1_compliance_packs_signing_keys_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePackSigningKeysResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Compliance Signing Keys",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/signing-keys/rotate": {
      "post": {
        "description": "Retire the active signing key and create a new one (D14, D-13).\n\nThe retired key's private half is destroyed (its ciphertext cleared): it\nnever signs again. Its public key stays, so every pack it signed keeps\nverifying. Typed confirmation, and a reason kept on the retired key.",
        "operationId": "rotate_compliance_signing_key_api_v1_compliance_packs_signing_keys_rotate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompliancePackKeyRotateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePackSigningKeyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Rotate Compliance Signing Key",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/signing-keys/{signing_key_id}/pem": {
      "get": {
        "description": "One public key as ``testlookup-compliance-<id>.pem`` (never a private key).",
        "operationId": "download_compliance_signing_key_api_v1_compliance_packs_signing_keys__signing_key_id__pem_get",
        "parameters": [
          {
            "in": "path",
            "name": "signing_key_id",
            "required": true,
            "schema": {
              "title": "Signing Key Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Download Compliance Signing Key",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/{pack_id}": {
      "delete": {
        "description": "Delete a pack whose retention window has already passed.\n\n**Refused while the window is still open** — 409, naming the expiry. Retire\nit first if it really should go now. That two-step exists because the\nwindow was previously enforced only on the way out: nothing could shorten\nit, and with no delete route nothing tested it on the way in either.\n\n**Refused while a retention hold covers the pack** (W22a ACT-05: a live\nhold on the project, the pack, or its release). The hold check lives HERE,\nbeside the session-free ``lifecycle.deletion_blockers`` (which cannot read a\ntable): ``retention_hold_service.holds_covering_pack`` names each hold as\n``Held: <reason>``, listed first, before any storage call.",
        "operationId": "delete_compliance_pack_api_v1_compliance_packs__pack_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pack Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Compliance Pack",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/{pack_id}/download": {
      "get": {
        "description": "Stream a pack ZIP back to the caller.\n\nEnforces tenant isolation via the pack's ``project_id``. The response\nincludes the SHA-256 of the manifest in the ``X-Manifest-Sha256``\nheader so automated verifiers can assert before reading the body.",
        "operationId": "download_compliance_pack_api_v1_compliance_packs__pack_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pack Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Download Compliance Pack",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/{pack_id}/retire": {
      "post": {
        "description": "Bring a pack's retention window forward to now (S4).\n\nDoes not delete. The nightly purge already deletes packs past their\nwindow, using an object-then-row ordering that makes a failed object\ndelete retryable; duplicating that here would mean two implementations of\nthe one sequence that must not be got wrong.\n\nADMIN, typed confirmation, and a reason — a pack is audit evidence\ngenerated with a seven-year default, so shortening that is a deliberate\nact and is recorded as one.\n\n**Refused while a retention hold covers the pack** (W22a: the project, the\npack, or its release) — 409 ``{\"blockers\": [\"Held: <reason>\", …]}`` BEFORE\nthe confirmation check. A held pack is not retired, so releasing the hold\nnever hands it to the next purge the same instant.",
        "operationId": "retire_compliance_pack_api_v1_compliance_packs__pack_id__retire_post",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pack Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetireCompliancePackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePackLifecycleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Retire Compliance Pack",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/compliance-packs/{pack_id}/verify": {
      "post": {
        "description": "Check a stored pack: every file against the manifest, the manifest\nagainst the digest recorded at generation, and the signature (W11 REL-11).\n\nWhoever may download the pack may verify it (the download route's rule:\nthe pack's own project through ``resolve_project_scope``). A POST that\nwrites nothing. The request's connection is handed back before the storage\nread; a storage failure answers 200 ``unreadable`` (absence is not health,\nand not a 502 toast either).",
        "operationId": "verify_compliance_pack_api_v1_compliance_packs__pack_id__verify_post",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pack Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePackVerification"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Verify Compliance Pack",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/debug/generate-test-run": {
      "post": {
        "description": "Generates a synthetic test run and triggers the ingestion pipeline.",
        "operationId": "generate_mock_test_run_api_v1_debug_generate_test_run_post",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "num_tests",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Num Tests",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "failure_rate",
            "required": false,
            "schema": {
              "default": 0.2,
              "title": "Failure Rate",
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "report_type",
            "required": false,
            "schema": {
              "default": "both",
              "enum": [
                "allure",
                "testng",
                "both"
              ],
              "title": "Report Type",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Generate Mock Test Run",
        "tags": [
          "Debug"
        ]
      }
    },
    "/api/v1/deep-investigate/defects/pending-review": {
      "get": {
        "description": "List defects awaiting approval in the caller's projects (QA Lead+, paginated).\n\n``require_role(QA_LEAD)`` gates by ROLE, not by project membership, and this\nquery previously had no project filter at all — so a QA lead of one project\nreceived the titles, components and owner teams of pending defects belonging\nto every OTHER project on the deployment.\n\n``get_accessible_project_ids()`` returning ``None`` means ADMIN, who is\nlegitimately unscoped; the defect was that non-admins were unscoped too.\n``defects.project_id`` is indexed (``ix_defects_project_id``), so the schema\nalready anticipated this filter.\n\nDEF-06: ``{items, total, page, page_size}``. ``total`` is a COUNT over the\nsame scope, not the page length, so the Inbox badge never reads\n``min(n, page_size)``. ``project_id`` pins one project (400 malformed, 403\nnot accessible); soft-deleted projects' defects never wait for anyone.",
        "operationId": "list_pending_defects_api_v1_deep_investigate_defects_pending_review_get",
        "parameters": [
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "description": "Only this project's queue (must be accessible)",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's queue (must be accessible)",
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingDefectList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Pending Defects",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/defects/{defect_id}/review": {
      "post": {
        "description": "Approve or reject a defect that is pending review (QA Lead+ only).\n\nApprove (DEF-06): the approval is committed FIRST, so a slow or failing\nJira never undoes it. Then, when a Jira project key was given at\npromotion, the ticket is filed ON this defect (or linked to the open issue\nalready filed for the same failure) and committed; offline it says so.\n``defect.promoted`` (ledger + webhook) covers cluster promotions only, the\nwebhook after the last commit.\n\nReject (D-11): the defect is also closed as ``INVALID`` with the reason in\nthe activity ledger, so a rejected suggestion stops blocking the gate.",
        "operationId": "review_defect_api_v1_deep_investigate_defects__defect_id__review_post",
        "parameters": [
          {
            "in": "path",
            "name": "defect_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Defect Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefectApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefectApprovalResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Review Defect",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/history": {
      "get": {
        "description": "Per run of ONE project, its latest deep pipeline (VIEWER may read).",
        "operationId": "get_deep_history_api_v1_deep_investigate_history_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 50,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepHistoryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Deep History",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}": {
      "post": {
        "description": "Trigger the deep investigation pipeline for a completed test run.\nUses workflow_type=\"deep\" which adds failure clustering, flaky sentinel,\ntest health analysis, and release risk on top of the standard 5-stage pipeline.",
        "operationId": "trigger_deep_investigation_api_v1_deep_investigate__run_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerDeepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerDeepResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Deep Investigation",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/clusters": {
      "get": {
        "description": "Return semantic failure clusters for a test run.",
        "operationId": "get_failure_clusters_api_v1_deep_investigate__run_id__clusters_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ClusterResponse"
                  },
                  "title": "Response Get Failure Clusters Api V1 Deep Investigate  Run Id  Clusters Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Failure Clusters",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/clusters/ranked": {
      "get": {
        "description": "Return failure clusters ranked by impact score for triage prioritization.",
        "operationId": "get_ranked_clusters_api_v1_deep_investigate__run_id__clusters_ranked_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ranked Clusters",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/clusters/{cluster_id}/defect-candidate": {
      "get": {
        "description": "Get a pre-assembled defect candidate for a failure cluster.",
        "operationId": "get_cluster_defect_candidate_api_v1_deep_investigate__run_id__clusters__cluster_id__defect_candidate_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "title": "Cluster Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefectCandidateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Cluster Defect Candidate",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/clusters/{cluster_id}/duplicate-check": {
      "get": {
        "description": "Check if a cluster likely duplicates an existing open defect.\nReturns duplicate info without creating anything.\nP3-9: Business logic extracted to cluster_service.",
        "operationId": "check_cluster_duplicate_api_v1_deep_investigate__run_id__clusters__cluster_id__duplicate_check_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "title": "Cluster Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Check Cluster Duplicate",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/clusters/{cluster_id}/promote": {
      "post": {
        "description": "Promote a failure cluster to a defect record (optionally with Jira ticket).",
        "operationId": "promote_cluster_to_defect_api_v1_deep_investigate__run_id__clusters__cluster_id__promote_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "title": "Cluster Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefectPromotionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefectPromotionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Promote Cluster To Defect",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/estimate": {
      "get": {
        "description": "The measured time / cost of a deep run of this configuration, and the server's gate.\n\nThe gate is DATA here (``gate.allowed``), never a 422: the page decides\nwhether to offer Run from it.",
        "operationId": "get_deep_estimate_api_v1_deep_investigate__run_id__estimate_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "selected_failures",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Selected Failures"
            }
          },
          {
            "in": "query",
            "name": "max_failures_analyzed",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Failures Analyzed"
            }
          },
          {
            "in": "query",
            "name": "model_tier",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Tier"
            }
          },
          {
            "in": "query",
            "name": "evidence_sources",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Evidence Sources"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepEstimateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Deep Estimate",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/findings": {
      "get": {
        "description": "Return deep investigation findings per failure cluster for a test run.",
        "operationId": "get_deep_findings_api_v1_deep_investigate__run_id__findings_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeepFindingResponse"
                  },
                  "title": "Response Get Deep Findings Api V1 Deep Investigate  Run Id  Findings Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Deep Findings",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/deep-investigate/{run_id}/pre-scan": {
      "get": {
        "description": "The run's failing results grouped by error signature (offline; no ChromaDB).",
        "operationId": "get_deep_pre_scan_api_v1_deep_investigate__run_id__pre_scan_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepPreScanResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Deep Pre Scan",
        "tags": [
          "Deep Investigation"
        ]
      }
    },
    "/api/v1/dev/seed": {
      "delete": {
        "description": "Wipe seed data without re-seeding.",
        "operationId": "delete_seed_data_api_v1_dev_seed_delete",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Seed Data",
        "tags": [
          "Dev Seed Data"
        ]
      },
      "post": {
        "description": "Load seed data (idempotent — skips if already seeded).",
        "operationId": "load_seed_data_api_v1_dev_seed_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Load Seed Data",
        "tags": [
          "Dev Seed Data"
        ]
      }
    },
    "/api/v1/dev/seed/reset": {
      "post": {
        "description": "Wipe existing seed data and regenerate from scratch.",
        "operationId": "reset_seed_data_api_v1_dev_seed_reset_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reset Seed Data",
        "tags": [
          "Dev Seed Data"
        ]
      }
    },
    "/api/v1/dev/seed/status": {
      "get": {
        "description": "Check whether seed data is currently loaded.",
        "operationId": "seed_status_api_v1_dev_seed_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Seed Status",
        "tags": [
          "Dev Seed Data"
        ]
      }
    },
    "/api/v1/digests/preview": {
      "get": {
        "description": "Preview digest content without sending.\n\nScope is resolved for the **provided** ``project_id``. The previous check\nran only when ``project_id`` was absent — i.e. only when there was nothing\nto guard — so naming any project id returned that project's digest to any\nauthenticated caller (name, run count, pass rate, regressions).\n\n``saved_view_id`` (W09 NTF-04) previews the digest a subscription bound to\nthat view would receive. The view is checked for THIS caller in THIS\nproject with the subscription rule: another project's view, a teammate's\nprivate view and a layout row all answer the same 422.",
        "operationId": "preview_digest_api_v1_digests_preview_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "default": "weekly",
              "title": "Period",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "saved_view_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Saved View Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestContentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Digest",
        "tags": [
          "Digests"
        ]
      }
    },
    "/api/v1/digests/subscriptions": {
      "get": {
        "description": "List current user's digest subscriptions.",
        "operationId": "list_subscriptions_api_v1_digests_subscriptions_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DigestSubscriptionResponse"
                  },
                  "title": "Response List Subscriptions Api V1 Digests Subscriptions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Subscriptions",
        "tags": [
          "Digests"
        ]
      },
      "post": {
        "description": "Create a new digest subscription.\n\n``project_id`` arrives in the request body, so the architectural\nauthorization ratchet — which matches ``{project_id}`` **path** params —\ncannot see it. It is verified explicitly: the delivery task reads\n``project_id`` straight off this row and never re-checks membership, so an\nunvalidated row is a standing instruction to mail another tenant's digest\non a schedule.",
        "operationId": "create_subscription_api_v1_digests_subscriptions_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigestSubscriptionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestSubscriptionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Subscription",
        "tags": [
          "Digests"
        ]
      }
    },
    "/api/v1/digests/subscriptions/{sub_id}": {
      "delete": {
        "description": "Delete (unsubscribe from) a digest subscription.",
        "operationId": "delete_subscription_api_v1_digests_subscriptions__sub_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "sub_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Sub Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Subscription",
        "tags": [
          "Digests"
        ]
      },
      "get": {
        "description": "Get a single subscription.",
        "operationId": "get_subscription_api_v1_digests_subscriptions__sub_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "sub_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Sub Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestSubscriptionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Subscription",
        "tags": [
          "Digests"
        ]
      },
      "patch": {
        "description": "Update a digest subscription (own subscriptions only).",
        "operationId": "update_subscription_api_v1_digests_subscriptions__sub_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "sub_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Sub Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigestSubscriptionUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestSubscriptionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Subscription",
        "tags": [
          "Digests"
        ]
      }
    },
    "/api/v1/digests/subscriptions/{sub_id}/pause": {
      "post": {
        "description": "Pause digest delivery without deleting.",
        "operationId": "pause_subscription_api_v1_digests_subscriptions__sub_id__pause_post",
        "parameters": [
          {
            "in": "path",
            "name": "sub_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Sub Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestSubscriptionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Pause Subscription",
        "tags": [
          "Digests"
        ]
      }
    },
    "/api/v1/digests/subscriptions/{sub_id}/resume": {
      "post": {
        "description": "Resume a paused subscription.",
        "operationId": "resume_subscription_api_v1_digests_subscriptions__sub_id__resume_post",
        "parameters": [
          {
            "in": "path",
            "name": "sub_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Sub Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestSubscriptionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Resume Subscription",
        "tags": [
          "Digests"
        ]
      }
    },
    "/api/v1/feature-flags": {
      "get": {
        "description": "List every flag in the store. ADMIN only.",
        "operationId": "list_feature_flags_api_v1_feature_flags_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FeatureFlagResponse"
                  },
                  "title": "Response List Feature Flags Api V1 Feature Flags Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Feature Flags",
        "tags": [
          "Feature Flags"
        ]
      },
      "post": {
        "description": "Create a new feature flag. ADMIN only.",
        "operationId": "create_feature_flag_api_v1_feature_flags_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureFlagCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Feature Flag",
        "tags": [
          "Feature Flags"
        ]
      }
    },
    "/api/v1/feature-flags/{key}": {
      "delete": {
        "description": "Hard-delete a feature flag. ADMIN only.",
        "operationId": "delete_feature_flag_api_v1_feature_flags__key__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Feature Flag",
        "tags": [
          "Feature Flags"
        ]
      },
      "get": {
        "description": "Get a single flag by key. ADMIN only.",
        "operationId": "get_feature_flag_api_v1_feature_flags__key__get",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Feature Flag",
        "tags": [
          "Feature Flags"
        ]
      },
      "patch": {
        "description": "Partial-update a feature flag. ADMIN only. Any unset field is kept.",
        "operationId": "update_feature_flag_api_v1_feature_flags__key__patch",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__models__schemas__FeatureFlagUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Feature Flag",
        "tags": [
          "Feature Flags"
        ]
      }
    },
    "/api/v1/feature-flags/{key}/history": {
      "get": {
        "description": "A flag's changes, newest first: action, who, when, the changed field\nnames and the reason given (W17 ADM-07). ADMIN only; never the values.",
        "operationId": "get_feature_flag_history_api_v1_feature_flags__key__history_get",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FeatureFlagHistoryEntry"
                  },
                  "title": "Response Get Feature Flag History Api V1 Feature Flags  Key  History Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Feature Flag History",
        "tags": [
          "Feature Flags"
        ]
      }
    },
    "/api/v1/feature-flags/{key}/status": {
      "get": {
        "description": "Check whether this flag is enabled for the current caller.\n\nAny authenticated user can call this so frontend code can\nconditionally render UI without needing ADMIN access. Returns\n``{key, enabled}`` only — no flag configuration detail is leaked.",
        "operationId": "get_feature_flag_status_api_v1_feature_flags__key__status_get",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Feature Flag Status",
        "tags": [
          "Feature Flags"
        ]
      }
    },
    "/api/v1/feedback/jira-webhook": {
      "post": {
        "operationId": "jira_resolution_webhook_api_v1_feedback_jira_webhook_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Jira Resolution Webhook",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/feedback/stats": {
      "get": {
        "operationId": "get_feedback_stats_api_v1_feedback_stats_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Feedback Stats",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/feedback/{analysis_id}": {
      "post": {
        "operationId": "submit_feedback_api_v1_feedback__analysis_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "analysis_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Analysis Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Submit Feedback",
        "tags": [
          "Feedback & Training"
        ]
      },
      "put": {
        "operationId": "update_feedback_api_v1_feedback__analysis_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "analysis_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Analysis Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Feedback",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/fixer/attempts/{attempt_id}": {
      "get": {
        "description": "A single FixAttempt with patch + runner_log_digest + ledger_run_id.",
        "operationId": "get_fixer_attempt_api_v1_fixer_attempts__attempt_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Fixer Attempt Api V1 Fixer Attempts  Attempt Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Fixer Attempt",
        "tags": [
          "Fixer"
        ]
      }
    },
    "/api/v1/github/app/install-url": {
      "get": {
        "description": "Where to install the App for this project, with a signed, user-bound, 10-minute state. QA lead.",
        "operationId": "github_app_install_url_api_v1_github_app_install_url_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubAppInstallUrl"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Github App Install Url",
        "tags": [
          "GitHub App"
        ]
      }
    },
    "/api/v1/github/app/setup-callback": {
      "post": {
        "description": "Record the installation GitHub sent back, for the project the signed state names.",
        "operationId": "github_app_setup_callback_api_v1_github_app_setup_callback_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitHubAppSetupCallback"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubAppSetupResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Github App Setup Callback",
        "tags": [
          "GitHub App"
        ]
      }
    },
    "/api/v1/identity/events": {
      "get": {
        "description": "List identity events with filtering (ADMIN only).",
        "operationId": "list_identity_events_api_v1_identity_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/IdentityEventType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User Id"
            }
          },
          {
            "in": "query",
            "name": "sso_config_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sso Config Id"
            }
          },
          {
            "in": "query",
            "name": "success",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Success"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityEventListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Identity Events",
        "tags": [
          "Identity & Audit"
        ]
      }
    },
    "/api/v1/identity/sync-status": {
      "get": {
        "description": "Get aggregated identity sync health (ADMIN only).",
        "operationId": "get_identity_sync_status_api_v1_identity_sync_status_get",
        "parameters": [
          {
            "in": "query",
            "name": "sso_config_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sso Config Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentitySyncStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Identity Sync Status",
        "tags": [
          "Identity & Audit"
        ]
      }
    },
    "/api/v1/ingest": {
      "post": {
        "description": "Accept a JSON batch of test results and queue for async processing.\n\nThe batch is dispatched to a Celery worker which creates the TestRun,\nupserts test cases, runs post-ingestion tagging, and triggers the\nAI analysis pipeline.",
        "operationId": "ingest_batch_api_v1_ingest_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ingest test results (JSON batch)",
        "tags": [
          "Ingest"
        ]
      }
    },
    "/api/v1/ingest/file": {
      "post": {
        "description": "Upload a test result file for async parsing and ingestion.\n\nSupported formats: ``junit`` | ``testng`` | ``allure`` | ``cypress`` |\n``playwright`` | ``pytest`` | ``robot`` | ``cucumber`` | ``nunit`` |\n``trx`` | ``xunit``. Use\n``format=auto`` (default) for content-based detection.\nThe Cypress and Playwright parsers are gated behind the ``cypress_ingest``\nand ``playwright_ingest`` feature flags respectively — 503 is returned if\na disabled format is requested.",
        "operationId": "ingest_file_api_v1_ingest_file_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_ingest_file_api_v1_ingest_file_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upload test result file (JUnit/TestNG XML, Allure/Cypress/Playwright JSON)",
        "tags": [
          "Ingest"
        ]
      }
    },
    "/api/v1/ingest/uploads/{task_id}": {
      "get": {
        "description": "Return the async parse/ingest status for an upload task.\n\nProject-scoped: 404 if unknown/expired, 403 if the caller can't access the\nrun's project (so a leaked/guessed task_id can't reveal another tenant's\nrun).",
        "operationId": "get_upload_status_api_v1_ingest_uploads__task_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "title": "Task Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Poll the status of an uploaded report's async processing",
        "tags": [
          "Ingest"
        ]
      }
    },
    "/api/v1/integration-health/history/{provider}": {
      "get": {
        "description": "Probe history for a provider: the deployment-wide history, or -- with\n``project_id`` (checked by ``resolve_project_scope`` first) -- that\nproject's integration.",
        "operationId": "get_provider_history_api_v1_integration_health_history__provider__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "maximum": 90,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Provider History",
        "tags": [
          "Integration Health"
        ]
      }
    },
    "/api/v1/integration-health/probe": {
      "post": {
        "description": "Trigger an on-demand health probe for all or a specific provider (QA_LEAD+).\n\n``project_id`` probes that project's GitHub or GitLab integration\n(``provider=github|gitlab``); the id passes ``resolve_project_scope`` before\nanything is read. Without a provider and a project: every deployment-wide\nprobe plus every per-project integration the reader may see. The request\nsession's connection is handed back before any probe makes an HTTP call.",
        "operationId": "trigger_probe_api_v1_integration_health_probe_post",
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Probe",
        "tags": [
          "Integration Health"
        ]
      }
    },
    "/api/v1/integration-health/status": {
      "get": {
        "description": "Latest health per integration.\n\n``scope=global`` (the default, every existing consumer): the\ndeployment-wide rows. ``scope=all``: those, then one row per enabled\nper-project GitHub / GitLab integration of the reader's projects (an admin:\nevery project), then one row per paused outbound webhook in them. Five\nreads for ``all``, none per row.",
        "operationId": "get_all_status_api_v1_integration_health_status_get",
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "default": "global",
              "title": "Scope",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/IntegrationHealthRow"
                  },
                  "title": "Response Get All Status Api V1 Integration Health Status Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get All Status",
        "tags": [
          "Integration Health"
        ]
      }
    },
    "/api/v1/integration-health/trends": {
      "get": {
        "description": "Get aggregated health trends for all providers over a period.\n\nEvery status the probe service persists gets its own counter. The probers\nemit five (``skipped`` is dropped before insert, see\n``integration_probe_service._persist``), and reporting only three left\n``auth_error`` and ``timeout`` probes counted in ``total_probes`` — so they\ndragged ``uptime_pct`` down — while appearing in no column at all. A\nprovider whose token had expired rendered as 0% uptime with 0 healthy,\n0 degraded and 0 down, which reads as \"no data\" rather than \"your\ncredentials are wrong\".\n\nThe trend is deployment-wide (W10 INT-04): per-project probes\n(``scope_key <> ''``) stay out of both statements.",
        "operationId": "get_health_trends_api_v1_integration_health_trends_get",
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "maximum": 30,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Health Trends",
        "tags": [
          "Integration Health"
        ]
      }
    },
    "/api/v1/integrations/jira": {
      "post": {
        "description": "Create a Jira Bug ticket from AI triage analysis output.",
        "operationId": "create_jira_defect_api_v1_integrations_jira_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JiraIssueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JiraIssueResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Jira Defect",
        "tags": [
          "Integrations"
        ]
      }
    },
    "/api/v1/investigations/{investigation_id}": {
      "get": {
        "description": "InvestigationDetail (pinned wire shape). The UI polls this.\n\n``proposals`` (W15 AGT-02): the agent-action ledger rows the investigation\nfiled, read by its pipeline id AND the investigation's own project (a row of\nanother project under the same pipeline id is never returned). Read-only.",
        "operationId": "get_investigation_api_v1_investigations__investigation_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "investigation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Investigation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Investigation Api V1 Investigations  Investigation Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Investigation",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/investigations/{investigation_id}/cancel": {
      "post": {
        "description": "Request cooperative cancellation (QA_ENGINEER+). The workflow checks\nthe flag between nodes and finalizes the row as ``cancelled``.",
        "operationId": "cancel_investigation_api_v1_investigations__investigation_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "investigation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Investigation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Cancel Investigation Api V1 Investigations  Investigation Id  Cancel Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cancel Investigation",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/keys": {
      "get": {
        "description": "List active API keys. Non-admin users see only their own keys.\nADMIN can filter by project_id to see all keys bound to a project.\n\nA caller authenticated with a project-bound key sees only keys bound to\nthat project, and naming another project is a 403 (re-audit N20).",
        "operationId": "list_api_keys_api_v1_keys_get",
        "parameters": [
          {
            "description": "Filter by project (ADMIN only)",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by project (ADMIN only)",
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  },
                  "title": "Response List Api Keys Api V1 Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Api Keys",
        "tags": [
          "API Keys"
        ]
      },
      "post": {
        "description": "Generate a new scoped API key. The raw key is only shown once.\n\nADMIN can supply ``project_id`` to restrict the key to a single project\nand ``target_user_id`` to create a key on behalf of another user.\n\nA caller authenticated with a project-bound key may mint only a key bound\nto that same project, for its own owner (re-audit N20). That is what CI\nneeds to rotate its key, and nothing wider.\n\nA caller authenticated with an API key also grants no more than it holds\n(QA-R3-11):\n\n* scopes: if the caller's key is scoped, the new key's scopes must be a\n  subset of them. Omitting ``scopes`` inherits the caller's; an explicit\n  empty list (a full-access key) is refused. A legacy unscoped caller\n  mints as before.\n* expiry: the new key may not expire later than the caller's key.\n  Omitting ``expires_days`` inherits the caller's expiry. A caller with\n  no expiry mints as before.\n\nSo ``testlookup keys create``, which sends only a name, rotates a scoped,\nexpiring CI key into one with the same scopes and the same end date.\n\nScopes: an empty list is a full-access key. ``stream:write`` is required\nby the streaming ingest endpoints. ``project:admin`` is required by the\nproject-administration routes a project-bound key may use (run deletion,\nproject reset, retention and deletion jobs, member removal, release/phase\ndeletion, compliance packs, release-gate policies).",
        "operationId": "create_api_key_api_v1_keys_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Api Key",
        "tags": [
          "API Keys"
        ]
      }
    },
    "/api/v1/keys/{key_id}": {
      "delete": {
        "description": "Revoke (soft-delete) an API key: your own, or -- as an ADMIN -- anyone's.\n\nAn ADMIN revokes another user's key for incident response: a leaked CI key\nhas to stop working now, whoever minted it. The Streaming API keys page\nlists every key bound to the project for an admin and offers Revoke on\neach, and ``require_api_key_owner`` already let an admin through; this\nquery then looked the key up by ``user_id == current_user.id`` and answered\n404 for every key the admin did not own. Everyone else revokes only their\nown keys (``require_api_key_owner`` refuses the rest with 403, and the\nquery below would not find them either).\n\nA caller authenticated with a project-bound key may revoke only keys bound\nto that project; ``require_api_key_owner`` refuses the rest (re-audit N20).\n\nEvery revocation is written to the identity trail naming the actor and the\nkey's owner, so \"who killed this key\" has an answer when they differ.",
        "operationId": "revoke_api_key_api_v1_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Revoke Api Key",
        "tags": [
          "API Keys"
        ]
      }
    },
    "/api/v1/knowledge-sources": {
      "get": {
        "operationId": "list_knowledge_sources_api_v1_knowledge_sources_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Type"
            }
          },
          {
            "in": "query",
            "name": "sync_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sync Status"
            }
          },
          {
            "in": "query",
            "name": "classification",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Classification"
            }
          },
          {
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSourceListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Knowledge Sources",
        "tags": [
          "Knowledge Sources"
        ]
      },
      "post": {
        "operationId": "create_knowledge_source_api_v1_knowledge_sources_post",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeSourceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSourceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Knowledge Source",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/knowledge-sources/connectors/test": {
      "post": {
        "operationId": "test_connector_api_v1_knowledge_sources_connectors_test_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorConfigTestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorTestResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Test Connector",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/knowledge-sources/governance/domain-allowlist": {
      "get": {
        "operationId": "get_domain_allowlist_api_v1_knowledge_sources_governance_domain_allowlist_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Domain Allowlist",
        "tags": [
          "Knowledge Sources"
        ]
      },
      "put": {
        "operationId": "update_domain_allowlist_api_v1_knowledge_sources_governance_domain_allowlist_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDomainAllowlistUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Domain Allowlist",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/knowledge-sources/{source_id}": {
      "delete": {
        "operationId": "delete_knowledge_source_api_v1_knowledge_sources__source_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Knowledge Source",
        "tags": [
          "Knowledge Sources"
        ]
      },
      "get": {
        "operationId": "get_knowledge_source_api_v1_knowledge_sources__source_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSourceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Knowledge Source",
        "tags": [
          "Knowledge Sources"
        ]
      },
      "patch": {
        "operationId": "update_knowledge_source_api_v1_knowledge_sources__source_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeSourceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSourceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Knowledge Source",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/knowledge-sources/{source_id}/freshness": {
      "get": {
        "operationId": "get_freshness_api_v1_knowledge_sources__source_id__freshness_get",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSourceFreshnessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Freshness",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/knowledge-sources/{source_id}/sync": {
      "post": {
        "operationId": "trigger_sync_api_v1_knowledge_sources__source_id__sync_post",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSourceSyncResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Sync",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/knowledge-sources/{source_id}/sync-history": {
      "get": {
        "operationId": "get_sync_history_api_v1_knowledge_sources__source_id__sync_history_get",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeSyncEventResponse"
                  },
                  "title": "Response Get Sync History Api V1 Knowledge Sources  Source Id  Sync History Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Sync History",
        "tags": [
          "Knowledge Sources"
        ]
      }
    },
    "/api/v1/me/assigned-failures": {
      "get": {
        "description": "Return the caller's FAILED/BROKEN TestCase rows, newest first.\n\nPagination notes:\n  * ``unresolved_total`` is the same-filter total without pagination so\n    the sidebar badge stays accurate while the user is on page 2.\n  * ``total`` is the paginated total (matches ``items`` count summed\n    across pages) — currently equal to ``unresolved_total`` because we\n    don't yet have a \"resolved\" concept; future-proofed by keeping both\n    fields distinct now.",
        "operationId": "list_my_assigned_failures_api_v1_me_assigned_failures_get",
        "parameters": [
          {
            "description": "Project UUID or \"all\"",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project UUID or \"all\"",
              "title": "Project Id"
            }
          },
          {
            "description": "Time window (created_at)",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Time window (created_at)",
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "description": "Only failures from runs in this release. Repeatable (OR, at most 20): a release UUID or 'unattributed'.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only failures from runs in this release. Repeatable (OR, at most 20): a release UUID or 'unattributed'.",
              "title": "Release Id"
            }
          },
          {
            "description": "Only failures in these suites (effective suite, case-insensitive). Repeatable (OR, at most 50), 1-500 characters.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only failures in these suites (effective suite, case-insensitive). Repeatable (OR, at most 50), 1-500 characters.",
              "title": "Suite Name"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "description": "'mine' = caller's assigned failures only; 'team' = all failures across project (QA_LEAD/ADMIN only)",
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "default": "mine",
              "description": "'mine' = caller's assigned failures only; 'team' = all failures across project (QA_LEAD/ADMIN only)",
              "pattern": "^(mine|team)$",
              "title": "Scope",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyFailureListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List My Assigned Failures",
        "tags": [
          "My Failures"
        ]
      }
    },
    "/api/v1/me/assigned-failures/count": {
      "get": {
        "description": "Cheap COUNT for the sidebar badge — no row hydration.\n\nThe list endpoint already returns ``unresolved_total`` for pages it\nserves, but the sidebar polls independently of the page state, so a\ndedicated endpoint keeps the badge fresh without fetching 25 rows on\nevery poll.",
        "operationId": "my_assigned_failures_count_api_v1_me_assigned_failures_count_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "description": "Only failures from runs in this release. Repeatable (OR, at most 20): a release UUID or 'unattributed'.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only failures from runs in this release. Repeatable (OR, at most 20): a release UUID or 'unattributed'.",
              "title": "Release Id"
            }
          },
          {
            "description": "Only failures in these suites (effective suite, case-insensitive). Repeatable (OR, at most 50), 1-500 characters.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only failures in these suites (effective suite, case-insensitive). Repeatable (OR, at most 50), 1-500 characters.",
              "title": "Suite Name"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "default": "mine",
              "pattern": "^(mine|team)$",
              "title": "Scope",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "My Assigned Failures Count",
        "tags": [
          "My Failures"
        ]
      }
    },
    "/api/v1/me/assigned-failures/{test_case_id}/reassign": {
      "put": {
        "description": "Move a FAILED/BROKEN TestCase to a new owner.\n\nAuthorisation:\n  * Caller must be QA_LEAD or ADMIN on the failure's project.\n  * ``new_assignee_user_id`` must be EITHER the resolved suite owner\n    OR a QA_ENGINEER project member. Anyone else 422s — including\n    another QA_LEAD or ADMIN. The auto-assigner already covers\n    intra-Lead reassignment via its pool distribution.\n\nReturns the updated ``MyFailureItem`` so the frontend can drop the\nnew row into the (now-correct) owner's view without re-fetching the\nwhole list. The caller's own list shrinks by one on the next poll.",
        "operationId": "reassign_assigned_failure_api_v1_me_assigned_failures__test_case_id__reassign_put",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_reassign_assigned_failure_api_v1_me_assigned_failures__test_case_id__reassign_put"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyFailureItem"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reassign Assigned Failure",
        "tags": [
          "My Failures"
        ]
      }
    },
    "/api/v1/me/assigned-failures/{test_case_id}/reassign-options": {
      "get": {
        "description": "Picker payload for the reassign modal.\n\nReturns the resolved suite owner (when one exists) plus every\nQA_ENGINEER project member. The frontend renders these as the\nonly valid reassignment targets — anyone outside this set fails\nthe ``PUT .../reassign`` endpoint's 422 validation.\n\nSame authorisation contract as the PUT: caller must be QA_LEAD or\nADMIN on the project. Returning 403 here (instead of an empty\npayload) keeps the UI honest about WHY the picker is unavailable.",
        "operationId": "get_reassign_options_api_v1_me_assigned_failures__test_case_id__reassign_options_get",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Reassign Options",
        "tags": [
          "My Failures"
        ]
      }
    },
    "/api/v1/me/assigned-failures/{test_case_id}/triage": {
      "put": {
        "description": "Move a failure to a new ``triage_status``.\n\nStatuses (see ``TriageStatus`` enum):\n\n* ``PENDING_REVIEW``     — default; the row appears on /my-failures.\n* ``REVIEWED_APPROVED``  — looked at, no action. Known flake or\n                           environmental issue.\n* ``DEFECT_CREATED``     — defect/bug logged. ``notes`` typically\n                           holds the bug link.\n* ``WONT_FIX``           — deprecated test or accepted failure.\n                           ``notes`` typically holds the rationale.\n\nAuthorisation: the assignee themselves, OR a QA_LEAD / ADMIN on the\nproject. Anyone else 403s.\n\nThe row drops off ``GET /assigned-failures`` (and the count badge)\non the next poll once status moves off PENDING_REVIEW — that's the\nprimary mechanism for \"resolving\" an inbox item.",
        "operationId": "update_failure_triage_status_api_v1_me_assigned_failures__test_case_id__triage_put",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageStatusUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyFailureItem"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Failure Triage Status",
        "tags": [
          "My Failures"
        ]
      }
    },
    "/api/v1/me/data-export": {
      "post": {
        "description": "Queue an export of everything TestLookup holds about the caller (Art. 15 / 20). 409 ``export_running``\nnames the live job in ``detail.job_id``.",
        "operationId": "start_my_data_export_api_v1_me_data_export_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start My Data Export",
        "tags": [
          "Subject rights"
        ]
      }
    },
    "/api/v1/me/data-exports": {
      "get": {
        "description": "The caller's own exports of themselves, newest first (≤ 10; ``total`` counts all). Writes nothing.",
        "operationId": "list_my_data_exports_api_v1_me_data_exports_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectJobList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List My Data Exports",
        "tags": [
          "Subject rights"
        ]
      }
    },
    "/api/v1/memory/projects/{project_id}": {
      "get": {
        "description": "List memory entries for a project, optionally filtered by entity type.",
        "operationId": "list_project_memories_api_v1_memory_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Type"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentMemoryListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Project Memories",
        "tags": [
          "Agent Memory"
        ]
      }
    },
    "/api/v1/memory/projects/{project_id}/recall": {
      "post": {
        "description": "Find historically similar failures in the same project via semantic search.",
        "operationId": "recall_similar_memories_api_v1_memory_projects__project_id__recall_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimilarMemoryRecallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimilarMemoryRecallResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Recall Similar Memories",
        "tags": [
          "Agent Memory"
        ]
      }
    },
    "/api/v1/memory/runs/{run_id}/timeline": {
      "get": {
        "description": "Get all memory entries for a run, grouped by entity type.",
        "operationId": "get_run_memory_timeline_api_v1_memory_runs__run_id__timeline_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryTimelineResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Memory Timeline",
        "tags": [
          "Agent Memory"
        ]
      }
    },
    "/api/v1/metrics/detection-timing": {
      "get": {
        "description": "How long does this project wait to learn a test is flaky? (Roadmap Phase 6.)\n\nTwo-tier detection: a short-cadence screen of new and directly-modified\nfingerprints, plus a nightly pass over the whole corpus for the\nenvironment- and dependency-induced flakiness a diff cannot reach.\n\nThe cadence is expressed in **time**, not commits. A commit-count cadence\nassumes a commit range on most runs and enough of them to count; the Phase 0\ncensus measured zero of four genuine projects on the reference deployment\nclearing that, so such a cadence would simply never fire here.\n\nThe number worth reading is ``bottleneck``. On a thin corpus, detection is\nlimited by how often tests *run*, not by how often they are screened — a\nscore needs observations before it is defensible — and this says which term\ndominates from measured numbers rather than assuming the flattering one.\n\nLatency is reported only over fingerprints whose first appearance was\nactually observed; the rest are counted and excluded, not backfilled to a\nzero that would read as instant detection.\n\n``project_id`` is REQUIRED: detection latency is a claim about one\nproject's own history, so a fleet average would be meaningless.",
        "operationId": "detection_timing_api_v1_metrics_detection_timing_get",
        "parameters": [
          {
            "description": "Project to measure — detection latency is never a fleet average",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to measure — detection latency is never a fleet average",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 7,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Detection Timing",
        "tags": [
          "Metrics"
        ]
      }
    },
    "/api/v1/metrics/flaky-readiness": {
      "get": {
        "description": "Does this project have enough history to score flakiness at all?\n(Roadmap Phase 0 gate on the continuous-score work.)\n\nThe published evidence for probabilistic flakiness scoring comes from\nhyperscale monorepos; academic open-source corpora report per-test flake\nrates about an order of magnitude lower. A moving-window posterior needs\nruns *per fingerprint* to update a prior with — a test seen three times can\nonly produce a number that is mostly prior, which is fabricated confidence\nwearing a decimal point.\n\nSo this reports how many fingerprints clear the per-fingerprint run\nthreshold, the median runs per test, and a plain ``available`` verdict with\n``insufficient_data_reason`` when the corpus is too thin — the same honesty\ncontract as ``/metrics/tia-readiness``.\n\n``project_id`` is REQUIRED: corpus depth is a claim about one project's own\nhistory, so a fleet average would be meaningless.",
        "operationId": "flaky_readiness_api_v1_metrics_flaky_readiness_get",
        "parameters": [
          {
            "description": "Project to measure — readiness is never a fleet average",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to measure — readiness is never a fleet average",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 90,
              "maximum": 365,
              "minimum": 7,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Flaky Readiness",
        "tags": [
          "Metrics"
        ]
      }
    },
    "/api/v1/metrics/summary": {
      "get": {
        "description": "Return aggregated KPI metrics for the Executive Dashboard.\n\n``release_id`` and ``suite_name`` repeat: OR within a dimension, AND\nacross. Every release id is authorised (403/404) before any KPI runs.\n\nField-level exception: ``active_defects``, ``flaky_test_count`` and\n``new_failures_24h`` honour ``suite_name`` but NOT ``release_id`` -- they\nare project-wide inputs of the readiness verdict's hard caps\n(``DASHBOARD_RELEASE_UNSCOPED``). Every other figure honours both.",
        "operationId": "dashboard_summary_api_v1_metrics_summary_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-90.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-90.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Dashboard Summary",
        "tags": [
          "Metrics"
        ]
      }
    },
    "/api/v1/metrics/tia-readiness": {
      "get": {
        "description": "Is this project's commit-range corpus big enough to train test-impact\nanalysis on yet? (Epic 10 go/no-go.)\n\nCounts the runs whose commit range actually resolved AND carries\nper-commit changed files, the span they cover, and the distinct paths\nseen. Returns ``available: false`` with a concrete\n``insufficient_data_reason`` until every published threshold is met —\nthe same honesty contract as the value-metrics headline gate.\n\n``project_id`` is REQUIRED: readiness is a claim about one project's own\nchange/failure history, so there is no meaningful all-projects rollup.",
        "operationId": "tia_readiness_api_v1_metrics_tia_readiness_get",
        "parameters": [
          {
            "description": "Project to measure — readiness is never a fleet average",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to measure — readiness is never a fleet average",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 90,
              "maximum": 365,
              "minimum": 7,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Tia Readiness",
        "tags": [
          "Metrics"
        ]
      }
    },
    "/api/v1/metrics/trends": {
      "get": {
        "description": "Return daily pass/fail/skip breakdown for trend charts.",
        "operationId": "trend_data_api_v1_metrics_trends_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-90.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-90.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trend Data",
        "tags": [
          "Metrics"
        ]
      }
    },
    "/api/v1/notifications/history": {
      "get": {
        "operationId": "list_history_api_v1_notifications_history_get",
        "parameters": [
          {
            "in": "query",
            "name": "unread_only",
            "required": false,
            "schema": {
              "default": false,
              "title": "Unread Only",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationLogResponse"
                  },
                  "title": "Response List History Api V1 Notifications History Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List History",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/history/read-all": {
      "post": {
        "operationId": "mark_all_read_api_v1_notifications_history_read_all_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mark All Read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/history/unread-count": {
      "get": {
        "operationId": "unread_count_api_v1_notifications_history_unread_count_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Unread Count",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/history/{log_id}/read": {
      "post": {
        "operationId": "mark_read_api_v1_notifications_history__log_id__read_post",
        "parameters": [
          {
            "in": "path",
            "name": "log_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Log Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mark Read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/preferences": {
      "get": {
        "operationId": "list_preferences_api_v1_notifications_preferences_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationPreferenceResponse"
                  },
                  "title": "Response List Preferences Api V1 Notifications Preferences Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Preferences",
        "tags": [
          "Notifications"
        ]
      },
      "post": {
        "operationId": "upsert_preference_api_v1_notifications_preferences_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferenceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferenceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Preference",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/preferences/{pref_id}": {
      "delete": {
        "operationId": "delete_preference_api_v1_notifications_preferences__pref_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "pref_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pref Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Preference",
        "tags": [
          "Notifications"
        ]
      },
      "put": {
        "operationId": "update_preference_api_v1_notifications_preferences__pref_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "pref_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pref Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferenceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferenceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Preference",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/projects/{project_id}/transition-policy": {
      "get": {
        "description": "The project's transition-notification policy. A missing row means\nthe new-project defaults apply (transitions ON, per-run spam OFF).",
        "operationId": "get_transition_policy_api_v1_notifications_projects__project_id__transition_policy_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationTransitionPolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Transition Policy",
        "tags": [
          "Notifications"
        ]
      },
      "put": {
        "description": "Create or replace the project's transition-notification policy.\nQA_LEAD+.\n\nW09 NTF-02: records ``notification_policy.updated`` (outcome mode, the same\ntransaction as the upsert) when a field changed or the PUT created the\nproject's row; a PUT that changes nothing on an existing row records nothing.",
        "operationId": "update_transition_policy_api_v1_notifications_projects__project_id__transition_policy_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationTransitionPolicyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationTransitionPolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Transition Policy",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/test": {
      "post": {
        "operationId": "send_test_api_v1_notifications_test_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestNotificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Send Test",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/observability/frontend": {
      "post": {
        "description": "Accepts and logs a batch of frontend errors and Web Vitals.\nAlways returns 202 — the browser fires-and-forgets this call.",
        "operationId": "receive_frontend_telemetry_api_v1_observability_frontend_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FrontendTelemetryBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Receive frontend telemetry batch",
        "tags": [
          "Observability"
        ]
      }
    },
    "/api/v1/onboarding/events": {
      "get": {
        "description": "List recent product usage events for analytics. Requires ADMIN.\n\nF-044: this served **instance-wide** analytics to any authenticated caller.\n``get_usage_events`` applies no project filter when none is named, and the\nhandler bound the user to ``_`` — so it discarded the identity it would\nhave needed to scope by. A zero-membership VIEWER read another user's\n``user_id``, an inaccessible ``project_id``, and the raw ``event_payload``.\n\nADMIN-only rather than membership-scoped: this is cross-project analytics\nby nature, mirroring ``/audit-dashboard/export``, and it has no consumer —\nno frontend, CLI, MCP or SDK caller references it.",
        "operationId": "list_usage_events_api_v1_onboarding_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "event_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Name"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Usage Events",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/onboarding/track": {
      "post": {
        "description": "Track a product usage event for adoption analytics.\n\nA named project must be one the caller can access (QA-R3-2): the event is\nfiled under it, and ``GET /events`` reports it as that project's adoption.\n``resolve_project_scope`` answers 403 for a non-member and for a key bound\nto another project. An unparseable id is still dropped, as before, so the\nevent is filed under no project.",
        "operationId": "track_usage_event_api_v1_onboarding_track_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrackEventRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Track Usage Event",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/onboarding/{project_id}/complete": {
      "post": {
        "description": "Mark an onboarding step as completed.",
        "operationId": "mark_step_complete_api_v1_onboarding__project_id__complete_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mark Step Complete",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/onboarding/{project_id}/detect": {
      "post": {
        "description": "Auto-detect and update onboarding progress from existing data.",
        "operationId": "detect_progress_api_v1_onboarding__project_id__detect_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Detect Progress",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/onboarding/{project_id}/restore": {
      "post": {
        "description": "Un-skip an onboarding step, returning it to pending so it can be redone.",
        "operationId": "mark_step_restored_api_v1_onboarding__project_id__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mark Step Restored",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/onboarding/{project_id}/skip": {
      "post": {
        "description": "Mark an onboarding step as skipped.",
        "operationId": "mark_step_skipped_api_v1_onboarding__project_id__skip_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mark Step Skipped",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/onboarding/{project_id}/status": {
      "get": {
        "description": "Get onboarding progress for a project.",
        "operationId": "get_status_api_v1_onboarding__project_id__status_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Status",
        "tags": [
          "Onboarding"
        ]
      }
    },
    "/api/v1/performance/budgets": {
      "get": {
        "description": "Return all codified performance budgets and scale scenarios.",
        "operationId": "get_performance_budgets_api_v1_performance_budgets_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Performance Budgets",
        "tags": [
          "Performance"
        ]
      }
    },
    "/api/v1/performance/observed": {
      "get": {
        "description": "W17b ADM-06: observed p50/p95/p99 and request count per budgeted route, beside its budget.\n\n``source`` is ``prometheus`` when ``PROMETHEUS_URL`` answers, else ``in_app`` (measured by\nTestLookup on every API pod). A route with no requests in the window reads ``measured: false``.",
        "operationId": "get_observed_performance_api_v1_performance_observed_get",
        "parameters": [
          {
            "description": "15m, 1h or 24h",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "default": "1h",
              "description": "15m, 1h or 24h",
              "pattern": "^(15m|1h|24h)$",
              "title": "Window",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Observed Performance",
        "tags": [
          "Performance"
        ]
      }
    },
    "/api/v1/performance/search-config": {
      "get": {
        "description": "Return current search and indexing configuration.",
        "operationId": "get_search_config_api_v1_performance_search_config_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Search Config",
        "tags": [
          "Performance"
        ]
      }
    },
    "/api/v1/performance/slow-queries": {
      "get": {
        "description": "W17b ADM-06: the slowest statement shapes (no bound values). ADMIN: SQL text reveals the schema.",
        "operationId": "get_slow_queries_api_v1_performance_slow_queries_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Slow Queries",
        "tags": [
          "Performance"
        ]
      }
    },
    "/api/v1/project-data-jobs/{data_job_id}": {
      "get": {
        "description": "One export or import job (the page and the CLI poll it). Writes nothing.",
        "operationId": "get_project_data_job_api_v1_project_data_jobs__data_job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "data_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Data Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Project Data Job",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/project-data-jobs/{data_job_id}/download": {
      "get": {
        "description": "Stream a succeeded, unexpired export (``Content-Length`` = the stored size). 409 not an export / not\nready / failed, 410 expired, 502 when storage cannot give the first byte. Writes NOTHING.",
        "operationId": "download_project_export_api_v1_project_data_jobs__data_job_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "data_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Data Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Download Project Export",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/project-imports": {
      "get": {
        "description": "The caller's OWN import jobs, newest first. Writes nothing.",
        "operationId": "list_my_project_imports_api_v1_project_imports_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List My Project Imports",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/project-imports/uploads": {
      "post": {
        "description": "Open a parted upload (ADMIN): a NEW import job in ``uploading`` (201), or — the token checked FIRST — the\ncaller's existing non-failed job of that ``client_token`` (200, with its received parts or its later\nstatus). Then the name check (W24's order): 422 ``name_invalid`` / 409 ``name_taken``. Nothing is read.",
        "operationId": "start_import_upload_api_v1_project_imports_uploads_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectImportUploadStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start Import Upload",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/project-imports/uploads/{data_job_id}/complete": {
      "post": {
        "description": "Every part present at its planned size → ``queued``, COMMIT, then the worker is enqueued with the history\ntime limits (202). A repeat on a job already queued / running / finished → 200 with it (no second enqueue —\na lost one is the janitor's). 409 ``upload_incomplete`` names the missing parts; 409 ``upload_not_open``\nfor a failed / expired upload.",
        "operationId": "complete_import_upload_api_v1_project_imports_uploads__data_job_id__complete_post",
        "parameters": [
          {
            "in": "path",
            "name": "data_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Data Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Complete Import Upload",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/project-imports/uploads/{data_job_id}/parts/{part_number}": {
      "put": {
        "description": "One part (raw ``application/octet-stream``, ≤ 32 MiB) of the caller's own open upload. Checked before the\nbody is read: the job is this admin's import (else the ONE 404), still ``uploading`` (409\n``upload_not_open``), the part number in its plan (422 ``part_number_invalid``), ``X-Part-Sha256`` 64 hex\n(422 ``part_digest_mismatch``); the same part again with the same digest → 200, nothing rewritten; another\ndigest → 409 ``part_conflict``. Then the body is counted + hashed (413 ``part_too_large`` past 32 MiB, 422\n``part_digest_mismatch`` / ``upload_parts_invalid`` — in every case NOTHING is stored), the job row locked\n(``FOR UPDATE``), the part written as ONE object, its receipt recorded, ONE commit.",
        "operationId": "upload_import_part_api_v1_project_imports_uploads__data_job_id__parts__part_number__put",
        "parameters": [
          {
            "in": "path",
            "name": "data_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Data Job Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "part_number",
            "required": true,
            "schema": {
              "title": "Part Number",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-Part-Sha256",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Part-Sha256"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectImportPartReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upload Import Part",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "list_projects_api_v1_projects_get",
        "parameters": [
          {
            "description": "W17 ADM-04: also list archived projects, with when / by whom (ADMIN only; 403 otherwise).",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "W17 ADM-04: also list archived projects, with when / by whom (ADMIN only; 403 otherwise).",
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProjectResponse"
                  },
                  "title": "Response List Projects Api V1 Projects Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Projects",
        "tags": [
          "Projects"
        ]
      },
      "post": {
        "operationId": "create_project_api_v1_projects_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v1/projects/import": {
      "post": {
        "description": "Accept an export ZIP to import as a NEW project. The body is counted into a spool before any job\nrow exists (413 past 50 MB, nothing stored); a repeated ``client_token`` answers 200 with its job and\nreads nothing. Commit, then enqueue; 202.",
        "operationId": "start_project_import_api_v1_projects_import_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_start_project_import_api_v1_projects_import_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start Project Import",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/projects/{project_id}": {
      "delete": {
        "description": "Soft-delete a project and revoke everything that grants access to it.\n\nThe soft delete used to be the whole handler, which meant \"deleted\"\nrevoked nothing: the auto-provisioned QA-lead account stayed live, and\nany API key bound to the project kept authenticating and kept accepting\ningestion. See ``project_access_revocation_service`` for the measurements.",
        "operationId": "delete_project_api_v1_projects__project_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Project",
        "tags": [
          "Projects"
        ]
      },
      "get": {
        "operationId": "get_project_api_v1_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Project",
        "tags": [
          "Projects"
        ]
      },
      "put": {
        "description": "Update a project's attributes. Only non-None fields are applied. Requires QA_LEAD or higher.",
        "operationId": "update_project_api_v1_projects__project_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/activity": {
      "get": {
        "description": "One page of the project's activity, newest first.\n\nAny member of the project can read this — see the module docstring.",
        "operationId": "list_activity_api_v1_projects__project_id__activity_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable category filter",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable category filter",
              "title": "Category"
            }
          },
          {
            "description": "Repeatable event-type filter",
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable event-type filter",
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "description": "user|api_key|service_account|system|agent",
            "in": "query",
            "name": "actor_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "user|api_key|service_account|system|agent",
              "title": "Actor Type"
            }
          },
          {
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Type"
            }
          },
          {
            "in": "query",
            "name": "entity_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Id"
            }
          },
          {
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Release Id"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "description": "Free text over the summary; ignored under 3 characters",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Free text over the summary; ignored under 3 characters",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque keyset cursor from a previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque keyset cursor from a previous page",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Activity Api V1 Projects  Project Id  Activity Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Project activity feed (keyset paginated)",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/projects/{project_id}/activity/entity/{entity_type}/{entity_id}": {
      "get": {
        "description": "Embedded by run and release detail pages.",
        "operationId": "list_entity_timeline_api_v1_projects__project_id__activity_entity__entity_type___entity_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entity_type",
            "required": true,
            "schema": {
              "title": "Entity Type",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entity_id",
            "required": true,
            "schema": {
              "title": "Entity Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Entity Timeline Api V1 Projects  Project Id  Activity Entity  Entity Type   Entity Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Everything that happened to one entity",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/projects/{project_id}/activity/export": {
      "get": {
        "description": "Stream the history out as CSV or NDJSON. Lead-on-THIS-project only.\n\nCapped at ``EXPORT_MAX_ROWS``; a truncated export says so in a header\ninstead of silently returning a prefix that reads as the whole story.",
        "operationId": "export_activity_api_v1_projects__project_id__activity_export_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "csv",
              "pattern": "^(csv|ndjson)$",
              "title": "Format",
              "type": "string"
            }
          },
          {
            "description": "Repeatable category filter",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable category filter",
              "title": "Category"
            }
          },
          {
            "description": "Repeatable event-type filter",
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable event-type filter",
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "description": "user|api_key|service_account|system|agent",
            "in": "query",
            "name": "actor_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "user|api_key|service_account|system|agent",
              "title": "Actor Type"
            }
          },
          {
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Type"
            }
          },
          {
            "in": "query",
            "name": "entity_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Id"
            }
          },
          {
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Release Id"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "description": "Free text over the summary; ignored under 3 characters",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Free text over the summary; ignored under 3 characters",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque keyset cursor from a previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque keyset cursor from a previous page",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export the filtered activity history (QA_LEAD+)",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/projects/{project_id}/activity/stream": {
      "get": {
        "description": "New ledger rows of this project as Server-Sent Events, after their commit.\n\nDeclared ABOVE ``/{event_id}`` (else ``stream`` would 422 as a UUID). JWT\nonly: an API key polls the feed. Resume with the ``Last-Event-ID`` HEADER.\nThe request's pooled connection is released BEFORE the response starts and\nthe generator never touches Postgres: a held session per open tab would\nstarve the 2 + 1 pool. Redis is read with short non-blocking ``XRANGE``.",
        "operationId": "stream_activity_api_v1_projects__project_id__activity_stream_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Live tail of the project's activity (text/event-stream; signed-in sessions only)",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/projects/{project_id}/activity/{event_id}": {
      "get": {
        "description": "The drawer's payload. Registered LAST so the literal-segment routes\nabove (``export``, ``entity``) are matched before this UUID pattern.",
        "operationId": "get_activity_event_api_v1_projects__project_id__activity__event_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Event Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Activity Event Api V1 Projects  Project Id  Activity  Event Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "One activity event, with its before/after diff",
        "tags": [
          "Activity"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-actions": {
      "get": {
        "description": "The project's agent actions. ``view=pending`` is the queue (oldest first);\n``view=decided`` the recent decisions (newest decision first). ``pipeline_run_id``\n/ ``test_run_id`` filter INSIDE the path project: a foreign id matches nothing.",
        "operationId": "list_agent_actions_api_v1_projects__project_id__agent_actions_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "View"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "action_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 60,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Action Type"
            }
          },
          {
            "in": "query",
            "name": "pipeline_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pipeline Run Id"
            }
          },
          {
            "in": "query",
            "name": "test_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Test Run Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentActionListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Agent Actions",
        "tags": [
          "Agent Actions"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-actions/{action_id}": {
      "patch": {
        "description": "Approve, reject or undo one agent action. Nothing is written before every check passes.",
        "operationId": "transition_agent_action_api_v1_projects__project_id__agent_actions__action_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionTransitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentActionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Transition Agent Action",
        "tags": [
          "Agent Actions"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-configs": {
      "get": {
        "description": "Every configurable agent, with the defaults for agents nobody has configured.\n\n``tools`` maps every agent tool to the permission it needs (E4.3), so a\nclient can offer tools that are not in an allowlist today.",
        "operationId": "list_agent_configs_api_v1_projects__project_id__agent_configs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Agent Configs Api V1 Projects  Project Id  Agent Configs Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Agent Configs",
        "tags": [
          "Agent Configs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-configs/{agent_id}": {
      "get": {
        "operationId": "get_agent_config_api_v1_projects__project_id__agent_configs__agent_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Agent Config Api V1 Projects  Project Id  Agent Configs  Agent Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Agent Config",
        "tags": [
          "Agent Configs"
        ]
      },
      "put": {
        "description": "Replace this project's configuration of one agent (QA_LEAD+).",
        "operationId": "put_agent_config_api_v1_projects__project_id__agent_configs__agent_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentConfigV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Put Agent Config Api V1 Projects  Project Id  Agent Configs  Agent Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Agent Config",
        "tags": [
          "Agent Configs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-policies": {
      "get": {
        "deprecated": true,
        "description": "Every known agent's effective policy (defaults when no row exists).",
        "operationId": "list_agent_policies_api_v1_projects__project_id__agent_policies_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Agent Policies Api V1 Projects  Project Id  Agent Policies Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Agent Policies",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-policies/{agent_id}": {
      "put": {
        "deprecated": true,
        "description": "Retired write alias; agent-configs is the single writable resource.",
        "operationId": "update_agent_policy_api_v1_projects__project_id__agent_policies__agent_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Agent Policy Api V1 Projects  Project Id  Agent Policies  Agent Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Agent Policy",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agent-runs": {
      "get": {
        "description": "Paged AgentRunEntry ledger, newest first (AI-3).",
        "operationId": "list_agent_runs_api_v1_projects__project_id__agent_runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Agent Runs Api V1 Projects  Project Id  Agent Runs Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Agent Runs",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/analyses/lookup": {
      "get": {
        "description": "Latest AI analysis for a test fingerprint, project-scoped (US-2.4).\n\nBridges the Failure Analysis page (which identifies tests by\n``test_fingerprint``) to the feedback endpoints (which key on\n``analysis_id``). Returns 200 with null fields when no analysis exists.",
        "operationId": "lookup_latest_analysis_api_v1_projects__project_id__analyses_lookup_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fingerprint",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Fingerprint",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisLookupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Lookup Latest Analysis",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/projects/{project_id}/attribution-rules": {
      "get": {
        "description": "Rules for this project, in the order the ladder evaluates them.\n\nListed in evaluation order rather than by creation, because which rule wins\nis the whole question when two could match — sorting by anything else would\nshow a list that does not explain the outcome.",
        "operationId": "list_attribution_rules_api_v1_projects__project_id__attribution_rules_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Attribution Rules",
        "tags": [
          "Release Attribution Rules"
        ]
      },
      "post": {
        "description": "Create a rule. Rung 3 can fire for this project from the next run on.",
        "operationId": "create_attribution_rule_api_v1_projects__project_id__attribution_rules_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttributionRuleIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Attribution Rule",
        "tags": [
          "Release Attribution Rules"
        ]
      }
    },
    "/api/v1/projects/{project_id}/attribution-rules/fields": {
      "get": {
        "description": "The fields a rule can match on, with how each one matches (W11 REL-09).\n\nIn ``AttributionMatchField`` declaration order. Static: the vocabulary is\nthe ORM enum, the glob flag the evaluator's own set, so the handler runs\nno statement (the dependency checks the caller's access to the project).",
        "operationId": "list_attribution_rule_fields_api_v1_projects__project_id__attribution_rules_fields_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttributionRuleFieldsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Attribution Rule Fields",
        "tags": [
          "Release Attribution Rules"
        ]
      }
    },
    "/api/v1/projects/{project_id}/attribution-rules/preview": {
      "post": {
        "description": "Try a rule against recent runs WITHOUT saving it.\n\nThe failure mode of an attribution rule is not that it misses — it is that\nit captures everything, and every run still gets attributed so nothing looks\nwrong. ``matched`` against ``considered`` is the one number that tells those\napart before the rule starts deciding where real runs land.\n\nEvaluated with ``rule_matches`` — the same predicate the ladder uses — on an\nUNSAVED instance, so the preview cannot disagree with the rule it previews.\n\n``detail`` (W11 REL-09) adds where each matched run would really land\n(``_preview_detail``). ``rule_id`` names the rule being edited, so it is not\ncounted as an earlier rule shadowing itself; it is read only inside the\nPATH project (the access check above), so another project's rule id is\nsimply never found — the answer is the same as without it, no oracle.\nPlain defaults, not ``Query(...)``: tests call this handler directly.",
        "operationId": "preview_attribution_rule_api_v1_projects__project_id__attribution_rules_preview_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "detail",
            "required": false,
            "schema": {
              "default": false,
              "title": "Detail",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "rule_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rule Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttributionRuleIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttributionPreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Attribution Rule",
        "tags": [
          "Release Attribution Rules"
        ]
      }
    },
    "/api/v1/projects/{project_id}/attribution-rules/{rule_id}": {
      "delete": {
        "description": "Delete a rule.\n\nDeliberately does NOT re-attribute the runs it already matched. A link\ncarries ``link_source=rule_match`` and the release it produced; rewriting\nhistory because a rule was retired would change what a past gate decision\nwas based on, silently.",
        "operationId": "delete_attribution_rule_api_v1_projects__project_id__attribution_rules__rule_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "title": "Rule Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Attribution Rule",
        "tags": [
          "Release Attribution Rules"
        ]
      },
      "put": {
        "operationId": "update_attribution_rule_api_v1_projects__project_id__attribution_rules__rule_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "title": "Rule Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttributionRuleUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Attribution Rule",
        "tags": [
          "Release Attribution Rules"
        ]
      }
    },
    "/api/v1/projects/{project_id}/classification-hints": {
      "get": {
        "description": "Every hint of the project in precedence order (the oldest matching one is used).",
        "operationId": "list_classification_hints_api_v1_projects__project_id__classification_hints_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationHintList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Classification Hints",
        "tags": [
          "Classification hints"
        ]
      },
      "post": {
        "description": "Add a hint (QA lead). New analyses only: existing ones are not re-classified.",
        "operationId": "create_classification_hint_api_v1_projects__project_id__classification_hints_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassificationHintCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationHintResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Classification Hint",
        "tags": [
          "Classification hints"
        ]
      }
    },
    "/api/v1/projects/{project_id}/classification-hints/preview": {
      "get": {
        "description": "How many of the project's newest 200 failures of the last 30 days the rule would match. Writes nothing.",
        "operationId": "preview_classification_hint_api_v1_projects__project_id__classification_hints_preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "error_message | test_name | suite_name | class_name",
            "in": "query",
            "name": "match_field",
            "required": true,
            "schema": {
              "description": "error_message | test_name | suite_name | class_name",
              "maxLength": 20,
              "title": "Match Field",
              "type": "string"
            }
          },
          {
            "description": "The text to look for (3-200 characters, case-insensitive).",
            "in": "query",
            "name": "pattern",
            "required": true,
            "schema": {
              "description": "The text to look for (3-200 characters, case-insensitive).",
              "maxLength": 200,
              "title": "Pattern",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationHintPreview"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Classification Hint",
        "tags": [
          "Classification hints"
        ]
      }
    },
    "/api/v1/projects/{project_id}/classification-hints/{hint_id}": {
      "delete": {
        "description": "Delete a hint (QA lead). Analyses it already classified keep their answer.",
        "operationId": "delete_classification_hint_api_v1_projects__project_id__classification_hints__hint_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Hint Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Classification Hint",
        "tags": [
          "Classification hints"
        ]
      },
      "patch": {
        "description": "Change the fields sent (QA lead); a ledger row only when one really changed.",
        "operationId": "update_classification_hint_api_v1_projects__project_id__classification_hints__hint_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Hint Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassificationHintUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationHintResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Classification Hint",
        "tags": [
          "Classification hints"
        ]
      }
    },
    "/api/v1/projects/{project_id}/data-jobs": {
      "get": {
        "description": "The project's exports, newest first; ``total`` counts all of them. Writes nothing.",
        "operationId": "list_project_exports_api_v1_projects__project_id__data_jobs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 10,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Project Exports",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/projects/{project_id}/default-qa-lead/reset-password": {
      "post": {
        "description": "Reset the project's auto-provisioned QA-lead account password.\n\nA QA lead (or admin) of the project can call this — the account is a\nshared, per-project triage inbox, not a personal user, so rotating\nits password is a routine project-admin task. It is a QA_LEAD login,\nso nobody below that role may obtain it.\n\nIdempotently provisions the QA-lead user first if it doesn't exist\nyet (covers projects created before this feature shipped). Returns\nthe new password so the operator can hand it off; the response is\nnot persisted anywhere else.",
        "operationId": "reset_default_qa_lead_password_endpoint_api_v1_projects__project_id__default_qa_lead_reset_password_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reset Default Qa Lead Password Endpoint",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/defects/jira": {
      "post": {
        "description": "One-click defect creation from a failure signature. QA_ENGINEER+.\n\nThe user reviews the prefilled payload in the dialog first — this\nendpoint re-assembles it server-side (never trusts a client-edited\nstack trace) and applies dedup before filing anything.",
        "operationId": "create_jira_defect_one_click_api_v1_projects__project_id__defects_jira_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JiraDefectCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JiraDefectCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Jira Defect One Click",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/defects/jira/metadata": {
      "get": {
        "description": "Jira projects + issue types for the create dialog. Never 5xxs for a\nbroken Jira — returns ``available=false`` + ``reason`` instead.",
        "operationId": "jira_defect_metadata_api_v1_projects__project_id__defects_jira_metadata_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JiraDefectMetadataResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Jira Defect Metadata",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/defects/jira/preview": {
      "get": {
        "description": "Pre-filled Jira payload for the dialog's read-only preview.\n\n422 when neither ``fingerprint`` nor ``cluster_id`` is given; 404 when\nthe signature matches nothing in the project.",
        "operationId": "jira_defect_preview_api_v1_projects__project_id__defects_jira_preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fingerprint",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Fingerprint"
            }
          },
          {
            "in": "query",
            "name": "cluster_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cluster Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JiraDefectPreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Jira Defect Preview",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/defects/{defect_id}": {
      "patch": {
        "description": "Triage a defect: status, assignee, owner team, Jira link (DEF-01). QA_ENGINEER+.\n\nOnly the fields SENT change. Each step's failure leaves nothing written:\nthe Jira lookup (online only) runs with the request's connection handed\nback and BEFORE any write; the writes and their ledger rows commit\ntogether; the Jira status write-back runs after the commit and never\nundoes it.",
        "operationId": "update_defect_api_v1_projects__project_id__defects__defect_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "defect_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Defect Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefectPatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefectPatchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Defect",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/deletion/execute": {
      "post": {
        "description": "Execute a previewed set. Takes a JOB ID, never a criteria body.\n\nAccepting criteria here would re-resolve them, which is exactly the bug the\nfreeze exists to prevent: the set executed would not be the set reviewed.\n\nRefusals come from :func:`claim_frozen_set` — 404 for a missing or foreign\njob, 409 for one that is not ``previewed`` (which is what stops a\ndouble-submitted form deleting twice) and 409 on hash drift. The queued\ntransition is committed before dispatch so a second request cannot race\nthrough the same preview.",
        "operationId": "execute_criteria_deletion_api_v1_projects__project_id__deletion_execute_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeletionExecuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionExecuteAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Execute Criteria Deletion",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/deletion/jobs": {
      "get": {
        "description": "Deletions that have run for this project, newest first.\n\nThe purge already writes a never-purged record to ``settings_audit_log``,\nbut that row is written after the fact — it cannot say a job is running\nnow, and it cannot exist for one that failed. This is that view.",
        "operationId": "list_deletion_jobs_api_v1_projects__project_id__deletion_jobs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionJobListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Deletion Jobs",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/deletion/jobs/{job_id}": {
      "get": {
        "description": "One deletion job — the endpoint a 202 caller polls.\n\n404s when the job belongs to another project, rather than leaking that the\nid exists somewhere else.",
        "operationId": "get_deletion_job_api_v1_projects__project_id__deletion_jobs__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionJobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Deletion Job",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/deletion/jobs/{job_id}/acknowledge": {
      "post": {
        "description": "Confirm a collected archive was saved -> the job is queued for deletion.\n\nNeeds a recorded collect and the EXACT manifest SHA-256, inside the\ncollection window. The transition, its audit row and the ledger row commit\ntogether; the worker is dispatched after the commit (the minute relay\nrepublishes a lost message).",
        "operationId": "acknowledge_deletion_archive_api_v1_projects__project_id__deletion_jobs__job_id__acknowledge_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeletionAcknowledgeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionJobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Acknowledge Deletion Archive",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/deletion/jobs/{job_id}/collect": {
      "post": {
        "description": "Download a verified archive while its job awaits collection.\n\nStamps the FIRST collect and stages an ``export_collected`` audit row,\nthen opens the stored stream: a storage failure on the first chunk is a\n502 and rolls the stamp back (nothing recorded). Commits BEFORE returning\nthe stream; the stream touches storage only, never the session.",
        "operationId": "collect_deletion_archive_api_v1_projects__project_id__deletion_jobs__job_id__collect_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Collect Deletion Archive",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/deletion/preview": {
      "post": {
        "description": "Resolve a criteria set and FREEZE it for execution.\n\nThe freeze is the whole point (N3/N4). The nightly purge's candidate set is\na pure function of ``(policy, now)``, so re-resolving gives the same answer.\nCriteria are not: they read columns other code rewrites while the job sits\nqueued — ``TestRun.status`` by ``_update_run_aggregates`` and by\nlive-session close, ``primary_suite_name`` at session close. Execute is\nasynchronous, so re-resolving there would delete a different set from the\none an ADMIN reviewed. This materializes the ids and hashes them; execute\nreplays that set.\n\nRuns that cannot be deleted are reported HERE rather than discovered\nmid-execution, so the count an ADMIN authorises is the count that will go.",
        "operationId": "preview_criteria_deletion_api_v1_projects__project_id__deletion_preview_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionCriteria"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionPreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Criteria Deletion",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/duplicate-candidates": {
      "get": {
        "description": "List a project's duplicate-candidate review queue (paginated, filterable).\n\n``status`` defaults to ``open`` so the review queue shows actionable pairs;\npass ``status=`` (empty) is not supported — use an explicit value to widen.",
        "operationId": "list_duplicate_candidates_api_v1_projects__project_id__duplicate_candidates_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Filter: exact|strong|possible",
            "in": "query",
            "name": "band",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter: exact|strong|possible",
              "title": "Band"
            }
          },
          {
            "description": "Filter: open|merged|dismissed (default open)",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": "open",
              "description": "Filter: open|merged|dismissed (default open)",
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateCandidateListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Duplicate Candidates",
        "tags": [
          "Duplicate Detection"
        ]
      }
    },
    "/api/v1/projects/{project_id}/duplicate-candidates/detect": {
      "post": {
        "description": "Run a tiered detection sweep over the project's authored cases.\n\nThe service stages candidate rows + lazily backfills ``dup_fingerprint``;\nthis router owns the commit. ``semantic_used`` returned by the service is an\nextra key the response model ignores.",
        "operationId": "run_duplicate_detection_api_v1_projects__project_id__duplicate_candidates_detect_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Run the optional local-embedder semantic tier (best-effort)",
            "in": "query",
            "name": "enable_semantic",
            "required": false,
            "schema": {
              "default": true,
              "description": "Run the optional local-embedder semantic tier (best-effort)",
              "title": "Enable Semantic",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateDetectionRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Duplicate Detection",
        "tags": [
          "Duplicate Detection"
        ]
      }
    },
    "/api/v1/projects/{project_id}/duplicate-candidates/{candidate_id}/dismiss": {
      "post": {
        "description": "Dismiss a candidate pair (status → ``dismissed`` + suppression record).\n\nThe suppression row keeps the pair from resurfacing on the next detection\nrun. STAGE in the service; commit here.",
        "operationId": "dismiss_duplicate_candidate_api_v1_projects__project_id__duplicate_candidates__candidate_id__dismiss_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "candidate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Candidate Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Dismiss Duplicate Candidate",
        "tags": [
          "Duplicate Detection"
        ]
      }
    },
    "/api/v1/projects/{project_id}/duplicate-candidates/{candidate_id}/merge": {
      "post": {
        "description": "NON-DESTRUCTIVE merge: status → ``merged`` + optional soft-deprecate of the\nlosing case. Never deletes a case or redirects a fingerprint.\n\n``payload.candidate_id`` must match the path ``candidate_id`` (the path is\nauthoritative — a mismatch is a 400). ``keep_case_id`` must be one of the\npair's two cases (service raises → 400).",
        "operationId": "merge_duplicate_candidate_api_v1_projects__project_id__duplicate_candidates__candidate_id__merge_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "candidate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Candidate Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateMergeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Merge Duplicate Candidate",
        "tags": [
          "Duplicate Detection"
        ]
      }
    },
    "/api/v1/projects/{project_id}/export": {
      "post": {
        "description": "Queue an export of the project's settings + catalog (an archived project too: the access rule is\n``require_project_access``'s, unchanged). 409 ``export_running`` names the live job. W30: no body /\n``include_history: false`` == phase 1 exactly; ``include_history: true`` stores the options and dispatches\nwith the history time limits (422 ``history_window_invalid`` / ``max_runs_invalid`` for a bad body).",
        "operationId": "start_project_export_api_v1_projects__project_id__export_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ProjectExportRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDataJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start Project Export",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/projects/{project_id}/export-estimate": {
      "get": {
        "description": "What an export with these options would hold — counts only (the export's rule: QA lead or ADMIN with\naccess). Writes NOTHING (no job, no object, no cache). An unreachable Mongo / object store answers\n``measured[store] = false`` with NULL counts (200, never 0). ``history_days`` absent = all history.",
        "operationId": "estimate_project_export_api_v1_projects__project_id__export_estimate_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_history",
            "required": false,
            "schema": {
              "default": true,
              "title": "Include History",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "history_days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "History Days"
            }
          },
          {
            "in": "query",
            "name": "max_runs",
            "required": false,
            "schema": {
              "default": 2000,
              "title": "Max Runs",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectExportEstimate"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Estimate Project Export",
        "tags": [
          "Project data"
        ]
      }
    },
    "/api/v1/projects/{project_id}/fix-outcomes": {
      "post": {
        "description": "Record a fix outcome for a fingerprint.\n\nWrites an ``ai_feedback`` row with ``source=\"fix_outcome\"`` against the\nlatest analysis for the (project, fingerprint) pair — the AI-F1 label\nsystem maps that source into the ``human_indirect`` provenance bucket.\n404 when the fingerprint has never been analysed (nothing to grade).\nProject-scoped via ``require_project_access`` (authorization ratchet);\nany active project member may record an outcome, matching the feedback\nendpoints above.",
        "operationId": "record_fix_outcome_api_v1_projects__project_id__fix_outcomes_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixOutcomeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Record Fix Outcome",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/projects/{project_id}/fixer/attempts": {
      "get": {
        "description": "Paged FixAttempt list, newest first.",
        "operationId": "list_fixer_attempts_api_v1_projects__project_id__fixer_attempts_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Fixer Attempts Api V1 Projects  Project Id  Fixer Attempts Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Fixer Attempts",
        "tags": [
          "Fixer"
        ]
      }
    },
    "/api/v1/projects/{project_id}/fixer/config": {
      "get": {
        "deprecated": true,
        "description": "The project's effective FixerConfig (defaults when unconfigured).",
        "operationId": "get_fixer_config_api_v1_projects__project_id__fixer_config_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Fixer Config Api V1 Projects  Project Id  Fixer Config Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Fixer Config",
        "tags": [
          "Fixer"
        ]
      },
      "put": {
        "deprecated": true,
        "description": "Retired write alias; agent-configs is the single writable resource.",
        "operationId": "put_fixer_config_api_v1_projects__project_id__fixer_config_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Put Fixer Config Api V1 Projects  Project Id  Fixer Config Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Fixer Config",
        "tags": [
          "Fixer"
        ]
      }
    },
    "/api/v1/projects/{project_id}/fixer/run": {
      "post": {
        "description": "Trigger a manual fixer run (project QA_ENGINEER+).",
        "operationId": "start_fixer_run_api_v1_projects__project_id__fixer_run_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Start Fixer Run Api V1 Projects  Project Id  Fixer Run Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start Fixer Run",
        "tags": [
          "Fixer"
        ]
      }
    },
    "/api/v1/projects/{project_id}/flaky-coach": {
      "get": {
        "description": "Get project-level flaky test leaderboard with quarantine recommendations.\nRanked by impact score (failure_rate × frequency).",
        "operationId": "get_project_flaky_coach_api_v1_projects__project_id__flaky_coach_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Only flaky tests that ran in this release.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only flaky tests that ran in this release.",
              "title": "Release Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlakyCoachResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Project Flaky Coach",
        "tags": [
          "Test Health"
        ]
      }
    },
    "/api/v1/projects/{project_id}/flaky-coach/refresh": {
      "post": {
        "description": "Trigger a refresh of the flaky coach data for a project.\nRecomputes quarantine recommendations from test case history.",
        "operationId": "refresh_project_flaky_coach_api_v1_projects__project_id__flaky_coach_refresh_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Refresh Project Flaky Coach",
        "tags": [
          "Test Health"
        ]
      }
    },
    "/api/v1/projects/{project_id}/github-integration": {
      "delete": {
        "description": "Delete the GitHub integration row for a project. The stored PAT\nsecret is cleared from ``secret_service`` via the standard upsert\npath with an empty value.",
        "operationId": "delete_github_integration_api_v1_projects__project_id__github_integration_delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Github Integration",
        "tags": [
          "GitHub Integration"
        ]
      },
      "get": {
        "operationId": "get_github_integration_api_v1_projects__project_id__github_integration_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubIntegrationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Github Integration",
        "tags": [
          "GitHub Integration"
        ]
      },
      "put": {
        "description": "Create or replace the GitHub integration for a project. QA_LEAD+.",
        "operationId": "upsert_github_integration_api_v1_projects__project_id__github_integration_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitHubIntegrationWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubIntegrationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Github Integration",
        "tags": [
          "GitHub Integration"
        ]
      }
    },
    "/api/v1/projects/{project_id}/github-integration/test": {
      "post": {
        "description": "Probe the configured repo + PAT and report whether the\nintegration can actually reach GitHub. QA_LEAD+.",
        "operationId": "test_github_integration_api_v1_projects__project_id__github_integration_test_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubConnectionTestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Test Github Integration",
        "tags": [
          "GitHub Integration"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights": {
      "get": {
        "description": "The project's insights confirmed in the range (open first, then by\nseverity, newest first), the counts beside them, and the four detectors'\nlast evaluations -- a detector that could not measure says why.",
        "operationId": "list_project_insights_api_v1_projects__project_id__insights_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "How far back an insight must have been confirmed: 24h or 7d.",
            "in": "query",
            "name": "range",
            "required": false,
            "schema": {
              "default": "7d",
              "description": "How far back an insight must have been confirmed: 24h or 7d.",
              "title": "Range",
              "type": "string"
            }
          },
          {
            "description": "Also list the insights someone dismissed.",
            "in": "query",
            "name": "include_dismissed",
            "required": false,
            "schema": {
              "default": false,
              "description": "Also list the insights someone dismissed.",
              "title": "Include Dismissed",
              "type": "boolean"
            }
          },
          {
            "description": "Rows to return; `total` counts all.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Rows to return; `total` counts all.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Project Insights",
        "tags": [
          "Insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/insights/{insight_id}/dismiss": {
      "post": {
        "description": "Hide an insight for everyone in the project for the rest of its\nepisode (QA engineer or above). There is no un-dismiss; \"Show dismissed\"\nkeeps it readable.",
        "operationId": "dismiss_project_insight_api_v1_projects__project_id__insights__insight_id__dismiss_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "insight_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Insight Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightItem"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Dismiss Project Insight",
        "tags": [
          "Insights"
        ]
      }
    },
    "/api/v1/projects/{project_id}/integrations/gitlab": {
      "get": {
        "description": "Return the project's GitLab config (defaults when unconfigured).",
        "operationId": "get_gitlab_integration_api_v1_projects__project_id__integrations_gitlab_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitLabConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Gitlab Integration",
        "tags": [
          "GitLab Integration"
        ]
      },
      "put": {
        "description": "Create or replace the GitLab integration for a project. QA_LEAD+.\n\n``token`` is write-only: ``None`` leaves the stored PAT alone, ``\"\"``\nclears it, any value sets/rotates it.",
        "operationId": "upsert_gitlab_integration_api_v1_projects__project_id__integrations_gitlab_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitLabConfigWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitLabConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Gitlab Integration",
        "tags": [
          "GitLab Integration"
        ]
      }
    },
    "/api/v1/projects/{project_id}/integrations/gitlab/test": {
      "post": {
        "description": "Probe the configured project + PAT and report reachability. QA_LEAD+.",
        "operationId": "test_gitlab_integration_api_v1_projects__project_id__integrations_gitlab_test_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitLabConnectionTestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Test Gitlab Integration",
        "tags": [
          "GitLab Integration"
        ]
      }
    },
    "/api/v1/projects/{project_id}/investigations": {
      "get": {
        "description": "Paged InvestigationSummary list, newest first.",
        "operationId": "list_investigations_api_v1_projects__project_id__investigations_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Investigations Api V1 Projects  Project Id  Investigations Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Investigations",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/llm-quota": {
      "get": {
        "description": "Read the billing config for a project. QA_LEAD+ or project member.",
        "operationId": "get_project_quota_api_v1_projects__project_id__llm_quota_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmQuotaRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Project Quota",
        "tags": [
          "LLM Cost Budget"
        ]
      },
      "put": {
        "description": "Create or replace the billing config for a project. ADMIN only.",
        "operationId": "upsert_project_quota_api_v1_projects__project_id__llm_quota_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LlmQuotaWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmQuotaRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Project Quota",
        "tags": [
          "LLM Cost Budget"
        ]
      }
    },
    "/api/v1/projects/{project_id}/llm-usage": {
      "get": {
        "description": "Current-period usage with cap status, for the project overview card.",
        "operationId": "get_current_usage_api_v1_projects__project_id__llm_usage_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmUsageRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Current Usage",
        "tags": [
          "LLM Cost Budget"
        ]
      }
    },
    "/api/v1/projects/{project_id}/llm-usage/history": {
      "get": {
        "description": "Most recent ``limit`` billing periods for a project (default 12).",
        "operationId": "get_usage_history_api_v1_projects__project_id__llm_usage_history_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 12,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LlmUsageHistoryEntry"
                  },
                  "title": "Response Get Usage History Api V1 Projects  Project Id  Llm Usage History Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Usage History",
        "tags": [
          "LLM Cost Budget"
        ]
      }
    },
    "/api/v1/projects/{project_id}/members": {
      "get": {
        "description": "List all members of a project.",
        "operationId": "list_project_members_api_v1_projects__project_id__members_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProjectMemberResponse"
                  },
                  "title": "Response List Project Members Api V1 Projects  Project Id  Members Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Project Members",
        "tags": [
          "User Management"
        ]
      },
      "post": {
        "description": "Add a user to a project with a role. Requires QA_LEAD or higher.",
        "operationId": "add_project_member_api_v1_projects__project_id__members_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProjectMemberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMemberResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Add Project Member",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/projects/{project_id}/members/{user_id}": {
      "delete": {
        "description": "Remove a user from a project. Requires ADMIN.",
        "operationId": "remove_project_member_api_v1_projects__project_id__members__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Remove Project Member",
        "tags": [
          "User Management"
        ]
      },
      "patch": {
        "description": "Update a project member's role. Requires QA_LEAD or higher.",
        "operationId": "update_project_member_role_api_v1_projects__project_id__members__user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectMemberRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMemberResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Project Member Role",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/codeowners/coverage": {
      "get": {
        "description": "Percentage of recent failing-test paths matched by a ``path`` rule.\n\nBounded lookback (``days``, clamped 1-365) over a capped sample of recent\nFAILED/BROKEN test cases. ``coverage_pct`` is over the *locatable* failures.",
        "operationId": "codeowners_coverage_api_v1_projects__project_id__ownership_codeowners_coverage_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeownersCoverage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Codeowners Coverage",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/codeowners/import": {
      "post": {
        "description": "Import a GitHub CODEOWNERS file into ``path`` ownership rules (QA_LEAD+).\n\nTwo acquisition paths:\n  * ``source=\"text\"`` — the raw CODEOWNERS body is in ``payload.text``\n    (air-gapped / paste-upload). No egress.\n  * ``source=\"github\"`` — fetched over the configured GitHub connector.\n    422s (with the connector's reason) when offline / flag-off / not\n    configured / file absent, so the caller can surface why.\n\nIdempotent: replaces the project's prior CODEOWNERS-sourced rules only,\nleaving hand-authored rules untouched. This router owns the commit.",
        "operationId": "import_codeowners_api_v1_projects__project_id__ownership_codeowners_import_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeownersImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeownersImportResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Import Codeowners",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/resolve/{cluster_id}": {
      "get": {
        "description": "Resolve the probable owner for a specific failure cluster.",
        "operationId": "resolve_cluster_ownership_endpoint_api_v1_projects__project_id__ownership_resolve__cluster_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "title": "Cluster Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OwnershipResolution"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Resolve Cluster Ownership Endpoint",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/rules": {
      "get": {
        "description": "List all ownership rules for a project.",
        "operationId": "list_ownership_rules_api_v1_projects__project_id__ownership_rules_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OwnershipRuleResponse"
                  },
                  "title": "Response List Ownership Rules Api V1 Projects  Project Id  Ownership Rules Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Ownership Rules",
        "tags": [
          "Service Ownership"
        ]
      },
      "post": {
        "description": "Create a new ownership rule (QA_LEAD+).",
        "operationId": "create_ownership_rule_api_v1_projects__project_id__ownership_rules_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OwnershipRuleCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OwnershipRuleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Ownership Rule",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/rules/bulk-import": {
      "post": {
        "description": "Bulk import ownership rules (ADMIN only). Optionally replaces existing.",
        "operationId": "bulk_import_rules_api_v1_projects__project_id__ownership_rules_bulk_import_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OwnershipBulkImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OwnershipRuleResponse"
                  },
                  "title": "Response Bulk Import Rules Api V1 Projects  Project Id  Ownership Rules Bulk Import Post",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Bulk Import Rules",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/rules/export": {
      "get": {
        "description": "Export all ownership rules for a project (same as list, for import/export workflows).",
        "operationId": "export_ownership_rules_api_v1_projects__project_id__ownership_rules_export_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OwnershipRuleResponse"
                  },
                  "title": "Response Export Ownership Rules Api V1 Projects  Project Id  Ownership Rules Export Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Ownership Rules",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/rules/{rule_id}": {
      "delete": {
        "description": "Delete an ownership rule (QA_LEAD+).",
        "operationId": "delete_ownership_rule_api_v1_projects__project_id__ownership_rules__rule_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Rule Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Ownership Rule",
        "tags": [
          "Service Ownership"
        ]
      },
      "patch": {
        "description": "Update an ownership rule (QA_LEAD+).",
        "operationId": "update_ownership_rule_api_v1_projects__project_id__ownership_rules__rule_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Rule Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OwnershipRuleUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OwnershipRuleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Ownership Rule",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/source-roots": {
      "get": {
        "description": "The project's Java source roots, in priority order (any member).",
        "operationId": "get_source_roots_api_v1_projects__project_id__ownership_source_roots_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRootsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Source Roots",
        "tags": [
          "Service Ownership"
        ]
      },
      "put": {
        "description": "Replace the project's Java source roots (QA_LEAD+).\n\nThe whole list is sent and stored (stripped, a trailing ``/`` removed);\nan empty list removes every root and restores the pre-FAIL-08 behaviour.\nA ``project.updated`` ledger row is staged only when the stored list\nactually changes, and this router owns the single commit.",
        "operationId": "put_source_roots_api_v1_projects__project_id__ownership_source_roots_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceRootsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRootsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Source Roots",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/source-roots/preview": {
      "post": {
        "description": "What an EDITED list would locate over the project's recent failures\n(the coverage sample: newest 500 FAILED/BROKEN rows of 30 days). Writes\nnothing; the same 422 texts as the PUT.",
        "operationId": "preview_source_roots_api_v1_projects__project_id__ownership_source_roots_preview_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceRootsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRootsPreview"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Source Roots",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/team-channels": {
      "get": {
        "description": "List the team → notification-channel mappings for a project.\n\nTeams are the free-text ``team_name`` values used by the ownership\nrules; a mapping here makes transition notifications for tests owned\nby that team route directly to the team's channel.",
        "operationId": "list_team_channels_api_v1_projects__project_id__ownership_team_channels_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TeamChannelResponse"
                  },
                  "title": "Response List Team Channels Api V1 Projects  Project Id  Ownership Team Channels Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Team Channels",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/ownership/team-channels/{team_name}": {
      "delete": {
        "description": "Remove a team's notification channel (QA_LEAD+). Transition events\nfor that team's tests fall back to the project default channels.",
        "operationId": "delete_team_channel_api_v1_projects__project_id__ownership_team_channels__team_name__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "team_name",
            "required": true,
            "schema": {
              "title": "Team Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Team Channel",
        "tags": [
          "Service Ownership"
        ]
      },
      "put": {
        "description": "Create or replace the notification channel for one team (QA_LEAD+).",
        "operationId": "upsert_team_channel_api_v1_projects__project_id__ownership_team_channels__team_name__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "team_name",
            "required": true,
            "schema": {
              "title": "Team Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamChannelUpsert"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamChannelResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Team Channel",
        "tags": [
          "Service Ownership"
        ]
      }
    },
    "/api/v1/projects/{project_id}/quarantine/manifest": {
      "get": {
        "description": "CI-consumable manifest of currently-effective quarantines.\n\nReturns only tests whose quarantine is active right now (QUARANTINED,\nRECHECK_SCHEDULED, RE_QUARANTINED) — released / rejected / expired rows\nand un-reviewed proposals are excluded. Each entry carries the identity\ntuple a CI-side matcher needs: ``fingerprint`` (primary), plus\n``test_name`` / ``suite_name`` / ``class_name`` for name-based fallback.\n\nSends a content-hash ``ETag`` and honours ``If-None-Match`` with 304 so\nCI can poll cheaply. Empty when the ``flaky_auto_quarantine`` feature\nflag is off (quarantine isn't enforced anywhere in that state).",
        "operationId": "get_quarantine_manifest_api_v1_projects__project_id__quarantine_manifest_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-None-Match"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuarantineManifestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Quarantine Manifest",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/projects/{project_id}/quarantine/policy": {
      "get": {
        "description": "The project's quarantine lifecycle policy. A missing row means the\ncode defaults apply (SLA 14d, no auto-defect, no auto-promote, promote\nafter 20 passes, detection floor 20% over 10 runs).",
        "operationId": "get_quarantine_lifecycle_policy_api_v1_projects__project_id__quarantine_policy_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuarantineLifecyclePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Quarantine Lifecycle Policy",
        "tags": [
          "Flaky Quarantine"
        ]
      },
      "put": {
        "description": "Create or replace the project's quarantine lifecycle policy.\nQA_LEAD+ — flaky policy ownership is a QA Lead decision.\n\nW09 FLK-02: records ``quarantine_policy.updated`` on this session\n(committed with the policy) when a field changed or the PUT created the\nproject's row; a PUT that changes nothing on an existing row records\nnothing. ``before`` is the stored row, or the effective defaults.",
        "operationId": "update_quarantine_lifecycle_policy_api_v1_projects__project_id__quarantine_policy_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineLifecyclePolicyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuarantineLifecyclePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Quarantine Lifecycle Policy",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/projects/{project_id}/reports/analysis": {
      "get": {
        "description": "Build and return the self-contained HTML analysis report.",
        "operationId": "download_analysis_report_api_v1_projects__project_id__reports_analysis_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Report window: 1d (daily) or 7d (weekly).",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "default": "7d",
              "description": "Report window: 1d (daily) or 7d (weekly).",
              "enum": [
                "1d",
                "7d"
              ],
              "title": "Window",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Download Analysis Report",
        "tags": [
          "Analysis Report"
        ]
      }
    },
    "/api/v1/projects/{project_id}/reset": {
      "post": {
        "description": "Wipe project-scoped data. ADMIN-only.\n\n``mode=\"runs\"`` deletes every TestRun in the project (cascades to\ntest_cases, ai_analyses, failure_clusters, agent_pipeline_runs,\nrelease_decisions, etc.) but keeps the test_suites and canonical\ncatalog so the project's authored structure survives.\n\n``mode=\"full\"`` runs the ``runs`` deletes and then also wipes\ntest_suites, canonical_test_cases, releases, release_gate_policies,\nperf_baselines, flaky_quarantine_requests, managed_test_cases,\ntest_plans, test_strategies, and knowledge_sources. The Project\nrow, its members, API keys, and AI/SSO config survive.\n\nBoth modes first delete the runs' stored MongoDB documents; the\nper-collection counts are returned as ``documents``.\n\nTwo-step confirmation: ``payload.confirmation_name`` must equal\nthe project's ``name`` exactly (case-sensitive). A mismatch\nreturns 422 and nothing is deleted.",
        "operationId": "reset_project_data_api_v1_projects__project_id__reset_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectResetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResetResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reset Project Data",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/restore": {
      "post": {
        "description": "Bring an archived project back (W17 ADM-04). ADMIN only.\n\nArchive revoked the project's API keys and its default QA-lead account on\npurpose; restoring does NOT bring them back (new keys are one click; the\nQA lead is re-enabled by resetting its password from Members). Members\nkeep their memberships; runs and history are untouched. 409 when the\nproject is not archived.",
        "operationId": "restore_project_api_v1_projects__project_id__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRestoreResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Restore Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/retention-holds": {
      "get": {
        "description": "The project's retention holds — any member (and a key bound to the\nproject, read only). Writes nothing.\n\nEvery statement carries ``project_id``, so a QUERY ``entity_id`` of another\nproject matches nothing (200, empty) — no existence oracle. ``total`` is a\nCOUNT of the filter; ``counts`` the per-state totals (state filter ignored).",
        "operationId": "list_retention_holds_api_v1_projects__project_id__retention_holds_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "live",
              "title": "State",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Type"
            }
          },
          {
            "in": "query",
            "name": "entity_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionHoldListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Retention Holds",
        "tags": [
          "Retention"
        ]
      },
      "post": {
        "description": "Place a retention hold on the project, a release, a run or a compliance pack.\n\nThe BODY ``entity_id`` is resolved ``WHERE id AND project_id``: a release,\nrun or pack of another project is the same 404 as a missing one. One\n``retention_hold.placed`` ledger row and one ``settings_audit_log`` row are\ncommitted with the hold (a rolled-back place records nothing).",
        "operationId": "place_retention_hold_api_v1_projects__project_id__retention_holds_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionHoldCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionHoldRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Place Retention Hold",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/retention-holds/{hold_id}/release": {
      "post": {
        "description": "Release a live hold — ADMIN only, with a reason, audited.\n\n``hold_id`` is loaded ``WHERE id AND project_id … FOR UPDATE``: another\nproject's hold is the same 404. A released or expired hold is 409 (an\nexpired hold needs no release). One ``retention_hold.released`` ledger row\nand one ``settings_audit_log`` row are committed with the release.",
        "operationId": "release_retention_hold_api_v1_projects__project_id__retention_holds__hold_id__release_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hold_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Hold Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionHoldRelease"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionHoldRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Release Retention Hold",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/retention-policy": {
      "get": {
        "description": "Effective retention policy for a project (defaults when no row\nexists — the UI always renders the form) plus the latest purge.\n\nW22b ACT-06: every inheritable field is the EFFECTIVE per-field value\n(project, else the instance default, else the code default), with its\nsource, what it would read if inherited, the window, the pause and the\nnext scheduled purge.",
        "operationId": "get_retention_policy_api_v1_projects__project_id__retention_policy_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Retention Policy",
        "tags": [
          "Retention"
        ]
      },
      "put": {
        "description": "Upsert the project's retention policy. ADMIN-only — retention drives\na destructive scheduled purge. Omitted fields keep their current (or\ndefault) value; returns the effective policy.\n\nW22b ACT-06: ``purge_window_start_utc``, ``pause_days`` / ``resume`` and\n``inherit`` (the fields to reset to the inherited value); their refusals\nare 422 ``{\"code\", \"message\"}`` beside the existing plain-string 422.",
        "operationId": "put_retention_policy_api_v1_projects__project_id__retention_policy_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionPolicyWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Retention Policy",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/retention-policy/preview": {
      "post": {
        "description": "Dry-run the purge NOW (synchronous, read-only): per-class cutoffs and\ncandidate counts. Deliberately available while the policy is disabled.\n\nW22a: also what the purge would KEEP — the live holds and what each pins\n(``holds``), the keep-last floor (``floor``) — and the links the deletion\nwould break (``references_broken``, a warning; ``references_measured``\nfalse = not measured, never \"none\"). A hold read that fails fails the\npreview (500) rather than under-reporting what is kept.",
        "operationId": "preview_retention_purge_api_v1_projects__project_id__retention_policy_preview_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Retention Purge",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/retention-policy/purge": {
      "post": {
        "description": "Enqueue an execute-mode purge for THIS project (202).\n\nTwo-step confirmation: ``confirmation_name`` must equal the project's\nname exactly (422 on mismatch — the project-reset convention). 409\nwhile the policy is disabled.",
        "operationId": "enqueue_retention_purge_api_v1_projects__project_id__retention_policy_purge_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionPurgeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPurgeQueued"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Enqueue Retention Purge",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/reviews": {
      "get": {
        "description": "The project's review queue, newest first. ``?state=pending_review`` for the open queue.",
        "operationId": "list_reviews_api_v1_projects__project_id__reviews_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending_review",
                    "accepted",
                    "rejected",
                    "superseded"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReviewResponse"
                  },
                  "title": "Response List Reviews Api V1 Projects  Project Id  Reviews Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Reviews",
        "tags": [
          "Reviews"
        ]
      }
    },
    "/api/v1/projects/{project_id}/run-cadences": {
      "get": {
        "description": "The project's expected cadences (at most 20); ``total`` is the full count.",
        "operationId": "list_run_cadences_api_v1_projects__project_id__run_cadences_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCadenceList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Run Cadences",
        "tags": [
          "Expected runs"
        ]
      },
      "post": {
        "description": "Add an expected cadence (QA lead or above; a project-bound key is refused).",
        "operationId": "create_run_cadence_api_v1_projects__project_id__run_cadences_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunCadenceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCadenceRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Run Cadence",
        "tags": [
          "Expected runs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/run-cadences/status": {
      "get": {
        "description": "Met / missed / paused / pending windows per cadence in the last ``days`` days (writes nothing).",
        "operationId": "run_cadence_status_api_v1_projects__project_id__run_cadences_status_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "The window: the last N days (1-90).",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 14,
              "description": "The window: the last N days (1-90).",
              "maximum": 90,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCadenceStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Cadence Status",
        "tags": [
          "Expected runs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/run-cadences/{cadence_id}": {
      "delete": {
        "description": "Remove an expected cadence; its window history goes with it.",
        "operationId": "delete_run_cadence_api_v1_projects__project_id__run_cadences__cadence_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cadence_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Cadence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Run Cadence",
        "tags": [
          "Expected runs"
        ]
      },
      "patch": {
        "description": "Change the fields sent; a change re-defines the expectation from now. Nothing changed → nothing written.",
        "operationId": "update_run_cadence_api_v1_projects__project_id__run_cadences__cadence_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cadence_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Cadence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunCadencePatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCadenceRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Run Cadence",
        "tags": [
          "Expected runs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/run-cadences/{cadence_id}/pause": {
      "post": {
        "description": "Pause the EXPECTATION (never CI) until a time ≤ 90 days away, with a reason; no alerts meanwhile.",
        "operationId": "pause_run_cadence_api_v1_projects__project_id__run_cadences__cadence_id__pause_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cadence_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Cadence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunCadencePauseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCadenceRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Pause Run Cadence",
        "tags": [
          "Expected runs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/run-cadences/{cadence_id}/resume": {
      "post": {
        "description": "End a current pause; the next deadline is expected again (decided paused windows stay paused).",
        "operationId": "resume_run_cadence_api_v1_projects__project_id__run_cadences__cadence_id__resume_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "cadence_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Cadence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCadenceRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Resume Run Cadence",
        "tags": [
          "Expected runs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/storage": {
      "get": {
        "description": "Storage footprint for this project, per store (S3).\n\nRead-only. ADMIN-gated like the rest of this router's writes: the figure\nis the blast radius of a purge, so it is not a general-membership read.\n\nA store that cannot be reached comes back ``measured=False`` with null\nfigures rather than a zero — the endpoint degrades per store instead of\n500-ing, because a page whose whole job is reporting is more useful\npartially right than absent.",
        "operationId": "get_project_storage_api_v1_projects__project_id__storage_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectStorageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Project Storage",
        "tags": [
          "Retention"
        ]
      }
    },
    "/api/v1/projects/{project_id}/systemic-clusters/epics": {
      "get": {
        "description": "The cluster list's one status read (reads only; no Jira call while Jira is unavailable).",
        "operationId": "cluster_epic_status_api_v1_projects__project_id__systemic_clusters_epics_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterEpicStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cluster Epic Status",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/systemic-clusters/{membership_key}/epic": {
      "post": {
        "description": "File one Jira epic for a recurring cluster (QA_ENGINEER+, the project's opt-in on).\n\n201 ``created: true`` when this request stored the link; 200 ``created: false`` when an epic was\nalready stored for this member set (nothing is sent to Jira). The router owns the unit of work:\nthe link row and its activity row commit together.",
        "operationId": "create_cluster_epic_api_v1_projects__project_id__systemic_clusters__membership_key__epic_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "membership_key",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "title": "Membership Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClusterEpicCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterEpicCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Cluster Epic",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/systemic-clusters/{membership_key}/epic/preview": {
      "get": {
        "description": "The epic this person would file for this cluster (its description names them as the filer).\n404 gone, 422 ``not_recurring``.",
        "operationId": "cluster_epic_preview_api_v1_projects__project_id__systemic_clusters__membership_key__epic_preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "membership_key",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "title": "Membership Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterEpicPreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cluster Epic Preview",
        "tags": [
          "Defects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/timeline-notes": {
      "get": {
        "description": "The notes overlapping ``from`` .. ``to`` (inclusive), at most 200.",
        "operationId": "list_timeline_notes_api_v1_projects__project_id__timeline_notes_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "The window's first UTC day (YYYY-MM-DD).",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "The window's first UTC day (YYYY-MM-DD).",
              "format": "date",
              "title": "From",
              "type": "string"
            }
          },
          {
            "description": "The window's last UTC day; at most 366 days after `from`.",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "The window's last UTC day; at most 366 days after `from`.",
              "format": "date",
              "title": "To",
              "type": "string"
            }
          },
          {
            "description": "Keep the project-wide notes and this suite's (any case). Omit for every note.",
            "in": "query",
            "name": "suite",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Keep the project-wide notes and this suite's (any case). Omit for every note.",
              "title": "Suite"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineNoteList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Timeline Notes",
        "tags": [
          "Timeline notes"
        ]
      },
      "post": {
        "description": "Pin a note on one UTC day or a day range (QA engineer or above).",
        "operationId": "create_timeline_note_api_v1_projects__project_id__timeline_notes_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimelineNoteCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineNoteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Timeline Note",
        "tags": [
          "Timeline notes"
        ]
      }
    },
    "/api/v1/projects/{project_id}/timeline-notes/{note_id}": {
      "delete": {
        "description": "Remove a note (the author or a QA lead).",
        "operationId": "delete_timeline_note_api_v1_projects__project_id__timeline_notes__note_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Timeline Note",
        "tags": [
          "Timeline notes"
        ]
      },
      "patch": {
        "description": "Change the fields sent (the author or a QA lead); a ledger row only when one changed.",
        "operationId": "update_timeline_note_api_v1_projects__project_id__timeline_notes__note_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimelineNoteUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineNoteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Timeline Note",
        "tags": [
          "Timeline notes"
        ]
      }
    },
    "/api/v1/projects/{project_id}/value-metrics/assumptions": {
      "get": {
        "description": "Effective hours-saved assumptions for a project (defaults when no\nrow exists — the UI always renders the form).",
        "operationId": "get_value_metric_assumptions_api_v1_projects__project_id__value_metrics_assumptions_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValueMetricAssumptionsRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Value Metric Assumptions",
        "tags": [
          "Value Metrics"
        ]
      },
      "put": {
        "description": "Upsert the project's assumptions row. QA_LEAD+. Omitted fields keep\ntheir current (or default) value; returns the effective assumptions.",
        "operationId": "put_value_metric_assumptions_api_v1_projects__project_id__value_metrics_assumptions_put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValueMetricAssumptionsWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValueMetricAssumptionsRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Value Metric Assumptions",
        "tags": [
          "Value Metrics"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows": {
      "get": {
        "operationId": "list_workflows_api_v1_projects__project_id__workflows_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Workflows Api V1 Projects  Project Id  Workflows Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Workflows",
        "tags": [
          "Workflows"
        ]
      },
      "post": {
        "operationId": "create_workflow_api_v1_projects__project_id__workflows_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowBodyV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Workflow Api V1 Projects  Project Id  Workflows Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/defaults": {
      "get": {
        "description": "Both bases' defaults (a fork, or the built-in). Any member; writes nothing.",
        "operationId": "get_workflow_defaults_api_v1_projects__project_id__workflows_defaults_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefaultsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Workflow Defaults",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/defaults/{base}": {
      "delete": {
        "description": "Clear the ``base`` default: new runs use the built-in again. 204 also\nwhen there was none (nothing changed, nothing recorded).",
        "operationId": "delete_workflow_default_api_v1_projects__project_id__workflows_defaults__base__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "base",
            "required": true,
            "schema": {
              "title": "Base",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Workflow Default",
        "tags": [
          "Workflows"
        ]
      },
      "put": {
        "description": "Make a PUBLISHED fork of this project the ``base`` default for new runs.\n\nThe fork resolves in THIS project only; the publish route's semantic\nvalidation runs first and a definition it refuses is a 422 here too.",
        "operationId": "put_workflow_default_api_v1_projects__project_id__workflows_defaults__base__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "base",
            "required": true,
            "schema": {
              "title": "Base",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefaultUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefaultRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Workflow Default",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/{workflow_id}": {
      "delete": {
        "operationId": "delete_workflow_api_v1_projects__project_id__workflows__workflow_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Workflow",
        "tags": [
          "Workflows"
        ]
      },
      "get": {
        "operationId": "get_workflow_api_v1_projects__project_id__workflows__workflow_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Workflow Api V1 Projects  Project Id  Workflows  Workflow Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Workflow",
        "tags": [
          "Workflows"
        ]
      },
      "put": {
        "operationId": "update_workflow_api_v1_projects__project_id__workflows__workflow_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowBodyV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Workflow Api V1 Projects  Project Id  Workflows  Workflow Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/{workflow_id}/evaluate": {
      "post": {
        "operationId": "evaluate_workflow_api_v1_projects__project_id__workflows__workflow_id__evaluate_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowEvaluateV1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Evaluate Workflow Api V1 Projects  Project Id  Workflows  Workflow Id  Evaluate Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Evaluate Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/{workflow_id}/fork": {
      "post": {
        "operationId": "fork_workflow_api_v1_projects__project_id__workflows__workflow_id__fork_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowForkV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Fork Workflow Api V1 Projects  Project Id  Workflows  Workflow Id  Fork Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Fork Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/{workflow_id}/publish": {
      "post": {
        "operationId": "publish_workflow_api_v1_projects__project_id__workflows__workflow_id__publish_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowPublishV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Publish Workflow Api V1 Projects  Project Id  Workflows  Workflow Id  Publish Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Publish Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/projects/{project_id}/workflows/{workflow_id}/validate": {
      "post": {
        "operationId": "validate_workflow_api_v1_projects__project_id__workflows__workflow_id__validate_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "title": "Workflow Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Validate Workflow Api V1 Projects  Project Id  Workflows  Workflow Id  Validate Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Validate Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/api/v1/quarantine": {
      "get": {
        "description": "List quarantine requests visible to the caller.\n\nNon-admin callers see only projects they're members of. Admins see\neverything. The ``status_filter`` parameter accepts any value from\n``FlakyQuarantineStatus``.",
        "operationId": "list_quarantine_requests_api_v1_quarantine_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "query",
            "name": "live_only",
            "required": false,
            "schema": {
              "default": false,
              "title": "Live Only",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FlakyQuarantineRead"
                  },
                  "title": "Response List Quarantine Requests Api V1 Quarantine Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Quarantine Requests",
        "tags": [
          "Flaky Quarantine"
        ]
      },
      "post": {
        "description": "Manually propose a test for quarantine. QA_LEAD+ only.",
        "operationId": "create_proposal_api_v1_quarantine_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineProposeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlakyQuarantineRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Proposal",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/quarantine/stats": {
      "get": {
        "description": "Return status counts for the UI header.",
        "operationId": "get_quarantine_stats_api_v1_quarantine_stats_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuarantineStatsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Quarantine Stats",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/quarantine/{request_id}": {
      "get": {
        "operationId": "get_quarantine_request_api_v1_quarantine__request_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Request Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlakyQuarantineRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Quarantine Request",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/quarantine/{request_id}/approve": {
      "post": {
        "operationId": "approve_quarantine_api_v1_quarantine__request_id__approve_post",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Request Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlakyQuarantineRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Approve Quarantine",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/quarantine/{request_id}/reject": {
      "post": {
        "operationId": "reject_quarantine_api_v1_quarantine__request_id__reject_post",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Request Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlakyQuarantineRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reject Quarantine",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/quarantine/{request_id}/release": {
      "post": {
        "operationId": "release_quarantine_api_v1_quarantine__request_id__release_post",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Request Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlakyQuarantineRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Release Quarantine",
        "tags": [
          "Flaky Quarantine"
        ]
      }
    },
    "/api/v1/release-gate-policies": {
      "get": {
        "description": "List all release gate policies with optional filters.",
        "operationId": "list_policies_api_v1_release_gate_policies_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Active"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                  },
                  "title": "Response List Policies Api V1 Release Gate Policies Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Policies",
        "tags": [
          "Release Gate Policies"
        ]
      },
      "post": {
        "description": "Create a new draft policy (ADMIN only).\n\nA project-bound API key may create drafts for its own project only, never\nfor another project or the system default (re-audit N20).",
        "operationId": "create_policy_api_v1_release_gate_policies_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseGatePolicyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Policy",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/effective/{project_id}": {
      "get": {
        "description": "Get the resolved effective policy for a project (project → system → None).",
        "operationId": "get_effective_policy_api_v1_release_gate_policies_effective__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Effective Policy Api V1 Release Gate Policies Effective  Project Id  Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Effective Policy",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/history/{project_id}": {
      "get": {
        "description": "Get all policy versions for a project scope, ordered by version desc.",
        "operationId": "get_policy_history_api_v1_release_gate_policies_history__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                  },
                  "title": "Response Get Policy History Api V1 Release Gate Policies History  Project Id  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Policy History",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/simulate": {
      "post": {
        "description": "Simulate a draft policy against a past run's decision data.",
        "operationId": "simulate_policy_api_v1_release_gate_policies_simulate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicySimulateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicySimulateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Simulate Policy",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/system-history": {
      "get": {
        "description": "Get all system default policy versions, ordered by version desc.",
        "operationId": "get_system_policy_history_api_v1_release_gate_policies_system_history_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                  },
                  "title": "Response Get System Policy History Api V1 Release Gate Policies System History Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get System Policy History",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/{policy_id}": {
      "get": {
        "description": "Get a single release gate policy by ID.",
        "operationId": "get_policy_api_v1_release_gate_policies__policy_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "policy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Policy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Policy",
        "tags": [
          "Release Gate Policies"
        ]
      },
      "patch": {
        "description": "Update a draft policy (ADMIN only). Fails if already published.",
        "operationId": "update_policy_api_v1_release_gate_policies__policy_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "policy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Policy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseGatePolicyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Policy",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/{policy_id}/deactivate": {
      "post": {
        "description": "Deactivate a policy (falls back to system default or hardcoded).",
        "operationId": "deactivate_policy_api_v1_release_gate_policies__policy_id__deactivate_post",
        "parameters": [
          {
            "in": "path",
            "name": "policy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Policy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Deactivate Policy",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-gate-policies/{policy_id}/publish": {
      "post": {
        "description": "Publish a draft policy: deactivates any previous active policy for the same scope.",
        "operationId": "publish_policy_api_v1_release_gate_policies__policy_id__publish_post",
        "parameters": [
          {
            "in": "path",
            "name": "policy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Policy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseGatePolicyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Publish Policy",
        "tags": [
          "Release Gate Policies"
        ]
      }
    },
    "/api/v1/release-readiness/{run_id}": {
      "get": {
        "description": "Retrieve the release readiness decision with full council context:\ndimension scores, linked cluster insights, baseline diff, open defects,\nand override audit trail.",
        "operationId": "get_release_decision_api_v1_release_readiness__run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "While the review gate is enforced, return ADVISORY_<value> for an unreviewed AI decision instead of PENDING_REVIEW.",
            "in": "query",
            "name": "allow_advisory",
            "required": false,
            "schema": {
              "default": false,
              "description": "While the review gate is enforced, return ADVISORY_<value> for an unreviewed AI decision instead of PENDING_REVIEW.",
              "title": "Allow Advisory",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseCouncilResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Release Decision",
        "tags": [
          "Release Readiness"
        ]
      }
    },
    "/api/v1/release-readiness/{run_id}/override": {
      "post": {
        "description": "Override the AI release decision (QA Lead only).\nRecords the override in an immutable audit trail with before/after values.",
        "operationId": "override_release_decision_api_v1_release_readiness__run_id__override_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseCouncilOverrideRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseCouncilResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Override Release Decision",
        "tags": [
          "Release Readiness"
        ]
      }
    },
    "/api/v1/releases": {
      "get": {
        "operationId": "list_releases_api_v1_releases_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Releases",
        "tags": [
          "Releases"
        ]
      },
      "post": {
        "operationId": "create_release_api_v1_releases_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Release",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/portfolio-trend": {
      "get": {
        "description": "The release KPI cards' trend (REL-03): each card's rule at ``weeks`` week ends and now.\n\n``project_id`` is resolved FIRST; without it, every project the caller can\nsee. Four statements; a GET that writes and caches nothing (the page asks\nonly when the \"Release health\" disclosure is open).",
        "operationId": "get_release_portfolio_trend_api_v1_releases_portfolio_trend_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "weeks",
            "required": false,
            "schema": {
              "default": 12,
              "maximum": 26,
              "minimum": 4,
              "title": "Weeks",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleasePortfolioTrend"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Release Portfolio Trend",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/schedule.csv": {
      "get": {
        "description": "The release schedule as CSV (REL-06): one row per phase, formula-guarded, a BOM.\n\nScoped exactly like the ICS twin; a cancelled release IS listed, with its\nstatus. A GET: writes nothing.",
        "operationId": "export_release_schedule_csv_api_v1_releases_schedule_csv_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Release Schedule Csv",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/schedule.ics": {
      "get": {
        "description": "The release schedule as an iCalendar file (REL-06): download only, no token in any URL.\n\n``project_id`` is resolved FIRST (400 malformed, 403 foreign); without it\nthe file covers every project the caller can see. A cancelled release is\nnot on the calendar. A GET: writes nothing.",
        "operationId": "export_release_schedule_ics_api_v1_releases_schedule_ics_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Release Schedule Ics",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/sync": {
      "post": {
        "description": "Pull releases in from GitHub milestones or Jira fix versions.\n\n**Why this endpoint exists at all.** ``sync_milestones`` and\n``sync_fix_versions`` shipped complete, gated and tested, and nothing\ncalled either of them -- so rung 2 of the attribution ladder (\"the run's\nexternal match\") could never fire in production, because nothing created a\nrelease carrying a ``source_system`` for it to match against. Two finished\nfeatures were unreachable behind a missing route.\n\n**Manual, not scheduled.** No beat entry: ``AI_OFFLINE_MODE`` defaults to\nTrue and a periodic job that egresses on its own is a materially larger\nchange than making a finished feature reachable. A person asking for a sync\nis also the point at which a 503 explaining WHY it cannot run is useful.\n\nOnly identity is written -- name, external id, external url. A synced\nrelease's phases, criteria, gate policy and run attribution are never\ntouched, because those are TestLookup's and neither GitHub nor Jira knows\nanything about them.",
        "operationId": "sync_releases_from_external_api_v1_releases_sync_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseSyncIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Sync Releases From External",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}": {
      "delete": {
        "operationId": "delete_release_api_v1_releases__release_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Release",
        "tags": [
          "Releases"
        ]
      },
      "get": {
        "operationId": "get_release_api_v1_releases__release_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Release",
        "tags": [
          "Releases"
        ]
      },
      "put": {
        "operationId": "update_release_api_v1_releases__release_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Release",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/activate": {
      "post": {
        "description": "Make this the project's active release.\n\nThe active release is where a run lands when nothing else claims it — the\nattribution ladder's terminal rung. It has been a real, enforced concept\nsince S0 (one per project, guarded by ``ix_releases_project_active``, with\nactivation history behind it), and until now it could only ever be chosen\nFOR the user by the ingestion ladder and the rotation beat.\n``activate_release`` was written complete, with its ``reason=\"manual\"``\ndefault, for a caller that never arrived.\n\nBoth guards, not one: ``require_role`` gates by ROLE and knows nothing about\nwhich project this release belongs to, so a QA lead of one project could\notherwise redirect another project's attribution.\n\nThe swap itself stays in ``release_lifecycle_service`` — it contains a\nload-bearing flush between the demote and the promote, because SQLAlchemy\norders persistent UPDATEs by primary key and ``Release.id`` is a random\nuuid4, so without it half of all orderings present two active rows to a\npartial unique index. Writing ``is_active`` here instead would route around\nthat.",
        "operationId": "activate_release_endpoint_api_v1_releases__release_id__activate_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Activate Release Endpoint",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/compliance-pack": {
      "post": {
        "description": "Generate a new compliance pack for a release. QA_LEAD+ only.",
        "operationId": "generate_compliance_pack_api_v1_releases__release_id__compliance_pack_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompliancePackGenerateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePackRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Generate Compliance Pack",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/releases/{release_id}/compliance-packs": {
      "get": {
        "description": "List every historical pack ever generated for a release.\n\nW22a: each pack carries ``holds`` — every LIVE retention hold covering it\n(the project's, the pack's own, its release's), from ONE read after the\npacks, so the release page needs no extra request.",
        "operationId": "list_compliance_packs_api_v1_releases__release_id__compliance_packs_get",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CompliancePackRead"
                  },
                  "title": "Response List Compliance Packs Api V1 Releases  Release Id  Compliance Packs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Compliance Packs",
        "tags": [
          "Compliance Pack"
        ]
      }
    },
    "/api/v1/releases/{release_id}/gate": {
      "get": {
        "description": "The standing verdict for this release, read from the stored snapshot.\n\nDeliberately does NOT recompute. Recomputing would restate a past verdict\nunder today's runs and today's policy, which is what the snapshot columns on\n``ReleaseGateDecision`` exist to prevent.\n\n404 when the release has never been evaluated — distinct from a verdict of\nNOT_EVALUATED, which means it WAS evaluated and there was not enough\nevidence to say. Collapsing those two into one response would lose the\ndifference between \"we have not looked\" and \"we looked and cannot say\".",
        "operationId": "get_release_gate_api_v1_releases__release_id__gate_get",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Release Gate",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/gate/baseline": {
      "get": {
        "description": "Release-over-release comparison, or a stated reason it is not meaningful.\n\nReturns ``comparable: false`` with a reason rather than numbers whenever a\ndelta would mislead — no baseline, or either side below the evidence floor.\nA delta against a release nothing ran in is arithmetically fine and\ncompletely meaningless, and once it is a number on a scorecard nobody\nre-derives whether it was meaningful.",
        "operationId": "get_release_gate_baseline_api_v1_releases__release_id__gate_baseline_get",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Release Gate Baseline",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/gate/evaluate": {
      "post": {
        "description": "Evaluate the gate and, by default, record the verdict.\n\nQA_LEAD, not plain membership. Recording appends to an append-only audit\ntrail that a release decision is later justified by, so it is a privileged\nwrite even though it computes rather than edits.\n\nThe router owns the commit, per the repo's transaction-boundary rule, so the\ndemote of the previous verdict and the insert of the new one land as one\nunit of work — a failure cannot leave a release with two current verdicts or\nnone.",
        "operationId": "evaluate_release_gate_api_v1_releases__release_id__gate_evaluate_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "description": "Append the verdict to the release's audit history. Pass false to preview without recording.",
            "in": "query",
            "name": "record",
            "required": false,
            "schema": {
              "default": true,
              "description": "Append the verdict to the release's audit history. Pass false to preview without recording.",
              "title": "Record",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Evaluate Release Gate",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/outcomes": {
      "post": {
        "description": "Append a human incident or rollback outcome for later G5 evaluation.",
        "operationId": "mark_release_outcome_api_v1_releases__release_id__outcomes_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseOutcomeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Mark Release Outcome",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases": {
      "post": {
        "operationId": "add_phase_api_v1_releases__release_id__phases_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhaseIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Add Phase",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases/bulk": {
      "post": {
        "description": "Create a release's first schedule in one request (REL-07's Create; also a manual bulk).\n\n409 when the release already has phases (single phases keep\n``POST /phases``); every name unique in the batch; ``source`` /\n``model_name`` are recorded in the activity row and the metric only.",
        "operationId": "create_release_phases_bulk_api_v1_releases__release_id__phases_bulk_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleasePhasesBulkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleasePhasesCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Release Phases Bulk",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases/clone": {
      "post": {
        "description": "Copy another release's phases into this one (REL-05): dates moved, all Pending.\n\nThe BODY id is checked by ONE statement scoped to the target's project\nBEFORE anything else reads it: an unknown, malformed (Pydantic's 422) or\nFOREIGN source is the same 404 text, so the route is no oracle for another\nproject's release ids. ``require_release_access`` scopes the path id.",
        "operationId": "clone_release_phases_api_v1_releases__release_id__phases_clone_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleasePhasesCloneRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleasePhasesCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Clone Release Phases",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases/gate": {
      "get": {
        "description": "Every phase of this release, with a verdict each, and whether it may\nadvance.\n\nRead-only: ``evaluate_all_phases`` defaults to ``record=False`` because\nlooking at the state of a release is routine, and appending a decision row\nper phase per look would bury the real decisions in noise.\n\nThe summary is three-valued on purpose. A release blocked by a FAILING\nphase and one blocked by an UNEVALUATED phase need different actions — fix\nthe tests, or go run some — and collapsing both into \"cannot advance\" sends\na release manager to do the wrong one half the time. ``NO_PHASES`` is a\nfourth state and not a pass: phases are optional, so having none is not a\nfailure, but nothing was gated either.",
        "operationId": "get_release_phase_gate_api_v1_releases__release_id__phases_gate_get",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Release Phase Gate",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases/generate": {
      "post": {
        "description": "Draft phases from a PRD for the reader to review (REL-07). Persists nothing.\n\nThe heading parser always runs; the model is asked only in ``llm`` /\n``auto`` analysis mode, and any model failure is the rules draft with a\n``fallback_reason`` -- never an error. The request's connection is handed\nback BEFORE the config read and the model call, so no connection is held\nwhile the model runs. The PRD is never stored or logged.",
        "operationId": "draft_release_phases_api_v1_releases__release_id__phases_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_draft_release_phases_api_v1_releases__release_id__phases_generate_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhaseDraftResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Draft Release Phases",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases/{phase_id}": {
      "delete": {
        "operationId": "delete_phase_api_v1_releases__release_id__phases__phase_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "phase_id",
            "required": true,
            "schema": {
              "title": "Phase Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Phase",
        "tags": [
          "Releases"
        ]
      },
      "put": {
        "operationId": "update_phase_api_v1_releases__release_id__phases__phase_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "phase_id",
            "required": true,
            "schema": {
              "title": "Phase Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhaseUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Phase",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/phases/{phase_id}/gate/evaluate": {
      "post": {
        "description": "Evaluate ONE phase and, by default, record the verdict.\n\n``record=false`` previews without appending. The history is the point of\nthat table, so writing to it is a deliberate act rather than a side effect\nof looking — which is also why the read endpoint above never records.",
        "operationId": "evaluate_release_phase_gate_api_v1_releases__release_id__phases__phase_id__gate_evaluate_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "phase_id",
            "required": true,
            "schema": {
              "title": "Phase Id",
              "type": "string"
            }
          },
          {
            "description": "Append the verdict to the audit history",
            "in": "query",
            "name": "record",
            "required": false,
            "schema": {
              "default": true,
              "description": "Append the verdict to the audit history",
              "title": "Record",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Evaluate Release Phase Gate",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/test-runs": {
      "post": {
        "operationId": "link_test_run_api_v1_releases__release_id__test_runs_post",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Link Test Run",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/releases/{release_id}/test-runs/{run_id}": {
      "delete": {
        "operationId": "unlink_test_run_api_v1_releases__release_id__test_runs__run_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "release_id",
            "required": true,
            "schema": {
              "title": "Release Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Unlink Test Run",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/v1/reports/email-trends": {
      "post": {
        "description": "Email the Trends report of one project (the page's window, releases and\nsuites) to project members and up to 5 typed addresses, through the relay\nsaved in Settings › Notifications. One message for every recipient.",
        "operationId": "email_trends_report_api_v1_reports_email_trends_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailTrendsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTrendsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Email Trends Report",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/email-trends/availability": {
      "get": {
        "description": "Can the Trends report be emailed right now? The relay saved in Settings ›\nNotifications must be enabled, have a host, and pass the offline egress\ngate (the recipients are judged when sending). Reads nothing of a project.",
        "operationId": "email_trends_availability_api_v1_reports_email_trends_availability_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAvailability"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Email Trends Availability",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/runs/{run_id}/evidence-bundle": {
      "get": {
        "description": "Generate and download a ZIP evidence bundle for the given run.",
        "operationId": "export_evidence_bundle_api_v1_reports_runs__run_id__evidence_bundle_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Evidence Bundle",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/runs/{run_id}/pdf": {
      "get": {
        "description": "Generate and download a PDF intelligence report for the given run.\n\nE8.4: an AI report nobody has accepted is refused (409) once the review gate\nis enforced, unless the project allows drafts or a QA lead passes\n``include_unreviewed``; either way it is watermarked and audited.",
        "operationId": "export_run_report_pdf_api_v1_reports_runs__run_id__pdf_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "layout",
            "required": false,
            "schema": {
              "default": "executive",
              "pattern": "^(executive|engineering)$",
              "title": "Layout",
              "type": "string"
            }
          },
          {
            "description": "Export an AI report still awaiting human review, watermarked DRAFT. QA_LEAD or ADMIN only; audited.",
            "in": "query",
            "name": "include_unreviewed",
            "required": false,
            "schema": {
              "default": false,
              "description": "Export an AI report still awaiting human review, watermarked DRAFT. QA_LEAD or ADMIN only; audited.",
              "title": "Include Unreviewed",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Run Report Pdf",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/runs/{run_id}/share": {
      "post": {
        "description": "Create a time-limited share link for the run report.",
        "operationId": "create_share_link_endpoint_api_v1_reports_runs__run_id__share_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShareLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLinkResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Share Link Endpoint",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/runs/{run_id}/share-links": {
      "get": {
        "description": "List all share links for a run.",
        "operationId": "list_share_links_endpoint_api_v1_reports_runs__run_id__share_links_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShareLinkResponse"
                  },
                  "title": "Response List Share Links Endpoint Api V1 Reports Runs  Run Id  Share Links Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Share Links Endpoint",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/share-links/{link_id}": {
      "delete": {
        "description": "Revoke a share link. Creator, project members, and admins can revoke.",
        "operationId": "revoke_share_link_endpoint_api_v1_reports_share_links__link_id__delete",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Revoke Share Link Endpoint",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/summary": {
      "get": {
        "description": "Return the summary report payload for the active project.",
        "operationId": "get_summary_report_api_v1_reports_summary_get",
        "parameters": [
          {
            "description": "``window`` aggregates every run in the window; ``latest`` takes the most recent run per suite.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "default": "window",
              "description": "``window`` aggregates every run in the window; ``latest`` takes the most recent run per suite.",
              "enum": [
                "window",
                "latest"
              ],
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryReportResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Summary Report",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/summary/exports": {
      "get": {
        "description": "The reader's own background exports for the project that have not expired, newest first.",
        "operationId": "list_summary_report_exports_api_v1_reports_summary_exports_get",
        "parameters": [
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReportExportOut"
                  },
                  "title": "Response List Summary Report Exports Api V1 Reports Summary Exports Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Summary Report Exports",
        "tags": [
          "Summary Report"
        ]
      },
      "post": {
        "description": "VIZ-607: download now, or queue a background export.\n\n``delivery: \"download\"`` -- the report is small: fetch ``GET /pdf`` or\n``/xlsx`` with the same query. ``delivery: \"background\"`` (202) -- a job\nwas queued; poll ``GET /exports/{id}`` and download from ``download_url``\nwhen it completes. ``dispatched: false`` means the worker could not be\nreached: the job stays queued (it is not failed) and can be retried.",
        "operationId": "request_summary_report_export_api_v1_reports_summary_exports_post",
        "parameters": [
          {
            "description": "``pdf`` or ``xlsx``.",
            "in": "query",
            "name": "format",
            "required": true,
            "schema": {
              "description": "``pdf`` or ``xlsx``.",
              "enum": [
                "pdf",
                "xlsx"
              ],
              "title": "Format",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "default": "window",
              "enum": [
                "window",
                "latest"
              ],
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "description": "Queue a background export even when the report is small.",
            "in": "query",
            "name": "background",
            "required": false,
            "schema": {
              "default": false,
              "description": "Queue a background export even when the report is small.",
              "title": "Background",
              "type": "boolean"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportExportRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Request Summary Report Export",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/summary/exports/{export_id}": {
      "get": {
        "description": "One background export's status (any member of its project).",
        "operationId": "get_summary_report_export_api_v1_reports_summary_exports__export_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportExportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Summary Report Export",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/summary/exports/{export_id}/download": {
      "get": {
        "description": "The finished file, through the API (no storage URL leaves the server).\n\n409 until the export has completed; 410 once it has expired.",
        "operationId": "download_summary_report_export_api_v1_reports_summary_exports__export_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Download Summary Report Export",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/summary/exports/{export_id}/retry": {
      "post": {
        "description": "Re-queue a failed export, or one whose message or worker was lost. 409 otherwise.",
        "operationId": "retry_summary_report_export_api_v1_reports_summary_exports__export_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportExportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Retry Summary Report Export",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/summary/pdf": {
      "get": {
        "description": "Return the summary report as a downloadable PDF, charts included (VIZ-607).",
        "operationId": "export_summary_report_pdf_api_v1_reports_summary_pdf_get",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "default": "window",
              "enum": [
                "window",
                "latest"
              ],
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Summary Report Pdf",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/summary/xlsx": {
      "get": {
        "description": "VIZ-607: the summary report as an Excel workbook: a context sheet, then\none sheet per part of the report, each with a native chart over its data.",
        "operationId": "export_summary_report_xlsx_api_v1_reports_summary_xlsx_get",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "default": "window",
              "enum": [
                "window",
                "latest"
              ],
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Summary Report Xlsx",
        "tags": [
          "Summary Report"
        ]
      }
    },
    "/api/v1/reports/trends/pdf": {
      "get": {
        "description": "The Trends report as a PDF (any member): the page's KPIs, verdict, daily\nseries and suite table for its window, releases and suites. Audited.",
        "operationId": "export_trends_report_pdf_api_v1_reports_trends_pdf_get",
        "parameters": [
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-90.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 14,
              "description": "Window in days, 1-90.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Trends Report Pdf",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reviews/{review_id}": {
      "get": {
        "operationId": "get_review_api_v1_reviews__review_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Review Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Review",
        "tags": [
          "Reviews"
        ]
      }
    },
    "/api/v1/reviews/{review_id}/accept": {
      "post": {
        "description": "Accept an AI report. Its run becomes ``passed``.",
        "operationId": "accept_review_api_v1_reviews__review_id__accept_post",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Review Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/AcceptReviewRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Accept Review",
        "tags": [
          "Reviews"
        ]
      }
    },
    "/api/v1/reviews/{review_id}/reject": {
      "post": {
        "description": "Reject an AI report with a reason code. Its run becomes ``failed``.",
        "operationId": "reject_review_api_v1_reviews__review_id__reject_post",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Review Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectReviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reject Review",
        "tags": [
          "Reviews"
        ]
      }
    },
    "/api/v1/runs": {
      "get": {
        "operationId": "list_runs_api_v1_runs_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 500,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Show runs from last N days (0 = all time)",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 365,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": 30,
              "description": "Show runs from last N days (0 = all time)",
              "title": "Days"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters: runs labelled with, or holding a test in, the suite; case-insensitive.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters: runs labelled with, or holding a test in, the suite; case-insensitive.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Case-insensitive: contains on build number, branch and CI job; prefix on commit hash.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive: contains on build number, branch and CI job; prefix on commit hash.",
              "title": "Q"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): exact branch names.",
            "in": "query",
            "name": "branch",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): exact branch names.",
              "title": "Branch"
            }
          },
          {
            "description": "The AI verdict column: GO | CONDITIONAL_GO | NO_GO | none.",
            "in": "query",
            "name": "recommendation",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The AI verdict column: GO | CONDITIONAL_GO | NO_GO | none.",
              "title": "Recommendation"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Runs",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/ai-verdicts": {
      "get": {
        "description": "The AI-verdict inputs of the runs on screen, from their stored snapshots (W07 FAIL-04).\n\nReads stored state only: a run without a servable snapshot is answered\n``snapshot: false`` (with ``analysed`` saying why), never computed here.\nEvery id is resolved against the caller's projects; an unknown and a\nforeign id are both listed in ``unavailable``, the same way.",
        "operationId": "run_ai_verdicts_api_v1_runs_ai_verdicts_get",
        "parameters": [
          {
            "description": "Repeatable: 1-25 run ids (the runs on screen).",
            "in": "query",
            "name": "run_id",
            "required": true,
            "schema": {
              "description": "Repeatable: 1-25 run ids (the runs on screen).",
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "title": "Run Id",
              "type": "array"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunVerdictBatchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Ai Verdicts",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/branches": {
      "get": {
        "description": "The project's branches in the window, newest last run first, for the Runs toolbar (W07 FAIL-05).",
        "operationId": "list_run_branches_api_v1_runs_branches_get",
        "parameters": [
          {
            "description": "The project whose branches to list.",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "The project whose branches to list.",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Look back window in days (0 = all time)",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 365,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": 30,
              "description": "Look back window in days (0 = all time)",
              "title": "Days"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunBranchListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Run Branches",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/compare": {
      "get": {
        "description": "Compare two test runs and return per-test + aggregate deltas.\n\nClassifies every test whose status or duration differed between\nthe two runs into buckets like ``new_failure``, ``fixed``,\n``regressed``, ``duration_spike``. The response is sorted with\nthe most urgent deltas first so the UI's default view surfaces\nregressions before wins.\n\nArgs:\n    left: UUID of the baseline (\"before\") run.\n    right: UUID of the target (\"after\") run.",
        "operationId": "compare_two_runs_api_v1_runs_compare_get",
        "parameters": [
          {
            "in": "query",
            "name": "left",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Left",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "right",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Right",
              "type": "string"
            }
          },
          {
            "description": "Optional suite scope; matched case-insensitively",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional suite scope; matched case-insensitively",
              "title": "Suite Name"
            }
          },
          {
            "description": "Attach cached or generated AI comparison report",
            "in": "query",
            "name": "include_ai_report",
            "required": false,
            "schema": {
              "default": true,
              "description": "Attach cached or generated AI comparison report",
              "title": "Include Ai Report",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCompareResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Compare Two Runs",
        "tags": [
          "Run Compare"
        ]
      }
    },
    "/api/v1/runs/compare/latest": {
      "get": {
        "description": "Compare the latest completed run for a suite against the previous latest\ncompleted run for the same suite and branch.",
        "operationId": "compare_latest_suite_runs_api_v1_runs_compare_latest_get",
        "parameters": [
          {
            "description": "Suite name; matched case-insensitively",
            "in": "query",
            "name": "suite_name",
            "required": true,
            "schema": {
              "description": "Suite name; matched case-insensitively",
              "minLength": 1,
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "description": "Attach cached or generated AI comparison report",
            "in": "query",
            "name": "include_ai_report",
            "required": false,
            "schema": {
              "default": true,
              "description": "Attach cached or generated AI comparison report",
              "title": "Include Ai Report",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCompareResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Compare Latest Suite Runs",
        "tags": [
          "Run Compare"
        ]
      }
    },
    "/api/v1/runs/failed-ids": {
      "get": {
        "description": "Return just the IDs of FAILED runs in the project + day window.\n\nBacks the \"Trigger all FAILED across pages\" shortcut on /runs. Returning\nonly IDs (not the full row) keeps the payload tiny so the UI can fan out\npipeline triggers in parallel without an oversized round-trip.\n\nWith ``only_pending=true``, runs that already have an AgentPipelineRun\nin 'running' status, or any pipeline created in the last 2h, are\nexcluded — matching the Celery task's dedup window so the user doesn't\nwaste a click re-firing what's already in flight.",
        "operationId": "list_failed_run_ids_api_v1_runs_failed_ids_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "description": "Look back window in days (0 = all time)",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 365,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": 30,
              "description": "Look back window in days (0 = all time)",
              "title": "Days"
            }
          },
          {
            "description": "Hard cap to prevent runaway fan-outs",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 1000,
              "description": "Hard cap to prevent runaway fan-outs",
              "maximum": 5000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "When true, exclude runs that already have an active or recent agent pipeline (within the last 2h, matching the Celery dedup TTL)",
            "in": "query",
            "name": "only_pending",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, exclude runs that already have an active or recent agent pipeline (within the last 2h, matching the Celery dedup TTL)",
              "title": "Only Pending",
              "type": "boolean"
            }
          },
          {
            "description": "Filter failed runs by suite name, case-insensitive",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter failed runs by suite name, case-insensitive",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Failed Run Ids",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/failure-signatures": {
      "get": {
        "description": "The top failure signatures of each failed build, for grouping them by error (W07 FAIL-03).\n\nSame validation and authorization shape as ``/ai-verdicts``; at most\n``SIGNATURE_ROWS_PER_RUN`` failing rows are read per run (``capped`` says so).",
        "operationId": "run_failure_signatures_api_v1_runs_failure_signatures_get",
        "parameters": [
          {
            "description": "Repeatable: 1-50 run ids.",
            "in": "query",
            "name": "run_id",
            "required": true,
            "schema": {
              "description": "Repeatable: 1-50 run ids.",
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "title": "Run Id",
              "type": "array"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSignatureBatchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Failure Signatures",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}": {
      "delete": {
        "description": "Delete one run across all five stores. Irreversible.\n\n**202, not 204.** A synchronous delete of a multi-GB prefix times out at\nthe gateway, and the Mongo -> MinIO -> Postgres ordering means the caller\nwould get a 504 with the artifacts already gone and the run still listed.\nThe work runs as a Celery job; poll it at\n``GET /api/v1/projects/{project_id}/deletion/jobs/{job_id}``.\n\nFour guards, each a real hazard rather than defensive habit:\n\n* **In flight.** ``IN_PROGRESS`` is refused — the drainer and the persist\n  task are writing to this run right now.\n* **Resurrection.** A tombstone is written in the same transaction as the\n  row deletion, because five code paths re-create a ``TestRun`` from a\n  caller-supplied id on a SELECT miss. Refusing ``IN_PROGRESS`` narrows\n  that window; it does not close it.\n* **Citations.** A run cited by a compliance pack, linked to a release, or\n  named by a decision report is refused — deleting it strands evidence\n  whose subject no longer exists.\n* **Prefix scope.** ``minio_prefix`` is uploader-derived and unvalidated\n  beyond non-empty. Prefixes outside the project's scope are refused and\n  REPORTED, never deleted.\n\n**Retention holds (W22a).** A run covered by a live hold — directly, by its\nrelease, as a held run's baseline, or by a project hold — is refused 409\nwith ``Held: <reason>`` FIRST in ``blockers`` (the hold read lives in\n``citation_blockers``); whatever the credential, no flag bypasses it. The\n202 also lists the links the delete breaks (``references_broken``, a\nwarning) and says the keep-last floor does not apply to explicit deletes.",
        "operationId": "delete_run_api_v1_runs__run_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteRunAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Run",
        "tags": [
          "Test Runs"
        ]
      },
      "get": {
        "operationId": "get_run_api_v1_runs__run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/ai-compare": {
      "get": {
        "description": "This run's AI analysis against a baseline's (default: the D42 previous run). Live sides\nby default; a pinned version compares what a pipeline produced. Never triggers an LLM.",
        "operationId": "compare_ai_with_baseline_api_v1_runs__run_id__ai_compare_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "baseline_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Baseline Run Id"
            }
          },
          {
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Suite Name"
            }
          },
          {
            "description": "A digest version id of THIS run",
            "in": "query",
            "name": "version_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A digest version id of THIS run",
              "title": "Version Id"
            }
          },
          {
            "description": "A digest version id of the BASELINE run",
            "in": "query",
            "name": "baseline_version_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A digest version id of the BASELINE run",
              "title": "Baseline Version Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AICompareResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Compare Ai With Baseline",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/ai-history": {
      "get": {
        "description": "Stored AI versions of the run (one kind), newest first. Reads each version's\n``meta``/``provenance`` only, never its payload. An empty store is ``versions: []``.",
        "operationId": "list_ai_history_api_v1_runs__run_id__ai_history_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "analysis_digest | run_summary",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "default": "analysis_digest",
              "description": "analysis_digest | run_summary",
              "pattern": "^(analysis_digest|run_summary)$",
              "title": "Kind",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIHistoryListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Ai History",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/ai-history/diff": {
      "get": {
        "description": "Structured diff of two analysis digests of the same run (mode ``versions``).",
        "operationId": "diff_ai_history_api_v1_runs__run_id__ai_history_diff_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "A digest version id of THIS run",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "A digest version id of THIS run",
              "format": "uuid",
              "title": "From",
              "type": "string"
            }
          },
          {
            "description": "A version id | latest | live",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "default": "latest",
              "description": "A version id | latest | live",
              "maxLength": 64,
              "title": "To",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIDigestDiffResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Diff Ai History",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/ai-history/export": {
      "get": {
        "description": "The run's whole AI history as one JSON file (``AIHistoryExportBundle``).\n\nAI report content leaving the system: the E8.4 distribution policy decides\n(channel ``ai_history_export``) and its audit row is committed whether the\nexport is allowed or refused (409) -- the one documented write of this\nfamily of GETs, exactly like the intelligence export.",
        "operationId": "export_ai_history_api_v1_runs__run_id__ai_history_export_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Ai History",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/ai-history/{version_id}": {
      "get": {
        "description": "One stored version (any kind) with its payload. A version of another run is 404.",
        "operationId": "get_ai_history_version_api_v1_runs__run_id__ai_history__version_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Version Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIVersionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ai History Version",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/attribution": {
      "get": {
        "description": "Per-failure verdicts for this run: yours, flaky, infrastructure, or unknown.\n\nAt Google roughly **84% of pass→fail transitions involve a flaky test**, so a\nraw \"new failure\" list is mostly noise and trains engineers to dismiss the\nreal ones. This composes five signals — the transition against the previous\nrun, the flakiness score, systemic co-failure cluster membership, overlap\nwith the commit range's changed files, and this project's measured\nclassifier calibration — into one verdict per failing test.\n\nEvery verdict carries **all five inputs and the votes behind it**, because\nwhen a verdict disagrees with an engineer the useful question is *which\ninput was wrong*, and that is unanswerable from a bare label.\n\n``UNCERTAIN`` is a first-class answer, returned whenever the signals\ndisagree or are too thin — not a failure to decide.\n\n**Advisory only.** Nothing here suppresses, hides or auto-closes a failure:\na newly-flaky test reflects a real bug often enough that suppression is the\none irreversible mistake available.",
        "operationId": "run_attribution_api_v1_runs__run_id__attribution_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Run Attribution",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/baseline-diff": {
      "get": {
        "description": "Return a deterministic baseline diff for the given test run.\n\nCompares against the most recent prior PASSED run for the same project.\nNo LLM calls — all classification is deterministic using existing AI analyses.\n\nResponse includes:\n- pass_rate_delta, new_failures, resolved_failures\n- regression_classification (run-level)\n- regression_clusters (per-cluster: cluster_id, label, size, classification)\n- classified_new_failures (new failures enriched with their cluster classification)\n- suites_impacted_delta, current_suite_count, baseline_suite_count",
        "operationId": "get_run_baseline_diff_api_v1_runs__run_id__baseline_diff_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Baseline Diff",
        "tags": [
          "Run Intelligence"
        ]
      }
    },
    "/api/v1/runs/{run_id}/bisect": {
      "get": {
        "description": "Narrow one failing test of the run to its own last pass (W23b FAIL-12).\n\nThe path run is guarded by ``require_run_access`` (VIEWER included: a\nread); the QUERY ``fingerprint`` is scoped here to a test case OF THAT RUN\n-- another run's, another project's or an unknown fingerprint is the same\n404. A git-host failure, a timeout or Redis being down is a 200 whose\n``compare.state`` / ``compare.reason`` says so, never an error status. A\nGET: no Postgres write, no lazy resolve.",
        "operationId": "get_run_bisect_api_v1_runs__run_id__bisect_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "Fingerprint of a test case of THIS run",
            "in": "query",
            "name": "fingerprint",
            "required": true,
            "schema": {
              "description": "Fingerprint of a test case of THIS run",
              "maxLength": 64,
              "minLength": 1,
              "title": "Fingerprint",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BisectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Bisect",
        "tags": [
          "Commit Attribution"
        ]
      }
    },
    "/api/v1/runs/{run_id}/commit-range": {
      "get": {
        "description": "Return the commit range associated with a run (US-8.1).\n\nIf no range exists yet — or the last attempt is older than the service's\nre-resolve cooldown — attempts a one-shot resolution (supplied wins →\nconnector → unavailable) in a dedicated write session so this GET stays\nread-only, then returns the freshly-resolved range. The cooldown gate\nmeans repeated GETs on a range-less run do NOT re-run the connector.",
        "operationId": "get_run_commit_range_api_v1_runs__run_id__commit_range_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Commit Range",
        "tags": [
          "Commit Attribution"
        ]
      }
    },
    "/api/v1/runs/{run_id}/decision-reports": {
      "get": {
        "description": "List immutable published DecisionReport versions for an authorized run.",
        "operationId": "list_run_decision_reports_api_v1_runs__run_id__decision_reports_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Run Decision Reports",
        "tags": [
          "Run Intelligence"
        ]
      }
    },
    "/api/v1/runs/{run_id}/decision-reports/{report_id}/feedback": {
      "post": {
        "operationId": "submit_decision_report_feedback_api_v1_runs__run_id__decision_reports__report_id__feedback_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "report_id",
            "required": true,
            "schema": {
              "title": "Report Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionReportFeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Submit Decision Report Feedback",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/runs/{run_id}/decision-trail": {
      "get": {
        "description": "Return the full AI decision trail for a test run.\n\nThe trail contains:\n  - Pipeline run metadata (status, started_at, completed_at, cost).\n  - Per-stage summary with decision_log, analysis_mode, fallback reason.\n  - Per-test routing showing which engine ran and any confidence\n    adjustments or retries.\n  - Workflow router events (fast-path skips, specialist stage picks).\n\nAccess control: the caller must have access to the run's project.",
        "operationId": "get_decision_trail_api_v1_runs__run_id__decision_trail_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionTrailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "AI decision trail for a test run",
        "tags": [
          "Decision Trail"
        ]
      }
    },
    "/api/v1/runs/{run_id}/downstream-status": {
      "get": {
        "description": "Expose durable publication state for required post-ingestion work.",
        "operationId": "get_run_downstream_status_api_v1_runs__run_id__downstream_status_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Downstream Status",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/duration-regressions": {
      "get": {
        "description": "EXEC-05: tests slower than their baseline and suites slower than their\nhistory, for the run page's Changes tab.\n\nThe findings stored when the run was evaluated on ingest, else the same\nchecks computed now without writing anything (``stored: false``).\n``measured: false`` with a ``reason`` (\"not enough history (4 of 10)\",\n\"duration regression detection is off for this project\") when neither\ncheck could be made -- an empty list never stands in for \"no\nregressions\". A live run still streaming answers the same way instead of\n404, as ``/regression-diff`` does.",
        "operationId": "get_run_duration_regressions_api_v1_runs__run_id__duration_regressions_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DurationRegressionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Duration Regressions",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/export": {
      "get": {
        "description": "Export a customer-facing intelligence report as a structured JSON payload.\n\nCombines: run summary, structured AI analysis, baseline diff, release decision,\ncriticality dimensions, role actions, and provenance — in a single downloadable document.",
        "operationId": "export_intelligence_report_api_v1_runs__run_id__export_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "Summary mode: executive | developer | manager",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "default": "manager",
              "description": "Summary mode: executive | developer | manager",
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Intelligence Report",
        "tags": [
          "Run Intelligence"
        ]
      }
    },
    "/api/v1/runs/{run_id}/intelligence": {
      "get": {
        "description": "Return a unified Run Intelligence snapshot for the given test run.\n\nAggregates:\n- 4-layer structured summary (MongoDB)\n- Failure clusters with criticality levels\n- AI analyses (category breakdown, top findings)\n- Release decision + 7-dimension risk scores\n- What changed since last good run (deterministic baseline diff)\n- Lightweight defect candidates\n- Pipeline stage history with skip context\n- Provenance (schema_version, fallback_used, tools_used_count)",
        "operationId": "get_run_intelligence_endpoint_api_v1_runs__run_id__intelligence_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated optional expansions: test_cases,evidence,history",
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "default": "",
              "description": "Comma-separated optional expansions: test_cases,evidence,history",
              "title": "Include",
              "type": "string"
            }
          },
          {
            "description": "Immutable DecisionReport version to display; omitted means latest",
            "in": "query",
            "name": "report_version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Immutable DecisionReport version to display; omitted means latest",
              "title": "Report Version"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Intelligence Endpoint",
        "tags": [
          "Run Intelligence"
        ]
      }
    },
    "/api/v1/runs/{run_id}/intelligence/refresh": {
      "post": {
        "description": "Force-refresh the intelligence snapshot for a run.\nInvalidates the cached snapshot and recomputes from live data.\nReturns the fresh intelligence payload.",
        "operationId": "refresh_intelligence_api_v1_runs__run_id__intelligence_refresh_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Refresh Intelligence",
        "tags": [
          "Run Intelligence"
        ]
      }
    },
    "/api/v1/runs/{run_id}/investigations": {
      "post": {
        "description": "Trigger a manual investigation for a run (QA_ENGINEER+).",
        "operationId": "start_investigation_api_v1_runs__run_id__investigations_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Start Investigation Api V1 Runs  Run Id  Investigations Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start Investigation",
        "tags": [
          "Agent Investigations"
        ]
      }
    },
    "/api/v1/runs/{run_id}/likely-affected-tests": {
      "get": {
        "description": "Advisory \"Likely affected tests\" for a run (W36 STRAT-08).\n\nRanks THIS run's tests by path overlap with the run's changed files and, when\nthe project's TIA readiness is available, past co-failures with those paths.\n``available: false`` + ``no_commit_range`` / ``no_changed_files`` when there is\nnothing to rank from; ``co_failure_runs`` is null (not 0) without history.\nIt never selects or skips a test (``caveat``). A GET: no write, and NO\n``lazy_resolve_commit_range`` -- the stored range is read as it is.",
        "operationId": "get_run_likely_affected_tests_api_v1_runs__run_id__likely_affected_tests_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "Most tests returned (1..50), highest score first",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Most tests returned (1..50), highest score first",
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LikelyAffectedTestsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Likely Affected Tests",
        "tags": [
          "Commit Attribution"
        ]
      }
    },
    "/api/v1/runs/{run_id}/previous": {
      "get": {
        "description": "The D42 previous run: same project, suite and branch, completed, newest finished\nbefore this run. \"No baseline\" is an answer (``reason`` + ``message``), never an error.",
        "operationId": "get_previous_run_api_v1_runs__run_id__previous_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIPreviousRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Previous Run",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/recover-live": {
      "post": {
        "description": "Re-enqueue ``persist_live_session`` for a live-stream run whose\nper-test rows never landed in PostgreSQL.\n\nLooks up the run, checks that it's a ``live_stream`` run with zero\n``test_cases`` rows, then fires the persistence task with the buffered\nevents still sitting in Redis (TTL 25h). Idempotent — the task itself\nre-checks whether work is already done before inserting.\n\nReturns 422 when the run isn't recoverable (already populated / not a\nlive run / no buffer left in Redis).",
        "operationId": "recover_live_run_from_buffer_api_v1_runs__run_id__recover_live_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Recover Live Run From Buffer",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/regression-diff": {
      "get": {
        "description": "Return a \"What changed since last good run?\" diff for the given test run.\nP3-9: Business logic extracted to regression_diff_service.\n\nIn-flight live runs (no TestRun row yet — only a LiveSession) get a\ngraceful in-progress payload instead of a 404. The frontend renders\n\"Diff will be available once the run completes\" rather than a\nbroken error toast. (Bug 2026-05-19 — Run Detail page hit 404s for\nsessions clicked during the first ~30s before the drainer\nmaterialised the TestRun row.)",
        "operationId": "get_regression_diff_api_v1_runs__run_id__regression_diff_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Regression Diff",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/release": {
      "post": {
        "operationId": "set_run_release_api_v1_runs__run_id__release_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Set Run Release",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/step-flips": {
      "get": {
        "description": "Run-level roll-up of cross-run step-flip (FLK-P6 slice 5).\n\nREAD-ONLY. Aggregates the per-test cross-run step-flip across the run's\nfingerprint-anchored tests so a QA engineer triaging a whole run sees WHICH\nTESTS have a flickering step — without opening each one. Resolves the run's\nproject via the PROVIDED ``run_id`` (verified by ``require_run_access`` — IDOR\nratchet); the underlying read is project-scoped. No DB writes. Returns 404\nwhen ``run_id`` has no run; otherwise a roll-up listing only the tests with at\nleast one step flip (``truncated`` flags a run larger than the analysis cap).",
        "operationId": "get_run_step_flips_api_v1_runs__run_id__step_flips_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Step Flips",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/summary": {
      "get": {
        "description": "Return a mode-specific AI-generated summary.\n\n- executive: concise 3-sentence summary + release impact\n- developer: evidence pack, stack traces, fix recommendations\n- manager:   business impact, criticality, immediate mitigation\n\nFalls back to a deterministic PostgreSQL-derived summary when the AI pipeline\nhas not yet produced a MongoDB document for this run.",
        "operationId": "get_run_summary_by_mode_api_v1_runs__run_id__summary_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "Summary mode: executive | developer | manager",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "default": "executive",
              "description": "Summary mode: executive | developer | manager",
              "title": "Mode",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Summary By Mode",
        "tags": [
          "Run Intelligence"
        ]
      }
    },
    "/api/v1/runs/{run_id}/suspects": {
      "get": {
        "description": "Return ranked suspect commits for a newly-failing cluster/test (US-8.2).\n\nHonest ``available: False`` when there's no commit range for the run.\nRanking is deterministic + inspectable (per-commit overlapping files).",
        "operationId": "get_run_suspects_api_v1_runs__run_id__suspects_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "Failure cluster id (e.g. cl_001) to attribute",
            "in": "query",
            "name": "cluster_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Failure cluster id (e.g. cl_001) to attribute",
              "title": "Cluster Id"
            }
          },
          {
            "description": "Test fingerprint to attribute (single test)",
            "in": "query",
            "name": "fingerprint",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Test fingerprint to attribute (single test)",
              "title": "Fingerprint"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Suspects",
        "tags": [
          "Commit Attribution"
        ]
      }
    },
    "/api/v1/runs/{run_id}/test-health": {
      "get": {
        "description": "Get test health findings for a specific run.\nReturns anti-pattern analysis, health scores, and stabilization recommendations.",
        "operationId": "get_test_health_api_v1_runs__run_id__test_health_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestHealthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Health",
        "tags": [
          "Test Health"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests": {
      "get": {
        "operationId": "list_test_cases_api_v1_runs__run_id__tests_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "suite",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Suite"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Test Cases",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}": {
      "get": {
        "operationId": "get_test_case_api_v1_runs__run_id__tests__test_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}/ai-history": {
      "get": {
        "description": "The stored analysis versions of one test result, newest first, plus the current row.\nPostgres only: never a 503.",
        "operationId": "get_test_ai_history_api_v1_runs__run_id__tests__test_id__ai_history_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AITestHistoryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Ai History",
        "tags": [
          "AI History"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}/history": {
      "get": {
        "description": "Cross-run history + flakiness + metadata for one logical test (Phase 2).\n\nREAD-ONLY. Resolves the test's ``test_fingerprint`` + project via the\nPROVIDED ``run_id`` (verified by ``require_run_access`` — IDOR ratchet), then\nreturns a project-scoped timeline (``test_fingerprint`` is not salted, so the\nhistory query JOINs ``test_runs`` on ``project_id`` — no cross-project\nleakage), the computed flakiness value (reusing\n``analytics_service``/``test_health_coach`` thresholds), and identity\nmetadata (owner / first-last seen / suite / timestamps). No DB writes.",
        "operationId": "get_test_case_history_endpoint_api_v1_runs__run_id__tests__test_id__history_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseHistoryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case History Endpoint",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}/http-exchanges": {
      "get": {
        "description": "W23d AGT-14: the captured HTTP exchanges of one test (redacted at ingest).\n\n``require_run_access`` verifies the PROVIDED ``run_id``; the test must belong\nto THAT run (another run's case answers the same 404 as an unknown id). The\nMongo read filters on the run's project, the run and the case — all server\nvalues. Reads only. A Mongo failure is a 503, never an empty list that would\nread as \"nothing captured\".",
        "operationId": "get_test_case_http_exchanges_api_v1_runs__run_id__tests__test_id__http_exchanges_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpExchangeListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case Http Exchanges",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}/rich-detail": {
      "get": {
        "description": "Versioned additive detail contract with optional recursive steps.\n\nAccess is checked against the supplied run before the service query. The\nendpoint is separate from the legacy flat detail route so existing clients\nretain their response shape during gradual rollout.",
        "operationId": "get_enriched_test_case_detail_endpoint_api_v1_runs__run_id__tests__test_id__rich_detail_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichedTestCaseDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Enriched Test Case Detail Endpoint",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}/step-flips": {
      "get": {
        "description": "Cross-run step-flip report for one logical test (FLK-P6 slice 4).\n\nREAD-ONLY. Unlike ``/steps`` (a LATEST-RUN-ONLY snapshot), this reads the\nretained per-run step outcomes (``test_step_runs``) and reports WHICH step\noscillated PASSED<->FAILED across runs, how often, and in which direction —\nso a flickering step reads as step-level flakiness rather than a whole-test\nverdict. Resolves the test's ``test_fingerprint`` + project via the PROVIDED\n``run_id`` (verified by ``require_run_access`` — IDOR ratchet); the underlying\nread is project-scoped. No DB writes. Returns 404 when ``test_id`` doesn't\nbelong to ``run_id``; an empty-window \"insufficient history\" report otherwise.",
        "operationId": "get_test_case_step_flips_api_v1_runs__run_id__tests__test_id__step_flips_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case Step Flips",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/tests/{test_id}/steps": {
      "get": {
        "description": "Granular step/attachment tree for one test (LATEST-RUN-ONLY snapshot).\n\nLazy / separate from the test-case detail payload — the detail endpoint\nstays unchanged and clients fetch steps on demand. Guarded by\n``require_run_access`` which verifies the PROVIDED ``run_id`` (IDOR ratchet).\nReturns the ordered, nested step tree with per-step + test-level attachments.",
        "operationId": "get_test_case_steps_api_v1_runs__run_id__tests__test_id__steps_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "test_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case Steps",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/timing": {
      "get": {
        "description": "EXEC-03: how long the run took and where the time went.\n\nWall clock vs summed test time and parallelism, phase totals, the run's suite executions, the slowest tests\nwith their duration baselines, worker lanes, a timeline of at most ``timeline_limit`` tests for the waterfall,\nand the run's duration regressions (the ``/duration-regressions`` body). A figure the report did not carry is\n``null`` with ``measured: false`` and a ``reason`` on its block -- e.g. ``timeline.reason`` \"report carried no\ntimestamps\" for a JUnit run -- never 0. Read-only.",
        "operationId": "get_run_timing_api_v1_runs__run_id__timing_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "How many slowest tests to return.",
            "in": "query",
            "name": "slowest",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many slowest tests to return.",
              "maximum": 100,
              "minimum": 1,
              "title": "Slowest",
              "type": "integer"
            }
          },
          {
            "description": "Max timeline bars; the LONGEST tests are kept when more qualify (timeline.truncated).",
            "in": "query",
            "name": "timeline_limit",
            "required": false,
            "schema": {
              "default": 2000,
              "description": "Max timeline bars; the LONGEST tests are kept when more qualify (timeline.truncated).",
              "maximum": 2000,
              "minimum": 1,
              "title": "Timeline Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunTimingResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Run Timing",
        "tags": [
          "Execution Metrics",
          "Test Runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/timing.csv": {
      "get": {
        "description": "EXEC-06: every test of the run with its timing, as CSV, slowest first.\n\nColumns: test_name, suite_name (the effective suite), status, duration_ms,\nstarted_at, finished_at (ISO 8601 UTC), setup_ms, call_ms, teardown_ms,\nworker_id, timing_source (``report`` | ``derived`` | ``live``). A figure\nthe report did not carry (a JUnit file has no timestamps) is an empty\ncell, never 0. ``X-Row-Count`` is the number of tests in the file and\n``X-Truncated`` says whether the 100,000-row cap cut it. Read-only.",
        "operationId": "export_run_timing_csv_api_v1_runs__run_id__timing_csv_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {}
            },
            "description": "One row per test, slowest first."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Run Timing Csv",
        "tags": [
          "Test Runs"
        ]
      }
    },
    "/api/v1/saved-views": {
      "get": {
        "description": "List saved views: user's personal + shared views for the project.",
        "operationId": "list_saved_views_api_v1_saved_views_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "dashboard",
                    "trends",
                    "coverage",
                    "defects",
                    "failures",
                    "summary_report",
                    "explore",
                    "search",
                    "test_management"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SavedViewResponse"
                  },
                  "title": "Response List Saved Views Api V1 Saved Views Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Saved Views",
        "tags": [
          "Saved Views"
        ]
      },
      "post": {
        "description": "Create a new saved view.",
        "operationId": "create_saved_view_api_v1_saved_views_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedViewCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedViewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Saved View",
        "tags": [
          "Saved Views"
        ]
      }
    },
    "/api/v1/saved-views/{view_id}": {
      "delete": {
        "description": "Delete a saved view (owner only).",
        "operationId": "delete_saved_view_api_v1_saved_views__view_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "view_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "View Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Saved View",
        "tags": [
          "Saved Views"
        ]
      },
      "get": {
        "description": "Get a single saved view.",
        "operationId": "get_saved_view_api_v1_saved_views__view_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "view_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "View Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active_project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Active Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedViewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Saved View",
        "tags": [
          "Saved Views"
        ]
      },
      "patch": {
        "description": "Update a saved view (owner only).",
        "operationId": "update_saved_view_api_v1_saved_views__view_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "view_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "View Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedViewUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedViewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Saved View",
        "tags": [
          "Saved Views"
        ]
      }
    },
    "/api/v1/scim-tokens": {
      "get": {
        "description": "List all SCIM tokens (ADMIN only).",
        "operationId": "list_scim_tokens_api_v1_scim_tokens_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SCIMTokenResponse"
                  },
                  "title": "Response List Scim Tokens Api V1 Scim Tokens Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Scim Tokens",
        "tags": [
          "SCIM Tokens"
        ]
      },
      "post": {
        "description": "Create a new SCIM bearer token (ADMIN only). The raw token is shown once.",
        "operationId": "create_token_api_v1_scim_tokens_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SCIMTokenCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SCIMTokenCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Token",
        "tags": [
          "SCIM Tokens"
        ]
      }
    },
    "/api/v1/scim-tokens/{token_id}": {
      "delete": {
        "description": "Revoke a SCIM token (ADMIN only).",
        "operationId": "revoke_scim_token_api_v1_scim_tokens__token_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Token Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Revoke Scim Token",
        "tags": [
          "SCIM Tokens"
        ]
      }
    },
    "/api/v1/scim/v2/Groups": {
      "get": {
        "description": "SCIM 2.0: list groups (W20 ADM-09); ``filter=displayName eq \"<name>\"`` only.",
        "operationId": "scim_list_groups_api_v1_scim_v2_Groups_get",
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter"
            }
          },
          {
            "in": "query",
            "name": "startIndex",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Startindex",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 0,
              "title": "Count",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim List Groups",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "post": {
        "description": "SCIM 2.0: create a group; its members' project memberships follow the group's mappings.",
        "operationId": "scim_create_group_api_v1_scim_v2_Groups_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Create Group",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/Groups/{group_id}": {
      "delete": {
        "description": "SCIM 2.0: delete a group; memberships it alone granted are removed.",
        "operationId": "scim_delete_group_api_v1_scim_v2_Groups__group_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Delete Group",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "get": {
        "description": "SCIM 2.0: one group with its members.",
        "operationId": "scim_get_group_api_v1_scim_v2_Groups__group_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Get Group",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "patch": {
        "description": "SCIM 2.0 PatchOp on ``members`` (add / remove / replace, and ``members[value eq \"<id>\"]``) and ``displayName``.",
        "operationId": "scim_patch_group_api_v1_scim_v2_Groups__group_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Patch Group",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "put": {
        "description": "SCIM 2.0: replace a group's name and members.",
        "operationId": "scim_replace_group_api_v1_scim_v2_Groups__group_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Replace Group",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/ResourceTypes": {
      "get": {
        "description": "SCIM 2.0: List provisionable resource types.",
        "operationId": "scim_resource_types_api_v1_scim_v2_ResourceTypes_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Resource Types",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/ResourceTypes/{resource_type}": {
      "get": {
        "description": "SCIM 2.0: Retrieve one provisionable resource type.",
        "operationId": "scim_resource_type_api_v1_scim_v2_ResourceTypes__resource_type__get",
        "parameters": [
          {
            "in": "path",
            "name": "resource_type",
            "required": true,
            "schema": {
              "title": "Resource Type",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Resource Type",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/Schemas": {
      "get": {
        "description": "SCIM 2.0: List supported resource schemas.",
        "operationId": "scim_schemas_api_v1_scim_v2_Schemas_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Schemas",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/Schemas/{schema_uri}": {
      "get": {
        "description": "SCIM 2.0: Retrieve one supported resource schema.",
        "operationId": "scim_schema_api_v1_scim_v2_Schemas__schema_uri__get",
        "parameters": [
          {
            "in": "path",
            "name": "schema_uri",
            "required": true,
            "schema": {
              "title": "Schema Uri",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Schema",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/ServiceProviderConfig": {
      "get": {
        "description": "SCIM 2.0: Discover implemented protocol capabilities.",
        "operationId": "scim_service_provider_config_api_v1_scim_v2_ServiceProviderConfig_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Service Provider Config",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/Users": {
      "get": {
        "description": "SCIM 2.0: List users.",
        "operationId": "scim_list_api_v1_scim_v2_Users_get",
        "parameters": [
          {
            "description": "1-based start index (values below 1 become 1)",
            "in": "query",
            "name": "startIndex",
            "required": false,
            "schema": {
              "default": 1,
              "description": "1-based start index (values below 1 become 1)",
              "title": "Startindex",
              "type": "integer"
            }
          },
          {
            "description": "Requested page size (coerced to the provider's 200-item cap)",
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Requested page size (coerced to the provider's 200-item cap)",
              "title": "Count",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter"
            }
          },
          {
            "in": "query",
            "name": "attributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Attributes"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim List",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "post": {
        "description": "SCIM 2.0: Create a user.",
        "operationId": "scim_create_api_v1_scim_v2_Users_post",
        "parameters": [
          {
            "in": "query",
            "name": "attributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Attributes"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SCIMUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Create",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scim/v2/Users/{user_id}": {
      "delete": {
        "description": "SCIM 2.0: Deactivate (soft-delete) a user.",
        "operationId": "scim_delete_api_v1_scim_v2_Users__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Delete",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "get": {
        "description": "SCIM 2.0: Get a single user.",
        "operationId": "scim_get_api_v1_scim_v2_Users__user_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "attributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Attributes"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Get",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "patch": {
        "description": "SCIM 2.0: Patch (partial update) a user.",
        "operationId": "scim_patch_api_v1_scim_v2_Users__user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "attributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Attributes"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SCIMPatchRequestPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Patch",
        "tags": [
          "SCIM 2.0"
        ]
      },
      "put": {
        "description": "SCIM 2.0: Replace (full update) a user.",
        "operationId": "scim_replace_api_v1_scim_v2_Users__user_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "attributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Attributes"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "title": "Authorization",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SCIMUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scim Replace",
        "tags": [
          "SCIM 2.0"
        ]
      }
    },
    "/api/v1/scoring-model": {
      "get": {
        "description": "Return the risk scoring model.\n\nResponse shape:\n{\n  \"version\": 1,\n  \"go_threshold\": 20,\n  \"no_go_threshold\": 55,\n  \"dimensions\": [\n    { \"name\": \"user_impact\", \"weight\": 0.25, \"description\": \"...\" },\n    ...\n  ]\n}\n\nScoped (``project_id`` or ``run_id``), it adds ``pass_rate_minimum``,\n``pass_rate_hard_floor_factor`` and ``policy`` =\n``{policy_id, name, version, level}`` where ``level`` is ``project``,\n``system`` or ``hardcoded`` (no active policy: config defaults).",
        "operationId": "get_scoring_model_api_v1_scoring_model_get",
        "parameters": [
          {
            "description": "Return the model this project's verdict applies (its active release-gate policy's thresholds and weights). 403 without access.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return the model this project's verdict applies (its active release-gate policy's thresholds and weights). 403 without access.",
              "title": "Project Id"
            }
          },
          {
            "description": "As project_id, for the run's project. 404 for a run you cannot read.",
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "As project_id, for the run's project. 404 for a run you cannot read.",
              "title": "Run Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Scoring Model",
        "tags": [
          "Scoring Model"
        ]
      }
    },
    "/api/v1/sdk": {
      "get": {
        "description": "Return metadata for all available SDK downloads.",
        "operationId": "list_sdks_api_v1_sdk_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List available client SDKs",
        "tags": [
          "SDK Downloads"
        ]
      }
    },
    "/api/v1/sdk/cli/info": {
      "get": {
        "description": "W17 DEV-02: the newest staged CLI wheel (name, version, download path), or\n``available: false`` when this deployment was built without one (the guide\nthen shows the from-a-clone install).",
        "operationId": "cli_info_api_v1_sdk_cli_info_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "The CLI wheel this deployment serves",
        "tags": [
          "SDK Downloads"
        ]
      }
    },
    "/api/v1/sdk/cli/{filename}": {
      "get": {
        "description": "W17 DEV-02: one staged CLI wheel, by its exact file name (pip needs it).\n\nOnly a name from the staged list is served: anything else -- another\npackage, a path, ``..`` -- is a 404, never a file read.",
        "operationId": "download_cli_wheel_api_v1_sdk_cli__filename__get",
        "parameters": [
          {
            "in": "path",
            "name": "filename",
            "required": true,
            "schema": {
              "title": "Filename",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download the CLI wheel",
        "tags": [
          "SDK Downloads"
        ]
      }
    },
    "/api/v1/sdk/{lang}": {
      "get": {
        "description": "Download the SDK for the specified language.\n\n- **python** — returns a ZIP containing the reporter and its required sibling modules\n- **java** — returns `testlookup-reporter-1.0.0-all.jar` (fat JAR) if built,\n  otherwise falls back to a ZIP archive of the source directory\n- **go / js** — returns a ZIP archive of the SDK directory",
        "operationId": "download_sdk_api_v1_sdk__lang__get",
        "parameters": [
          {
            "in": "path",
            "name": "lang",
            "required": true,
            "schema": {
              "title": "Lang",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download a client SDK",
        "tags": [
          "SDK Downloads"
        ]
      }
    },
    "/api/v1/search": {
      "get": {
        "description": "Search test cases by name, suite, or error message.\n\nsearch_type options:\n- keyword  (default): ILIKE substring matching across name/suite/error columns.\n- semantic: ChromaDB vector-similarity search — finds conceptually similar failures.\n- hybrid:   Merges keyword + semantic results, deduplicates, and re-ranks by relevance.\n\nThe response always includes search_type to reflect the mode actually used\n(may fall back to keyword if ChromaDB is unavailable), plus\n``requested_search_type`` and, when they differ, WHY (``fallback_reason``:\n``semantic_unavailable`` -- the index raised; ``no_semantic_match`` -- it\nanswered nothing; ``no_text`` -- the query is filters only) with the\nsentence the page shows (``fallback_message``).\n\n``q`` takes the structured syntax; this test-result path applies\n``status:`` (one value), ``since:`` and ``type:`` naming test results.\nAny other filter means nothing is searched, and ``parsed.notes`` says so.\n``record=true`` (the /search page's own page-1 searches) records the\nsearch after the response (a recent + a usage row, no query text in the\nrow).",
        "operationId": "search_test_cases_api_v1_search_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search_type",
            "required": false,
            "schema": {
              "default": "keyword",
              "pattern": "^(keyword|semantic|hybrid)$",
              "title": "Search Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "record",
            "required": false,
            "schema": {
              "default": false,
              "title": "Record",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Search Test Cases",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/entity-counts": {
      "get": {
        "description": "Project-scoped totals for the /search page's chip + Index Health panels.\n\nThe page previously sourced these counts from ``response.entity_counts`` —\nthe per-query result counts — so the user saw 0 everywhere before they\ntyped anything. The chip count for ``Tests`` was meant to read \"how many\ntest cases exist in this project\", not \"how many match the empty query\".\nThis endpoint fills that gap with one round trip of cheap COUNT queries.\n\nFiltering:\n  * If ``project_id`` is provided, scope to that single project (after\n    tenant-access validation by ``resolve_project_scope``).\n  * If ``project_id`` is omitted (or the All-Projects sentinel resolved\n    to ``None``), scope to the union of projects the caller can see;\n    ADMIN gets the full instance.\n\nNotes:\n  * ``test_case`` joins against ``test_runs`` because test_cases hold a\n    ``test_run_id`` FK, not a direct ``project_id`` column.\n  * ``flaky_test`` counts ``flaky_quarantine_requests`` rows in *any*\n    state — proposed/approved/quarantined/re_quarantined — because the\n    /search page's ``Flaky`` chip is \"everything the system has seen\n    flagged as flaky\", not just live quarantines. Released rows are\n    excluded since those are no longer flagged-as-flaky.",
        "operationId": "get_entity_counts_api_v1_search_entity_counts_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Entity Counts",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/global": {
      "get": {
        "description": "System-wide global search across multiple entity types.\n\nSearches test cases, test runs, suites, defects, flaky tests, and releases.\nReturns mixed results with entity badges and navigation URLs.\n\nAn empty ``q`` acts as a browse: the chips on the /search page show\nproject-scoped totals from ``/entity-counts``, and selecting a chip with\nno query should surface real records of that type rather than a blank\npanel. Adapters fall back to \"most recent N\" when ``q`` is empty.\n\n``q`` takes the structured syntax (``status:`` ``suite:`` ``branch:``\n``env:`` ``type:`` ``since:`` ``release:`` ``owner:``); the ``parsed``\nblock lists the applied filters, the ignored tokens, the entity types\nthat could not apply a filter (and so were not searched) and a sentence\nfor each. A ``release:`` value is resolved only inside the caller's\nscope. ``record=true`` (the /search page's own page-1 searches) records\nthe search after the response.",
        "operationId": "global_search_endpoint_api_v1_search_global_get",
        "parameters": [
          {
            "description": "Search query — empty browses the most-recent items in scope",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "description": "Search query — empty browses the most-recent items in scope",
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "description": "Comma-separated entity types to search",
            "in": "query",
            "name": "entity_types",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated entity types to search",
              "title": "Entity Types"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 365,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Days"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "record",
            "required": false,
            "schema": {
              "default": false,
              "title": "Record",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Global Search Endpoint",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/index-status": {
      "get": {
        "description": "Return the semantic (ChromaDB) index's health within the caller's active project scope.\n\n``status``: ``healthy`` (with ``document_count`` and ``last_indexed_at``),\n``not_configured`` (no ChromaDB server answers at the configured address,\ne.g. a ``make dev`` stack without the ``local-llm`` profile) or\n``unavailable`` (a server answered but the read failed). The index holds\ntest cases only; global search is keyword over every entity either way.\n\nW12 SRCH-01/-02: also the active collection / generation / embedder (from\n``get_index_status``) and whether Hybrid / Semantic can answer here:\n``semantic_available``, ``semantic_reason`` and its sentence\n(``core/search_vocab.semantic_availability``). Every key is always present.",
        "operationId": "get_index_status_api_v1_search_index_status_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Index Status",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/recent": {
      "delete": {
        "description": "Forget the caller's recent searches (their own Redis list only).",
        "operationId": "clear_recent_searches_api_v1_search_recent_delete",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Clear Recent Searches",
        "tags": [
          "Search"
        ]
      },
      "get": {
        "description": "The caller's own last searches (Redis, newest first, at most 20, kept 30 days).\n\nKeyed by the CALLER's id. Each entry's project is re-checked against the\nprojects the reader can access NOW: an entry of a project they lost is\nleft out of the answer (this GET writes nothing, so it is filtered, not\ndeleted). A Redis fault answers an empty list.",
        "operationId": "list_recent_searches_api_v1_search_recent_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecentSearchesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Recent Searches",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/reindex": {
      "post": {
        "description": "Manually trigger a search reindex via Celery task.\n\nPass ``full=true`` for a complete rebuild; default is incremental.\n\nAuthorization mirrors the blast radius rather than one flat role. This\nendpoint previously took no user at all — every other endpoint in this\nmodule depends on ``get_current_active_user`` — so a VIEWER holding zero\nproject memberships could queue an instance-wide rebuild.\n\n* A named project needs QA_LEAD **and** membership: reindexing burns\n  worker capacity, which VIEWER (read-only) has no business spending.\n* No project named means *every* tenant's index, so that variant is\n  ADMIN-only — otherwise a lead in one project rebuilds everyone else's.",
        "operationId": "trigger_reindex_api_v1_search_reindex_post",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "full",
            "required": false,
            "schema": {
              "default": false,
              "title": "Full",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Reindex",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/similar/{test_case_id}": {
      "get": {
        "description": "Find similar FAILURES within the source test case's project.\n\nThe source's project is authorised (``resolve_project_scope``) before any\nChroma read; a malformed, unknown or textless id answers an empty list.\nThe semantic read asks for ``min(limit * 4, 40)`` candidates and keeps\nFAILED / BROKEN results only, the source excluded, the top ``limit`` in\nrelevance order. ``semantic_status`` says whether the index answered:\n``ok``, ``not_configured`` (no ChromaDB server answers) or ``unavailable``\n-- an outage is never shown as \"nothing similar\".",
        "operationId": "find_similar_failures_api_v1_search_similar__test_case_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 5,
              "maximum": 20,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Find Similar Failures",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/suggested": {
      "get": {
        "description": "What the /search page offers while its box is empty, for one project.\n\nThe tests failing most in the last 7 days (top 5, each with its failure\ncount), the newest open defects with a Jira key (top 5) and the active\nrelease. The project is authorised FIRST (400 / 403).",
        "operationId": "suggested_searches_api_v1_search_suggested_get",
        "parameters": [
          {
            "description": "The ONE project the suggestions are for",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "The ONE project the suggestions are for",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchSuggestionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Suggested Searches",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/search/usage": {
      "get": {
        "description": "Searches, the zero-result rate and the latency percentiles of recorded searches.\n\nQA lead and up. The project is authorised FIRST; without one a QA lead\nsees the projects they belong to and an ADMIN the whole deployment. No\nsearch in the window answers ``measured: false`` (never ``0 %``).",
        "operationId": "search_usage_api_v1_search_usage_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "description": "1 (today, UTC), 7 or 30",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 1,
              "description": "1 (today, UTC), 7 or 30",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchUsageRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Search Usage",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/settings/ai": {
      "get": {
        "operationId": "get_ai_config_api_v1_settings_ai_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ai Config",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "operationId": "update_ai_config_api_v1_settings_ai_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Ai Config",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/ai/embedding-index": {
      "get": {
        "description": "Which embedder every index uses NOW, what is configured, and any re-embed.\n\nDeployment-wide. The settings page polls this only while a build runs\n(``GET /settings/ai`` carries the same body on load). 503 when the state\ncannot be read: an unreadable state is never reported as in sync.",
        "operationId": "get_embedding_index_api_v1_settings_ai_embedding_index_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingIndexRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Embedding Index",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/ai/embedding-index/rebuild": {
      "post": {
        "description": "**Re-embed now**: build the CONFIGURED generation (embedder + Collection prefix).\n\nADMIN only (refused to project-bound keys); audited as\n``settings_audit_log(\"embedding_index\", \"reembed_requested\")``. 422 when\nthe configured generation is already in use and nothing is building, 409\nwhile a build toward it runs (a failed one may be retried, and so may a\nSTALLED one -- ``build_is_stalled``: its worker died), 422 with the\nembedder's sentence when this deployment refuses it.",
        "operationId": "rebuild_embedding_index_api_v1_settings_ai_embedding_index_rebuild_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingIndexRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Rebuild Embedding Index",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/ai/ml/retrain": {
      "post": {
        "description": "Queue one training run of the ML classifier (\"Train now\").",
        "operationId": "retrain_ml_classifier_api_v1_settings_ai_ml_retrain_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLRetrainAccepted"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Retrain Ml Classifier",
        "tags": [
          "AI Settings"
        ]
      }
    },
    "/api/v1/settings/ai/ml/status": {
      "get": {
        "description": "Samples, the current model, the retrain lock and the last attempt. Never 500s on an outage.",
        "operationId": "get_ml_status_api_v1_settings_ai_ml_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLStatusRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ml Status",
        "tags": [
          "AI Settings"
        ]
      }
    },
    "/api/v1/settings/ai/mode": {
      "get": {
        "description": "The analysis mode (``rules`` / ``ml`` / ``llm`` / ``auto``), for any signed-in role.\n\nThe sidebar (whether to offer Ask AI) and the chat, release-gate, run\nevidence and pipeline pages need only this, and read it for every role.\nThey read ``GET /settings/ai`` (QA lead and above), so a QA engineer,\ntester or viewer got \"Requires at least QA_LEAD role\" toasts on every\npage and never saw Ask AI (the UX redesign's browser E2E pass). Nothing\nelse of the config — providers, models, which keys are set — is here.",
        "operationId": "get_ai_mode_api_v1_settings_ai_mode_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIModeRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ai Mode",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/ai/model-status": {
      "get": {
        "description": "Probe the configured model backend and report what will really run.\n\nRead-only and best-effort: an unreachable Ollama, an unreadable\nsettings row, or a broken ML model directory all degrade into honest\nfields rather than a 500 — an operator debugging an air-gapped install\nneeds this page to render precisely when things are broken.",
        "operationId": "get_ai_model_status_api_v1_settings_ai_model_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIModelStatusRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ai Model Status",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/audit-log": {
      "get": {
        "description": "Return recent settings change audit entries.",
        "operationId": "get_audit_log_api_v1_settings_audit_log_get",
        "parameters": [
          {
            "in": "query",
            "name": "setting_key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Setting Key"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Audit Log",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/flags": {
      "get": {
        "deprecated": true,
        "description": "List all feature flags (legacy shape). Deprecated: use GET /api/v1/feature-flags.\n\nA database failure propagates to the error boundary: an empty list is a\nvalid authority answer and must never stand in for an outage.",
        "operationId": "list_feature_flags_api_v1_settings_flags_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Feature Flags",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/flags/{flag_key}": {
      "delete": {
        "deprecated": true,
        "description": "Delete a feature flag. Requires ADMIN. Deprecated: use /api/v1/feature-flags.\n\nA missing key is still a 204: no service call, no audit row.",
        "operationId": "remove_feature_flag_api_v1_settings_flags__flag_key__delete",
        "parameters": [
          {
            "in": "path",
            "name": "flag_key",
            "required": true,
            "schema": {
              "title": "Flag Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Remove Feature Flag",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "deprecated": true,
        "description": "Create or update a flag's global toggle. Requires ADMIN. Deprecated: use /api/v1/feature-flags.\n\n``scope`` and ``config`` are accepted and ignored, as they always were.",
        "operationId": "update_feature_flag_api_v1_settings_flags__flag_key__put",
        "parameters": [
          {
            "in": "path",
            "name": "flag_key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "title": "Flag Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__app_settings__FeatureFlagUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Feature Flag",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/github-app": {
      "get": {
        "description": "The deployment's GitHub App (secrets as *_set only). ADMIN.",
        "operationId": "get_github_app_settings_api_v1_settings_github_app_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubAppSettingsRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Github App Settings",
        "tags": [
          "GitHub App"
        ]
      },
      "put": {
        "description": "Store the App id / slug, and the private key / webhook secret (None keeps, \"\" clears). ADMIN.",
        "operationId": "put_github_app_settings_api_v1_settings_github_app_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitHubAppSettingsWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubAppSettingsRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Github App Settings",
        "tags": [
          "GitHub App"
        ]
      }
    },
    "/api/v1/settings/integrations": {
      "get": {
        "operationId": "get_integrations_config_api_v1_settings_integrations_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationsConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Integrations Config",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "operationId": "update_integrations_config_api_v1_settings_integrations_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationsConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationsConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Integrations Config",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/integrations/health": {
      "get": {
        "description": "Return health status for all tracked integration providers.\n\nThe deployment-wide view only (``scope_key = ''``): per-project GitHub /\nGitLab rows (W10 INT-04) are Integration Health's ``?scope=all`` read.",
        "operationId": "get_integration_health_api_v1_settings_integrations_health_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Integration Health",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/mfa-policy": {
      "get": {
        "description": "Read the workspace MFA + lockout policy. QA_LEAD or higher.",
        "operationId": "get_mfa_policy_api_v1_settings_mfa_policy_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Mfa Policy",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "description": "Update the workspace MFA + lockout policy. ADMIN only, audit-logged.",
        "operationId": "update_mfa_policy_api_v1_settings_mfa_policy_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaPolicyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Mfa Policy",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/retention-defaults": {
      "get": {
        "description": "The instance retention defaults: the stored values (NULL = the code\ndefault), the code defaults, the effective values, how many projects\ninherit each field, and who switched the default on. Reads only.",
        "operationId": "get_retention_defaults_api_v1_settings_retention_defaults_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceRetentionPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Retention Defaults",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "description": "Save the instance defaults (``clear`` resets a field to the code\ndefault). ``enabled: true`` is refused (422 ``enable_via_flow``);\n``enabled: false`` switches the default off at once. Interactive login only.",
        "operationId": "update_retention_defaults_api_v1_settings_retention_defaults_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceRetentionPolicyWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceRetentionPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Retention Defaults",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/retention-defaults/enable": {
      "post": {
        "description": "Switch the instance default ON for every project without its own\n``enabled`` (D12): the preview's hash must still match (409\n``preview_stale``) and the confirmation must be the exact phrase (422\n``confirmation_mismatch``). Interactive login only.",
        "operationId": "enable_retention_defaults_api_v1_settings_retention_defaults_enable_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceEnableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceRetentionPolicyRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Enable Retention Defaults",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/retention-defaults/enable-preview": {
      "get": {
        "description": "Every project switching the default on would affect (no policy row, or\nno explicit ``enabled``), the hash ``POST …/enable`` must echo and the phrase\nit must type. An instance administrator's deployment-wide view. Writes\nNOTHING.",
        "operationId": "preview_retention_defaults_enable_api_v1_settings_retention_defaults_enable_preview_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceEnablePreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Retention Defaults Enable",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/review-gate": {
      "get": {
        "description": "When unreviewed AI reports stop leaving TestLookup: the stored date (or\nnone = audit only), whether the gate is enforced right now and why, and the\ndistribution attempts that would have been withheld in the last 30 days.\nReads only.",
        "operationId": "get_review_gate_api_v1_settings_review_gate_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewGateRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Review Gate",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "description": "Set the enforcement date (an ISO-8601 instant with an offset; past or\nfuture) or clear it with ``null`` (back to audit only). A past instant\nenforces at once. Interactive login only; audited once per actual change.",
        "operationId": "update_review_gate_api_v1_settings_review_gate_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewGateWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewGateRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Review Gate",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/secret-providers": {
      "get": {
        "operationId": "get_secret_providers_api_v1_settings_secret_providers_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Secret Providers Api V1 Settings Secret Providers Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Secret Providers",
        "tags": [
          "Secret providers"
        ]
      }
    },
    "/api/v1/settings/smtp": {
      "get": {
        "description": "Return current SMTP configuration (password is never returned — only a boolean flag).",
        "operationId": "get_smtp_config_api_v1_settings_smtp_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Smtp Config",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "description": "Persist SMTP configuration to the database. Password is stored in secret_refs, not in app_settings.",
        "operationId": "update_smtp_config_api_v1_settings_smtp_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmtpConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Smtp Config",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/smtp/test": {
      "post": {
        "description": "Send a test email to the current user's address using the stored SMTP config.",
        "operationId": "test_smtp_config_api_v1_settings_smtp_test_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpTestResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Test Smtp Config",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/settings/storage": {
      "get": {
        "operationId": "get_storage_config_api_v1_settings_storage_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Storage Config",
        "tags": [
          "Settings"
        ]
      },
      "put": {
        "operationId": "update_storage_config_api_v1_settings_storage_put",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageConfigRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Storage Config",
        "tags": [
          "Settings"
        ]
      }
    },
    "/api/v1/shared/reports/{token}": {
      "get": {
        "description": "Render the shared HTML report view (no auth required — token-based).\n\nA refused (unreviewed, enforced) report answers 409: an HTML page for a\nbrowser, the JSON ``refusal_detail`` for every other caller.",
        "operationId": "view_shared_report_api_v1_shared_reports__token__get",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "View Shared Report",
        "tags": [
          "Shared Reports"
        ]
      }
    },
    "/api/v1/shared/reports/{token}/pdf": {
      "get": {
        "description": "Download the shared PDF report (no auth required — token-based).",
        "operationId": "download_shared_report_pdf_api_v1_shared_reports__token__pdf_get",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download Shared Report Pdf",
        "tags": [
          "Shared Reports"
        ]
      }
    },
    "/api/v1/sso/acs": {
      "post": {
        "description": "SAML Assertion Consumer Service — processes the SAML Response from the IdP.\n\nThis endpoint receives the base64-encoded SAMLResponse via form POST,\nvalidates the assertion, and either logs in an existing user or JIT-provisions\na new one.\n\nThe POST comes from the browser. It answers with a 303 into the app\n(``/sso/callback``) carrying a one-time code in the URL fragment, which the\napp exchanges for the tokens (``POST /sso/exchange``); a refusal goes back\nto ``/login``. A client that asks for JSON gets the tokens as before.",
        "operationId": "saml_acs_api_v1_sso_acs_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOLoginResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Saml Acs",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/configs": {
      "get": {
        "description": "List all SSO configurations (ADMIN only).",
        "operationId": "list_sso_configs_api_v1_sso_configs_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SSOConfigResponse"
                  },
                  "title": "Response List Sso Configs Api V1 Sso Configs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Sso Configs",
        "tags": [
          "SSO / SAML"
        ]
      },
      "post": {
        "description": "Create a new SSO configuration (ADMIN only).",
        "operationId": "create_sso_config_api_v1_sso_configs_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOConfigCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfigResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Sso Config",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/configs/{config_id}": {
      "delete": {
        "description": "Delete an SSO configuration (ADMIN only).",
        "operationId": "delete_sso_config_api_v1_sso_configs__config_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Sso Config",
        "tags": [
          "SSO / SAML"
        ]
      },
      "get": {
        "description": "Get a specific SSO configuration (ADMIN only).",
        "operationId": "get_sso_config_api_v1_sso_configs__config_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfigResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Sso Config",
        "tags": [
          "SSO / SAML"
        ]
      },
      "patch": {
        "description": "Update an SSO configuration (ADMIN only).",
        "operationId": "update_sso_config_api_v1_sso_configs__config_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfigResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Sso Config",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/configs/{config_id}/preview-role": {
      "post": {
        "description": "W20 ADM-08a: the role a user in these IdP groups would get (ADMIN only; pure, writes nothing).\n\nThe posted ``role_mapping`` / ``default_role`` preview an unsaved edit; otherwise the stored ones answer.",
        "operationId": "preview_sso_role_api_v1_sso_configs__config_id__preview_role_post",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSORolePreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSORolePreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Preview Sso Role",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/configs/{config_id}/test": {
      "post": {
        "description": "Test an SSO configuration by validating the certificate and IdP metadata (ADMIN only).",
        "operationId": "test_sso_connection_api_v1_sso_configs__config_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Config Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOTestConnectionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Test Sso Connection",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/exchange": {
      "post": {
        "description": "The tokens for an SSO sign-in the ACS completed, for its one-time code.\n\nPublic, like the ACS: the code is the credential. It works once, within a\nminute of the IdP's response.",
        "operationId": "exchange_sso_code_api_v1_sso_exchange_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOLoginResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Exchange Sso Code",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/login-url": {
      "get": {
        "description": "The IdP URL that starts an SP-initiated login: the IdP SSO URL carrying a\nSAML AuthnRequest (HTTP-Redirect binding) and, when ``next`` is an\napp-relative path, a RelayState the browser returns to after sign-in.",
        "operationId": "get_sso_login_url_api_v1_sso_login_url_get",
        "parameters": [
          {
            "in": "query",
            "name": "next",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Sso Login Url Api V1 Sso Login Url Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Sso Login Url",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/metadata": {
      "get": {
        "description": "Return SP metadata for configuring the IdP.\n\nW20 ADM-08c: the single-logout URL is advertised only while the active SAML\nconfiguration has an IdP SLO URL (``/sso/slo`` answers 404 otherwise, and\nadvertising it then sent IdPs to that 404). IdP-initiated SLO only, so no\nSP signing key is published.",
        "operationId": "get_sp_metadata_api_v1_sso_metadata_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Sp Metadata Api V1 Sso Metadata Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Sp Metadata",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/oidc/callback": {
      "get": {
        "description": "W20 ADM-08b: the IdP sends the browser back here with ``code`` + ``state``.\n\nThe state is burned first (single use), the code exchanged with the client secret and the PKCE verifier,\nthe ID token validated (signature / iss / aud / exp / nonce), then the user is JIT-provisioned or linked\nand handed into the app through the one-time-code fragment. Every refusal goes back to ``/login`` with a\ngeneric notice; the reason stays in the server log and the identity-event audit.",
        "operationId": "oidc_callback_api_v1_sso_oidc_callback_get",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oidc Callback",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/oidc/login": {
      "get": {
        "description": "W20 ADM-08b: start an OIDC sign-in — 302 to the IdP's authorization endpoint (state, nonce, PKCE S256).",
        "operationId": "oidc_login_api_v1_sso_oidc_login_get",
        "parameters": [
          {
            "in": "query",
            "name": "next",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oidc Login",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/scim-groups": {
      "get": {
        "operationId": "list_scim_groups_api_v1_sso_scim_groups_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Scim Groups Api V1 Sso Scim Groups Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Scim Groups",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/scim-groups/{group_id}/mappings": {
      "put": {
        "operationId": "put_scim_group_mappings_api_v1_sso_scim_groups__group_id__mappings_put",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupMappingsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Put Scim Group Mappings Api V1 Sso Scim Groups  Group Id  Mappings Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Put Scim Group Mappings",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/slo": {
      "get": {
        "description": "W20 ADM-08c: IdP-initiated single logout, HTTP-Redirect binding (see ``saml_single_logout``).",
        "operationId": "saml_single_logout_redirect",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Saml Single Logout Redirect Binding",
        "tags": [
          "SSO / SAML"
        ]
      },
      "post": {
        "description": "W20 ADM-08c: IdP-initiated single logout, HTTP-POST binding (see ``saml_single_logout``).",
        "operationId": "saml_single_logout_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Saml Single Logout Post Binding",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/sso/status": {
      "get": {
        "description": "Public endpoint to check if SSO is enabled and available.",
        "operationId": "get_sso_status_api_v1_sso_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Sso Status Api V1 Sso Status Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Sso Status",
        "tags": [
          "SSO / SAML"
        ]
      }
    },
    "/api/v1/stream/active": {
      "get": {
        "operationId": "list_active_sessions_api_v1_stream_active_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters: sessions in any of these suites; trimmed, case-insensitive.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters: sessions in any of these suites; trimmed, case-insensitive.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Cutoff for *completed* sessions/runs to include alongside the always-current active set. 1 = last 24 hours; 0 = no cutoff. Default 7 preserves the prior hardcoded window.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Cutoff for *completed* sessions/runs to include alongside the always-current active set. 1 = last 24 hours; 0 = no cutoff. Default 7 preserves the prior hardcoded window.",
              "maximum": 365,
              "minimum": 0,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveSessionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Active Sessions",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/stream/events/batch": {
      "post": {
        "operationId": "ingest_event_batch_api_v1_stream_events_batch_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-Session-Token",
            "required": true,
            "schema": {
              "title": "X-Session-Token",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveEventBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveEventBatchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Ingest Event Batch",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/stream/http-exchanges": {
      "post": {
        "description": "W23d AGT-14: the captured HTTP exchanges of ONE live test (opt-in capture).\n\nAuthenticated like ``POST /ingest`` (JWT or API key, the ingest role). The\nBODY ``session_id`` names the live session; the project, the run and the\ntest case id are DERIVED from that session, never read from the body. A key\nbound to another project is refused, the caller must be a member of the\nsession's project, and the body ``run_id`` must be the session's own. The\nexchanges were already cut and redacted by the model; the store redacts\nthem again (idempotent) and never fails the request on a Mongo error.",
        "operationId": "ingest_http_exchanges_api_v1_stream_http_exchanges_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveHttpExchangesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveHttpExchangesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ingest Http Exchanges",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/stream/ingest": {
      "post": {
        "description": "Stream test results using only an API key — no /sessions ceremony.\n\nAuth: ``X-API-Key`` only. The key must be project-scoped (so the server\ncan derive ``project_id`` itself) and carry the ``stream:write`` scope.\nThe first call for a given ``run_id`` auto-creates a live session;\nsubsequent calls reuse it.",
        "operationId": "ingest_via_api_key_api_v1_stream_ingest_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveStreamIngestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveStreamIngestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Ingest Via Api Key",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/stream/sessions": {
      "post": {
        "operationId": "create_session_api_v1_stream_sessions_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveSessionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Session",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/stream/sessions/{session_id}": {
      "delete": {
        "operationId": "close_session_api_v1_stream_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Close Session",
        "tags": [
          "Live Stream"
        ]
      },
      "get": {
        "operationId": "get_session_api_v1_stream_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Session",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/stream/sse/{project_id}": {
      "get": {
        "operationId": "sse_stream_api_v1_stream_sse__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sse Stream",
        "tags": [
          "Live Stream"
        ]
      }
    },
    "/api/v1/subject-data-jobs/{subject_job_id}": {
      "get": {
        "description": "One export or erasure job (the cards poll it). Writes nothing.",
        "operationId": "get_subject_data_job_api_v1_subject_data_jobs__subject_job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "subject_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subject Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Subject Data Job",
        "tags": [
          "Subject rights"
        ]
      }
    },
    "/api/v1/subject-data-jobs/{subject_job_id}/download": {
      "get": {
        "description": "Stream a succeeded, unexpired export. 409 not an export / not ready / failed, 410 expired (no audit row on\na refusal); then ONE ``access_audit_logs`` row is COMMITTED — the attempt is recorded even when storage\ncannot give the first byte (502 ``archive_unreadable``). The job row is never touched.",
        "operationId": "download_subject_export_api_v1_subject_data_jobs__subject_job_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "subject_job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subject Job Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Download Subject Export",
        "tags": [
          "Subject rights"
        ]
      }
    },
    "/api/v1/suites": {
      "get": {
        "description": "List test suites. ``project_id`` scopes to one project; otherwise the\nresponse covers every project the caller can see (ADMIN: all).",
        "operationId": "list_suites_api_v1_suites_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSuiteListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Suites",
        "tags": [
          "Test Suites"
        ]
      },
      "post": {
        "operationId": "create_suite_api_v1_suites_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSuiteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Suite",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/suites/{suite_id}": {
      "delete": {
        "operationId": "delete_suite_api_v1_suites__suite_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "suite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suite Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Suite",
        "tags": [
          "Test Suites"
        ]
      },
      "get": {
        "operationId": "get_suite_api_v1_suites__suite_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suite Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSuiteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite",
        "tags": [
          "Test Suites"
        ]
      },
      "patch": {
        "operationId": "update_suite_api_v1_suites__suite_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "suite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suite Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSuiteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Suite",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/suites/{suite_id}/set-default": {
      "post": {
        "description": "Promote this suite to ``is_default`` within its project (demoting the\nprior default). New ingested test cases without an explicit suite land\nin whichever suite is currently default.",
        "operationId": "set_default_api_v1_suites__suite_id__set_default_post",
        "parameters": [
          {
            "in": "path",
            "name": "suite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suite Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSuiteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Set Default",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/suites/{suite_id}/test-cases": {
      "get": {
        "operationId": "list_suite_test_cases_api_v1_suites__suite_id__test_cases_get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suite Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonicalTestCaseListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Suite Test Cases",
        "tags": [
          "Test Suites"
        ]
      }
    },
    "/api/v1/test-cases/{test_case_id}/review": {
      "delete": {
        "description": "Drop the review row so the case reverts to ``pending_review``.",
        "operationId": "clear_test_case_review_api_v1_test_cases__test_case_id__review_delete",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Clear Test Case Review",
        "tags": [
          "Test Execution Reviews"
        ]
      },
      "get": {
        "description": "Current review state for a test case, or ``null`` if no transition\nhas been recorded yet (the implicit ``pending_review`` initial state).\n\nReturns 200 with ``null`` rather than 404 for the \"no review yet\"\ncase so test-run detail pages don't pepper the browser network\ntab with red error rows on every page load. The frontend service\ntreats ``null`` and 404 identically — but 200/null keeps the tab\nclean and removes a UI-test false positive. (Bug 2026-05-19.)",
        "operationId": "get_test_case_review_api_v1_test_cases__test_case_id__review_get",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TestExecutionReviewRead"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Test Case Review Api V1 Test Cases  Test Case Id  Review Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case Review",
        "tags": [
          "Test Execution Reviews"
        ]
      },
      "put": {
        "description": "Transition the review state. The router resolves the project via\nTestRun, enforces tenant access, then delegates to the service for\nstate-machine validation + write.",
        "operationId": "upsert_test_case_review_api_v1_test_cases__test_case_id__review_put",
        "parameters": [
          {
            "in": "path",
            "name": "test_case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestExecutionReviewUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestExecutionReviewRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Test Case Review",
        "tags": [
          "Test Execution Reviews"
        ]
      }
    },
    "/api/v1/test-management/audit": {
      "get": {
        "operationId": "get_audit_log_api_v1_test_management_audit_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Type"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Action"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Audit Log",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/batches/{batch_id}": {
      "get": {
        "operationId": "get_batch_api_v1_test_management_batches__batch_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "batch_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Batch Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationBatchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Batch",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/batches/{batch_id}/accept": {
      "post": {
        "operationId": "batch_accept_api_v1_test_management_batches__batch_id__accept_post",
        "parameters": [
          {
            "in": "path",
            "name": "batch_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Batch Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchAcceptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Batch Accept",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/batches/{batch_id}/cases/{case_id}/accept": {
      "post": {
        "operationId": "accept_case_api_v1_test_management_batches__batch_id__cases__case_id__accept_post",
        "parameters": [
          {
            "in": "path",
            "name": "batch_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Batch Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptCaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Accept Case",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/batches/{batch_id}/cases/{case_id}/reject": {
      "post": {
        "operationId": "reject_case_api_v1_test_management_batches__batch_id__cases__case_id__reject_post",
        "parameters": [
          {
            "in": "path",
            "name": "batch_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Batch Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectCaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Reject Case",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/batches/{batch_id}/coverage": {
      "get": {
        "operationId": "get_batch_coverage_api_v1_test_management_batches__batch_id__coverage_get",
        "parameters": [
          {
            "in": "path",
            "name": "batch_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Batch Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RequirementCoverageSchema"
                  },
                  "title": "Response Get Batch Coverage Api V1 Test Management Batches  Batch Id  Coverage Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Batch Coverage",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/batches/{batch_id}/eval": {
      "get": {
        "operationId": "batch_eval_api_v1_test_management_batches__batch_id__eval_get",
        "parameters": [
          {
            "in": "path",
            "name": "batch_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Batch Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Batch Eval",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases": {
      "get": {
        "operationId": "list_test_cases_api_v1_test_management_cases_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/TestCaseLifecycleState"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "test_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Test Type"
            }
          },
          {
            "in": "query",
            "name": "priority",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Priority"
            }
          },
          {
            "in": "query",
            "name": "feature_area",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Feature Area"
            }
          },
          {
            "in": "query",
            "name": "ai_generated",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ai Generated"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Suite Name"
            }
          },
          {
            "in": "query",
            "name": "owner",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner"
            }
          },
          {
            "in": "query",
            "name": "automation",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Automation"
            }
          },
          {
            "in": "query",
            "name": "requirement",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Requirement"
            }
          },
          {
            "description": "When true, merge synthesised rows derived from per-run test_cases into the response so the Test Management page can surface automation-ingested tests alongside authored ones. Deduped by test_fingerprint — any fingerprint already linked to a managed_test_cases row is skipped.",
            "in": "query",
            "name": "include_automation",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, merge synthesised rows derived from per-run test_cases into the response so the Test Management page can surface automation-ingested tests alongside authored ones. Deduped by test_fingerprint — any fingerprint already linked to a managed_test_cases row is skipped.",
              "title": "Include Automation",
              "type": "boolean"
            }
          },
          {
            "description": "Include archived authored cases when no exact status filter is set.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include archived authored cases when no exact status filter is set.",
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Test Cases",
        "tags": [
          "Test Management"
        ]
      },
      "post": {
        "operationId": "create_test_case_api_v1_test_management_cases_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagedTestCaseCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Test Case",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/ai-coverage": {
      "post": {
        "operationId": "ai_coverage_analysis_api_v1_test_management_cases_ai_coverage_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AICoverageAnalysisRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AICoverageAnalysisResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Coverage Analysis",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/ai-generate": {
      "post": {
        "operationId": "ai_generate_cases_api_v1_test_management_cases_ai_generate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIGenerateTestCasesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIGenerateTestCasesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Generate Cases",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/ai-generate/async": {
      "post": {
        "operationId": "ai_generate_cases_async_api_v1_test_management_cases_ai_generate_async_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIGenerateTestCasesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AITaskEnqueueResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Generate Cases Async",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/ai-task/{task_id}": {
      "get": {
        "operationId": "get_ai_task_status_api_v1_test_management_cases_ai_task__task_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "title": "Task Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AITaskStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Ai Task Status",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/bulk": {
      "post": {
        "description": "Change the status, owner, priority, tags or suite of selected cases of ONE project.\n\nThe body's ``project_id`` is authorised FIRST (403 before anything is\nloaded); ``case_ids`` are then loaded only within that project, so another\nproject's id is ``not_found`` in the per-case results, like an unknown one.\nOne 200 answers per case; a refused case never fails the request.",
        "operationId": "bulk_edit_test_cases_api_v1_test_management_cases_bulk_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestCaseBulkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseBulkResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Bulk Edit Test Cases",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/evidence-gaps": {
      "get": {
        "operationId": "get_test_case_evidence_gaps_api_v1_test_management_cases_evidence_gaps_get",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": true,
            "schema": {
              "pattern": "^(never_executed|automation_vanished|flaky_active|no_owner)$",
              "title": "Kind",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 200,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceGapListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case Evidence Gaps",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/export/excel": {
      "get": {
        "description": "Export test cases to an Excel (.xlsx) file.\n\nHonours the case list's filters (``status`` / ``test_type`` / ``priority``\nrepeatable, ``owner``, ``automation``, ``requirement``, the list's search)\nand keeps its own default of every status. Columns 1-18 are unchanged;\n``ID``, ``Suite`` and ``Description`` are appended as 19-21 (an import\nreads them back; prepending would renumber the pinned columns).",
        "operationId": "export_test_cases_excel_api_v1_test_management_cases_export_excel_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "test_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Test Type"
            }
          },
          {
            "in": "query",
            "name": "priority",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Priority"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "owner",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner"
            }
          },
          {
            "in": "query",
            "name": "automation",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Automation"
            }
          },
          {
            "in": "query",
            "name": "requirement",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Requirement"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Test Cases Excel",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/import": {
      "post": {
        "description": "A dry run by default (nothing written); ``dry_run=false`` creates every valid row as a Draft.",
        "operationId": "import_test_cases_api_v1_test_management_cases_import_post",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dry_run",
            "required": false,
            "schema": {
              "default": true,
              "title": "Dry Run",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_import_test_cases_api_v1_test_management_cases_import_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseImportResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Import Test Cases",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/needs-review": {
      "get": {
        "description": "Generated cases held back for human review, lowest faithfulness first.\n\nPopulated by the faithfulness gate (Tier 2 item 9). When the\n``rag_faithfulness_gate`` flag is off nothing sets ``needs_review_reason``,\nso this returns an empty list rather than an error — \"nothing is queued\"\nand \"the gate is not running\" look the same here on purpose, because the\nqueue itself cannot tell them apart. `/settings/ai` is where the flag state\nis reported.",
        "operationId": "cases_needing_review_api_v1_test_management_cases_needs_review_get",
        "parameters": [
          {
            "description": "Project to list — never a fleet view",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to list — never a fleet view",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Cases Needing Review",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases/rag-generate": {
      "post": {
        "operationId": "rag_generate_api_v1_test_management_cases_rag_generate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RagGenerateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagGenerateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Rag Generate",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases/rag-retrieve": {
      "post": {
        "operationId": "rag_retrieve_api_v1_test_management_cases_rag_retrieve_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RagRetrieveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagRetrieveResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Rag Retrieve",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases/stale": {
      "get": {
        "operationId": "list_stale_cases_api_v1_test_management_cases_stale_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Stale Cases",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}": {
      "delete": {
        "operationId": "deprecate_test_case_api_v1_test_management_cases__case_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TestCaseDeprecateRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Deprecate Test Case",
        "tags": [
          "Test Management"
        ]
      },
      "get": {
        "operationId": "get_test_case_api_v1_test_management_cases__case_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case",
        "tags": [
          "Test Management"
        ]
      },
      "patch": {
        "operationId": "update_test_case_api_v1_test_management_cases__case_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagedTestCaseUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Test Case",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/ai-review": {
      "post": {
        "operationId": "ai_review_case_api_v1_test_management_cases__case_id__ai_review_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIReviewTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Review Case",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/allowed-transitions": {
      "get": {
        "operationId": "get_allowed_transitions_api_v1_test_management_cases__case_id__allowed_transitions_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AllowedTransitionResponse"
                  },
                  "title": "Response Get Allowed Transitions Api V1 Test Management Cases  Case Id  Allowed Transitions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Allowed Transitions",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/citations": {
      "get": {
        "operationId": "get_case_citations_api_v1_test_management_cases__case_id__citations_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Case Citations",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/comments": {
      "get": {
        "operationId": "list_comments_api_v1_test_management_cases__case_id__comments_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TestCaseCommentResponse"
                  },
                  "title": "Response List Comments Api V1 Test Management Cases  Case Id  Comments Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Comments",
        "tags": [
          "Test Management"
        ]
      },
      "post": {
        "operationId": "add_comment_api_v1_test_management_cases__case_id__comments_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestCaseCommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseCommentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Add Comment",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/dismiss-stale": {
      "post": {
        "operationId": "dismiss_stale_api_v1_test_management_cases__case_id__dismiss_stale_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Dismiss Stale",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/history": {
      "get": {
        "operationId": "get_test_case_history_api_v1_test_management_cases__case_id__history_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TestCaseVersionResponse"
                  },
                  "title": "Response Get Test Case History Api V1 Test Management Cases  Case Id  History Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case History",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/request-review": {
      "post": {
        "operationId": "request_review_api_v1_test_management_cases__case_id__request_review_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseReviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Request Review",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/requirements": {
      "get": {
        "description": "The case's manual requirement links, oldest first.",
        "operationId": "list_case_requirements_api_v1_test_management_cases__case_id__requirements_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequirementLinkListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Case Requirements",
        "tags": [
          "Test Management"
        ]
      },
      "post": {
        "description": "Link a requirement key to the case (TESTER+); records ``test_case.requirement_linked``.",
        "operationId": "add_case_requirement_api_v1_test_management_cases__case_id__requirements_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequirementLinkCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequirementLinkRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Add Case Requirement",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/requirements/{requirement_link_id}": {
      "delete": {
        "description": "Unlink one of THIS case's requirement links (TESTER+); records ``test_case.requirement_unlinked``.",
        "operationId": "remove_case_requirement_api_v1_test_management_cases__case_id__requirements__requirement_link_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "requirement_link_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Requirement Link Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Remove Case Requirement",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/restore": {
      "post": {
        "description": "Save an older version's content as a new version; status and owner are kept.\n\nAnswers the case unchanged (same version) when that version's content is\nalready the current one.",
        "operationId": "restore_test_case_version_api_v1_test_management_cases__case_id__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestCaseRestoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Restore Test Case Version",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/review-action": {
      "post": {
        "operationId": "review_action_api_v1_test_management_cases__case_id__review_action_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Review Action",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/reviews": {
      "get": {
        "operationId": "get_reviews_api_v1_test_management_cases__case_id__reviews_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TestCaseReviewResponse"
                  },
                  "title": "Response Get Reviews Api V1 Test Management Cases  Case Id  Reviews Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Reviews",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/timeline": {
      "get": {
        "description": "The case's timeline (TCL-05): newest first, keyset-paged by ``cursor``.",
        "operationId": "get_test_case_timeline_api_v1_test_management_cases__case_id__timeline_get",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kinds",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kinds"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestCaseTimelineResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Test Case Timeline",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/cases/{case_id}/transition": {
      "post": {
        "operationId": "transition_test_case_api_v1_test_management_cases__case_id__transition_post",
        "parameters": [
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestCaseTransitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTestCaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Transition Test Case",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/health": {
      "get": {
        "description": "Library health for ONE project (All Projects has none: 422 with the sentence).",
        "operationId": "get_library_health_api_v1_test_management_health_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryHealthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Library Health",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans": {
      "get": {
        "operationId": "list_plans_api_v1_test_management_plans_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Plans",
        "tags": [
          "Test Management"
        ]
      },
      "post": {
        "operationId": "create_plan_api_v1_test_management_plans_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestPlanCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Plan",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/ai-create": {
      "post": {
        "operationId": "ai_create_plan_api_v1_test_management_plans_ai_create_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIOptimizePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Create Plan",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/ai-create/async": {
      "post": {
        "operationId": "ai_create_plan_async_api_v1_test_management_plans_ai_create_async_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIOptimizePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AITaskEnqueueResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Create Plan Async",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/{plan_id}": {
      "get": {
        "operationId": "get_plan_api_v1_test_management_plans__plan_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Plan",
        "tags": [
          "Test Management"
        ]
      },
      "patch": {
        "operationId": "update_plan_api_v1_test_management_plans__plan_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestPlanUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Plan",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/{plan_id}/export/pdf": {
      "get": {
        "description": "Export a test plan to a PDF document.",
        "operationId": "export_test_plan_pdf_api_v1_test_management_plans__plan_id__export_pdf_get",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Test Plan Pdf",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/{plan_id}/export/word": {
      "get": {
        "description": "Export a test plan to a Word (.docx) document.",
        "operationId": "export_test_plan_word_api_v1_test_management_plans__plan_id__export_word_get",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Test Plan Word",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/{plan_id}/items": {
      "get": {
        "operationId": "list_plan_items_api_v1_test_management_plans__plan_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TestPlanItemResponse"
                  },
                  "title": "Response List Plan Items Api V1 Test Management Plans  Plan Id  Items Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Plan Items",
        "tags": [
          "Test Management"
        ]
      },
      "post": {
        "operationId": "add_plan_item_api_v1_test_management_plans__plan_id__items_post",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestPlanItemCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanItemResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Add Plan Item",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/{plan_id}/items/{item_id}": {
      "delete": {
        "operationId": "remove_plan_item_api_v1_test_management_plans__plan_id__items__item_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Remove Plan Item",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/plans/{plan_id}/items/{item_id}/execute": {
      "patch": {
        "operationId": "record_execution_api_v1_test_management_plans__plan_id__items__item_id__execute_patch",
        "parameters": [
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Plan Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteTestPlanItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestPlanItemResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Record Execution",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/rag/status": {
      "get": {
        "description": "RAG feature status plus adoption counts **for the caller's projects**.\n\nThe counts were previously unscoped ``COUNT(*)`` across every tenant, on an\nendpoint with no role or project guard, so any authenticated user could\nread the whole install's totals. ``get_accessible_project_ids`` returns\n``None`` for an ADMIN (sees everything) and a membership set otherwise.\n\n``project_id`` scopes ``enabled`` only (the generate tab passes its\nproject, so it says \"not enabled\" exactly when generation would 503); a\nnon-member is refused before anything is read.",
        "operationId": "rag_status_api_v1_test_management_rag_status_get",
        "parameters": [
          {
            "description": "The project the page is about: `enabled` is then that project's answer for the caller (project and role allow-lists applied).",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The project the page is about: `enabled` is then that project's answer for the caller (project and role allow-lists applied).",
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Rag Status",
        "tags": [
          "RAG Generation"
        ]
      }
    },
    "/api/v1/test-management/strategies": {
      "get": {
        "operationId": "list_strategies_api_v1_test_management_strategies_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TestStrategyResponse"
                  },
                  "title": "Response List Strategies Api V1 Test Management Strategies Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Strategies",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/strategies/ai-generate": {
      "post": {
        "operationId": "ai_generate_strategy_api_v1_test_management_strategies_ai_generate_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIGenerateStrategyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestStrategyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Generate Strategy",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/strategies/ai-generate/async": {
      "post": {
        "operationId": "ai_generate_strategy_async_api_v1_test_management_strategies_ai_generate_async_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIGenerateStrategyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AITaskEnqueueResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Ai Generate Strategy Async",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/strategies/{strategy_id}": {
      "get": {
        "operationId": "get_strategy_api_v1_test_management_strategies__strategy_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "strategy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Strategy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestStrategyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Strategy",
        "tags": [
          "Test Management"
        ]
      },
      "put": {
        "operationId": "update_strategy_api_v1_test_management_strategies__strategy_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "strategy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Strategy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestStrategyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestStrategyResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Strategy",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/strategies/{strategy_id}/export/pdf": {
      "get": {
        "description": "Export a test strategy to a PDF document.",
        "operationId": "export_test_strategy_pdf_api_v1_test_management_strategies__strategy_id__export_pdf_get",
        "parameters": [
          {
            "in": "path",
            "name": "strategy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Strategy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Test Strategy Pdf",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/strategies/{strategy_id}/export/word": {
      "get": {
        "description": "Export a test strategy to a Word (.docx) document.",
        "operationId": "export_test_strategy_word_api_v1_test_management_strategies__strategy_id__export_word_get",
        "parameters": [
          {
            "in": "path",
            "name": "strategy_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Strategy Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Test Strategy Word",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suite-owners": {
      "get": {
        "description": "Resolve owners for a project's suites.\n\nWith ``suite_name`` set, returns a single-item list (or an empty list\nwhen neither an explicit owner nor a project manager is configured —\ncallers should not rely on a 404 for the empty case so the UI can show\na neutral \"Unassigned\" badge).",
        "operationId": "list_suite_owners_api_v1_test_management_suite_owners_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "If set, returns the single suite owner.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "If set, returns the single suite owner.",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SuiteOwnerResponse"
                  },
                  "title": "Response List Suite Owners Api V1 Test Management Suite Owners Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Suite Owners",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suite-owners/{suite_name}": {
      "put": {
        "description": "Assign or clear (``owner_user_id=null``) the suite's explicit owner.",
        "operationId": "set_suite_owner_api_v1_test_management_suite_owners__suite_name__put",
        "parameters": [
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuiteOwnerUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuiteOwnerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Set Suite Owner",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suite-reviews": {
      "get": {
        "operationId": "list_suite_reviews_api_v1_test_management_suite_reviews_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Suite Name"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(pending|confirmed|acknowledged|review_later)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "test_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Test Run Id"
            }
          },
          {
            "in": "query",
            "name": "reviewer_user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reviewer User Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SuiteReviewResponse"
                  },
                  "title": "Response List Suite Reviews Api V1 Test Management Suite Reviews Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Suite Reviews",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suite-reviews/by-run/{test_run_id}": {
      "get": {
        "description": "All suite reviews for a single run (used by the run-detail page).",
        "operationId": "list_reviews_for_run_api_v1_test_management_suite_reviews_by_run__test_run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "test_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SuiteReviewResponse"
                  },
                  "title": "Response List Reviews For Run Api V1 Test Management Suite Reviews By Run  Test Run Id  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Reviews For Run",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suite-reviews/by-run/{test_run_id}/{suite_name}": {
      "put": {
        "description": "Set the review state for (run, suite). Creates the row on first call.\n\nNon-gating: the AI pipeline already wrote ``AIAnalysis`` rows for this\nrun independently. This call records the human verdict on top.",
        "operationId": "upsert_review_for_run_suite_api_v1_test_management_suite_reviews_by_run__test_run_id___suite_name__put",
        "parameters": [
          {
            "in": "path",
            "name": "test_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Test Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuiteReviewUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuiteReviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Upsert Review For Run Suite",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suites": {
      "get": {
        "description": "Return test suites grouped by suite_name, combining automation test_cases\n(from ingested runs) and manually authored managed_test_cases.\n\n``release_id`` / ``suite_name`` repeat (OR within each). A release keeps\nthe suites and counts of runs in those releases (manual cases, which never\nran in a release, are then left out); a suite name keeps those suites\n(trimmed, case-insensitive). The body stays a JSON list, so a bounded\nsummary of the analytics envelope (ids and counts, no names, <= 2 KB;\n``analytics_meta.header_summary``) travels in the ``X-Analytics-Meta``\nheader (VIZ-204).",
        "operationId": "list_test_suites_in_scope_api_v1_test_management_suites_get",
        "parameters": [
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Test Suites In Scope",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suites/{suite_name}/cases": {
      "get": {
        "description": "Paginated test cases for a suite, merging automation runs +\nmanaged cases. Returns ``{items, total, page, pages, size}``.\n\nSuite-match semantics: per-row ``tc.suite_name`` OR run-level\n``tr.primary_suite_name`` — both contribute, so a SDK that stamps\nthe Java class as the per-row name but ``testlookup.suite`` at the\nrun level still surfaces the case under the run-level suite.",
        "operationId": "get_suite_test_cases_api_v1_test_management_suites__suite_name__cases_get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 500,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 500,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite Test Cases",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suites/{suite_name}/changes": {
      "get": {
        "description": "Return suite membership change events, optionally filtered by run.",
        "operationId": "get_suite_changes_api_v1_test_management_suites__suite_name__changes_get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run Id"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite Changes",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suites/{suite_name}/deleted": {
      "get": {
        "description": "Return deleted/needs_review members from the <suite>-deleted bucket.",
        "operationId": "get_suite_deleted_api_v1_test_management_suites__suite_name__deleted_get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite Deleted",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suites/{suite_name}/membership": {
      "get": {
        "description": "Return current suite membership records from the traceability model.",
        "operationId": "get_suite_membership_api_v1_test_management_suites__suite_name__membership_get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(active|deleted|needs_review)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite Membership",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/suites/{suite_name}/trend": {
      "get": {
        "description": "Per-day trend points for one suite over the time window.\n\n``release_id`` repeats (OR) and keeps the runs of those releases. The\nsuite is the path segment; a ``suite_name`` query parameter cannot widen\nor narrow it and is reported in ``meta.ignored_filters``.",
        "operationId": "get_suite_trend_in_scope_api_v1_test_management_suites__suite_name__trend_get",
        "parameters": [
          {
            "in": "path",
            "name": "suite_name",
            "required": true,
            "schema": {
              "title": "Suite Name",
              "type": "string"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Suite Trend In Scope",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/test-management/traceability/gaps": {
      "get": {
        "description": "The project's uncovered requirements, paged, and the cases linking none.",
        "operationId": "get_traceability_gaps_api_v1_test_management_traceability_gaps_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceabilityGapsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Traceability Gaps",
        "tags": [
          "Test Management"
        ]
      }
    },
    "/api/v1/training/export": {
      "post": {
        "operationId": "trigger_export_api_v1_training_export_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Export",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/training/finetune": {
      "post": {
        "operationId": "trigger_finetune_api_v1_training_finetune_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_trigger_finetune_api_v1_training_finetune_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Trigger Finetune",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/training/promote": {
      "post": {
        "operationId": "promote_model_api_v1_training_promote_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Promote Model",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/training/status": {
      "get": {
        "operationId": "get_training_status_api_v1_training_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Training Status",
        "tags": [
          "Feedback & Training"
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "description": "List all users (paginated). Requires QA_LEAD or higher.\n\nThe body stays a bare list (other callers read it); the number of users\nmatching the filters, across every page, is the ``X-Total-Count`` header.",
        "operationId": "list_users_api_v1_users_get",
        "parameters": [
          {
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Active"
            }
          },
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/UserRole"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Role"
            }
          },
          {
            "description": "Case-insensitive substring of the username, email or full name (ADM-03).",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive substring of the username, email or full name (ADM-03).",
              "title": "Q"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserListResponse"
                  },
                  "title": "Response List Users Api V1 Users Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Users",
        "tags": [
          "User Management"
        ]
      },
      "post": {
        "description": "Admin creates a user directly with a temporary password. Requires ADMIN.",
        "operationId": "admin_create_user_api_v1_users_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminCreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCreateUserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Admin Create User",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/invitations": {
      "get": {
        "description": "W17b ADM-01: pending (and expired) invitations, newest first. Never a token. ADMIN.\n\nDeclared before ``/{user_id}`` so ``invitations`` is not parsed as a user id.",
        "operationId": "list_invitations_api_v1_users_invitations_get",
        "parameters": [
          {
            "description": "Also list used and revoked invitations",
            "in": "query",
            "name": "include_closed",
            "required": false,
            "schema": {
              "default": false,
              "description": "Also list used and revoked invitations",
              "title": "Include Closed",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/InvitationSummary"
                  },
                  "title": "Response List Invitations Api V1 Users Invitations Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Invitations",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/invitations/{invitation_id}/resend": {
      "post": {
        "description": "Issue a new link (new token, new expiry); the previous link stops working. ADMIN.\n\nAlso the only way to get a copyable link again: the raw token is never\nstored, so an old link cannot be shown twice.",
        "operationId": "resend_invitation_api_v1_users_invitations__invitation_id__resend_post",
        "parameters": [
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invitation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteUserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Resend Invitation",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/invitations/{invitation_id}/revoke": {
      "post": {
        "description": "Kill an invitation link. A used invitation cannot be revoked (the account exists). ADMIN.",
        "operationId": "revoke_invitation_api_v1_users_invitations__invitation_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invitation Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationSummary"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Revoke Invitation",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/invite": {
      "post": {
        "description": "Invite a user by email with a role and optional project memberships. Requires ADMIN.\n\nW17b ADM-01: only ``sha256(token)`` is stored; the link carries the token in\na URL fragment; the link is emailed when SMTP is configured and always\nreturned so the admin can copy it (the offline path).",
        "operationId": "invite_user_api_v1_users_invite_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteUserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Invite User",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}": {
      "get": {
        "description": "Get a specific user by ID.",
        "operationId": "get_user_api_v1_users__user_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get User",
        "tags": [
          "User Management"
        ]
      },
      "patch": {
        "description": "Update a user's profile attributes. Requires ADMIN. Only non-None fields are applied.",
        "operationId": "update_user_profile_api_v1_users__user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update User Profile",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/access-audit": {
      "get": {
        "description": "Return access audit trail for a specific user.",
        "operationId": "get_user_access_audit_api_v1_users__user_id__access_audit_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get User Access Audit",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/data-export": {
      "post": {
        "description": "Queue an export of one person's data (any user, the admin included). 404 ``user_not_found``.",
        "operationId": "start_user_data_export_api_v1_users__user_id__data_export_post",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Start User Data Export",
        "tags": [
          "Subject rights"
        ]
      }
    },
    "/api/v1/users/{user_id}/data-jobs": {
      "get": {
        "description": "One person's export / erasure jobs, newest first (≤ 10; ``total`` counts all); ``?kind=export|erasure``\n(FastAPI's 422 otherwise — the pattern is built from ``JOB_KINDS``). Writes nothing.",
        "operationId": "list_user_data_jobs_api_v1_users__user_id__data_jobs_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(export|erasure)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectJobList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List User Data Jobs",
        "tags": [
          "Subject rights"
        ]
      }
    },
    "/api/v1/users/{user_id}/erasure": {
      "post": {
        "description": "Erase (pseudonymise) this person: refusals in E-1's order, the exact typed username, then the\nlock-out committed in ONE transaction and the worker enqueued. An unfinished erasure is resumed.",
        "operationId": "erase_user_api_v1_users__user_id__erasure_post",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ErasureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectJobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Erase User",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/erasure-preview": {
      "get": {
        "description": "Counts of what erasing this person would delete / rewrite, keep and leave open, the blockers (listed,\nnot raised), the pseudonym, and an unfinished erasure job to resume. Writes nothing.",
        "operationId": "get_erasure_preview_api_v1_users__user_id__erasure_preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErasurePreview"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Erasure Preview",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/memberships": {
      "get": {
        "description": "Return all project memberships for a user in a single query.\nReplaces the N+1 pattern of fetching each project's members individually.",
        "operationId": "get_user_memberships_api_v1_users__user_id__memberships_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get User Memberships",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/password-reset-link": {
      "post": {
        "description": "W17b ADM-02: a single-use reset link for another user. ADMIN.\n\nThe administrator never sees or sets the password. Older unused links for\nthe user stop working. Refused for the caller's own account (change-password\nexists for that). Audited without the token.",
        "operationId": "issue_password_reset_link_api_v1_users__user_id__password_reset_link_post",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordResetLinkResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Issue Password Reset Link",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/role": {
      "patch": {
        "description": "Update a user's global role. Requires ADMIN.",
        "operationId": "update_user_role_api_v1_users__user_id__role_patch",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update User Role",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/users/{user_id}/status": {
      "patch": {
        "description": "Activate or deactivate a user account. Requires ADMIN.",
        "operationId": "update_user_status_api_v1_users__user_id__status_patch",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update User Status",
        "tags": [
          "User Management"
        ]
      }
    },
    "/api/v1/value-metrics": {
      "get": {
        "description": "Return operational value metrics for a project (or all the caller's\nprojects) over a time window, including the US-12.1 engineer-hours-saved\nmodel (``months`` bounds the monthly trend; unpinned, the model is the\n\"select a project\" one, for an admin and a member alike).\n\n``release_id`` / ``suite_name`` are accepted, authorised and declared in\n``meta.ignored_filters`` with the reason: these are time-based counts\nover the project, and most of them have no release or suite to filter.",
        "operationId": "get_metrics_api_v1_value_metrics_get",
        "parameters": [
          {
            "in": "query",
            "name": "months",
            "required": false,
            "schema": {
              "default": 6,
              "maximum": 24,
              "minimum": 1,
              "title": "Months",
              "type": "integer"
            }
          },
          {
            "description": "One project (single-valued). Omit for every project you can read.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One project (single-valued). Omit for every project you can read.",
              "title": "Project Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Metrics",
        "tags": [
          "Value Metrics"
        ]
      }
    },
    "/api/v1/value-metrics/by-team": {
      "get": {
        "description": "W08 TRND-08 -- value metrics by owning team, for one project.\n\nOne row per team (``Unassigned`` last): tests, executions, the evaluated\npass rate, flaky tests, defects and MTTR, and the hours saved attributed\nfrom the headline's own legs, plus ``not_attributable_hours`` (runs\nunblocked by quarantine) and ``headline_hours``. ``rules_configured:\nfalse`` / ``measured: false`` when the project has no ownership rules and\nno component map. ``release_id`` / ``suite_name`` are accepted, authorised\nand declared in ``meta.ignored_filters``: these are project-level counts\nover time, as on the Overview.",
        "operationId": "get_metrics_by_team_api_v1_value_metrics_by_team_get",
        "parameters": [
          {
            "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "description": "Project to read. Single-valued. Required: without it the request is refused with 422 'missing_parameter' (All Projects is not supported here).",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
            "in": "query",
            "name": "release_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 20): a release UUID or 'unattributed' for runs no release claims.",
              "title": "Release Id"
            }
          },
          {
            "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
            "in": "query",
            "name": "suite_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeatable (OR, at most 50), 1-500 characters; matched case-insensitively on the effective suite.",
              "title": "Suite Name"
            }
          },
          {
            "description": "Window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Window in days, 1-365.",
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Metrics By Team",
        "tags": [
          "Value Metrics"
        ]
      }
    },
    "/api/v1/value-metrics/export": {
      "get": {
        "description": "Export value metrics as a downloadable JSON report.\n\nHON-04: the scope is ``resolve_project_scope``'s, as on ``/by-team``. A\nproject the caller cannot read is a 403. It used to be a 200 carrying a\none-key ``{\"report_type\": \"value_metrics\"}`` stub, which the browser saved\nas if it were the report.\n\nSTRAT-01: a non-admin who names no project exports the aggregate over\nTHEIR projects -- the same numbers ``GET /value-metrics`` shows them --\nbecause the service applies their set to every count (an earlier\nrevision refused them, when the unpinned export spanned every tenant). A\ncaller with no project at all is still refused: there is nothing to\naggregate. An admin who names none exports every project.",
        "operationId": "export_metrics_api_v1_value_metrics_export_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Export Metrics",
        "tags": [
          "Value Metrics"
        ]
      }
    },
    "/api/v1/value-metrics/methodology": {
      "get": {
        "description": "US-12.1: the hours-saved model documented — legs, formulas, caveats,\ndefaults, research anchors. Static content; login-only, not\nproject-scoped.",
        "operationId": "get_methodology_page_api_v1_value_metrics_methodology_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Methodology Page",
        "tags": [
          "Value Metrics"
        ]
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "list_webhook_subscriptions_api_v1_webhooks_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookSubscriptionRead"
                  },
                  "title": "Response List Webhook Subscriptions Api V1 Webhooks Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Webhook Subscriptions",
        "tags": [
          "Outbound Webhooks"
        ]
      },
      "post": {
        "description": "Create a new webhook subscription. QA_LEAD+.\n\n``project_id`` must be passed as a query parameter so the tenant\nisolation check can fire before the body is validated against the\nsubscription table.",
        "operationId": "create_webhook_subscription_api_v1_webhooks_post",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Create Webhook Subscription",
        "tags": [
          "Outbound Webhooks"
        ]
      }
    },
    "/api/v1/webhooks/events": {
      "get": {
        "description": "Return the supported event types — shown in the Settings UI so\nusers can pick which events to subscribe to.",
        "operationId": "list_webhook_events_api_v1_webhooks_events_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventCatalogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Webhook Events",
        "tags": [
          "Outbound Webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{subscription_id}": {
      "delete": {
        "operationId": "delete_webhook_subscription_api_v1_webhooks__subscription_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Delete Webhook Subscription",
        "tags": [
          "Outbound Webhooks"
        ]
      },
      "get": {
        "operationId": "get_webhook_subscription_api_v1_webhooks__subscription_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Get Webhook Subscription",
        "tags": [
          "Outbound Webhooks"
        ]
      },
      "patch": {
        "operationId": "update_webhook_subscription_api_v1_webhooks__subscription_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Update Webhook Subscription",
        "tags": [
          "Outbound Webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{subscription_id}/deliveries": {
      "get": {
        "operationId": "list_webhook_deliveries_api_v1_webhooks__subscription_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookDeliveryRead"
                  },
                  "title": "Response List Webhook Deliveries Api V1 Webhooks  Subscription Id  Deliveries Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "List Webhook Deliveries",
        "tags": [
          "Outbound Webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{subscription_id}/deliveries/{delivery_id}/replay": {
      "post": {
        "description": "Replay a failed or DLQ'd webhook delivery.\n\nCreates a fresh ``PENDING`` row with the same payload and enqueues\na delivery task. The original failed row is left in place so the\naudit history is preserved. QA_LEAD+ only; caller must have project\naccess to the subscription. Fails with 409 when the delivery is\nalready in-flight (``PENDING``) or succeeded (``SUCCESS``), and 503\nwhen the ``outbound_webhooks`` feature flag is off or offline mode\nis enabled.",
        "operationId": "replay_webhook_delivery_api_v1_webhooks__subscription_id__deliveries__delivery_id__replay_post",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Delivery Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryReplayResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Replay Webhook Delivery",
        "tags": [
          "Outbound Webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{subscription_id}/test": {
      "post": {
        "description": "Emit a synthetic ``run.completed`` event to this subscription so\nthe customer can verify their receiver without waiting for a real\nrun. Creates a real ``WebhookDelivery`` row so history reflects the\ntest alongside production deliveries.",
        "operationId": "test_webhook_subscription_api_v1_webhooks__subscription_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "JWT": []
          }
        ],
        "summary": "Test Webhook Subscription",
        "tags": [
          "Outbound Webhooks"
        ]
      }
    },
    "/health/details": {
      "get": {
        "description": "Full health report across all infrastructure dependencies.\nRuns all checks concurrently; returns 200 even when non-critical services are degraded.\nNot intended for K8s probes — use /health/live and /health/ready instead.\n\nEvery probe runs under a wall-clock budget, so no single dependency can\nstall the whole response: optional ones via ``_with_budget`` (reported\n``degraded``), critical ones via ``_critical`` (reported ``error``, so\nreadiness still fails closed on them).\n\nThe critical probes were previously left unwrapped, on the reasoning that\nthe readiness probe needs their honest result. A timeout *is* an honest\nfailure, and leaving them unbounded cost more than it bought: an\nunreachable Redis blocks for its 5s socket timeout, which made this\nendpoint take 5.01s and put /health/ready in a dead heat with the\nkubelet's own 5s deadline -- and a kubelet timeout discards the body that\nsays which dependency died.\n\nThe optional probes resolve their endpoints with ``use_cache=False``.\nThat cache is Redis-backed, and ``except Exception`` around it catches a\nrefusal but cannot shorten a hang, so a Redis outage used to time out the\nMinIO and ChromaDB probes and report both ``degraded`` while both were\nhealthy.",
        "operationId": "health_details_health_details_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Full dependency status — for ops dashboards",
        "tags": [
          "Health"
        ]
      }
    },
    "/health/ingestion": {
      "get": {
        "description": "Surface the load + backpressure signals used by the live-stream\nadmission gates.\n\nThe output is for dashboards and for support / on-call humans when a\ncustomer reports \"my runs are slow / 429ing\" (the admission gates are\ndescribed in ``architecture/INGESTION_SCALE.md``). A single GET answers:\n\n* Is Redis approaching the memory threshold that triggers 503?\n* What's the per-minute ingest vs reject rate?\n* How many live sessions are active right now?\n* How deep are the Celery queues backing ingestion + AI analysis?\n* What thresholds is the gate using today (env-tuned, useful for\n  verifying the deployment matches the docs)?\n\nEverything is best-effort — a degraded Redis returns partial data\nrather than 500'ing the health endpoint itself.",
        "operationId": "health_ingestion_health_ingestion_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Health Ingestion Health Ingestion Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Live-stream ingestion health — gate + queue + memory",
        "tags": [
          "Health"
        ]
      }
    },
    "/health/live": {
      "get": {
        "description": "Kubernetes liveness probe.\nReturns 200 as long as the process is running and the event loop is responsive.\nNever checks external dependencies — a database outage must NOT restart the pod.",
        "operationId": "liveness_health_live_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Liveness probe — is the process alive?",
        "tags": [
          "Health"
        ]
      }
    },
    "/health/ready": {
      "get": {
        "description": "Kubernetes readiness probe.\nChecks PostgreSQL, MongoDB, and Redis connectivity concurrently.\nReturns 503 if any of those is unavailable so the load balancer stops sending traffic.",
        "operationId": "readiness_health_ready_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Readiness probe — are critical dependencies up?",
        "tags": [
          "Health"
        ]
      }
    },
    "/health/version": {
      "get": {
        "description": "Cheap build-identity report — the running image's version and provenance\nwith **no** dependency probes, so it answers in microseconds.\n\n``/health/details`` also carries the ``build`` block, but it probes six\nservices (Postgres, Mongo, Redis, MinIO, Ollama, ChromaDB) and is\ndocumented as \"not intended for K8s probes (too slow)\". A post-deploy CD\nsmoke test, an uptime monitor, or an operator confirming a rollout landed\nall want a single fast answer to \"which commit + build is this pod?\" —\nthat is what this endpoint is for. Root ``GET /`` returns the version but\nnot the git revision or build date, so it cannot verify a specific build.\n\nAlways returns 200 (the process is alive if it can answer at all).\n``build.revision`` / ``build.built_at`` fall back to ``\"unknown\"`` in\nlocal/dev runs where the image-build env is unset.",
        "operationId": "version_health_version_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Build identity — version, revision, build date (no probes)",
        "tags": [
          "Health"
        ]
      }
    },
    "/webhooks/minio": {
      "post": {
        "description": "Receive MinIO ObjectCreated events.\nRequires MinIO's auth_token (``Authorization: Bearer``) or X-Webhook-Secret,\nmatching WEBHOOK_SECRET.\nOnly processes uploads of upload_complete.json sentinel files.\nAlways returns 200 OK quickly to prevent MinIO retry loops.",
        "operationId": "minio_webhook_webhooks_minio_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-Webhook-Secret",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Webhook-Secret"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Minio Webhook Webhooks Minio Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Minio Webhook",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/ws/events/{run_id}": {
      "post": {
        "description": "Receive a live test execution event from a test runner.\nThis endpoint is a thin producer — it enqueues the event to Redis Streams\nand returns 202 immediately (~1ms). The actual processing happens\nasynchronously in the LiveEventStreamConsumer background task.\n\nSupported event types:\n  - run_start:    {type, project_id, build_number, total_tests}\n  - test_result:  {type, test_name, status, duration_ms, error_message, test_case_id?}\n  - run_complete: {type}\n\nAny event may carry an ``event_id`` (1-200 printable characters, unique\nwithin its run): a POST retried with the same one is counted once. Without\none, ``run_start`` and ``run_complete`` are recognised by their content, and\nevery ``test_result`` is a new result.\n\nWith a project key the run is saved like an SDK run (re-audit N14). Its run\nid can be used again once the run completes: a ``run_start`` begins a new\nrun under it, and any other event for the finished run is refused with 409.\n``test_case_id``, and a ``test_result``'s ``total_tests``, are honoured only\non the legacy path: the SDK stream's events carry neither.\n\nAuthentication (re-audit H1). Preferred: a project-scoped ``X-API-Key``\ncarrying the ``stream:write`` scope — the project is then derived from the\nkey server-side and a caller cannot name someone else's. Legacy: the shared\n``X-Webhook-Secret``, which authenticates a caller but names no tenant, so\nit could previously inject fabricated results into ANY project. Set\n``LIVE_EVENTS_REQUIRE_PROJECT_KEY=true`` to refuse it outright.",
        "operationId": "ingest_live_event_ws_events__run_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-API-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Webhook-Secret",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Webhook-Secret"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "title": "Event",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Ingest Live Event",
        "tags": [
          "Live Reporting"
        ]
      }
    }
  }
}
