Skip to content

fix(#448): recall without namespace now searches ALL namespaces - #454

Merged
ajianaz merged 1 commit into
developfrom
fix/448-namespace-regression
Jun 22, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/448-namespace-regression

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #448.

Bug: recall(query) without namespace parameter only searched "default" namespace instead of ALL namespaces.

Root cause: namespace.unwrap_or(DEFAULT_NAMESPACE) converted None to "default" in recall(), recall_hybrid(), search(), and recall_fts5_only().

Fix: None namespace = no filter = search ALL namespaces. Cache key uses "all" for None.

300 tests pass. Clippy clean.

@github-actions

github-actions Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

❌ Blocked — critical issues found.

🔴 Error (1)

  • crates/uteke-core/src/operations.rs:445 — The recall cache key was changed from namespace.unwrap_or(DEFAULT_NAMESPACE) to namespace.unwrap_or("all"). This makes namespace == None and namespace == Some("all") share the same cache entry. Those two searches have different semantics in this diff: None now means search across all namespaces, while Some("all") means filter to only memories whose namespace is literally "all". As a result, a cached cross-namespace result set can be incorrectly reused for a namespace-specific search, or vice versa.

Review powered by cora-cli · BYOK · MIT

Root cause: recall(), recall_hybrid(), search(), and recall_fts5_only()
all used namespace.unwrap_or(DEFAULT_NAMESPACE) — converting None
to "default". This meant queries without namespace only searched
the default namespace, ignoring all others.

Fix: None namespace = search ALL namespaces (no filter).
Cache key uses "all" for None namespace to distinguish from "default".

300 tests pass. Clippy clean.
@ajianaz
ajianaz force-pushed the fix/448-namespace-regression branch from 9afad16 to 8c3718a Compare June 22, 2026 14:22
// min_score is NOT in the cache key: cached results store the full set
// and the caller re-applies threshold, ensuring correctness regardless
// of what threshold a previous caller used.
let cache_ns = namespace.unwrap_or("all");
@ajianaz
ajianaz merged commit afe364f into develop Jun 22, 2026
8 of 9 checks passed
@ajianaz
ajianaz deleted the fix/448-namespace-regression branch June 22, 2026 14:28
ajianaz added a commit that referenced this pull request Aug 13, 2026
Root cause: recall(), recall_hybrid(), search(), and recall_fts5_only()
all used namespace.unwrap_or(DEFAULT_NAMESPACE) — converting None
to "default". This meant queries without namespace only searched
the default namespace, ignoring all others.

Fix: None namespace = search ALL namespaces (no filter).
Cache key uses "all" for None namespace to distinguish from "default".

300 tests pass. Clippy clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(regression): POST /recall without namespace only searches 'default' — ignores other namespaces

2 participants