feat(evidence): evaluate retrieval with a small fixture
This commit is contained in:
@@ -115,3 +115,35 @@ def test_evidence_validate_json_is_pristine_and_reports_review_required(monkeypa
|
||||
"schemaVersion": 1,
|
||||
"status": "review_required",
|
||||
}
|
||||
|
||||
|
||||
def test_evidence_evaluate_json_reports_the_read_only_generation(monkeypatch, tmp_path):
|
||||
from tht.cli import evidence_cmd
|
||||
|
||||
monkeypatch.setattr(evidence_cmd, "_canonical_worktree", lambda root: root)
|
||||
monkeypatch.setattr(evidence_cmd, "evaluate_from_config", lambda *args, **kwargs: {
|
||||
"workspaceRevision": "a" * 40,
|
||||
"vectorGeneration": "gen:" + "1" * 32,
|
||||
"rrf": {"algorithm": "rrf", "k": 60, "prefetch_limit_multiplier": 2},
|
||||
"passed": True,
|
||||
"countsByExpectedKind": {"formula": 1},
|
||||
"queries": [],
|
||||
})
|
||||
|
||||
result = CliRunner().invoke(app, [
|
||||
"evidence", "evaluate", str(tmp_path), "--json", "-c", str(tmp_path / "runtime.yaml"),
|
||||
])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert result.stderr == ""
|
||||
assert json.loads(result.stdout) == {
|
||||
"countsByExpectedKind": {"formula": 1},
|
||||
"operation": "evidence_evaluate",
|
||||
"passed": True,
|
||||
"queries": [],
|
||||
"rrf": {"algorithm": "rrf", "k": 60, "prefetch_limit_multiplier": 2},
|
||||
"schemaVersion": 1,
|
||||
"status": "passed",
|
||||
"vectorGeneration": "gen:" + "1" * 32,
|
||||
"workspaceRevision": "a" * 40,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user