Dashboard › opencode-lore › Distillation
51f55dff-1a63-46d1-9f18-1720a4c9d71a["lore_tm_v1_CftEHx3hHspyjwzbZpW2BW6-p5JSIYODq9jPDZmXvt4","lore_tm_v1_NP4ZXJFT4G7HMaa7jZZDpZTCT3myFaFeLb81wziw8Io","lore_tm_v1_2CJ3h1jRjFpeobH-zm1yRlShWtEUoJKWDKLrE2EsDmc","lore_tm_v1_tN9A4pEPPpPIdfAaupGcRuq3zg5TzzAlUnn2gY80BvY","lore_tm_v1_2Rfmx4Sazh5M4Q6wRDGu6gNSzqRj4yJxC_DJmg6oUgU","lore_tm_v1_1JInxCgr_0RCy52ciaCBkWNI3yLQ0wzbQFYau96_ZhA","lore_tm_v1_D9Yawup0km3mF0yCK4pHQklDJByrb2MZU9Oi9tXazeY","lore_tm_v1_ppwBbxLaczlFr37Hh07pqOqs7yrehFoAV0AVsv0BF8s","lore_tm_v1_ku5lx6NLWgF9aUgysINnlyF_oYKqj9QQRR59Rx67JJY"]
Date: Sep 17, 2026
undefined, never NaN, and configuration parsing must not spin up workers.×0.7 backoff never fires; the only defense is preventing over-allocation in the first place.packages/core/test/embedding-pool-memory.test.ts documents Onur’s reported regression: the pool grew to N workers while each independently sized its token cap from roughly half of total free memory, causing aggregate host-memory exhaustion.free / ceiling; (2) every request re-clamps the cap against current free memory rather than retaining only its construction-time cap.packages/core/test/embedding-pool-memory.test.ts uses CapturingWorker extends EventEmitter to snapshot exact EmbedMsg payloads { type, id, maxTokens }; completeNext() emits one result vector new Float32Array([1, 0, 0]), and settle<T>() immediately installs fulfillment/rejection handlers so pending embeds cannot become unhandled rejections during teardown.VOYAGE_API_KEY and OPENAI_API_KEY, neutralize real CI cgroup limits with _setConstrainedMemoryForTest(0), and restore worker factory, pool-size seam, free-memory seams, constrained-memory seam, provider probe state, saved provider, and environment variables after every test.8192 with freeMemBytes=0, sets _setEmbedPoolSizeForTest(2) and _setContainerFreeForTest(6 * GB), and requires the posted cap to equal memoryModelEmbedCap((6 * GB) / 2) and be strictly below memoryModelEmbedCap(6 * GB).MIN_EMBED_TOKENS when _setAvailableMemoryForTest(Number.NaN) under both conditions: (1) constrained memory 12 * GB with container free 64 * GB; (2) no hard constraint (0) with container free 64 * GB.1.8192, sets pool ceiling 1, sends a first request at 6 * GB, completes it, drops free memory to 2 * GB, and sends a second request through the same worker; required caps are respectively memoryModelEmbedCap(6 * GB) and memoryModelEmbedCap(2 * GB), with the second strictly smaller.8192, uses pool ceiling 1, begins at 16 * GB, drops free memory to 2 * GB, then emits EMBED_OOM_EXIT_CODE; the fresh worker must receive the same request ID with maxTokens === memoryModelEmbedCap(2 * GB), strictly below backoffEmbedCap(first.maxTokens).×0.7 backoff, because this payload is posted directly without a later effectiveMaxTokens pass.packages/core/src/embedding.ts publicly re-exports pool test seams _configuredBackfillCpuDuty, _configuredEmbedPoolSize, _setEmbedPoolSizeForTest, _setEmbeddingWorkerWatchdogsForTest, and _setPoolFreememForTest; memory/provider seams include _setAvailableMemoryForTest, _setConstrainedMemoryForTest, _setContainerFreeForTest, and _setTestWorkerFactory.jj file annotate -L ... failed because jj file annotate does not accept -L; the CLI advised passing it as a value via -- -L and showed usage jj file annotate [OPTIONS] <PATH>.packages/core/test/setup.ts creates one isolated temporary database for the test run using mkdtempSync(join(tmpdir(), "lore-test-")) and sets LORE_DB_PATH to <tmp>/test.db, preventing fixtures from reaching ~/.local/share/lore/lore.db; afterAll calls close() and recursively removes the temporary directory.packages/core/test/setup.ts replaces globalThis.fetch with a baseline interceptor only for https://models.dev/api.json, returning canned HTTP 200 JSON while delegating all other requests to the real fetch. This prevents gateway pipeline pre-warms from depending on models.dev availability or polluting cross-file fetch-mock assertions.claude-opus-4-6 with cost { input: 5, output: 25, cache_read: 0.5 } and limits { context: 1_000_000, output: 128_000 }; claude-sonnet-4-20250514 with { input: 3, output: 15, cache_read: 0.3 } and { context: 1_000_000, output: 64_000 }; claude-haiku-4-5 with { input: 1, output: 5, cache_read: 0.1 } and { context: 200_000, output: 64_000 }; gpt-5.4-mini with { input: 0.75, output: 4.5, cache_read: 0.19 } and { context: 400_000, output: 100_000 }.afterEach in packages/core/test/setup.ts calls silenceStderr(false) because force-active Pi/OpenCode plugin tests using LORE_*_FORCE_ACTIVE=1 can otherwise leave shared-fork stderr silenced, hiding unrelated logs or vacuously satisfying “no output” assertions.afterEach in packages/core/test/setup.ts calls invalidateProjectIdCache() because the entire run shares one temporary database and one db() instance.packages/core/test/semantic-token-cache.test.ts verifies pending derived-cache publication is rejected after clearProject(scope.projectPath) and after session recreation, both through local deleteSession(...); parent() and through an external DatabaseSync transaction that deletes and reinserts the same session_id.PRAGMA busy_timeout = 1375, holds BEGIN IMMEDIATE on another DatabaseSync, requires pending.persist() to return in under 500 ms, restores timeout 1375, increments pending.stats.unavailable to 1, and leaves the prior payload unchanged; cleanup rolls back the external transaction and resets timeout to 5000.SAVEPOINT test_cache_rollback, fills the cache, executes ROLLBACK TO test_cache_rollback; RELEASE test_cache_rollback, and requires the next fill to report stats.misses === 1.mergeProjectInternal(source, target), and verifies no cache row remains under the source project_id, preventing a merged project’s derived cache from being reused under another owner.