Dashboard › opencode-lore › Vector worker isolation, fallback, and …
01a0a149-e59e-7bc9-9459-44577618520eRun vector recall/LTM work off-thread so slow SQLite searches cannot block streaming. Test via _setTestVectorWorkerFactory, not real workers. Dispatch/search/read APIs never reject: setup or dispatch failure becomes unavailable, safe equivalent work may run in-process, and timeout returns an empty/sentinel result without rerunning an uninterruptible scan on the main thread. A slow timeout does not permanently break the pool. For shutdown, first set shuttingDown, reject in-flight work, post cooperative shutdown, and await exits before writer close; this releases reader WAL marks needed for TRUNCATE. Race exits against an unrefed forced-termination timer. Make completion idempotent, declare the timer before callbacks can run, clear it on completion, and treat postMessage failure as worker completion.