fix(evidence): index only curated legacy documents
This commit is contained in:
@@ -117,6 +117,25 @@ def test_source_factory_preserves_legacy_first_order_and_filesystem_configuratio
|
||||
assert current[1].max_bytes == 1024
|
||||
|
||||
|
||||
def test_legacy_source_discovers_only_curated_evidence_units(tmp_path):
|
||||
legacy_root = tmp_path / "legacy"
|
||||
(legacy_root / "evidence" / "source").mkdir(parents=True)
|
||||
(legacy_root / "evidence" / "source" / "raw.md").write_text("raw source")
|
||||
(legacy_root / "evidence" / "curated" / "domain").mkdir(parents=True)
|
||||
(legacy_root / "evidence" / "curated" / "domain" / "patient.md").write_text("curated")
|
||||
cfg = SimpleNamespace(evidence=SimpleNamespace(
|
||||
source_root=legacy_root,
|
||||
evidence_dir="evidence",
|
||||
sources=[],
|
||||
))
|
||||
|
||||
source = build_sources(cfg.evidence)[0]
|
||||
|
||||
assert [item.metadata["relative_path"] for item in source.discover()] == [
|
||||
"curated/domain/patient.md"
|
||||
]
|
||||
|
||||
|
||||
def test_preprocessing_factory_forwards_only_evidence_pipeline_dependencies(monkeypatch):
|
||||
captured = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user