Dashboard › opencode-lore › Responses sparse-index representation
01a0a9ac-d2c4-7972-a35f-5ca42302b283Trap: validating only event-level coordinates or relying on retained-byte limits looks sufficient, but terminal-only arrays and shifted continuation indices can create unbounded sparse state or change coordinates. Fix: validate output_index, content_index, and summary_index against min(maxSSEFrames, DEFAULT_MAX_SSE_FRAMES) before normalization or mutation; include continuation offsets and bidirectionally reconcile terminal arrays with completed lifecycle state. Preserve validated holes in raw output, skip holes only during semantic flattening, and never compact coordinates.