# Compact Internal-Only Handoff

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "compact-internal-only-handoff-2026-08-13",
  "problems": [
    {
      "problemId": "internal-only-handoff-emits-nonmaterial-audit-content",
      "summary": "An answerable internal_only replay emitted long audit-style sections and an unadopted related-ticket candidate despite having no internal action or escalation need, and malformed nested inline code rendered poorly in Jira.",
      "status": "optimized_verified",
      "applicability": "Internal-only paired responses with no Support-owned action, customer clarification, safety risk, escalation, or material internal-only evidence boundary.",
      "issueKeys": ["ST-2891"],
      "sourceRefs": [
        "https://tidb.atlassian.net/browse/ST-2891#problem:internal-only-handoff-emits-nonmaterial-audit-content"
      ],
      "signalTextIncludesAny": [
        "visible context related evidence answer basis",
        "unadopted related ticket in internal handoff",
        "nested inline backticks break jira formatting"
      ],
      "observedThrough": "2026-08-13",
      "effectiveAt": "2026-08-13T05:05:01Z",
      "verifiedAt": "2026-08-13T05:15:09Z",
      "attemptedAction": "Keep action-free internal_only handoffs compact, include related Jira evidence only when adopted and material, and require Jira-safe fenced code for statements containing backticked identifiers.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/ST-2891"
    }
  ]
}
-->

- Optimization ID: `compact-internal-only-handoff-2026-08-13`
- Owner: internal handoff content and paired Markdown presentation
- Source reference: `ST-2891`, internal replay comment `23549042`
- Implementation status: merged and deployed to staging
- Effective status: `optimized_verified`

## Bounded problem

ST-2891 was correctly classified `internal_only` and had no real internal
confirmation or escalation need. Its replay nevertheless produced long
`Visible context`, `Related evidence`, and `Answer basis` sections because the
prompt required every matched related-ticket candidate to appear as audit
evidence. Its customer message also used nested inline backticks around SQL,
which caused Jira to render following prose as code.

## Implemented change

- Use a short internal conclusion when no actual internal action or boundary
  exists.
- Omit absent-input narration, unnecessary-diagnostic narration, and related
  candidates that were not adopted or material to the answer.
- Do not force internal headings with no material content.
- Use fenced code for SQL or commands containing backticked identifiers and
  keep sibling bullets contiguous.

## Verification status

Source PR `tidbcloud/aisupport#865` passed CI and merged as
`5caaa255c338e8cbc3cdd2c945bed9e1b2b62ff3`. Deployment workflow
`31668862599` built that image, and app-delivery PR
`tidbcloud/app-delivery#77144` updated the staging tag. The live Deployment
reported that exact image with one Ready Pod and zero restarts; `/healthz` and
`/readyz` both returned HTTP 200.

ST-2891 `mode=read` replay run `1e732945-4283-4ff2-b761-ac7fc945dbb4` remained
`decision=internal_only`. Its internal handoff became one short Chinese
conclusion plus one material RU-capacity caveat; it contained no `Visible
context`, `Related evidence`, `Answer basis`, internal confirmation request, or
unadopted related-ticket candidate. The customer message used one fenced SQL
block, contiguous bullets, and no nested inline backticks. The returned Jira,
database, evaluation, and Feishu publication states were all `not_requested`.

## Next validation action

Keep the compact-handoff, related-evidence, and Jira-safe Markdown tests as
preservation checks. No write replay or Jira comment refresh is required for
this presentation-only verification.
