From 7de2265c66c6a70922d40e98cad4bb475cbfb908 Mon Sep 17 00:00:00 2001 From: ClaudioDrews Date: Sun, 7 Jun 2026 14:05:31 -0300 Subject: [PATCH] fix: remove stale knowledge_base_hybrid references, fix generic ENV_PATH - file_ingestion.py: docstrings now reference 'configured collection' instead of hardcoded 'knowledge_base_hybrid' (code already uses COLLECTION_NAME env var, defaulting to knowledge_base) - context_enhancer.py: same docstring fix - wiki_continuous_ingest.py: ENV_PATH now points to memory-os/docker/.env instead of ai-stack/cognitive-agent/.env (production-specific path) --- docker/worker/tasks/file_ingestion.py | 4 ++-- scripts/context_enhancer.py | 2 +- scripts/wiki_continuous_ingest.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/worker/tasks/file_ingestion.py b/docker/worker/tasks/file_ingestion.py index 470248f..f935acd 100644 --- a/docker/worker/tasks/file_ingestion.py +++ b/docker/worker/tasks/file_ingestion.py @@ -1,7 +1,7 @@ """ Tasks — File-based wiki ingestion (Phase B: continuous). Receives a file path to a .md file inside the container (e.g. /wiki/concepts/new.md), -extracts frontmatter, generates DENSE + BM25 SPARSE embeddings, upserts into knowledge_base_hybrid. +extracts frontmatter, generates DENSE + BM25 SPARSE embeddings, upserts into the configured collection. """ import logging import os @@ -152,7 +152,7 @@ async def ingest_file( file_path: str, ) -> dict: """ - Ingests a .md file from the vault into knowledge_base_hybrid (dense + BM25 sparse). + Ingests a .md file from the vault (dense + BM25 sparse). Returns a dict with id and status. """ wiki_root = Path(WIKI_PATH).resolve() diff --git a/scripts/context_enhancer.py b/scripts/context_enhancer.py index 3023c95..1b5dc62 100755 --- a/scripts/context_enhancer.py +++ b/scripts/context_enhancer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Context Enhancer — HYBRID search (semantic + BM25) on knowledge_base_hybrid +Context Enhancer — HYBRID search (semantic + BM25) on the configured collection for prompt enrichment. Runs as a synchronous function (fast, <1s) before each Hermes response. diff --git a/scripts/wiki_continuous_ingest.py b/scripts/wiki_continuous_ingest.py index 03d17de..6d70b2e 100644 --- a/scripts/wiki_continuous_ingest.py +++ b/scripts/wiki_continuous_ingest.py @@ -18,7 +18,7 @@ from arq.connections import RedisSettings import redis.asyncio as aioredis # ─── Config ──────────────────────────────────────────────────────────────── -ENV_PATH = Path.home() / "ai-stack" / "cognitive-agent" / ".env" +ENV_PATH = Path.home() / "memory-os" / "docker" / ".env" if ENV_PATH.exists(): load_dotenv(ENV_PATH)