diff --git a/hindsight-api-slim/hindsight_api/engine/retain/fact_storage.py b/hindsight-api-slim/hindsight_api/engine/retain/fact_storage.py index 251410101a..11d2827b5a 100644 --- a/hindsight-api-slim/hindsight_api/engine/retain/fact_storage.py +++ b/hindsight-api-slim/hindsight_api/engine/retain/fact_storage.py @@ -269,6 +269,7 @@ async def handle_document_tracking( is_first_batch: bool, retain_params: dict | None = None, document_tags: list[str] | None = None, + ops=None, ) -> None: """ Handle document tracking in the database (full-replace mode). diff --git a/hindsight-api-slim/hindsight_api/engine/retain/orchestrator.py b/hindsight-api-slim/hindsight_api/engine/retain/orchestrator.py index 512b22ce32..d4077aa994 100644 --- a/hindsight-api-slim/hindsight_api/engine/retain/orchestrator.py +++ b/hindsight-api-slim/hindsight_api/engine/retain/orchestrator.py @@ -1103,6 +1103,7 @@ async def _process_db_batch( is_first_batch, retain_params, merged_tags, + ops=pool.ops, ) doc_tracking_done[0] = True log_buffer.append(f"[streaming] Document {effective_doc_id} tracked (0 facts in first batch)") @@ -1205,6 +1206,7 @@ async def _run_mini_batch_db_work() -> None: is_first_batch, retain_params, merged_tags, + ops=pool.ops, ) log_buffer.append(f"[streaming] Document {effective_doc_id} tracked (full content)") doc_tracking_done[0] = True