Summary
searchMemories (src/main/presenter/memoryPresenter/services/retrievalService.ts:114-130) delegates to retrieve(), whose fusion already slices results to the agent's retrieval topK (default 6, core/scoring.ts fuse slice). The subsequent hits.slice(0, limit) can therefore never return more than topK rows, while the route contract (memory.routes.ts memorySearchRoute, limit <= 500) and MemoryClient.search advertise a real limit.
Effect: the Memory Manager search (MemoryManagerPanel.vue) shows at most ~6 hits over any corpus size; limit is a dead parameter beyond topK.
Severity
P2 — functional gap in the management search surface; route contract and implementation disagree.
Fix direction
Thread an explicit topK override (clamped by MAX_TOP_K = 100) from searchMemories(limit) through retrieve/fuse for the management path only; agent-facing recall keeps config topK. Align the route schema max with the effective cap.
SDD doc: docs/issues/memory-audit-hardening/ (spec.md + plan.md + tasks.md)
Summary
searchMemories(src/main/presenter/memoryPresenter/services/retrievalService.ts:114-130) delegates toretrieve(), whose fusion already slices results to the agent's retrievaltopK(default 6,core/scoring.tsfuseslice). The subsequenthits.slice(0, limit)can therefore never return more than topK rows, while the route contract (memory.routes.tsmemorySearchRoute,limit <= 500) andMemoryClient.searchadvertise a real limit.Effect: the Memory Manager search (
MemoryManagerPanel.vue) shows at most ~6 hits over any corpus size;limitis a dead parameter beyond topK.Severity
P2 — functional gap in the management search surface; route contract and implementation disagree.
Fix direction
Thread an explicit topK override (clamped by
MAX_TOP_K = 100) fromsearchMemories(limit)throughretrieve/fusefor the management path only; agent-facing recall keeps config topK. Align the route schema max with the effective cap.SDD doc:
docs/issues/memory-audit-hardening/ (spec.md + plan.md + tasks.md)