schema_version: 1
id: ttl-row-processing-during-sql-tail-latency-incident-window
title: TTL row-processing signals in saas01 during the latest completed Beijing 11:00-11:05 window
status: active
owner: codex
evaluation:
  mode: adhoc_evidence
environment:
  profile: stable-dedicated
  cluster_label: saas01
  cluster_id: '10989049060142230334'
  cluster_type: dedicated
  tidb_version: v8.5.x
time_window:
  incident_at: '2026-06-13T03:00:00Z'
  resolved_by_output: resolved_window
runtime:
  hooks:
  - id: resolve_runtime_window
    stage: before_acp
    kind: python_script
    path: runtime_hook.py
    output_id: resolved_window
    args:
      - resolve-window
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --cluster-label
      - '{{environment.cluster_label}}'
      - --local-hour
      - '11'
      - --local-minute
      - '0'
      - --duration-minutes
      - '5'
  - id: build_runtime_reference
    stage: before_judge
    kind: python_script
    path: runtime_hook.py
    output_id: reference_answer
    args:
      - build-reference
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --cluster-label
      - '{{environment.cluster_label}}'
      - --start
      - '{{runtime.resolved_window.window.start}}'
      - --end
      - '{{runtime.resolved_window.window.end}}'
prompt:
  text: |
    帮我看下 {{environment.cluster_label}} 这个集群（{{environment.cluster_id}}）在 {{runtime.resolved_window.window.start}} 到 {{runtime.resolved_window.window.end}} 这 5 分钟里，TTL 看起来有没有明显在工作。

    不用展开整个根因分析，最后直接给我一个 `json` 代码块就行，字段固定为：
    `cluster_id`、`window`、`evidence_sufficient`、`ttl_activity_present`、`signals`

    `signals` 里固定放这两个字段：
    `ttl_insert_rows_delta`
    `ttl_processed_expired_rows_delta`

    不要输出额外解释，也不要多输出别的字段。

    JSON 结构如下：

    ```json
    {
      "cluster_id": "10989049060142230334",
      "window": {
        "start": "2026-01-01T03:00:00Z",
        "end": "2026-01-01T03:05:00Z"
      },
      "evidence_sufficient": true,
      "ttl_activity_present": true,
      "signals": {
        "ttl_insert_rows_delta": 12345,
        "ttl_processed_expired_rows_delta": 67890
      }
    }
    ```

    如果证据不足，请把 `evidence_sufficient` 设为 `false`，把 `ttl_activity_present` 设为 `false`，并把 `signals` 里的两个字段都设为 `null`。
tags:
- ttl
- structured-output
- adhoc-evidence
- dedicated
- latest-window
- metric-selection
case_tier: P1
cost_tier: low
followup:
  scheduled_max_followups: 0
execution:
  acp_bash_timeout_s: 300
