# Comparison Baseline Incident Time

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "comparison-baseline-incident-time-2026-08-18",
  "problems": [
    {
      "problemId": "relative-baseline-selected-as-primary-incident",
      "summary": "A ticket comparing the current regression with yesterday at the same clock interval was routed to the previous day's baseline instead of the cutoff-local current incident.",
      "status": "candidate",
      "applicability": "Historical replays whose frozen ticket contrasts a current symptom with yesterday or a previous-day baseline at a clock-only interval.",
      "issueKeys": ["TCID-12989"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/TCID-12989#problem:relative-baseline-selected-as-primary-incident"],
      "signalTextIncludesAny": ["yesterday was selected as the incident", "comparison baseline replaced current window", "wrong timezone day"],
      "observedThrough": "2026-08-18",
      "effectiveAt": null,
      "verifiedAt": null,
      "attemptedAction": "Make Scenario Router distinguish the previous-day comparison baseline from the current incident and anchor clock-only current symptoms to the replay cutoff local date and explicit UTC offset.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/TCID-12989"
    }
  ]
}
-->

- Optimization ID: `comparison-baseline-incident-time-2026-08-18`
- Owner: Scenario Router incident-window interpretation
- Source reference: `TCID-12989`
- Implementation status: local candidate
- Effective status: `candidate`

## Bounded problem

The frozen text compared the current `17:00–17:20` regression with yesterday's
roughly 40 ms baseline. Selecting yesterday as the primary incident caused the
Provider to miss the current 10-second writes and their aligned TiKV behavior.

## Change and validation

The Router contract now keeps yesterday as comparison context and resolves the
primary clock-only interval on the replay cutoff's local calendar date and
offset. The regression requires `2026-07-31 17:00–17:20 +08:00`, canonicalized
to UTC epoch `1785488400..1785489600`, and explicitly rejects the July 30 range.

## Unresolved gap and next action

This does not infer which metric change is causal. After deployment, replay
`TCID-12989` and verify the canonical current-day request window before using
the store-local flow-control evidence in the diagnosis.
