Dashboard › opencode-lore › Distillation
3874174a-d67c-453f-8550-03b650428c24["lore_tm_v1_QKR19tIu27kVuxeGnrFNxtPYznsqBwFLdsNhXVabNYI","lore_tm_v1_xaF3UgELe9ud1OTDykhmpj1Dw-LBCZtaYg8KlfqfmGM","lore_tm_v1_gVIsNPk0EVfVOK-y4i6LeOEo_EgifLspvKsJUCQKIZM","lore_tm_v1_tYjwQKdXSjYK-0NxSL7RGPG1yeV_JAwuxmDZXoB7Q08","lore_tm_v1_xEctiP5HAbWghthneeIqgWYzcyuwQl50hfGRiuGGIVg","lore_tm_v1_NQecP-vGndolci3nys9_JSLWmhsmQofR7TsjeBWbS44","lore_tm_v1_fDawYzAgdbqkaMKzqfi82-dCfxdaNd-rKuf1DYzFpSM","lore_tm_v1_RMlgXQmJqchRJphKmj2ar9uaElAVW1_ygU6oe0ESFK4","lore_tm_v1_CiSA6P2_21PK2tmY5Y6FuAODANoWol787E8LZmjhw_0","lore_tm_v1_I6ogssvqX92c61bGf677CxZshZo1H3b1jHM0vdiMjh8"]
Date: Sep 16, 2026
error() output in /home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts is “Always visible — these indicate real failures.”/home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts distinguishes notice() from warn() and error(): notice() is not debug-gated, reports to the registered sink through sink?.warn(msg), persists with "warn" level, and is silenced on stderr only in embedded/TUI mode; error() always writes to stderr unless silenced, calls sink?.error(msg), persists with "error" level, and sends a redacted copy of any found Error to sink?.captureException()./home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts filters sensitive key/value lines plus tokens matching sk-[A-Za-z0-9_-]{12,}, gh[pousr]_[A-Za-z0-9]{20,}, AKIA[A-Z0-9]{16}, and JWT-like eyJ...........; safeArgs() redacts strings, error stacks/messages, and stringified values, while sanitizedError() preserves the error name but redacts its message and stack./home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts uses directory mode 0o700, file mode 0o600, O_NOFOLLOW outside Windows, ownership checks via process.getuid(), inode/device identity checks with assertSameFile(), and O_NONBLOCK so a raced-in FIFO cannot block before fstatSync() rejects it; non-regular files, symlinks, wrong owners, and path swaps are refused./home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts immediately tightens both lore.log and lore.log.1, checks rotation every 1000 writes, rotates when size exceeds 5 * 1024 * 1024 bytes, validates and removes an existing regular owner-controlled backup before rename, and revalidates the renamed backup against races; log-open/write/rotation failures degrade silently rather than crashing the application./home/byk/Code/opencode-lore-responses-accumulation/vitest.config.ts places aliases at top-level resolve.alias: @loreai/core → packages/core/src and @loreai/gateway → packages/gateway/src. The former test.resolve.alias placement was invalid and silently resolved stale dist output, masking real test failures.packages/core/test/**/*.test.ts, packages/core/eval/**/*.test.ts, packages/gateway/test/**/*.test.ts, packages/opencode/test/**/*.test.ts, and packages/pi/test/**/*.test.ts; uses ./packages/core/test/setup.ts, Node environment, fork pool, 300_000 ms test/hook timeouts, and test env values NODE_ENV="test", SENTRY_ENABLED="0", LORE_DEBUG="0"."v8" with reporters "text", "json", "html", and "lcov"; exclusions include tests, setup/helpers/scripts/dist, packages/website/**, packages/pi/**, eval files, config files, and scripts/**./home/byk/Code/opencode-lore-responses-accumulation/packages/core/test/setup.ts creates one isolated temporary test database using mkdtempSync(join(tmpdir(), "lore-test-")), sets LORE_DB_PATH to <tmp>/test.db, then calls close() and recursively removes the temporary directory in afterAll()./home/byk/Code/opencode-lore-responses-accumulation/packages/core/test/setup.ts runs silenceStderr(false) and invalidateProjectIdCache() after every test. This prevents force-active Pi/OpenCode plugin tests from leaving stderr silenced and prevents the shared DB connection’s project path→ID memo from leaking mappings between tests./home/byk/Code/opencode-lore-responses-accumulation/packages/core/test/setup.ts replaces globalThis.fetch with a baseline guard that intercepts only https://models.dev/api.json, returns HTTP 200 canned JSON, and delegates all other requests to the real fetch. This prevents gateway pre-warming from depending on the third-party API or polluting fetch mocks across test files.models.dev test data defines: claude-opus-4-6 costs { input: 5, output: 25, cache_read: 0.5 } with limits { context: 1_000_000, output: 128_000 }; claude-sonnet-4-20250514 costs { input: 3, output: 15, cache_read: 0.3 } with limits { context: 1_000_000, output: 64_000 }; claude-haiku-4-5 costs { input: 1, output: 5, cache_read: 0.1 } with limits { context: 200_000, output: 64_000 }; gpt-5.4-mini costs { input: 0.75, output: 4.5, cache_read: 0.19 } with limits { context: 400_000, output: 100_000 }.streamResponsesRecallAware() “never forwards response-side item_reference lifecycle events.”/home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/bundle-exports.test.ts builds the bundle on demand in beforeAll./home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-recall-aware-stream.test.ts includes a backpressure test for streamResponsesRecallAware(): the upstream emits response.created, response.in_progress, and response.completed; before the client obtains a reader, upstream pulls remain exactly 3, after which the client reader is cancelled.maxStreamBytes equal to the encoded lifecycle event size plus 1 must emit response.failed; a continuation test applies one aggregate byte ceiling across the principal and follow-up streams.maxDeferredBytes: 16 * 1024, maxRetainedStateBytes: 48 * 1024, and validation: "codex"; it expects exactly one response.function_call_arguments.delta frame with output_index: 1, item_id: "fc_sparse_0", and the full sparse arguments, with no PUBLIC_RECALL_ERROR.streamResponsesRecallAware() is exported from /home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/src/pipeline.ts at line 7794 and invoked in the pipeline near line 18903.