homelab-codex-ws/jobs/documents-ingest/tests
oskar f964631d02 refactor(kb): extract packages/kb-retrieval from documents-ingest
Module 5 phase 4 step 0 (docs/kb/modules/05-faza4-plan.md, §3, decision 1):
kb-query is a long-lived Docker service, documents-ingest is a venv job with
an `anthropic` dependency and CLI scripts it doesn't need. Move
embed_chunk/_vector_literal/cascade_query/flat_query into a shared package
with minimal deps (asyncpg, aiohttp only) so both can depend on the same
tested retrieval code without the service image pulling in the job's extras.

documents_ingest.chunk_embed/retrieval keep thin re-exports so nothing
importing the old paths breaks. Pure refactor: retrieval_eval.py run live
against kb-postgres@PIHA + Ollama@SOLARIA before/after gives byte-identical
`dist`/hit@3/gate results (still PASS) — zero behavior change in the cascade.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 16:06:02 +02:00
..
test_chunk_embed.py feat(kb): faza 3 krok 1 — porządki po pilocie retrieval (śmieć + dedup + klucz modelu) 2026-07-16 17:24:38 +02:00
test_cyclic_ingest.py feat(kb): faza 3 krok 5 — cykliczny ingest (systemd timer) + alerting 2026-07-17 15:54:13 +02:00
test_extractor.py feat(documents-ingest): PDF attachment extractor — mail archive -> Paperless consume/ 2026-07-13 20:03:57 +02:00
test_paperless_adapter.py feat(documents-ingest): Paperless -> envelope adapter (module 5 phase 2 step 5) 2026-07-15 15:24:25 +02:00
test_summarize.py feat(kb): faza 3 krok 2 — migracja 004 (document_summary) + pilot streszczeń A/B 2026-07-17 13:30:47 +02:00