Files
breakpilot-compliance/backend-compliance/tests/test_obligation_taxonomy.py
T
Benjamin Admin 0631a98bdd 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>
2026-06-24 13:46:21 +02:00

21 lines
879 B
Python

"""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())