Source: OCR_ANALYSIS_REPORT.md, OpenCode Review report generated on 2026-08-12.
Findings: M-5, L-2. The context-pack code serializes near-limit records more than once and allocates full UTF-8 buffers before rejecting oversized strings. This is not currently a correctness failure, but it increases CPU and memory pressure around the 2 MB context-pack boundary.
Expected fix:
- Reuse the canonical JSON string returned by size enforcement.
- Add a cheap pre-check before allocating full buffers for clearly oversized strings.
- Add performance-oriented regression coverage around near-limit payloads.
Source: OCR_ANALYSIS_REPORT.md, OpenCode Review report generated on 2026-08-12.
Findings: M-5, L-2. The context-pack code serializes near-limit records more than once and allocates full UTF-8 buffers before rejecting oversized strings. This is not currently a correctness failure, but it increases CPU and memory pressure around the 2 MB context-pack boundary.
Expected fix: