Dashboard › opencode-lore › Distillation
Distillation
ID: c3c17d89-2931-4548-9ce1-e7ab9ccd3c2f
Generation: 0
Tokens: 1536
R_compression: 13.852
C_norm: 0.000
Archived: No
Created: 2026-09-17 09:55:57
Source IDs:
["lore_tm_v1_gr4XYAda4xmQm4gUBfQFRyPSBviosIuvA84Ccd6YnqI"]
Observations
Date: Sep 17, 2026
- π΄ (09:47) User defined the consolidation opposing-rule invariant: consolidation never creates entries, merges opposing rules, deletes contradictions, double-fires, or busts the v45 prefix.
- π΄ (09:47) User chose curator
update/delete application with cooldowns over creating replacement entries or treating contradiction detection as deduplication; opposing rules require user resolution, while new entries can cause recreation/thrashing.
- π΄ (09:47) User set conversation-cache TTL to 1h; rejected 5m because it causes avoidable churn.
- π΄ (09:47) User requires the distilled prefix to always occupy transformed-array positions
[0,1], durable knowledge deltas to remain near the tail, and orphan removal never to touch the prefix.
- π΄ (09:47) User stated meta passthrough bypasses
buildAnthropicRequest and remains uncached.
- π΄ (09:47) User requires persisted
ltmCacheText to equal ltmPinText across restart and re-pin; the pin is baseline-only metadata and is never sent upstream.
- π΄ (09:47) User requires
ltm.forSession() not to bust system[2] when the selected entry set is unchanged, except for byte-identical re-anchoring.
- π΄ (09:47) User stated moving deltas forward, caching passthrough, or independently rendering cache and pin text destabilizes cached bytes and can cause prefix drift or cache spirals.
- π΄ (09:47) User requires
embedInTokenBatches for all embedding paths, including temporal messages, to prevent ONNX from padding all inputs to the longest sequence and causing OOM.
- π΄ (09:47) User requires embedding batching by token area with
MAX_BATCH_TOKEN_AREA 4096, while always admitting the first item so the loop progresses.
- π΄ (09:47) User requires embedding batching to preserve input order and call
storeTemporalChunks once.
- π΄ (09:47) User set the temporal-chunk cap to 64: retain the first 63 chunks and join the remainder into one tail; an oversized tail may occupy its own batch and is truncated downstream.
- π΄ (09:47) User chose
__filename for CJS and import.meta.url for ESM worker resolution over one universal worker-relative path because Bun/tsx ESM workers must resolve from the module URL, while bundled CJS always defines its filename.
- π΄ (09:47) User requires retaining the CJS shim so source remains natural and rejects replacing both worker-resolution branches with
import.meta.url or runtime cwd resolution.
- π΄ (09:47) User requires recall, follow-up setup, provider work, and response-body reads to race against the foreground abort/deadline signal; cancellation must not wait for hostile or non-settling callbacks.
- π΄ (09:47) User requires abort handling to return promptly and asynchronously roll back late recall results or cancel/release late readers without awaiting potentially hung cleanup.
- π΄ (09:47) User requires releasing a setup reader before throwing if setup wins immediately before abort.
- π΄ (09:47) User requires the same combined signal throughout foreground work, stopping new work scheduling, suppressing cleanup rejection, and always removing listeners, timers, locks, and admission ownership.
- π΄ [requested-tests] (09:47) User requires foreground-cancellation tests for already-aborted requests, stalled bodies, handoff races, and non-settling cleanup, with bounded-settlement assertions.
- π΄ (09:47) User chose cgroup-aware
availableParallelism() limits for nativeIntraOpThreads only when the value is below cpus().length, rather than always setting ONNX Runtime threads to the logical CPU count.
- π΄ (09:47) User stated native ORT is cgroup-blind and can create host-core-sized pools in a 1-vCPU container, wasting RSS and causing context-switch thrash.
- π΄ (09:47) User requires unconstrained hosts to return
undefined, preserving ORTβs physical-core default instead of raising it to the hyper-thread count.
- π΄ (09:47) User defined one-way OpenCode runtime dependencies: Schema β Core and Protocol; Core and Protocol β Server; Client runtime β Schema and Protocol only;
sdk-next composes Client, Core, and Server.
- π΄ (09:47) User prohibits importing Core or Server from Client.
- π΄ (09:47) User requires
@loreai/core to support both bundled Node-compatible CJS for gateway and raw TypeScript for OpenCode/Pi.
- π΄ (09:47) User requires only
packages/core/src/db/driver.node.ts to import node:sqlite; all other source must use #db/driver because Bun lacks node:sqlite.
- π΄ [requested-tests] (09:47) User requires testing both bundled and raw-TypeScript consumers because either consumption path can hide failures in the other.
- π΄ (09:47) User identified partial import-and-spread mocking of real
@sentry/bun exports as a trap: ESM namespace exports cannot be reliably redefined, and eager SDK behavior can leak into tests.
- π΄ (09:47) User requires a complete
@sentry/bun Vitest mock to be installed before importing the subject, with controllable isInitialized() and exact captureMessage assertions; this keeps tests deterministic and proves telemetry remains non-throwing.
- π΄ (09:47) User identified a fetch deadline plus byte-capped response reader as insufficient for embedding response-body bounds because, after successful headers, a hostile body can leave
reader.read() pending forever; byte limits only bound streams that emit data.
- π΄ (09:47) User requires every embedding response-body read to race against caller/provider cancellation, cancellation to be fire-and-forget, and reader ownership to be released without awaiting the hostile source, while retaining the dimension-aware byte cap and strict payload validation.
- π΄ (09:47) User requires
embeddingStatus() to remain side-effect free and report retrying until a real embed succeeds; health checks must never report false ok before recovery.
- π΄ (09:47) User defined recall load as counting only single-text query embeds through the shared worker predicate; write-time and backfill document embeds are excluded so backfill never gates against itself.
- π΄ (09:47) User requires admission to read the live recall-load counter rather than a snapshot, and every provider disappearance, OOM, timeout, or rejection to release ownership in
finally.
- π΄ (09:47) User identified retaining admission until an unbounded readiness warmup settles as an
ensureEmbeddingReady trap: although cooperative providers eventually release it, a permanently stuck local worker wedges readiness and document admission forever.
- π΄ (09:47) User requires
ensureEmbeddingReady to re-read provider identity after admission, propagate the readiness guard into the pool request, and retire the assigned worker when the finite readiness deadline fires.
- π΄ (09:47) User requires pool cancellation to map back to fixed readiness
EmbeddingAbortError without accepting late output.