# Unified Cloud and OP Diagnosis Semantics

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "unified-cloud-op-diagnosis-2026-08-06",
  "problems": [
    {
      "problemId": "diagnosis-semantics-are-presented-as-op-specific",
      "summary": "The shared scenario reasoning contract was packaged and prompted as OP diagnosis even though entity alignment, mechanism analysis, alternatives, and causality boundaries apply equally to Cloud providers.",
      "status": "optimized_unverified",
      "issueKeys": ["ST-2864", "ST-2865", "TCID-13001"],
      "sourceRefs": [
        "https://tidb.atlassian.net/browse/ST-2864#problem:cloud-diagnosis-did-not-use-component-specific-scenario-semantics",
        "https://tidb.atlassian.net/browse/ST-2865#problem:cloud-diagnosis-and-op-diagnosis-contract-diverged",
        "https://tidb.atlassian.net/browse/TCID-13001#problem:cloud-multi-source-facts-lacked-shared-causality-semantics"
      ],
      "signalTextIncludesAny": [
        "op-diagnosis is treated as op only",
        "cloud and op diagnosis use different scenario semantics",
        "cloud diagnosis lacks component specific mechanism and alternative checks",
        "provider transport is coupled to diagnosis reasoning"
      ],
      "observedThrough": "2026-08-06",
      "effectiveAt": "2026-08-06T06:14:14Z",
      "verifiedAt": null,
      "attemptedAction": "Generalize the bundled diagnosis skill and prompt contract so Cloud and OP share provider-neutral scenario reasoning while Clinic, Wetech, and Manus remain isolated evidence transports with their own authorization and query helpers.",
      "evidenceUrl": "https://github.com/tidbcloud/aisupport/pull/652"
    }
  ]
}
-->

- Optimization ID: `unified-cloud-op-diagnosis-2026-08-06`
- Owner: auto-oncall-services
- Source references: the frozen Cloud comparison cohort and the current
  provider-specific diagnostic prompt boundary
- Implementation status: deployed to staging in image
  `692e850ea64427827be52bc0425306df5e95c283`
- Effective status: `optimized_unverified`

## Bounded problem

Scenario diagnosis concepts are provider-neutral, but the reusable skill is
named and described as OP-only and the Clinic parent is explicitly forbidden
from using it. That leaves Cloud evidence acquisition and Cloud diagnosis
semantics unnecessarily coupled to a narrower metrics path.

## Implementation

- Keep provider authorization, target isolation, and evidence acquisition in
  provider-specific children.
- Make scenario selection, evidence expectations, mechanism tests,
  alternatives, causality strength, and human handoff provider-neutral.
- Reuse only the bounded reasoning patterns from Investibook as a design
  reference; do not import or depend on Investibook code or configuration.

## Verification status

Local contract tests passed for the shared Cloud/OP scenario parent rules and
the existing serial Wetech/Manus transport boundary. Seven post-deployment
Cloud replays exercised the shared scenario contract; four entered Clinic
multi-source acquisition. This proves the Cloud path can consume the common
diagnosis semantics, but it does not yet prove a live OP control is unchanged.

## Unresolved gaps

- Cloud and OP must retain different target and authorization contracts.
- No live OP control case was part of the user-authorized affected Cloud
  cohort, so the combined Cloud-and-OP problem cannot be marked verified.
- Final case quality was mixed: shared semantics did not prevent publication
  fact loss in `ST-2864` and `TCID-13001`.

## Next validation action

Replay one bounded existing OP control without changing provider routing, then
compare its provider selection, artifact handoff, diagnosis, and Jira safety
behavior with the pre-change result.
