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.
This commit is contained in:
Yiorgis Gozadinos 2026-08-27 15:26:09 +03:00
parent c778fbf527
commit acea8cbaac
No known key found for this signature in database

View file

@ -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])