Files
ruflo/v3/@claude-flow/cli/src/commands
ruv c22a12badb fix(memory): #2461 fall through when transformers fetch fails; null-guard generateLocalEmbedding; default namespace
Three bugs fixed, all reproduced + verified against the built artifact.

1. \`loadEmbeddingModel()\` aborted on transformers failure. When
   \`pipeline('feature-extraction', ...)\` throws (e.g. \`fetch failed\`
   on Windows behind a corporate proxy / firewall), the throw escaped
   the outer try and returned \`{ success: false }\` BEFORE reaching
   the ruvector ONNX fallback that ships in-tree and works offline.
   The bundled ruvector embedder returns real 384-dim non-zero vectors;
   the user had a working fallback we just never tried. Wrapped the
   transformers branch in try/catch so a failure now falls through.

2. \`generateLocalEmbedding()\` crashed with "Cannot read properties of
   null (reading 'model')" because (1) left \`embeddingModelState=null\`
   and the function used a \`!\` non-null assertion. Replaced with a
   null coalescing default so we degrade to the hash fallback instead
   of crashing every \`memory store\` / \`memory search\` call.

3. Secondary bug filed in the same issue: \`memory store\` without
   \`-n\` stored under the literal namespace "undefined" (silent data
   loss for first-time users). Added \`|| 'default'\` on both store
   and retrieve.

Verified against the built dist/:
  - 100 \`generateLocalEmbedding\` calls with ALL embedding modules
    unresolvable → 100/100 success (was: instant crash on call #1)
  - \`memory store\` default namespace guard present in compiled JS

Reporter (#2461): Pishro-canadaapply did the root-cause investigation
and proposed the exact fix shape. Thanks.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-25 18:02:34 -04:00
..
2026-01-07 04:36:20 +00:00
2026-01-07 20:26:08 +00:00
2026-01-13 15:41:54 +00:00