FROM python:3.12-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY worker.py .
# Pure helper modules — sibling imports inside worker.py
# (noise_filter, confidence, entity_id, sensitive_filter). entity_id.py is
# byte-identical to extractor-sync's copy (per-service build contexts
# prevent a shared module; tests/test_entity_id_parity.py guards drift).
# sensitive_filter was added in #67 (interpersonal-gossip guard); if you
# add a new sibling module, add it here too — missing COPY makes the
# container crash-loop on import at startup (observed 2026-06-08 deploy).
# The test_*.py files are intentionally excluded; pytest only, not runtime.
COPY noise_filter.py confidence.py entity_id.py sensitive_filter.py extraction_schema.py ./

CMD ["python", "worker.py"]
