Skip to content

knowledge_store_rag._run() has no direct test coverage #442

Description

@NoveliaYuki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededtechnical-debtCode or process improvements needed to reduce long-term maintenance burden

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions