You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: selective recall filters re-run up to five times; the capture worker repeats housekeeping #1671
A selective recall filter re-runs the recall up to five times (recall_filter.rs:85). With strict or min_trust active, the window starts at 3x the limit and grows fourfold (15, 60, 240, 960, 1000 for limit 5), re-running the strategy and hydrating candidates on each pass. A query few hits satisfy always pays the worst case.
The capture worker repeats housekeeping per session and ignores shutdown mid-cycle (capture_worker.rs:38). run_cycle calls run_capture_extraction(facts, 1, ...) once per session, so the retention DELETE, lease reclaim and pending counts run budget_per_run times per cycle; and the loop never checks the shutdown flag, so stopping the server waits for up to budget_per_run provider calls.
Why
Off-topic strict queries are the common case for strict, and a stop signal should not wait minutes. Found by a Cora scan run as agent on the files added since v0.22.1 (2026-11-04). Line numbers are for develop @ 7e53cec.
Proposal
Stop widening when a pass added no kept row, or fetch the maximum window once when the first pass keeps nothing. Run the housekeeping once per cycle and check shutdown between sessions.
Testing
A strict query with no qualifying hit makes at most two passes; a shutdown during a cycle stops after the current session.
Fixed by #1681 (merged into develop). The recall filter part is done there; the worker housekeeping and shutdown check were already in place from #1674.
Activity
perf(core): widen a recall filter once to the maximum window when a p…
ajianaz commentedon Nov 4, 2026
Fixed by #1681 (merged into develop). The recall filter part is done there; the worker housekeeping and shutdown check were already in place from #1674.