Problem
The knowledge_store_rag RAG processor (backend/lamb/completions/rag/knowledge_store_rag.py) is the primary retrieval entry point for Knowledge Store assistants, but its _run() function has no direct test. Only its helpers (_ks_query_helpers, query_rewriting_ks_rag) are covered, leaving the multi-KS fan-out, the early-return guards, per-store error handling, and the numbered-context assembly untested.
Expected
Add a focused test module exercising _run() directly with a mocked query_one_ks, covering the success path, multi-store fan-out, failed-store handling, the guard branches, and the [N]-numbered context with aligned sources.
Scope
Test-only. No production code changes.
Problem
The
knowledge_store_ragRAG processor (backend/lamb/completions/rag/knowledge_store_rag.py) is the primary retrieval entry point for Knowledge Store assistants, but its_run()function has no direct test. Only its helpers (_ks_query_helpers,query_rewriting_ks_rag) are covered, leaving the multi-KS fan-out, the early-return guards, per-store error handling, and the numbered-context assembly untested.Expected
Add a focused test module exercising
_run()directly with a mockedquery_one_ks, covering the success path, multi-store fan-out, failed-store handling, the guard branches, and the[N]-numbered context with aligned sources.Scope
Test-only. No production code changes.