# Scenario Causal Brief Reconciliation

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "scenario-causal-brief-reconciliation-2026-08-12",
  "problems": [
    {
      "problemId": "router-reopens-local-diagnosis-and-becomes-more-conservative",
      "summary": "Scenario evidence was passed as a broad packet and the Router rebuilt local causality, so additional non-load-bearing gaps could erase a useful bounded conclusion and promote a recovered historical event to human_required.",
      "status": "optimized_unverified",
      "issueKeys": ["APID-29253", "APID-29194"],
      "sourceRefs": [],
      "signalTextIncludesAny": [
        "evidence becomes more conservative",
        "human_required after complete evidence",
        "Router re-diagnoses scenario observations",
        "op_batch_query_count_invalid",
        "op_batch_target_invalid"
      ],
      "observedThrough": "2026-08-12",
      "effectiveAt": "2026-08-12T05:24:44Z",
      "verifiedAt": null,
      "attemptedAction": "Make the Scenario Diagnostic Agent derive its initial evidence question from the Router reason as a hypothesis, return a compact causal brief, preserve bounded local conclusions, constrain Router work to cross-scenario reconciliation, and give same-round plan repair exact cardinality or immutable-target correction instructions.",
      "evidenceUrl": "https://github.com/tidbcloud/aisupport/tree/main/auto-oncall-services/docs/opts/2026-08-12-scenario-causal-brief-reconciliation.md"
    }
  ]
}
-->

- Optimization ID: `scenario-causal-brief-reconciliation-2026-08-12`
- Owner: Scenario Diagnostic Agent and Scenario Router
- Source reference: post-architecture regression replays on 2026-08-12
- Implementation status: merged and deployed to staging
- Effective status: `optimized_unverified`

## Bounded problem

`APID-29253` acquired broad successful evidence but became more conservative
than its prior accepted answer. `APID-29194` failed its first plan on batch
cardinality and then lost the immutable Wetech target during plan repair.

## Candidate change

- Start the Scenario evidence question from its Router reason as a hypothesis,
  without passing that reason directly to Evidence as a query plan.
- Reduce each completed Scenario result to one local causal brief: four
  load-bearing observations, three counter-observations, one mechanism/open
  link, one alternative, attribution, mitigation/handoff, and severity.
- Let Router resolve only cross-scenario precedence, conflict, deduplication,
  dependency, mitigation, and ticket ownership. Missing deeper RCA must not
  erase a useful bounded conclusion.
- Make plan repair explicitly prune an oversized Wetech batch and copy the
  runner-owned target exactly after target validation failure.

## Verification evidence

- Source PRs [#811](https://github.com/tidbcloud/aisupport/pull/811) and
  [#814](https://github.com/tidbcloud/aisupport/pull/814) merged; 746 local tests
  and both source CI runs passed.
- `APID-29259` replay `0e67e865-4e0d-40cb-8881-cacbe2acf451` returned
  `internal_only` and `ai_better`; the workload handoff retained 12 query
  coverage entries and eight observations instead of discarding the packet.
- `APID-29253` replay `4193eb75-9554-4052-8c6b-e300e1d72d44` produced a useful
  bounded storage/transaction diagnosis but remained `human_required` because
  historical `urgent_incident` was still treated as a safety floor. That
  independent boundary was fixed by PR #817 and replayed as
  `1fd25ad8-3154-49f7-b7a1-81bd777b87b5`: `internal_only`, `ai_better`, and no
  unsupported scale-out recommendation.
- Post-deployment write replay `6a78a834-012a-476d-ae9c-da09c255df31`
  reconciled query latency, workload hotspot, and capacity briefs into one
  ranked TiKV store-local mechanism plus a distinct background-maintenance
  alternative. DB run `150034` refreshed private Jira comment `23310306`.
- `APID-29194` replay `b14cf721-48fb-4b66-80d0-e0980c021d10` exercised same-round
  repair for both query cardinality and target validation. It could not execute
  provider queries because the shared auth bootstrap returned
  `diagnostic_wetech_readiness_failed` with `targetReference=null` in 189 ms.

## Unresolved gaps

- The APID-29253 Jira internal comment is refreshed and verified
  `public=false`.
- APID-29194 remains blocked on Wetech target/auth readiness; Evidence plan
  repair cannot manufacture a runner-owned target.

## Next validation action

Restore the APID-29194 Wetech target/auth bootstrap, replay it without changing
the Evidence plan-repair contract, then refresh its applicable Jira internal
comment after human review. This shared problem remains
`optimized_unverified` until that independent case boundary is validated.
