Repository navigation
fix(memory): use db.loadExtension() instead of sqliteVec.load() for n… - #74435
googlerest wants to merge 1 commit into
Conversation
…ode:sqlite compat sqliteVec.load() is a better-sqlite3 API and is incompatible with the node:sqlite DatabaseSync used in 2026.4.26. Both code paths now use db.loadExtension(extensionPath) which node:sqlite supports. Fixes openclaw#74401
Greptile SummaryThis PR fixes a regression introduced in OpenClaw 2026.4.26 where switching from Confidence Score: 5/5This PR is safe to merge — it correctly removes a dead code path that relied on a The change is minimal (removing a single dead branch and updating the type definition), the logic is sound, and the fix directly addresses the described regression with no side effects. No files require special attention. Reviews (1): Last reviewed commit: "fix(memory): use db.loadExtension() inst..." | Re-trigger Greptile |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as duplicate/superseded: the PR targets the same degraded macOS sqlite-vec symptom already routed to open issue #66977, and its stated root cause is not supported by the current dependency contract. The published sqlite-vec helper already delegates to DatabaseSync.loadExtension(), so this one-file change does not address the remaining node:sqlite/macOS extension-loading boundary. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep #66977 as the canonical macOS sqlite-vec/node:sqlite load tracker and solve that issue by validating a supported macOS runtime, changing the SQLite binding/loading strategy, or documenting the limitation and fallback behavior; this PR should not be the fix path. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a0300378d6ac. |
Problem
sqliteVec.load(db)is abetter-sqlite3API. OpenClaw 2026.4.26 switched tonode:sqlite(DatabaseSync), which does not support this method. This causes sqlite-vec to silently fail on all platforms, degrading vector recall to BM25-only.Fix
Remove the
sqliteVec.load(db)branch. Both code paths now calldb.loadExtension(extensionPath), whichnode:sqlitesupports natively.Also removed the unused
loadmethod from theSqliteVecModuletype definition.Fixes #74401