Mark recall-limited obligations in DSE shadow telemetry
Trennt im Shadow drei Kategorien statt eines pauschalen FAILED: - echte Lücke (failed_by_current_checker) - redundanter Control-FP (kollabiert per OR zu MET) - Prüfer-Reichweitenproblem (recall_limited) obligation_taxonomy.py: decision_method_required=LLM für recipients_disclosed, third_country_transfer_disclosed, safeguards_disclosed, safeguards_accessible (versioniertes Registry-Artefakt bis DB-Tabelle, v1-Spec). Empirisch: TeamViewer 0/22 kw+emb trotz erfüllter Pflicht (cos 0.49-0.57) → CONTENT/LLM-Klasse, kein Schwellen-Fix. compute_obligation_shadow segregiert FAILED/PARTIAL über requires_llm(): teamviewer 5 Findings → 2 echte + 3 recall_limited. 9 neue Unit-Tests (41 gesamt grün). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Unit-Tests für die Obligation-Taxonomie-Registry (decision_method_required)."""
|
||||
from compliance.services.obligation_taxonomy import OBLIGATION_META, requires_llm
|
||||
|
||||
|
||||
class TestRequiresLlm:
|
||||
def test_marked_obligations_require_llm(self):
|
||||
for ob in ("recipients_disclosed", "third_country_transfer_disclosed",
|
||||
"safeguards_disclosed", "safeguards_accessible"):
|
||||
assert requires_llm(ob) is True
|
||||
|
||||
def test_unmarked_obligation_does_not(self):
|
||||
assert requires_llm("art20_right_exists_core") is False
|
||||
assert requires_llm("objection_general_art21_1") is False
|
||||
|
||||
def test_unknown_obligation_is_false(self):
|
||||
assert requires_llm("does_not_exist") is False
|
||||
|
||||
def test_registry_values_are_llm(self):
|
||||
assert all(v.get("decision_method_required") == "LLM"
|
||||
for v in OBLIGATION_META.values())
|
||||
Reference in New Issue
Block a user