mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
* fix(memory): make the embedder rescue reachable and stop silent NULL embeddings (#3375, #3325) #3375: generateLocalEmbedding() is documented as bridge-free but loaded its model through loadEmbeddingModel(), which is bridge-first. With the bridge up, the local state was recorded as { loaded: true, model: null }, so every call returned the hash fallback (backend 'mock') and rescueAgentdbEmbedder()'s backend === 'onnx' probe could never pass. Split out loadLocalEmbeddingChain() and cache the bridge result separately; generateLocalEmbedding() now loads only the local chain and never touches agentdb's embedder. #3325: bridgeStoreEntry embedded only via agentdb's embedder and a bare catch stored embedding=NULL when it was absent or threw, reporting nothing. Add embedForBridge(): agentdb first, then the local chain (generateLocalEmbedding, never the bridge-first generateEmbedding -- #2312), accepting only a real ONNX vector. Used for both the write and the bridgeSearchEntries query. When no vector can be produced the result carries embeddingError, and bridgeStorePattern reports hasEmbedding/embeddingError. Also fix bridgeGetEntry reporting hasEmbedding:false on every TieredCache hit. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(memory): treat a mock-tagged agentdb embedder as no embedder; surface embeddingError in memory_store (#3325) embedForBridge now honours the same isMock / backend==='mock' signal that bridgeGenerateEmbedding already uses, so vectors from an embedder the rescue could not replace are not stored as if they carried meaning; the local chain is tried instead, and embeddingError is reported if it has no real model either. storeEntry's type and memory_store's response carry embeddingError through. Co-Authored-By: RuFlo <ruv@ruv.net>