# TiCDC Diagnostic Scenario Coverage

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "ticdc-diagnostic-scenarios-2026-08-28",
  "problems": [
    {
      "problemId": "ticdc-domain-collapsed-into-generic-checkpoint-lag",
      "summary": "Cloud TiCDC topology, lifecycle, replication progress, and correctness tickets were collapsed into one checkpoint-lag route and manual write review remained blocked.",
      "status": "optimized_unverified",
      "applicability": "Allowlisted manual Agent9 read/write replay of a TiDB Cloud TiCDC ticket with exact orgId, source clusterId, and changefeed/task reference.",
      "issueKeys": ["TCID-13093", "TCOC-5870", "APID-29394", "ST-2906", "NAID-12187", "NAID-12197", "TCOC-5828", "TCOC-5854"],
      "sourceRefs": [
        "https://tidb.atlassian.net/browse/TCID-13093#problem:ticdc-domain-collapsed-into-generic-checkpoint-lag"
      ],
      "signalTextIncludesAny": [
        "ticdc-checkpoint-lag",
        "newarch",
        "checkpoint lag",
        "creating",
        "schema tracker",
        "missing table"
      ],
      "observedThrough": "2026-08-28",
      "effectiveAt": "2026-08-28T04:56:56.000Z",
      "verifiedAt": null,
      "attemptedAction": "Deployed the four-way TiCDC scenario split and exact manual review cohort, then ran live read preflights and two authorized write replays. The write path was safe, but provider degradation, attachment transport, and answer-quality blockers prevent broad admission.",
      "evidenceUrl": "https://github.com/tidbcloud/aisupport/pull/1137"
    }
  ]
}
-->

- Optimization ID: `ticdc-diagnostic-scenarios-2026-08-28`
- Owner: Scenario Router, Scenario Diagnostic Agent references, and Clinic
  Evidence Agent field contract
- Source: recent Cloud TiCDC Support cases, the TiCDC new-architecture design,
  checkpoint-lag oncall SOP, oncall record, and official TiCDC metrics
- Implementation status: deployed at source SHA
  `fb8cb54f58693120c22cbc22c2b13c6cc327fb8d`
- Effective status: `optimized_unverified`

## Bounded capability

Replace the generic `ticdc-checkpoint-lag` new-route behavior with four
diagnostic scenarios that preserve the independent TiCDC version concept and
choose architecture-specific evidence. Admit only an exact manual review cohort
for `mode=read` or user-authorized `mode=write`; do not open the active worker,
continuation, autonomous comments, customer publication, or any CDC operation.

## Verification criterion

After the source and app-delivery changes are merged and the exact live SHA is
Ready, replay representative cases for topology, control plane, upstream and
downstream progress, and correctness. Each passing write replay must:

- select the intended TiCDC scenario and exact changefeed target;
- treat source TiDB version, TiCDC version, deployment type, and kernel
  architecture independently;
- use the correct ResolvedTS/CheckpointTS branch and architecture-specific
  metric or log family when progress is the question;
- produce the ticket-language response pair without an unauthorized operation
  promise;
- update or create one stable Jira comment and read it back as `public=false`.

## Live deployment and replay evidence

- Source PR: <https://github.com/tidbcloud/aisupport/pull/1137>
- Configuration PR: <https://github.com/tidbcloud/app-delivery/pull/78633>
- Active Agent9 image PR: <https://github.com/tidbcloud/app-delivery/pull/78635>
- Live image: `fb8cb54f58693120c22cbc22c2b13c6cc327fb8d`,
  `1/1` Ready; `/healthz` and `/readyz` both returned `status=ok`.

| Case | Replay result | Write/readback | Review outcome |
| --- | --- | --- | --- |
| `APID-29394` | Missing exact cluster/changefeed metadata; safely stayed `human_required` without Provider evidence | Run `a1959b8f-68ff-4b6e-a085-e385df008cc7`, DB row `150144`, Jira comment `23730428` read back `public=false` | `different_but_valid`; useful missing-context review sample, but does not prove exact-target Provider execution |
| `NAID-12197` | Correctly preserved the DDL/schema recovery boundary and prohibited unverified delete/recreate | Run `40312bb5-fd91-4e65-8b4d-392003b75579`, DB row `150145`, Jira comment `23730548` read back `public=false` | `human_better`; the customer draft omitted the human answer's concrete log/diagnostic-package request |

Read preflight blockers:

- `TCID-13093`: exact Cloud/changefeed lookup keys were present, but Clinic
  degraded with `clinic_http_502`; the run correctly kept architecture unknown.
- `ST-2906`: Clinic degraded with `clinic_http_400`, but the final answer still
  cited unsupported lag and sink values and received `human_better`.
- `NAID-12187`: Agent9 rejected the attached ZIP with
  `agent9_workspace_file_too_large` before scenario diagnosis.
- `TCOC-5870`, `TCOC-5828`, and `TCOC-5854`: the JSM request-comment API
  returned the exact unsupported-context key
  `sd.customerview.error.vpOriginMissing`; the Jira Context Gate correctly
  rejected them.
- The `NAID-12197` Jira/DB/evaluation writes succeeded, while its optional
  Feishu Base sync returned HTTP 502. It was not rerun because Jira already had
  the intended review comment.

Automatic CDC admission remains intentionally closed. The cohort proves that
manual write replay is publication-safe, but it does not yet establish quality
across the four scenario families or a successful architecture-specific
Provider query.

## Next validation action

Fix the earliest owner for Provider-degraded answers so unsupported values
cannot reach the response, resolve the bounded attachment transport failure,
and rerun topology plus progress cases until at least one exact-target Clinic
query completes. Re-review `APID-29394` and `NAID-12197` from their stable Jira
internal comments before considering broader CDC admission.
