Skip to content

perf(core): widen a recall filter once to the maximum window when a pass keeps nothing (#1671) - #1681

Merged
ajianaz merged 1 commit into
developfrom
perf/recall-filter-window
Nov 4, 2026
Merged

ajianaz merged 1 commit into
developfrom
perf/recall-filter-window

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

What

  • ResultFilter::fetch: with strict/min_trust active, a first pass that keeps no row now widens once, straight to the 1000-candidate window, instead of re-running the strategy at 4x (15, 60, 240, 960, 1000). A query no hit satisfies costs two passes, not five. Partly filled passes still widen in steps. The returned rows and their order are unchanged.
  • The capture worker part of the issue is already done by fix(server): do not hold the store lock across the capture extractor call #1674 (housekeeping once per cycle in run_cycle, shutdown checked between sessions, covered by a_shutdown_stops_the_cycle_between_sessions), so nothing changes there. The CHANGELOG notes it.

Why

Off-topic strict queries are the common case for strict and always paid the worst case. Closes #1671

Testing

New tests in recall_filter.rs count the strategy calls: an empty first pass makes exactly two (15, 1000), a late hit at rank 500 is still found, a partly filled first pass still widens 15 then 60; the existing filter tests pass unchanged. cargo test -p uteke-core -p uteke-server, fmt clean.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

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.

perf: selective recall filters re-run up to five times; the capture worker repeats housekeeping

1 participant