Dashboard › opencode-lore › Distillation
ffdf75d0-c658-420e-aaf8-11c4022fbe07["lore_tm_v1_UBQ23PKsL0qqNSL3K8ghranFaXHs9M9J1ZYuglTPgOM"]
Date: Sep 16, 2026
packages/core/test/embedding-pool.test.ts:728-743 test normalizes an initialization watchdog at the readiness boundary configures pool size 1 and watchdogs (10, 60_000), then calls ensureEmbeddingReady({ deadlineMs: 1_000 }); the expected public error is LocalProviderUnavailableError, not EmbeddingWorkerWatchdogError, while its cause must have name: "EmbeddingWorkerWatchdogError" and stage: "init".packages/core/test/embedding-pool.test.ts:745-764 test stays at a single worker under concurrency when memory is tight sets _setEmbedPoolSizeForTest(2) and _setPoolFreememForTest(0). Concurrent alpha and beta embeds create exactly 1 worker with 1 native request; beta remains host-queued until alpha completes, after which both resolve sequentially with one embedding each.packages/core/test/embedding-pool.test.ts:766-790 documents the Railway regression in which cgroup-blind os.freemem() could spawn a second native ONNX worker beyond memory.max, causing Aditya’s container to be OOM-killed via SIGKILL. The regression test sets pool ceiling 2, host free memory 64 * GB, and constrained memory 256 * 1024 * 1024 (256 MiB); concurrent alpha and beta requests must remain serialized through exactly 1 worker because the container cap is below one per-worker budget.packages/core/test/embedding-pool.test.ts:792-813 test stays at a single worker when current cgroup headroom can't fit a second sets pool size 2, host free memory 64 * GB, constrained memory 12 * GB, and available memory 23 * 1024 * 1024. After warmPool(fakes), concurrent alpha and beta requests remain serialized on exactly 1 worker and each returns one embedding.packages/core/test/embedding-pool.test.ts:815-840 test reserves headroom while an admitted worker is still starting sets pool size 4, host free memory 64 * GB, constrained memory 12 * GB, and available memory 1600 * 1024 * 1024. After warming the pool, three concurrent requests (first, second, third) produce exactly 2 workers with one embed ID each; the one observed worker budget admits only one additional worker, and its reserved headroom cannot be reused until initialization completes.packages/core/test/embedding-pool.test.ts:842-857 test degrades the whole provider to unavailable when a worker init-errors sets pool size 1, starts embed(["alpha"], "query"), then invokes fakes[0].initError("model load failed"). The embed rejects and the module-global broken latch shared across the pool makes isAvailable() return false, forcing FTS-only operation.packages/core/test/embedding-pool.test.ts:859-869 begins test retires a transiently failed slot after a sibling recovers: it sets pool size 2, host free memory 64 * GB, installs and warms fake workers, starts embed(["healthy"], "document") and a settled embed(["failed"], "document"), then expects exactly 2 fake workers after flushing.