feat(retrieval): require practice_area only for internal/cases; enable searchable filter + health visibility (GAP-13, FU-2a)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,15 @@ def test_compute_searchable_false_without_core_fields():
|
||||
assert db._compute_searchable(row, has_embedded_chunk=True) is False
|
||||
|
||||
|
||||
def test_compute_searchable_external_allows_empty_practice_area():
|
||||
# External precedents (e.g. בג"ץ) are cross-domain — empty practice_area
|
||||
# must NOT disqualify them, as long as the rest of the contract holds.
|
||||
row = _complete_row()
|
||||
row["source_kind"] = "external_upload"
|
||||
row["practice_area"] = ""
|
||||
assert db._compute_searchable(row, has_embedded_chunk=True) is True
|
||||
|
||||
|
||||
# ── ingest wires in recompute_searchable (both types) ──────────────────
|
||||
def test_ingest_calls_recompute_searchable(monkeypatch, tmp_path):
|
||||
calls = {"recompute": [], "meta": [], "hal": []}
|
||||
|
||||
Reference in New Issue
Block a user