# Inline SQL Digest Evidence

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "inline-sql-digest-evidence-2026-09-07",
  "problems": [
    {
      "problemId": "inline-customer-sql-digest-not-extracted",
      "summary": "A bare SQL Digest beside customer context was dropped from customer evidence because extraction required a standalone line after comment whitespace had already been flattened.",
      "status": "optimized_unverified",
      "applicability": "Customer descriptions or visible comments containing an unlabelled complete 64-hex SQL Digest beside other text.",
      "issueKeys": ["APID-29470"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/APID-29470#problem:inline-customer-sql-digest-not-extracted"],
      "signalTextIncludesAny": ["inline customer SQL Digest not extracted", "bare Digest lost after comment whitespace normalization"],
      "observedThrough": "2026-09-07",
      "effectiveAt": "2026-09-07T02:37:00Z",
      "verifiedAt": null,
      "attemptedAction": "Extract complete word-bounded 64-hex Digest candidates anywhere in existing customer text, retaining explicit-label precedence, provenance, deduplication and comment visibility.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/APID-29470?focusedCommentId=23815229"
    }
  ]
}
-->

- Owner: runner-owned customer evidence materialization (`src/run-workspace.ts`).
- Source: user-requested removal of the standalone-line restriction after
  reviewing APID-29470, run `2e7c720c-7295-4dcd-8971-9a978c34f258`, database run
  `150206`, answer fingerprint
  `88e9d6782b7b1977c9885cd7635403dc504bea89a2c4d8c488599ee5c761afe5`.
- Repository base: `59ab3bf045056c38cf17b4b37a499e9cd79fa5a7`.
- Implementation status: deployed; runtime extraction passed, but the full
  source-case diagnostic and publication criterion remains unverified.

## Bounded change

The original input manifest included customer comment `23815229`. Its unedited
Jira ADF contains an unlabelled Digest on a line followed by cluster and site
context. The text projection and customer-comment normalization collapse those
lines. The previous extractor then found no standalone Digest line.

Accept complete 64-hex candidates inline in the existing description and
visible customer-comment inputs. Keep labelled values preferred within each
text and retain every distinct bare candidate when no label is present. Reject
partial matches inside longer identifiers. Provider exact binding still requires
one supplied Digest; this change does not select among multiple candidates.

## Verification and limits

Local regression coverage includes the bridged comment shape, inline ADF
description, uppercase normalization, multiple candidates, deduplication,
exclusion of internal Support comments, and rejection of longer identifiers.
On 2026-09-07, the TypeScript build and all 80 focused workspace, query-evidence
handoff, scenario-classifier, and optimization-record tests passed. These are
local deterministic tests, not a post-deployment model replay.

The persisted classification also incorrectly requested `sql_or_digest`, but
the original runtime workspace is unavailable. This extractor change alone
does not prove that the classifier's historical omission is fixed. No later
MVCC or query-expression findings are part of this repair's acceptance criterion.

A local real-model check after PR #1350 confirmed that extraction succeeded
while classification still requested `sql_or_digest`. The independently
reproduced classifier input gap and its follow-up local regression are recorded
in [Supplied SQL Digest in Classifier Input](2026-09-07-classifier-supplied-sql-digest.md).

Next validation: after an authorized deployment, replay APID-29470 with its
historical cutoff and verify that the supplied Digest is retained, the missing
target gate no longer blocks diagnosis, and any Provider acquisition uses that
exact identity. Keep the problem unverified until the case-specific check passes.

## Deployment verification on 2026-09-07

The live service ran merged-main image
`c5f5ce2a8a79ed554da57cc87b36e625d3822f91`. Read replay
`67001b30-7e1f-4d94-bedc-78fea27eeb9c` materialized the exact supplied Digest
from comment `23815229`, with `detection=bare_64_hex` and correct provenance.
The automatic cutoff was human comment `23815280`; customer time clarification
was included, while the later human MVCC and expression findings were excluded.

Extraction passed, but the classifier still reported `sql_or_digest` missing
and the diagnostic pipeline did not run. The HTTP request ended with
`codex_re_requested_existing_customer_sql_digest`; no successful read artifact
was published. Keep `optimized_unverified` because the declared downstream
admission, exact Provider identity use, and applicable comment-refresh checks
have not passed. The independent classifier failure is recorded in the linked
classifier handoff above. Frozen inputs and trace are preserved at
`/tmp/apid-29470-deployed-check-A2lZdU/frozen-run.tgz`.

## Follow-up deployment on 2026-09-07

On `9faf8945`, read replay `eff3e954-b116-4f5a-80ae-b91cde2e087a` retained the
same exact Digest, passed classification and diagnostic admission, completed a
valid response without repeating the SQL/Digest request, and published that
exact result to internal comment `23815249` / database run `150211` with
fingerprint `34979c3a2a11d6ad0b64596fabe41021f9f46f87bcbce831823607881011467b`. The separately recorded bridge-identity
repair fixed the remaining classifier projection loss. Target execution-detail
acquisition still failed at Dashboard login, so this older record's broader
exact-Provider-acquisition criterion remains `optimized_unverified`; this does
not describe another extraction failure. See the bridge-provenance verification
record for the passed input and classification boundary.
