# APID Non-Wetech Diagnostic Escalation

> Superseded on 2026-07-13 by `2026-07-13-op-non-wetech-auto-oncall-gate.md`. This file is historical only; active code and reporting use the broader `op_non_wetech` contract.

## Current Design

- The worker applies the L1 oncaller gate, then the auto coverage gate, then live analysis.
- The auto coverage gate classifies the visible Jira support case and enables automation by `scenarioClass + resolutionMode`.
- Evidence-required APID diagnostic cases such as SQL performance, cluster runtime, and TiCDC currently route to Wetech only when `Account Alias` is `Wetech`; otherwise they can route to the Investibook evidence lane.
- Staging enables `sql_performance_tuning`, `cluster_runtime_issue`, and `ticdc_or_data_pipeline` with `direct_answer`, `clarification_needed`, and `evidence_assisted`, so a non-Wetech APID diagnostic case can reach the agent path.

## Risks

- Non-Wetech APID diagnostic cases can need customer or backend evidence that auto-oncall cannot reliably collect.
- Letting the agent run first creates low-quality drafts that ask for missing evidence instead of escalating ownership early.
- A broad change to all APID cases would regress pure Q&A and public documentation answers.
- A broad change to all diagnostic cases would regress ST Clinic and APID Wetech evidence-assisted paths.

## Target Contract

- APID Wetech diagnostic cases keep the Wetech evidence-assisted route.
- APID non-Wetech evidence-required diagnostic cases are `human_required` and are an automation hard stop.
- Pure Q&A / feature capability APID cases remain eligible for `direct_answer` when configured.
- The Jira issue allowlist must not override this hard stop.
- No fallback should treat missing evidence as an agent-run problem for APID non-Wetech diagnostics.

## Implementation Steps

1. Add an explicit classifier risk flag for APID non-Wetech evidence-required diagnostics.
2. Resolve those cases to `human_required` with no evidence provider.
3. Teach auto coverage to treat that risk flag as a hard stop before issue allowlist checks.
4. Add classifier and coverage tests for non-Wetech diagnostic escalation, pure Q&A preservation, Wetech preservation, and allowlist non-bypass.

## Verification Checklist

- APID non-Wetech cluster runtime diagnostics classify as `human_required` and `evidenceProvider=none`.
- APID non-Wetech pure Q&A classifies as `direct_answer`.
- APID Wetech TiFlash diagnostics still classify as `evidence_assisted` with `evidenceProvider=wetech`.
- Coverage returns disabled for APID non-Wetech diagnostics even when issue allowlist and `human_required` are configured.
- `npm run typecheck` and targeted tests pass.
