Dashboard › opencode-lore › Distillation
bdf20682-e4d4-49db-b3a3-d0438dbc362a["lore_tm_v1_ecCjHWZIcUw95JTWPaHNKstDnK_wHS7Fq3drIHVePYw","lore_tm_v1_VM6HbByr0DrcVSkkxKeV-MmrrONCNy9YYcuboVMNINI","lore_tm_v1_0EMqsOJ8TBeOAE21pLJQygsb_3hHIjdaGd4pPKRKSJQ","lore_tm_v1_G3ELEEzuLptb0IB_Cm8h0lm9X0tltvPwN8HSUmJwV3c","lore_tm_v1_u7dXa6LvDB4owT1i0sipzc_b3IlUMMEPy0PXUJRyE5c","lore_tm_v1_8cjaB9YtmZoaMqX29-nlWrSODTs3ge0m8Vb2_lgTR-I"]
Date: Sep 16, 2026
packages/gateway/src/pipeline.ts, consumeReferenceEvent(...) accepts response.output_item.added items of type item_reference only when output_index is a nonnegative safe integer, id is a nonempty string, and the item has no keys other than type and id; duplicate identities across references, acc.rawItems, syntheticIdentities, outputIdentities, existing id/call_id values, or referenceIdentities throw "duplicate Responses item reference".packages/gateway/src/pipeline.ts, an item_reference lifecycle must end with exactly one matching response.output_item.done; malformed, mismatched, or repeated completion throws invalid Responses item_reference lifecycle for index ${outputIndex}, while an unfinished reference throws Responses stream ended before item_reference completion for index ${outputIndex}.packages/gateway/src/pipeline.ts, stripHiddenReferenceOutput(...) removes terminal response.output items whose type is "item_reference" and whose id belongs to referenceIdentities.packages/gateway/src/pipeline.ts, reserveSyntheticIdentity(...) rejects collisions with syntheticIdentities, referenceIdentities, outputIdentities, or any existing item/raw-item id or call_id, throwing "duplicate synthetic Responses item identity".packages/gateway/src/pipeline.ts uses KEEPALIVE_INACTIVITY_MS = 30_000; sequenceChunk(...) injects monotonically increasing sequence_number values into parseable SSE event payloads.packages/core/src/log.ts, error(...) is not debug-gated: unless stderr is silenced, it emits through console.error("[lore]", ...safeArgs(args)), sends the redacted message to sink?.error(msg), writes it to the persistent file with level "error", and sends a sanitized Error to sink?.captureException(...).packages/core/src/log.ts, notice(...) is also visible outside debug mode but represents actionable warnings rather than failures; it reports to sink?.warn(msg) and writes at "warn" level so notices do not inflate the error stream.packages/core/src/log.ts redacts sensitive log text, including sk- secrets, GitHub tokens matching gh[pousr]_, AWS access keys beginning AKIA, JWT-like values, and configured sensitive key/value lines; sanitizedError(...) redacts both Error.message and Error.stack.packages/core/src/log.ts uses LOG_MAX_BYTES = 5 * 1024 * 1024, ROTATION_CHECK_INTERVAL = 1000, directory mode 0o700, and file mode 0o600; it rejects symlinks/non-regular files, validates current ownership and inode/device stability, uses O_NOFOLLOW where supported, and silently degrades if logging fails.packages/gateway/test/openai-responses-recall-aware-stream.test.ts verifies that unsafe continuation index arithmetic, merged usage overflow, per-response usage overflow, impossible cache usage, cache usage without input_tokens, and an over-budget principal response all produce PUBLIC_RECALL_ERROR; pre-admission usage failures leave recalled at 0.packages/gateway/test/pipeline-streaming.test.ts was modified to import setRecallContinuationFailureHook from ../src/recall-continuation-failure and reset it with setRecallContinuationFailureHook(undefined) in afterEach.packages/gateway/test/pipeline-streaming.test.ts now embeds "principal-persistence-secret" in provider failure code, message, and diagnostics.detail, then verifies exactly one response.failed, exactly one "Gateway request failed", no response.completed, no provider secret in the response body or temporal.store calls, positive daily-cost accounting, and no persistence call.packages/gateway/test/pipeline-streaming.test.ts test "accounts a failed recall continuation cancelled under terminal backpressure": the principal response uses 10 input tokens and 1 output token; the failed continuation uses 1,000 input tokens and 100 output tokens; after client cancellation, accounting must reach inputTokens: 1_010, outputTokens: 101, and turns: 1, while temporal.store remains uncalled.setRecallContinuationFailureHook(...) to await category "follow_up_failed" before cancelling the response body with "cancelled under terminal backpressure"; it expects exactly 2 upstream calls.packages/gateway/test/recall-codex-stream.test.ts was updated so a failed translated stream must not contain the private text "provider terminal" and must contain the public message "Gateway request failed"; it still requires exactly one event: response.failed.