From 84e91097a8316668b023f7b6eeddfd7057565e87 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Mon, 18 May 2026 15:55:44 +0300 Subject: [PATCH] Stop hitting the embedder in test_sandbox_toc fixtures --- tests/agents/analysis/test_sandbox_toc.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/agents/analysis/test_sandbox_toc.py b/tests/agents/analysis/test_sandbox_toc.py index f59a6424..ea7b35c9 100644 --- a/tests/agents/analysis/test_sandbox_toc.py +++ b/tests/agents/analysis/test_sandbox_toc.py @@ -16,14 +16,17 @@ from haiku.rag.agents.analysis.dependencies import AnalysisContext from haiku.rag.agents.analysis.sandbox import Sandbox from haiku.rag.client import HaikuRAG from haiku.rag.config.models import AppConfig +from haiku.rag.store.models.document import Document from haiku.rag.store.models.document_item import DocumentItem async def _empty_doc(client, *, uri: str, title: str) -> str: - """Create a Document row and drop the auto-extracted items so the test - controls the items table exactly. Returns the document id.""" - doc = await client.create_document(content="x", uri=uri, title=title) - await client.document_item_repository.delete_by_document_id(doc.id) + """Create a Document row directly via the repository (no chunking, no + embedder) so these tests can run without a reachable embedding endpoint. + Returns the document id.""" + doc = await client.document_repository.create( + Document(content="x", uri=uri, title=title) + ) return doc.id