# Customer Digest Consumption

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "customer-digest-consumption-2026-07-22",
  "problems": [
    {
      "problemId": "customer-digest-present-but-re_requested",
      "summary": "Customer-supplied SQL Digests in bridged Jira comments are not consumed before auto-oncall asks for a Digest again.",
      "status": "optimized_verified",
      "issueKeys": ["APID-29213"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/APID-29213#problem:ai_gap:digest-re-request"],
      "signalTextIncludesAny": ["provide a representative SQL Digest", "请提供一条代表性的系统 SQL", "客户已经上传 sql digest", "已有 digest 仍重复询问"],
      "observedThrough": "2026-07-22",
      "effectiveAt": "2026-07-22T05:01:58Z",
      "verifiedAt": "2026-07-22T05:15:00Z",
      "attemptedAction": "Normalize bridged live-comment authors, extract customer SQL Digest candidates into bounded workspace evidence, and require the diagnostic agent to consume them before clarification.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/APID-29213?focusedCommentId=23256901"
    }
  ]
}
-->

- Optimization ID: `customer-digest-consumption-2026-07-22`
- Owner: auto-oncall
- Source reference: `APID-29213`
- Problem: the live timeline contained a CPU screenshot and two customer SQL
  Digests before analysis began, but bridged comments were rendered under the
  Jira bot author and the bare 64-character values remained untyped text. The
  agent ran generic workload queries and asked the customer for a Digest again.
- Implementation status: deployed to staging in `6d7cc93934d002343c56517cc7a6eaca019bbd54`
- Effective status: `optimized_verified`

## Verification

At `2026-07-22T12:27:50+08:00`, read-only replay
`c5139425-5d74-4158-903b-9eca033ba0f4` extracted both customer Digests and
used each one in an exact Wetech Slow Query lookup. The final draft explained
both results, set `requestedContext=[]`, and did not request another SQL or
Digest. The relevant contract tests passed.

At `2026-07-22T13:15:00+08:00`, deployed write replay
`f400209a-3471-4b5b-b55c-eba99b58110c` extracted both customer Digests from
comments `23256802` and `23256804`, completed an exact Slow Query lookup for
each, and updated existing Jira internal comment `23256901` in place. The
published reply used both results and did not request another SQL or Digest.

## Unresolved gaps

- The model's first turn can still attempt a duplicate request, so the backend
  correction turn remains the enforced publication guard.

## Next validation action

Monitor newer matching problem signals as regressions; do not suppress an
unrelated gap from APID-29213.
