gateway/tests/unit/services
Ida a7f4055130 fix(rag): preserve per-page granularity + remove on-demand extraction fallbacks
The default MergeStrategy concatenates every extracted text part into a
single ContentPart, collapsing a 500-page PDF into one chunk with a
blurred average embedding — RAG retrieval was effectively broken.

- ExtractionOptions.mergeStrategy is now Optional[MergeStrategy]; passing
  None preserves per-part granularity. Default factory kept for
  backward compatibility.
- routeDataFiles._autoIndexFile, _workspaceTools.readFile, and
  _documentTools.describeImage explicitly pass mergeStrategy=None.
- Agent tools no longer carry redundant extraction + requestIngestion
  fallback paths: the unified ingestion lane owns all corpus writes,
  and readFile/describeImage are pure consumers of the knowledge store.
- Unit test asserts runExtraction(mergeStrategy=None) keeps every part.
2026-04-29 14:39:40 +02:00
..
test_extraction_merge_strategy.py fix(rag): preserve per-page granularity + remove on-demand extraction fallbacks 2026-04-29 14:39:40 +02:00
test_featureDataAgent_schema.py trustee agent fix 2026-04-27 08:07:37 +02:00
test_json_extraction_merging.py fixes 2026-04-23 23:09:38 +02:00
test_renderer_pdf_smoke.py Graph and data class falignment strict 2026-04-26 22:53:44 +02:00