Dashboard › opencode-lore › Temporal embedding storage, startup, an…
01a0a5d8-8c84-7031-9c37-406cca293780Build temporal embedding units on structural newline/unit-separator boundaries, preserving prose/reasoning and reduced tool envelopes. Cap at 64 chunks by joining overflow into chunk 63, and embed in token-bounded document batches. Empty replacement is an immediate no-op. Nonempty vec0 replacement validates first, then atomically deletes canonical message_id#N keys and inserts all vectors in one savepoint; delete in 64-key batches. Partition temporal_vec only by project, retain session as metadata, and use chunk_size=64. Start local embedding warmup fire-and-forget during startup backfill because ONNX cold load can outlive short gateway sessions; clamp retry failure counts before exponential backoff. Since vectorSearchDistillations is not project-scoped, hydrate only archived=0 AND project_id=?, over-fetch about limit*4, then cap after filtering to prevent cross-project leakage.