# Metric Semantics Normalization

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "metric-semantics-normalization-2026-08-12",
  "problems": [
    {
      "problemId": "derived-metric-view-misclassified-as-contradiction",
      "summary": "Scenario diagnosis treated an explicit inverse-P999 selector as a physically implausible duration value and promoted an auxiliary comparison signal into the ticket-level answer.",
      "status": "optimized_verified",
      "issueKeys": ["APID-29296"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/APID-29296#problem:derived-duration-semantics"],
      "signalTextIncludesAny": ["duration metric semantics contradiction", "inverse_duration_p999", "physically implausible duration"],
      "observedThrough": "2026-08-12",
      "effectiveAt": "2026-08-12T11:13:00+08:00",
      "verifiedAt": "2026-08-12T11:40:00+08:00",
      "attemptedAction": "Preserve the Evidence metric statement and teach Scenario diagnosis to normalize source quantity, unit, labels, aggregation, window, and explicit transformations before declaring like-for-like contradiction.",
      "evidenceUrl": "https://github.com/tidbcloud/aisupport/tree/main/auto-oncall-services/docs/opts/2026-08-12-metric-semantics-normalization.md"
    }
  ]
}
-->

- Owner: Evidence Agent and Scenario Diagnostic Agent
- Source: `APID-29296` workload-hotspot round 2
- Status: optimized_verified

Different recording rules, aggregations, windows, percentiles, rates, inverses,
and normalized views are not required to match numerically. A semantics boundary
is valid only after translating both claims to the same quantity, or when a
value violates its own definition or physical domain. Auxiliary selectors do
not create ticket-level causal boundaries.

Staging replay `d8c9f1ba-e9ae-42b5-b338-e190ccbd27d9` preserved the metric
source and transformations. It treated 1-minute and 30-second P999 views as
compatible windowed views, emitted no `metric_semantics_unverified`, and did
not promote the inverse-duration comparison selector into the ticket result.

The existing Jira internal comment `23399342` was updated in place after human
review. Readback confirmed `public=false` and the expected body; no duplicate
comment or issue transition was created.

Next action: monitor later derived-metric replays for false semantic conflicts.
