Spaces:
Sleeping
Sleeping
Commit History
-
Give every module one definition of the data directory
Donne120 +1: Claude Opus 5Three modules worked out where to put files independently and disagreed. retrieval_engine.py honoured the DATA_DIR environment variable — but only when DEPLOYMENT_ENV was "huggingface". document_processor.py and prompt_engine/templates.py hardcoded Path("./data") and ignored it. Nothing sets DATA_DIR in production, so all three resolved to the same directory by coincidence and the split was invisible. Set it — which is the obvious thing to do when mounting persistent storage during the AWS migration — and uploads write to ./data while retrieval searches somewhere else. Nothing raises: the upload reports success and the document simply never becomes answerable. paths.py now owns DATA_DIR, DOCUMENTS_DIR, METADATA_FILE, VECTOR_DB_DIR, PROMPTS_DIR and ALU_BRAIN_DIR; the three modules import from it. Also removed retrieval_engine's DEPLOYMENT_ENV branch, whose non-Hugging-Face path preferred ./backend/data when it existed — verified it does not exist in this repo, so that branch never ran…c8527f1