From acea8cbaacf3bf884f68e4e3779b18996cc84be0 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Thu, 27 Aug 2026 15:26:09 +0300 Subject: [PATCH] Prove the lend without reaching the embedder The test searched through the capability, which embeds the query, so it passed against a local Ollama and failed CI where there is none. What it exists to show is that a lent client is what the capability reads through: `_ensure_rag` returns it, and a full-text search through it names its results. --- tests/multi_db/test_capabilities.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/multi_db/test_capabilities.py b/tests/multi_db/test_capabilities.py index 37425fb1..2ec676fb 100644 --- a/tests/multi_db/test_capabilities.py +++ b/tests/multi_db/test_capabilities.py @@ -225,7 +225,11 @@ class TestLendingANamedClient: deps = Deps(state={"rag": RAGState().model_dump(mode="json")}) run = await capability.for_run(make_context(deps)) assert run.state is not None - await run._search("cats", limit=5) + + # The lent client is what it reads through, whatever it was built with. + assert await run._ensure_rag() is client + + run.state.searches["cats"] = await client.search("cats", search_type="fts") [result] = run.state.searches["cats"] assert result.chunk_id is not None await run._cite([result.chunk_id])