fix(evidence): resolve final review findings

This commit is contained in:
2026-08-25 03:03:11 +02:00
parent d4818c8cc3
commit e9c65ef2db
10 changed files with 686 additions and 20 deletions
+25 -1
View File
@@ -315,11 +315,35 @@ def test_run_from_config_uses_runtime_identity_workspace_id(monkeypatch, tmp_pat
command.run_from_config(config)
assert calls["init"]["sparse_language"] == "english"
assert callable(calls["init"]["candidate_evaluator"])
assert calls["init"]["candidate_evaluator"] is None
assert calls["run_as_job"]["workspace_id"] == "psd-clinical"
assert calls["run_as_job"]["input_fingerprint"] != calls["run_as_job"]["config_fingerprint"]
@pytest.mark.parametrize("schema_version, source_type", [
(1, "filesystem"),
(1, "http"),
(1, "s3"),
(2, "http"),
(2, "s3"),
])
def test_candidate_evaluation_is_not_required_outside_v2_filesystem_corpora(
schema_version, source_type,
):
import tht.cli.preprocess_cmd as command
cfg = SimpleNamespace(
evidence=SimpleNamespace(
schema_version=schema_version,
source_root=None,
sources=[SimpleNamespace(type=source_type)],
),
language="it",
)
assert command._candidate_evaluator(cfg, vector_store=object(), embedder=object()) is None
def test_preprocess_evidence_gc_json_is_pristine(monkeypatch, tmp_path):
import tht.cli.preprocess_cmd as command