"""Test config: make `app` importable offline (no real Gemini key / network needed).

The tests here only exercise deterministic, network-free functions (the crisis gate, language
detection, program mapping, BM25 scoring, response finalization, retrieval filtering with a stubbed
embedder). `app` still needs a non-empty GEMINI_API_KEY to construct the client at import (no network
call happens there) and the committed data/kb.json + data/index.npz.
"""
import os
import sys

os.environ.setdefault("GEMINI_API_KEY", "test-key-not-used")
os.environ.pop("MOUNT_PREFIX", None)   # keep the fail-closed auth guard from firing in tests
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
