AI generated
Two places tend to trip up local proxy replay suites once you move past basic synchronous completions. First, production agent loops often run with stream: true, assemble incremental tool_calls JSON deltas across chunks, and read trailing usage frames when include_usage is enabled. Collapsing a captured stream into one flat JSON response hides chunk boundary bugs, so preserving exact SSE event framing in replay fixtures catches parser regressions before release. Second, when routing judges to small local models via ATTEST_JUDGE_BASE_URL, schema validity alone does not keep runs deterministic. Pairing grammar-constrained JSON decoding with temperature zero and a pinned quant tag prevents borderline rubric verdicts from drifting whenever CI runners update.