schema_version: 1
id: classify-selected-stores-as-tikv-or-tiflash
title: Classify selected storage stores as TiKV or TiFlash in the current cluster
status: active
owner: codex
evaluation:
  mode: adhoc_evidence
environment:
  profile: stable-dedicated
  cluster_id: '10518506906906971664'
  cluster_type: dedicated
  tidb_version: v8.5.x
time_window:
  resolved_by_output: case_input
runtime:
  hooks:
  - id: prepare_case_input
    stage: before_acp
    kind: python_script
    path: runtime_hook.py
    output_id: case_input
    args:
      - prepare-case-input
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --snapshot-lag-seconds
      - '600'
      - --step-seconds
      - '300'
      - --stores-per-role
      - '3'
  - 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}}'
      - --snapshot-time
      - '{{runtime.case_input.end}}'
      - --stores-csv
      - '{{runtime.case_input.store_ids_csv}}'
prompt:
  text: |
    帮我看下集群 {{environment.cluster_id}} 里这几个 store 分别属于 TiKV 还是 TiFlash：
    {{runtime.case_input.store_ids_json}}

    我只看最后结果。最终只输出一个 `json` 代码块，字段必须严格为：
    `cluster_id`、`evidence_sufficient`、`stores`

    `stores` 必须严格按我给你的 store 顺序返回。每个元素都只能包含：
    `store`、`component`

    `component` 只能是 `tikv` 或 `tiflash`。

    不要输出额外字段，不要输出额外解释，也不要把说明写进 JSON。

    JSON 结构如下：

    ```json
    {
      "cluster_id": "10518506906906971664",
      "evidence_sufficient": true,
      "stores": [
        {
          "store": "13",
          "component": "tikv"
        },
        {
          "store": "25",
          "component": "tiflash"
        }
      ]
    }
    ```

    如果证据不足，请把 `evidence_sufficient` 设为 `false`，并把 `stores` 设为空数组。
tags:
- topology
- storage-components
- store-role
- structured-output
case_tier: P1
cost_tier: low
followup:
  scheduled_max_followups: 0
execution:
  acp_bash_timeout_s: 300
