{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-release-investigation-response-schema.json",
  "title": "ReleaseInvestigationResponse",
  "description": "One complete bounded release investigation bundle.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-releases-api-openapi.yml#/components/schemas/ReleaseInvestigationResponse",
  "properties": {
    "analysis": {
      "$ref": "#/$defs/ReleaseInvestigationAnalysisResponse",
      "description": "Backend-derived failure state without a deployment-causality claim."
    },
    "comparison": {
      "$ref": "#/$defs/ReleaseInvestigationComparisonResponse",
      "description": "Truthful comparison availability and limitation."
    },
    "evidence": {
      "$ref": "#/$defs/InvestigationEvidenceCoverageResponse",
      "description": "Explicit captured, missing, redacted, and truncated evidence state."
    },
    "markers": {
      "anyOf": [
        {
          "$ref": "#/$defs/ReleaseInvestigationMarkersResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Bounded SDK release markers; present only in schema version 4."
    },
    "next_actions": {
      "description": "Backend-generated follow-up actions in priority order.",
      "items": {
        "$ref": "#/$defs/ReleaseInvestigationNextActionResponse"
      },
      "type": "array"
    },
    "schema_version": {
      "description": "Additive response schema version.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": "integer"
    },
    "sdk_coverage": {
      "$ref": "#/$defs/InvestigationCollectionResponse10",
      "description": "SDK and stream provenance observed for this release."
    },
    "signals": {
      "$ref": "#/$defs/ReleaseInvestigationSignalsResponse",
      "description": "High-value bounded evidence from each supported telemetry signal."
    },
    "subject": {
      "$ref": "#/$defs/ReleaseInvestigationSubjectResponse",
      "description": "Exact observed release identity, counts, window, and trace health."
    },
    "timeline": {
      "$ref": "#/$defs/InvestigationTimelineResponse5",
      "description": "Mixed chronological projection of the selected release evidence."
    }
  },
  "required": [
    "schema_version",
    "subject",
    "analysis",
    "sdk_coverage",
    "signals",
    "timeline",
    "comparison",
    "evidence",
    "next_actions"
  ],
  "type": "object",
  "$defs": {
    "InvestigationAvailabilityStatus": {
      "description": "Availability of one optional evidence source in an investigation bundle.",
      "oneOf": [
        {
          "const": "available",
          "description": "Evidence was queried and is included.",
          "type": "string"
        },
        {
          "const": "not_linked",
          "description": "The subject did not carry the identifier required for exact correlation.",
          "type": "string"
        },
        {
          "const": "not_found",
          "description": "An exact correlation identifier was present but no evidence was retained.",
          "type": "string"
        },
        {
          "const": "unavailable",
          "description": "The evidence source could not be read without failing the primary subject read.",
          "type": "string"
        }
      ]
    },
    "InvestigationCausalityStatus": {
      "description": "Causal confidence shared by evidence-only investigation analyses.",
      "oneOf": [
        {
          "const": "evidence_only",
          "description": "Correlated telemetry does not independently prove cause or remediation.",
          "type": "string"
        }
      ]
    },
    "InvestigationCollectionResponse10": {
      "description": "Bounded optional evidence with an explicit read receipt.",
      "properties": {
        "items": {
          "description": "Privacy-bounded evidence in the endpoint's documented order.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationSdkResponse"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact evidence or link availability."
        },
        "truncated": {
          "description": "Whether the owning boundary omitted one or more items.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "InvestigationCollectionResponse11": {
      "description": "Bounded optional evidence with an explicit read receipt.",
      "properties": {
        "items": {
          "description": "Privacy-bounded evidence in the endpoint's documented order.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationIssueResponse"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact evidence or link availability."
        },
        "truncated": {
          "description": "Whether the owning boundary omitted one or more items.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "InvestigationCollectionResponse12": {
      "description": "Bounded optional evidence with an explicit read receipt.",
      "properties": {
        "items": {
          "description": "Privacy-bounded evidence in the endpoint's documented order.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationTraceResponse"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact evidence or link availability."
        },
        "truncated": {
          "description": "Whether the owning boundary omitted one or more items.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "InvestigationCollectionResponse13": {
      "description": "Bounded optional evidence with an explicit read receipt.",
      "properties": {
        "items": {
          "description": "Privacy-bounded evidence in the endpoint's documented order.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationMetricResponse"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact evidence or link availability."
        },
        "truncated": {
          "description": "Whether the owning boundary omitted one or more items.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "InvestigationEvidenceCoverageResponse": {
      "description": "Explicit captured, missing, redacted, and truncated evidence state.",
      "properties": {
        "captured_fields": {
          "description": "Stable normalized field identifiers present in the bundle.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "missing_fields": {
          "description": "Stable normalized field identifiers that were required but unavailable.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "redacted_fields": {
          "description": "Stable normalized field identifiers intentionally withheld before ingestion.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationEvidenceStatus",
          "description": "Truthful aggregate status derived by the backend."
        },
        "truncated_fields": {
          "description": "Stable normalized field identifiers whose bounded history is incomplete.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "status",
        "captured_fields",
        "missing_fields",
        "redacted_fields",
        "truncated_fields"
      ],
      "type": "object"
    },
    "InvestigationEvidenceStatus": {
      "description": "Overall completeness of an investigation evidence bundle.",
      "oneOf": [
        {
          "const": "complete",
          "description": "All required fields for this version were captured and no omission was reported.",
          "type": "string"
        },
        {
          "const": "partial",
          "description": "One or more required fields are missing, redacted, truncated, or unavailable.",
          "type": "string"
        }
      ]
    },
    "InvestigationTimelineResponse5": {
      "description": "Bounded chronological evidence shared by investigation contracts.",
      "properties": {
        "items": {
          "description": "Oldest-to-newest evidence items.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationTimelineItemResponse"
          },
          "type": "array"
        },
        "truncated": {
          "description": "Whether the timeline boundary omitted one or more items.",
          "type": "boolean"
        }
      },
      "required": [
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "ReleaseInvestigationActionCountMethod": {
      "description": "Stable approximate-cardinality methods used by release action evidence.",
      "oneOf": [
        {
          "const": "approximate_distinct",
          "description": "Bounded approximate distinct count (version 5+).",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationActionEstimationResponse": {
      "description": "Accuracy contract for release action cardinalities.",
      "properties": {
        "method": {
          "$ref": "#/$defs/ReleaseInvestigationActionCountMethod",
          "description": "Stable aggregation used for every unique count in the action collection."
        },
        "unique_counts_are_approximate": {
          "description": "Whether unique user, anonymous-subject, and session counts are estimates.",
          "type": "boolean"
        }
      },
      "required": [
        "unique_counts_are_approximate",
        "method"
      ],
      "type": "object"
    },
    "ReleaseInvestigationActionResponse": {
      "description": "One identity-safe product-action aggregate observed for the release.",
      "properties": {
        "anonymous_subject_count": {
          "description": "Approximate distinct typed anonymous subjects, reported separately in version 2.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "event_count": {
          "description": "Number of retained action events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "first_seen_at": {
          "description": "Earliest retained action time.",
          "format": "date-time",
          "type": "string"
        },
        "identified_user_count": {
          "description": "Approximate distinct eligible actor IDs; version 2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "last_seen_at": {
          "description": "Latest retained action time.",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "Stable action name.",
          "type": "string"
        },
        "session_count": {
          "description": "Approximate distinct non-empty session identifiers, never the identifiers themselves.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "subject_coverage": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationActionSubjectCoverageResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Exhaustive version-2 subject-kind receipt for this action event population."
        },
        "trace_id": {
          "description": "Latest linked distributed trace identifier when supplied.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "event_count",
        "identified_user_count",
        "session_count",
        "first_seen_at",
        "last_seen_at",
        "trace_id"
      ],
      "type": "object"
    },
    "ReleaseInvestigationActionSubjectCoverageResponse": {
      "description": "Exhaustive subject-kind coverage for one release action aggregate.",
      "properties": {
        "anonymous_subject_events": {
          "description": "Events with a typed anonymous subject and usable opaque ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "historical_unindexed_events": {
          "description": "Historical events captured before subject-kind indexing.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "identified_user_events": {
          "description": "Events with a typed user subject and usable opaque ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "index_version": {
          "description": "Current action subject-index extraction contract.",
          "format": "uint8",
          "maximum": 255,
          "minimum": 0,
          "type": "integer"
        },
        "legacy_unknown_kind_events": {
          "description": "Events with a legacy actor ID but no typed subject kind.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "missing_subject_events": {
          "description": "Current-index events without a usable subject identity.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "index_version",
        "identified_user_events",
        "anonymous_subject_events",
        "legacy_unknown_kind_events",
        "missing_subject_events",
        "historical_unindexed_events"
      ],
      "type": "object"
    },
    "ReleaseInvestigationActionsResponse": {
      "description": "Bounded product-action aggregates and availability.",
      "properties": {
        "estimation": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationActionEstimationResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Version-2 accuracy contract for approximate unique subject and session counts."
        },
        "items": {
          "description": "Highest-volume action names.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationActionResponse"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact read state."
        },
        "truncated": {
          "description": "Whether additional action names were omitted.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "ReleaseInvestigationAnalysisResponse": {
      "description": "Failure assessment derived from observed release telemetry.",
      "properties": {
        "causality": {
          "$ref": "#/$defs/InvestigationCausalityStatus",
          "description": "Explicit statement that correlation does not independently prove deployment causality."
        },
        "status": {
          "$ref": "#/$defs/ReleaseInvestigationAnalysisStatus",
          "description": "Strongest backend-observed release state."
        }
      },
      "required": [
        "status",
        "causality"
      ],
      "type": "object"
    },
    "ReleaseInvestigationAnalysisStatus": {
      "description": "Stable release-analysis states.",
      "oneOf": [
        {
          "const": "failures_observed",
          "description": "Issue items or error traces were observed for the release scope.",
          "type": "string"
        },
        {
          "const": "no_failures_observed",
          "description": "Traces were observed without error spans and no issue item was observed.",
          "type": "string"
        },
        {
          "const": "telemetry_observed",
          "description": "Other telemetry exists but trace evidence cannot establish failure health.",
          "type": "string"
        },
        {
          "const": "insufficient_evidence",
          "description": "The release identity exists but retained counts do not establish useful health.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationComparisonAssessment": {
      "description": "Trace-error-rate direction for a deployment-aligned release comparison.",
      "oneOf": [
        {
          "const": "improved",
          "description": "Current release trace error rate is lower.",
          "type": "string"
        },
        {
          "const": "regressed",
          "description": "Current release trace error rate is higher.",
          "type": "string"
        },
        {
          "const": "unchanged",
          "description": "Current and previous trace error rates are equal.",
          "type": "string"
        },
        {
          "const": "not_determined",
          "description": "Trace rates were not comparable; no direction is claimed.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationComparisonChangesResponse": {
      "description": "Exact current-minus-previous observed release changes.",
      "properties": {
        "current_trace_error_rate_basis_points": {
          "description": "Current trace error rate when exact trace health is comparable.",
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "observed_action_count_delta": {
          "description": "Current observed product-action count minus previous observed action count.",
          "format": "int64",
          "type": "integer"
        },
        "observed_issue_count_delta": {
          "description": "Current observed issue count minus previous observed issue count.",
          "format": "int64",
          "type": "integer"
        },
        "observed_log_count_delta": {
          "description": "Current observed log count minus previous observed log count.",
          "format": "int64",
          "type": "integer"
        },
        "observed_metric_count_delta": {
          "description": "Current observed metric count minus previous observed metric count.",
          "format": "int64",
          "type": "integer"
        },
        "observed_trace_span_count_delta": {
          "description": "Current observed trace-span count minus previous observed trace-span count.",
          "format": "int64",
          "type": "integer"
        },
        "previous_trace_error_rate_basis_points": {
          "description": "Previous trace error rate when exact trace health is comparable.",
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "trace_error_rate_delta_basis_points": {
          "description": "Current trace error rate minus previous trace error rate.",
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "observed_issue_count_delta",
        "observed_log_count_delta",
        "observed_trace_span_count_delta",
        "observed_action_count_delta",
        "observed_metric_count_delta",
        "current_trace_error_rate_basis_points",
        "previous_trace_error_rate_basis_points",
        "trace_error_rate_delta_basis_points"
      ],
      "type": "object"
    },
    "ReleaseInvestigationComparisonDetailsResponse": {
      "description": "Deployment boundaries, previous-release telemetry, exact changes, and limitations.",
      "properties": {
        "assessment": {
          "$ref": "#/$defs/ReleaseInvestigationComparisonAssessment",
          "description": "Direction derived only from comparable trace error rates."
        },
        "changes": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationComparisonChangesResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Exact observed-count and trace-error-rate changes, when both release snapshots are usable."
        },
        "limitations": {
          "description": "Stable interpretation limits that prevent causal or normalized-volume overclaims.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationComparisonLimitation"
          },
          "type": "array"
        },
        "previous_deployment": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationDeploymentResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Newest prior successful deployment of a distinct release, when found."
        },
        "previous_release": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationComparisonSnapshotResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Retained telemetry snapshot for the prior deployed release, when found."
        },
        "subject_deployment": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationDeploymentResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Newest captured deployment boundary for the investigated release, when found."
        }
      },
      "required": [
        "subject_deployment",
        "previous_deployment",
        "previous_release",
        "changes",
        "assessment",
        "limitations"
      ],
      "type": "object"
    },
    "ReleaseInvestigationComparisonLimitation": {
      "description": "Stable interpretation limits for deployment-aligned release evidence.",
      "oneOf": [
        {
          "const": "raw_counts_not_rate_normalized",
          "description": "Raw telemetry counts are exact but are not normalized by traffic or observation duration.",
          "type": "string"
        },
        {
          "const": "observation_windows_differ",
          "description": "Current and previous releases cover different retained time windows.",
          "type": "string"
        },
        {
          "const": "deployment_correlation_not_causation",
          "description": "Deployment ordering and telemetry correlation do not independently prove causation.",
          "type": "string"
        },
        {
          "const": "current_trace_population_unavailable",
          "description": "The investigated release has no comparable trace population.",
          "type": "string"
        },
        {
          "const": "previous_trace_population_unavailable",
          "description": "The previous release has no comparable trace population.",
          "type": "string"
        },
        {
          "const": "subject_deployment_unsuccessful",
          "description": "The investigated release boundary was not successful.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationComparisonReason": {
      "description": "Stable release-comparison limitation reasons.",
      "oneOf": [
        {
          "const": "deployment_boundary_not_captured",
          "description": "Deploy start/end boundaries are not captured, so ordering by version text or event time is\nunsafe.",
          "type": "string"
        },
        {
          "const": "deployment_comparison_available",
          "description": "Captured deployment boundaries align the subject to a prior distinct release.",
          "type": "string"
        },
        {
          "const": "subject_deployment_not_found",
          "description": "No captured deployment boundary matches the investigated release scope.",
          "type": "string"
        },
        {
          "const": "previous_successful_deployment_not_found",
          "description": "No earlier successful deployment of a distinct release was captured.",
          "type": "string"
        },
        {
          "const": "previous_release_telemetry_not_found",
          "description": "The prior deployed release no longer has retained release telemetry.",
          "type": "string"
        },
        {
          "const": "deployment_read_unavailable",
          "description": "Deployment boundaries could not be read safely.",
          "type": "string"
        },
        {
          "const": "previous_release_read_unavailable",
          "description": "Prior-release telemetry could not be read safely.",
          "type": "string"
        },
        {
          "const": "comparison_evidence_invalid",
          "description": "Loaded release or deployment evidence contradicted the exact comparison scope.",
          "type": "string"
        },
        {
          "const": "comparison_values_out_of_range",
          "description": "Returned counts could not be represented safely by this JSON-number contract.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationComparisonResponse": {
      "description": "Truthful release-comparison availability.",
      "properties": {
        "details": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReleaseInvestigationComparisonDetailsResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Deployment-aligned evidence in schema version 3; omitted from exact legacy responses."
        },
        "reason": {
          "$ref": "#/$defs/ReleaseInvestigationComparisonReason",
          "description": "Stable reason the comparison is available or unavailable."
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Whether a trustworthy comparison is available."
        }
      },
      "required": [
        "status",
        "reason"
      ],
      "type": "object"
    },
    "ReleaseInvestigationComparisonSnapshotResponse": {
      "description": "Prior release telemetry projected on the same dimensions as the current subject.",
      "properties": {
        "action_count": {
          "description": "Observed product-action items for the release scope.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "environment": {
          "description": "Exact deployment environment.",
          "type": "string"
        },
        "first_seen_at": {
          "description": "First retained telemetry time for the release scope.",
          "format": "date-time",
          "type": "string"
        },
        "issue_count": {
          "description": "Observed issue items for the release scope.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "last_seen_at": {
          "description": "Latest retained telemetry time for the release scope.",
          "format": "date-time",
          "type": "string"
        },
        "log_count": {
          "description": "Observed log items for the release scope.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "metric_count": {
          "description": "Observed metric items for the release scope.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "release": {
          "description": "Exact previous release identifier.",
          "type": "string"
        },
        "service_name": {
          "description": "Exact logical service.",
          "type": "string"
        },
        "trace_health": {
          "$ref": "#/$defs/ReleaseTraceHealthResponse",
          "description": "Exact previous-release trace health when available; zero-valued otherwise."
        },
        "trace_health_status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Read availability for exact previous-release trace health."
        },
        "trace_span_count": {
          "description": "Observed trace-span items for the release scope.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "release",
        "environment",
        "service_name",
        "issue_count",
        "log_count",
        "trace_span_count",
        "action_count",
        "metric_count",
        "first_seen_at",
        "last_seen_at",
        "trace_health_status",
        "trace_health"
      ],
      "type": "object"
    },
    "ReleaseInvestigationDeploymentResponse": {
      "description": "One exact terminal deployment boundary used to order releases safely.",
      "properties": {
        "commit_sha": {
          "description": "Lowercase source commit identity when captured.",
          "type": [
            "string",
            "null"
          ]
        },
        "deployment_id": {
          "description": "Caller-owned external deployment identifier.",
          "type": "string"
        },
        "environment": {
          "description": "Exact deployment environment.",
          "type": "string"
        },
        "finished_at": {
          "description": "Inclusive deployment-attempt finish.",
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "description": "Stable deployment identifier.",
          "format": "uuid",
          "type": "string"
        },
        "project_id": {
          "description": "Owning project identifier.",
          "format": "uuid",
          "type": "string"
        },
        "release": {
          "description": "Exact deployed release.",
          "type": "string"
        },
        "service_name": {
          "description": "Exact logical service.",
          "type": "string"
        },
        "started_at": {
          "description": "Inclusive deployment-attempt start.",
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "description": "Terminal deployment result.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "project_id",
        "deployment_id",
        "release",
        "environment",
        "service_name",
        "status",
        "started_at",
        "finished_at",
        "commit_sha"
      ],
      "type": "object"
    },
    "ReleaseInvestigationIssueResponse": {
      "description": "One privacy-bounded grouped issue observed for the release.",
      "properties": {
        "first_seen_at": {
          "description": "First occurrence time in the exact release scope.",
          "format": "date-time",
          "type": "string"
        },
        "issue_id": {
          "description": "Grouped issue identifier for deeper investigation.",
          "format": "uuid",
          "type": "string"
        },
        "last_seen_at": {
          "description": "Latest occurrence time in the exact release scope.",
          "format": "date-time",
          "type": "string"
        },
        "message": {
          "description": "Bounded message from the latest retained occurrence.",
          "type": "string"
        },
        "occurrence_count": {
          "description": "Number of occurrences in the exact release scope.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "severity": {
          "description": "Canonical severity from the latest retained occurrence.",
          "type": "string"
        },
        "title": {
          "description": "Bounded title from the latest retained occurrence.",
          "type": "string"
        },
        "trace_id": {
          "description": "Latest linked distributed trace identifier when supplied.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "issue_id",
        "severity",
        "title",
        "message",
        "occurrence_count",
        "first_seen_at",
        "last_seen_at",
        "trace_id"
      ],
      "type": "object"
    },
    "ReleaseInvestigationLogResponse": {
      "description": "One privacy-bounded high-severity log observed for the release.",
      "properties": {
        "id": {
          "description": "Stored log identifier for exact detail readback.",
          "format": "uuid",
          "type": "string"
        },
        "level": {
          "description": "Canonical log severity.",
          "type": "string"
        },
        "message": {
          "description": "Bounded log message.",
          "type": "string"
        },
        "occurred_at": {
          "description": "Client occurrence timestamp.",
          "format": "date-time",
          "type": "string"
        },
        "source": {
          "description": "Bounded log source.",
          "type": "string"
        },
        "span_id": {
          "description": "Linked span identifier when supplied.",
          "type": [
            "string",
            "null"
          ]
        },
        "trace_id": {
          "description": "Linked distributed trace identifier when supplied.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "level",
        "source",
        "message",
        "occurred_at",
        "trace_id",
        "span_id"
      ],
      "type": "object"
    },
    "ReleaseInvestigationLogSelection": {
      "description": "Stable log-selection policy for release investigation.",
      "oneOf": [
        {
          "const": "warning_error_critical",
          "description": "Canonical warning, error, and critical logs only.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationLogsResponse": {
      "description": "Bounded high-severity log evidence and availability.",
      "properties": {
        "items": {
          "description": "Newest high-severity logs.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationLogResponse"
          },
          "type": "array"
        },
        "selection": {
          "$ref": "#/$defs/ReleaseInvestigationLogSelection",
          "description": "Stable severity selection applied by this contract."
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact read state."
        },
        "truncated": {
          "description": "Whether additional selected logs were omitted.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "selection",
        "items",
        "truncated"
      ],
      "type": "object"
    },
    "ReleaseInvestigationMarkerFieldResponse": {
      "description": "One explicitly classified bounded release-marker field.",
      "properties": {
        "status": {
          "$ref": "#/$defs/ReleaseInvestigationMarkerFieldStatus",
          "description": "Capture, truncation, or redaction state."
        },
        "value": {
          "description": "Bounded value when captured or truncated.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "status",
        "value"
      ],
      "type": "object"
    },
    "ReleaseInvestigationMarkerFieldStatus": {
      "description": "Stable release-marker field states.",
      "oneOf": [
        {
          "const": "not_captured",
          "description": "The SDK did not provide a usable value.",
          "type": "string"
        },
        {
          "const": "captured",
          "description": "The complete bounded value is present.",
          "type": "string"
        },
        {
          "const": "truncated",
          "description": "A bounded prefix is present.",
          "type": "string"
        },
        {
          "const": "redacted",
          "description": "Unsafe control content was withheld.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationMarkerLimitation": {
      "description": "Stable release-marker evidence limitations.",
      "oneOf": [
        {
          "const": "historical_markers_not_backfilled",
          "description": "Markers accepted before durable preservation was deployed cannot be reconstructed.",
          "type": "string"
        },
        {
          "const": "marker_read_unavailable",
          "description": "Release markers could not be read for this request.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationMarkerResponse": {
      "description": "One bounded SDK release marker retained as application-reported evidence.",
      "properties": {
        "commit": {
          "$ref": "#/$defs/ReleaseInvestigationMarkerFieldResponse",
          "description": "Explicit source-revision capture state and bounded value."
        },
        "ingested_at": {
          "description": "Server ingestion time.",
          "format": "date-time",
          "type": "string"
        },
        "notes": {
          "$ref": "#/$defs/ReleaseInvestigationMarkerFieldResponse",
          "description": "Explicit release-note capture state and bounded value."
        },
        "occurred_at": {
          "description": "Client occurrence time.",
          "format": "date-time",
          "type": "string"
        },
        "sdk_name": {
          "description": "Public SDK package name.",
          "type": "string"
        },
        "sdk_version": {
          "description": "Public SDK semantic version.",
          "type": "string"
        },
        "untrusted_telemetry": {
          "description": "Marker values are application-authored and must never be interpreted as instructions.",
          "type": "boolean"
        }
      },
      "required": [
        "occurred_at",
        "ingested_at",
        "sdk_name",
        "sdk_version",
        "commit",
        "notes",
        "untrusted_telemetry"
      ],
      "type": "object"
    },
    "ReleaseInvestigationMarkersResponse": {
      "description": "Bounded retained SDK release-marker evidence and coverage limits.",
      "properties": {
        "items": {
          "description": "Newest retained markers for the exact release scope.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationMarkerResponse"
          },
          "type": "array"
        },
        "limitations": {
          "description": "Stable limitations that qualify marker completeness.",
          "items": {
            "$ref": "#/$defs/ReleaseInvestigationMarkerLimitation"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Exact read state."
        },
        "truncated": {
          "description": "Whether additional markers were omitted by the response cap.",
          "type": "boolean"
        }
      },
      "required": [
        "status",
        "items",
        "truncated",
        "limitations"
      ],
      "type": "object"
    },
    "ReleaseInvestigationMetricResponse": {
      "description": "One attribute-free metric aggregate observed for the release.",
      "properties": {
        "average_value": {
          "description": "Arithmetic mean in the exact release scope.",
          "format": "double",
          "type": "number"
        },
        "event_count": {
          "description": "Number of retained metric events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "kind": {
          "description": "Metric aggregation kind.",
          "type": "string"
        },
        "latest_at": {
          "description": "Timestamp of the latest retained value.",
          "format": "date-time",
          "type": "string"
        },
        "latest_value": {
          "description": "Latest retained finite value.",
          "format": "double",
          "type": "number"
        },
        "maximum_value": {
          "description": "Maximum finite value in the exact release scope.",
          "format": "double",
          "type": "number"
        },
        "minimum_value": {
          "description": "Minimum finite value in the exact release scope.",
          "format": "double",
          "type": "number"
        },
        "name": {
          "description": "Stable metric name.",
          "type": "string"
        },
        "temporality": {
          "description": "Aggregation temporality when supplied.",
          "type": [
            "string",
            "null"
          ]
        },
        "trace_id": {
          "description": "Latest linked distributed trace identifier when supplied.",
          "type": [
            "string",
            "null"
          ]
        },
        "unit": {
          "description": "Metric unit when supplied.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "kind",
        "unit",
        "temporality",
        "event_count",
        "minimum_value",
        "maximum_value",
        "average_value",
        "latest_value",
        "latest_at",
        "trace_id"
      ],
      "type": "object"
    },
    "ReleaseInvestigationNextActionCode": {
      "description": "Stable next-action codes for release investigation.",
      "oneOf": [
        {
          "const": "inspect_release_issue",
          "description": "Inspect the highest-value grouped issue.",
          "type": "string"
        },
        {
          "const": "inspect_release_trace",
          "description": "Inspect the highest-value error or slow trace.",
          "type": "string"
        },
        {
          "const": "review_release_logs",
          "description": "Review high-severity logs retained for the release.",
          "type": "string"
        },
        {
          "const": "review_release_actions",
          "description": "Review product usage retained for the release.",
          "type": "string"
        },
        {
          "const": "review_release_metrics",
          "description": "Review metric evidence retained for the release.",
          "type": "string"
        },
        {
          "const": "retry_unavailable_evidence",
          "description": "Retry optional release evidence that could not be read.",
          "type": "string"
        },
        {
          "const": "capture_deployment_boundary",
          "description": "Capture deployment boundaries before attempting a release comparison.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationNextActionReason": {
      "description": "Stable reasons for release investigation actions.",
      "oneOf": [
        {
          "const": "issue_observed",
          "description": "A grouped issue was observed in this release scope.",
          "type": "string"
        },
        {
          "const": "trace_observed",
          "description": "An error or slow trace was observed in this release scope.",
          "type": "string"
        },
        {
          "const": "high_severity_logs_observed",
          "description": "High-severity logs were observed in this release scope.",
          "type": "string"
        },
        {
          "const": "product_usage_observed",
          "description": "Product-action aggregates were observed in this release scope.",
          "type": "string"
        },
        {
          "const": "metric_evidence_observed",
          "description": "Metric aggregates were observed in this release scope.",
          "type": "string"
        },
        {
          "const": "related_evidence_unavailable",
          "description": "One or more optional evidence reads failed.",
          "type": "string"
        },
        {
          "const": "comparison_unavailable",
          "description": "Trustworthy release comparison is unavailable.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationNextActionResponse": {
      "description": "One backend-generated release investigation action.",
      "properties": {
        "code": {
          "$ref": "#/$defs/ReleaseInvestigationNextActionCode",
          "description": "Stable action code."
        },
        "issue_id": {
          "description": "Grouped issue identifier when the action targets an issue.",
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "reason": {
          "$ref": "#/$defs/ReleaseInvestigationNextActionReason",
          "description": "Stable reason this action is useful."
        },
        "target": {
          "$ref": "#/$defs/ReleaseInvestigationNextActionTarget",
          "description": "Stable action target."
        },
        "trace_id": {
          "description": "Distributed trace identifier when the action targets a trace.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "code",
        "target",
        "reason",
        "issue_id",
        "trace_id"
      ],
      "type": "object"
    },
    "ReleaseInvestigationNextActionTarget": {
      "description": "Stable targets for release investigation actions.",
      "oneOf": [
        {
          "const": "issue_investigation",
          "description": "Versioned issue investigation endpoint.",
          "type": "string"
        },
        {
          "const": "trace_investigation",
          "description": "Versioned trace investigation endpoint.",
          "type": "string"
        },
        {
          "const": "telemetry_logs",
          "description": "Release-filtered native log reads.",
          "type": "string"
        },
        {
          "const": "telemetry_actions",
          "description": "Release-filtered product-action reads.",
          "type": "string"
        },
        {
          "const": "telemetry_metrics",
          "description": "Release-filtered metric reads.",
          "type": "string"
        },
        {
          "const": "release_investigation",
          "description": "Current versioned release investigation endpoint.",
          "type": "string"
        },
        {
          "const": "release_instrumentation",
          "description": "Release/deployment instrumentation setup.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationSdkResponse": {
      "description": "One SDK/version/stream aggregate observed for a release.",
      "properties": {
        "first_seen_at": {
          "description": "Earliest item time observed for the aggregate.",
          "format": "date-time",
          "type": "string"
        },
        "item_count": {
          "description": "Number of attributed items observed for this aggregate.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "last_seen_at": {
          "description": "Latest item time observed for the aggregate.",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "SDK package name.",
          "type": "string"
        },
        "stream": {
          "description": "Telemetry stream captured by this SDK/version.",
          "type": "string"
        },
        "version": {
          "description": "SDK semantic version as reported by the client.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "version",
        "stream",
        "item_count",
        "first_seen_at",
        "last_seen_at"
      ],
      "type": "object"
    },
    "ReleaseInvestigationSignalsResponse": {
      "description": "High-value bounded evidence from each supported release signal.",
      "properties": {
        "actions": {
          "$ref": "#/$defs/ReleaseInvestigationActionsResponse",
          "description": "Aggregated product actions observed for the release scope."
        },
        "issues": {
          "$ref": "#/$defs/InvestigationCollectionResponse11",
          "description": "Grouped issues observed for the release scope."
        },
        "logs": {
          "$ref": "#/$defs/ReleaseInvestigationLogsResponse",
          "description": "High-severity logs observed for the release scope."
        },
        "metrics": {
          "$ref": "#/$defs/InvestigationCollectionResponse13",
          "description": "Aggregated metrics observed for the release scope."
        },
        "traces": {
          "$ref": "#/$defs/InvestigationCollectionResponse12",
          "description": "Trace summaries observed for the release scope."
        }
      },
      "required": [
        "issues",
        "traces",
        "logs",
        "actions",
        "metrics"
      ],
      "type": "object"
    },
    "ReleaseInvestigationSubjectKind": {
      "description": "Kinds supported by the release-investigation subject contract.",
      "oneOf": [
        {
          "const": "release",
          "description": "One service release in one deployment environment.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationSubjectResponse": {
      "description": "Exact observed service-release subject.",
      "properties": {
        "action_count": {
          "description": "Number of product-action items attributed to this release scope.",
          "format": "int64",
          "type": "integer"
        },
        "environment": {
          "description": "Exact deployment environment.",
          "type": "string"
        },
        "first_seen_at": {
          "description": "First telemetry time observed for the exact release scope.",
          "format": "date-time",
          "type": "string"
        },
        "issue_count": {
          "description": "Number of issue items attributed to this release scope.",
          "format": "int64",
          "type": "integer"
        },
        "kind": {
          "$ref": "#/$defs/ReleaseInvestigationSubjectKind",
          "description": "Stable subject kind."
        },
        "last_seen_at": {
          "description": "Most recent telemetry time observed for the exact release scope.",
          "format": "date-time",
          "type": "string"
        },
        "log_count": {
          "description": "Number of log items attributed to this release scope.",
          "format": "int64",
          "type": "integer"
        },
        "metric_count": {
          "description": "Number of metric items attributed to this release scope.",
          "format": "int64",
          "type": "integer"
        },
        "project_id": {
          "description": "Owning project identifier.",
          "format": "uuid",
          "type": "string"
        },
        "release": {
          "description": "Exact application release.",
          "type": "string"
        },
        "service_name": {
          "description": "Exact logical service name.",
          "type": "string"
        },
        "trace_health": {
          "$ref": "#/$defs/ReleaseTraceHealthResponse",
          "description": "Distinct trace health when the aggregate read was available."
        },
        "trace_health_status": {
          "$ref": "#/$defs/InvestigationAvailabilityStatus",
          "description": "Read availability for aggregate trace health."
        },
        "trace_span_count": {
          "description": "Number of trace-span items attributed to this release scope.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "project_id",
        "release",
        "environment",
        "service_name",
        "issue_count",
        "log_count",
        "trace_span_count",
        "action_count",
        "metric_count",
        "first_seen_at",
        "last_seen_at",
        "trace_health_status",
        "trace_health"
      ],
      "type": "object"
    },
    "ReleaseInvestigationTimelineItemResponse": {
      "description": "One chronological release evidence item.",
      "properties": {
        "issue_id": {
          "description": "Grouped issue identifier when this item represents an issue.",
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "$ref": "#/$defs/ReleaseInvestigationTimelineKind",
          "description": "Signal or release-boundary kind."
        },
        "occurred_at": {
          "description": "Observation timestamp.",
          "format": "date-time",
          "type": "string"
        },
        "summary": {
          "description": "Bounded human-readable evidence label.",
          "type": "string"
        },
        "trace_id": {
          "description": "Distributed trace identifier when this item is trace-linked.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "occurred_at",
        "summary",
        "issue_id",
        "trace_id"
      ],
      "type": "object"
    },
    "ReleaseInvestigationTimelineKind": {
      "description": "Signal kinds included in a release investigation timeline.",
      "oneOf": [
        {
          "const": "previous_deployment_finished",
          "description": "Prior successful deployment completion used as the comparison boundary.",
          "type": "string"
        },
        {
          "const": "subject_deployment_started",
          "description": "Investigated release deployment attempt start.",
          "type": "string"
        },
        {
          "const": "subject_deployment_finished",
          "description": "Investigated release deployment attempt completion.",
          "type": "string"
        },
        {
          "const": "release_marker",
          "description": "Application-reported SDK release marker.",
          "type": "string"
        },
        {
          "const": "release_first_seen",
          "description": "First observed release telemetry boundary.",
          "type": "string"
        },
        {
          "const": "release_last_seen",
          "description": "Last observed release telemetry boundary.",
          "type": "string"
        },
        {
          "const": "issue",
          "description": "Grouped issue evidence.",
          "type": "string"
        },
        {
          "const": "trace",
          "description": "Trace evidence.",
          "type": "string"
        },
        {
          "const": "log",
          "description": "High-severity log evidence.",
          "type": "string"
        },
        {
          "const": "action",
          "description": "Product-action aggregate evidence.",
          "type": "string"
        },
        {
          "const": "metric",
          "description": "Metric aggregate evidence.",
          "type": "string"
        }
      ]
    },
    "ReleaseInvestigationTraceResponse": {
      "description": "One privacy-safe service-local trace summary observed for the release.",
      "properties": {
        "duration_ms": {
          "description": "Observed service-local wall-clock duration in milliseconds.",
          "format": "int64",
          "type": "integer"
        },
        "error_span_count": {
          "description": "Number of retained service-local spans with error status.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "root_span_name": {
          "description": "Best available parentless or earliest span name in this service scope.",
          "type": "string"
        },
        "span_count": {
          "description": "Number of retained service-local spans.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "started_at": {
          "description": "Earliest service-local span start.",
          "format": "date-time",
          "type": "string"
        },
        "trace_id": {
          "description": "Distributed trace identifier for deeper investigation.",
          "type": "string"
        }
      },
      "required": [
        "trace_id",
        "root_span_name",
        "span_count",
        "error_span_count",
        "started_at",
        "duration_ms"
      ],
      "type": "object"
    },
    "ReleaseTraceHealthResponse": {
      "description": "Privacy-safe trace health observed for one release and service.",
      "properties": {
        "error_rate_basis_points": {
          "description": "Error-trace rate from 0 to 10,000 basis points.",
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0,
          "type": "integer"
        },
        "error_trace_count": {
          "description": "Distinct traces containing at least one error span.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "status": {
          "$ref": "#/$defs/ReleaseTraceHealthStatus",
          "description": "Honest observed state without claiming that a release caused errors."
        },
        "trace_count": {
          "description": "Distinct traces observed for the release and service.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "status",
        "trace_count",
        "error_trace_count",
        "error_rate_basis_points"
      ],
      "type": "object"
    },
    "ReleaseTraceHealthStatus": {
      "description": "Honest release trace-health states.",
      "oneOf": [
        {
          "const": "unknown",
          "description": "No trace data is available for this release and service.",
          "type": "string"
        },
        {
          "const": "no_errors_observed",
          "description": "Traces are present and none contain an observed error span.",
          "type": "string"
        },
        {
          "const": "errors_observed",
          "description": "At least one observed trace contains an error span.",
          "type": "string"
        }
      ]
    }
  }
}