refactor(evidence): migrate runtime consumption (#29)

This commit is contained in:
2026-08-24 02:10:06 +02:00
parent 8b63715b56
commit d5e78febd3
8 changed files with 128 additions and 58 deletions
+13
View File
@@ -93,6 +93,18 @@ def _patch(monkeypatch, embedder, searcher):
def test_pack_single_embed_and_sections(tmp_path, monkeypatch):
import tht.evidence as evidence_facade
projected = []
build_retrieval_entries = evidence_facade.build_retrieval_entries
monkeypatch.setattr(
evidence_facade,
"build_retrieval_entries",
lambda results, *, excerpt_chars: (
projected.append((list(results), excerpt_chars))
or build_retrieval_entries(results, excerpt_chars=excerpt_chars)
),
)
cfg = _workspace(tmp_path)
emb = _FakeEmbedder()
searcher = _FakeSearcher()
@@ -109,6 +121,7 @@ def test_pack_single_embed_and_sections(tmp_path, monkeypatch):
# must not leak into a new search pack.
assert "Dominio ablazione" not in res.output
assert "SELECT 1" in res.output
assert projected == [([], 400)]
def test_pack_json_and_session_file(tmp_path, monkeypatch):