Dashboard › opencode-lore › Distillation
bcf6ded5-4c18-450f-9d4e-072a98da6746["lore_tm_v1_yQbBazA-B88PYlVB6_7RtADj9apBgvpJmhe3-ceVW3o","lore_tm_v1_KEGVqr5GGI6lt7neKHoQal5QOgzUWoY1rwniv3kRixc"]
Date: Sep 16, 2026
/home/byk/Code/opencode-lore-responses-projection-security/packages/gateway/test/openai-responses-recall-aware-stream.test.ts, an 8,795-line Vitest suite for streamResponsesRecallAware, the true-streaming, recall-aware OpenAI Responses streamer."Provider response headers timed out after 10000ms": buffered accumulateResponsesSSEStream withheld all client bytes until a slow, reasoning-heavy upstream completed, causing opencode’s 10-second ProviderHeaderTimeoutError on ChatGPT sessions. streamResponsesRecallAware instead forwards events live, intercepts a recall function call, emits a marker, runs a follow-up, and rebuilds terminal response.completed.streamResponsesRecallAware from ../src/pipeline, setRecallContinuationFailureHook and RecallContinuationFailureCategory from ../src/recall-continuation-failure, and setPrincipalTransportFailureHook and PrincipalTransportFailureSample from ../src/principal-transport-failure; afterEach clears both hooks and registers silentLogSink.sseEvent() for constructing SSE payloads, streamFrom() for creating a text/event-stream Response, drain() for reading the complete client-facing stream, responseEvents() for parsing emitted events, and expectVisibleOutputIndicesToMatchTerminal() for verifying each visible event’s output_index and item ID match the rebuilt terminal response’s output.created(id, model), recallCall(outputIndex, args, itemId, callId), sparseVisibleFunctionCall(outputIndex, argumentsText, itemId, callId), and completed(id, usage?). recallCall emits response.output_item.added, response.function_call_arguments.done, and response.output_item.done for a completed recall; sparseVisibleFunctionCall begins with blank call_id, name, and arguments, streams an arguments delta, then completes as a read call.msg_${state.id || "lore"}_${shiftedRecallIndex}, updates to contState.items, propagation of contState.terminalEvent, construction of continuationFollowUpInput and continuationRetryBaseline, reset of recallContinuationTransportRetries to 0, and recall-continuation failure categorization/logging.response.completed to reflect visible output only, computes visibleIndices via visibleOutputIndexMap(), remaps continuation chunks with remapVisibleOutputIndices(chunk, visibleIndices), clears keepalives, handles client disconnects during continuation and terminal delivery, and exposes transactional commit/rollback behavior for pendingCommits.deferredBytes by chunk.byteLength, and tracks source output indices where available.