mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
Fixes #2646 (3rd occurrence of the #1123/#1131 bug shape). Root cause: the memory_search MCP tool handler coerced an omitted `namespace` parameter to the literal string 'default': const namespace = (input.namespace as string) || 'default'; But both underlying search implementations already resolve an omitted/undefined namespace to the 'all' sentinel (fan out across every namespace): const effectiveNamespace = namespace || 'all'; // memory-initializer.ts const effectiveNamespace = namespace || 'all'; // memory-bridge.ts 'default' is truthy, so passing it explicitly defeated that fallback and silently scoped the search to a namespace that is usually empty — exactly matching memory_stats showing entries across other namespaces while memory_search with no namespace returned 0 results. The CLI's `memory search` command already got this right (defaults to 'all', not 'default'), which is what tipped this off as a tool-handler-only bug. Fix: leave `namespace` undefined when the caller omits it, so the search layer's own `|| 'all'` fallback actually fires. Also corrected the inputSchema description, which previously (and misleadingly) documented the empty-default behavior as intended. Added __tests__/memory-search-namespace-default-2646.test.ts, which mocks the search layer to assert the tool forwards `namespace: undefined` (not 'default') and reproduces the issue's exact repro shape end-to-end. Verified it fails against the pre-fix handler and passes against the fix. Co-Authored-By: RuFlo <ruv@ruv.net>