Dashboard › opencode-lore › Distillation
dc308746-e94a-444d-bea0-55299b6ed7be["lore_tm_v1_R1CIl69seoZga0fUPtvVL0n9pkmuXgzKjGXI4k7WCc8","lore_tm_v1_Q91ZMQfDCVylOnUXelw8Zl47sry28gUQJM3vkJaX2HY","lore_tm_v1_4HA6_pcZBeHdZVil5RwRL6MJe0_WhUcBDhV1esQx1sw","lore_tm_v1_uPoctNGCoCUW5vpKarlVr5tfAqMbTUxX7-58gw_Yj44","lore_tm_v1_8ixmMn92_pz7zKwaxtOWNwhWcVWeLfIdnq3fPgtXlS0"]
Date: Sep 16, 2026
packages/gateway/src/pipeline.ts:8473-9166, covering Responses output lifecycle handling for raw-item uniqueness, call_id and item identity validation, content-part state, reasoning-summary state, function-call argument deltas, response.output_item.done, and Codex-specific validation.packages/gateway/src/pipeline.ts:9170-9207 validates each streamed reasoning-content entry against the corresponding terminal finalContent[contentIndex]: the terminal part must exist with the same contentState.kind; delta lifecycles require valueDone; part lifecycles require partDone; and terminal values must match authoritativeValue, finalValue, and partFinalValue. Violations throw errors identifying the output/content indices, after which a valid lifecycle sets lifecycle.outputDone = true.seedImplicitCodexItem() at packages/gateway/src/pipeline.ts:9212-9242 seeds an implicit output item from normalizationState.rawItems only when normalization state exists, the event is neither response.output_item.added nor response.output_item.done, output_index is a nonnegative safe integer, and acc.rawItems does not already contain that index. It synthesizes response.output_item.added through both outputIndexForEvent() and applyResponsesEvent().packages/gateway/test/openai-responses-recall-aware-stream.test.ts:7598 (iteratively reconstructs a resource-limited continuation with 125500 content blocks) and line 7668 (computes the continuation offset without spreading 126000 retained item keys); comments at lines 7709-7710 isolate the continuation-offset regression from the existing quadratic duplicate-identity scan while retaining real stream validation and accumulation.packages/gateway/test/openai-responses-stream.test.ts:2516 parameterized test %s validation handles high-cardinality indexed identities and line 4177 test stops pulling upstream while a downstream consumer is not reading.