# v2.0.2 Schema Forensic

## Source Run
- run_id: `eval-baY1nPi1rI`
- timestamp: `2026-03-23T18:59:54.829Z`
- prompt_version: `normalizer_v2_0_1`
- schema_validation_pass_rate: `96.15%`
- failed case: `BQ-001`
- trace_id: `SatgafwxwDR9BU`

## BQ-001 Failure Reconstruction
1. Raw question was a long multi-intent pre-close analytical request.
2. Model response arrived with:
   - `status: incomplete`
   - `incomplete_details.reason: max_output_tokens`
3. The JSON body in `output_text` was truncated mid-fragment.
4. Parser error after retry:
   - `JSON_PARSE_ERROR_AFTER_RETRY: Unterminated string in JSON at position 3506`
5. `request_count_for_case = 2`, but retry used the same output budget, so truncation repeated.

## Root Cause
Primary failure was not taxonomy misclassification.  
It was transport-level truncation due insufficient `max_output_tokens` for long structured output.

## Systemic Fix Implemented in v2.0.2
1. Added adaptive retry output budget logic in normalizer service:
   - Detects `status=incomplete` + `reason=max_output_tokens`.
   - Escalates retry budget (`computeRetryMaxOutputTokens`) instead of repeating the same limit.
   - Hard cap: `2400` output tokens.
2. Kept strict JSON schema validation unchanged (no relaxation).
3. Added `normalized_query_v2_0_2` contract with explicit execution/route fields to reduce ambiguous partial outputs.

## Why This Is Not a Case-Specific Patch
- Trigger condition is generic (`max_output_tokens` truncation), not tied to `BQ-001`.
- Applies to any long, multi-fragment normalization.
- Preserves strict schema discipline while improving completion reliability.

## Follow-up Validation
- Run `single-pass-strict` on v2.0.2 labeled eval set.
- Confirm:
  - `schema_validation_pass_rate = 100`
  - no parser failures caused by truncation in trace logs.
