Files
ruflo/v3/@claude-flow/cli/bin
ruv 844f68dbe5 fix(memory): drop agentdb's stale "Falling back to mock embeddings" warning cluster
User-reported 2026-06-02: even with the rescue patch landed in 3.10.35,
the `Transformers.js initialization failed: Something went wrong
installing the "sharp" module ... Falling back to mock embeddings`
warning block STILL prints on every `memory search` invocation. After
the rescue lands, the message is actively wrong — we ARE using real
ruvector ONNX embeddings via the swapped `embed()` method — but
agentdb's upstream `console.warn` fires before the rescue can run.

Fix: extend the log-filters.ts drop-list (and the matching inline
filter in bin/cli.js for the MCP-stdio path) to silence the 9-line
agentdb mock-fallback warning cluster:

  - "Transformers.js initialization failed:"
  - "   Falling back to mock embeddings for testing"
  - "   This is normal if:"
  - "     - Running offline/without internet access"
  - "     - Model not yet downloaded"
  - "     - Network connectivity issues"
  - "   To use real embeddings:"
  - "     - Ensure internet connectivity for first..."
  - "     - Or pre-download: npx agentdb..."

Matched to the EXACT upstream prefixes at
agentdb/dist/controllers/EmbeddingService.js:48–56 so unrelated
warnings always flow through (audit_1776483149979 broad-filter
lesson). Suppression is safe because:

  - When the rescue succeeds (the common case on macOS arm64 w/o
    libvips), the warnings would have been LIES — we are using
    real embeddings, not mock.
  - When the rescue itself fails (rare — would need ruvector ONNX
    to also be unavailable), the user still sees the real symptom:
    `[WARN] No results found` from the calling command.

Verified locally on the same macOS arm64 system: before this change,
`memory search` printed the 9-line warning block + the multi-line
sharp dlopen error. After: clean output, only the legitimate ONNX
init lines on stderr + the result table on stdout.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-02 06:22:13 -04:00
..