Dashboard › opencode-lore › Distillation
77de05a0-a3fc-4022-9d7f-1865032001a8["lore_tm_v1_dTlkGtEouyRLXJ37K-3-IhQWOV5EMjMMZgTlcBZ3vgQ","lore_tm_v1_gpqVCka3DlblmnrZjQzDy3d-AF9WyhA_-ksZnodrLXU","lore_tm_v1_fiIjti6dkRtearfP7CocVEdBNPnP_gPcDwzEVZsckww","lore_tm_v1_wRwGqcvv2BnfrPsJPMPhmzlPfDHOZkPsrVQZq90NQjU","lore_tm_v1_IzCXu8ob4K__3hWrNCNKWaY5kAtGGHfCMklKA_Jbf4Q","lore_tm_v1_9dpfbbBdyXc9joehBeWJ0GRgDCFJuOY3nlvpCxwhuc0","lore_tm_v1_3wG-8FaMSUtjWQ3mXkt7kmIeQRuArUw0OW_mWK42wDg","lore_tm_v1_Yo7ONqrC_zTQoxtBckDNqMrt10RG53On5d_F-5pd9I0","lore_tm_v1_cbVpnMv9D-1DP3FybyGtnj6ox4SMYKCPuW_UR__tZoU","lore_tm_v1_rBeHd5zYVd5FLpk2sn6pPRNFIWjbEiwKHA69CGJkMN4","lore_tm_v1_-yME49CNXv2j-h_EThLJqbjH-yWfP3aJirkKtAChznM","lore_tm_v1_R2NyzMHSAMXoEMzsTdzDbXOtouHJOvFUdNyf-WyoQtE"]
Date: Sep 16, 2026
.lore.md:550 specifies the validation workflow: inspect package scripts; run focused tests, affected-suite checks, typecheck/lint/format, and the full pnpm test workflow when appropriate; repeat async/streaming tests for flakes; write deterministic failing-first regressions for bug fixes and exact lifecycle/accounting paths; keep pre-pipeline route tests in server suites and pipeline behavior in replay/protocol harnesses; distinguish infrastructure timeouts and pre-existing warnings from regressions; inspect the diff; report concrete validation results.packages/gateway/test/openai-responses-recall-aware-stream.test.ts:821–879, test "retries a principal read failure before emitting any client event" injects Error("private principal socket failure"), then retryPrincipal({ attempt: 1 }) returns resp_principal_retry with text "recovered". Expected behavior: exactly 1 retry, 1 response.created, no response.failed or response.incomplete, no private cause or injected session text in output/logs, completion { successful: true, text: "recovered" }, no errors, and warning "retrying principal Responses stream after read transport failure".packages/gateway/test/openai-responses-recall-aware-stream.test.ts:2298–2348, test "redacts a done-only failed Codex recall before lifecycle validation" supplies a failed response.output_item.done recall containing private query, function ID, and call ID. Expected behavior: exactly 1 response.failed, PUBLIC_RECALL_ERROR rather than PUBLIC_GATEWAY_ERROR, no private query/IDs in client output or completedResponse, onRecall is never called, and successful === false.packages/gateway/test/openai-responses-recall-aware-stream.test.ts:2350–2418, test "redacts a sparse principal recall when promotion exceeds the hidden budget" uses validation: "codex", maxDeferredBytes: 16 * 1024, maxHiddenRecallBytes: 1, and maxRetainedStateBytes: 64 * 1024. Expected behavior: PUBLIC_RECALL_ERROR, no PUBLIC_GATEWAY_ERROR, no private query/function/call identity in output or completion state, zero recall executions, and successful === false."recall-only: never converts a failed continuation into completed" at packages/gateway/test/openai-responses-recall-aware-stream.test.ts:8289–8341 uses follow-up resp_followup_failure, emits "partial answer", then receives response.failed with usage { input_tokens: 1_000, output_tokens: 100 } and private error "provider failed". Expected behavior: emit failure with PUBLIC_RECALL_ERROR; expose neither private/internal failure text, "lore-recall", nor partial output; omit response.completed; retain usage as { inputTokens: 1_000, outputTokens: 100 }; invoke completion with successful === false; report exactly ["follow_up_failed"]."redacts a done-only failed Codex recall in a continuation" at packages/gateway/test/openai-responses-recall-aware-stream.test.ts:8343–8399 expects exactly 1 response.failed, PUBLIC_RECALL_ERROR, no response.completed, no private continuation query/function ID/call ID in output or completion state, exactly 1 principal recall execution, and successful === false."recall continuation diagnostics never alter the fixed public failure" at packages/gateway/test/openai-responses-recall-aware-stream.test.ts:8401–8429 makes setRecallContinuationFailureHook() throw Error("private telemetry failure") and runFollowUp() throw Error("private provider failure"). Expected client output still contains PUBLIC_RECALL_ERROR and excludes both private errors, "private query", and "private result".packages/gateway/test/openai-responses-recall-aware-stream.test.ts:8431–8459 treats response.done status "failed" and "cancelled" as failed continuations; each case must emit exactly 1 response.failed and no "type":"response.completed".vitest.mutation.config.ts, vitest.evals.config.ts, and vitest.config.ts.vitest.config.ts defines top-level aliases @loreai/core → packages/core/src and @loreai/gateway → packages/gateway/src; placing aliases under test.resolve.alias was rejected because Vite resolution is top-level and the prior placement silently resolved stale dist builds, masking real failures.vitest.config.ts includes tests from 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; heavy *.eval.ts tests run under vitest.evals.config.ts.vitest.config.ts uses packages/core/test/setup.ts, Node environment, pool: "forks", testTimeout: 300_000, hookTimeout: 300_000, and test env values NODE_ENV="test", SENTRY_ENABLED="0", LORE_DEBUG="0".vitest.config.ts coverage uses provider "v8" and reporters "text", "json", "html", and "lcov"; exclusions include tests, setup/helpers, scripts, dist, packages/website/**, packages/pi/**, eval files, config files, and scripts/**.packages/core/test/setup.ts creates one isolated temporary DB directory with mkdtempSync(join(tmpdir(), "lore-test-")), sets LORE_DB_PATH to <tmp>/test.db, and on afterAll() calls close() then rmSync(tmp, { recursive: true, force: true }), preventing fixtures from leaking into ~/.local/share/lore/lore.db.packages/core/test/setup.ts replaces globalThis.fetch with a guard that intercepts only https://models.dev/api.json, returns canned HTTP 200 JSON, and delegates all other requests to realFetch. This prevents gateway pre-warms from depending on the live third-party API or polluting cross-file fetch-mock assertions.models.dev data in packages/core/test/setup.ts includes: claude-opus-4-6 costs { input: 5, output: 25, cache_read: 0.5 }, limits { context: 1_000_000, output: 128_000 }; claude-sonnet-4-20250514 costs { input: 3, output: 15, cache_read: 0.3 }, limits { context: 1_000_000, output: 64_000 }; claude-haiku-4-5 costs { input: 1, output: 5, cache_read: 0.1 }, limits { context: 200_000, output: 64_000 }; gpt-5.4-mini costs { input: 0.75, output: 4.5, cache_read: 0.19 }, limits { context: 400_000, output: 100_000 }.packages/core/test/setup.ts:83–95 explains that Pi/OpenCode force-active plugin tests can call log.silenceStderr() and otherwise leave stderr silenced for unrelated test files sharing the fork; afterEach() therefore calls silenceStderr(false).db() instance, packages/core/test/setup.ts:90–94 calls invalidateProjectIdCache() after every test to prevent the per-connection project path→ID memo from leaking mappings across tests.