feat(reconcile): B — Cross-Doc-Reconciliation (Pflicht in anderem Doc erfüllt)
Ein 'X fehlt'/'zu prüfen'-Finding wird unterdrückt, wenn die Pflicht in einem ANDEREN Snapshot-Dokument erfüllt ist (z.B. § 36 VSBG / OS-Link stehen bei BMW in AGB/'Rechtlicher Hinweis', nicht im Impressum → war False Positive). Konservative Allowlist (impressum: verbraucher_streitbeilegung, odr_link) gegen False-Reconciliation. Verdrahtet in _run_doc_agent (alle Doc-Checks). Frontend: 'In anderem Dokument abgedeckt'-Sektion. Greift voll nach Scan + Legal-Capture. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,17 @@ async def _run_doc_agent(snapshot_id: str, doc_type: str, agent_id: str) -> dict
|
||||
return {"findings": [], "recommendations": [], "mc_coverage": [],
|
||||
"notes": f"kein {doc_type}-Text im Snapshot", "confidence": 0.0}
|
||||
out = await REGISTRY.get(agent_id).evaluate(AgentInput(**agent_input))
|
||||
return out.model_dump(mode="json")
|
||||
result = out.model_dump(mode="json")
|
||||
# B: Cross-Doc-Reconciliation — Pflichten, die in einem ANDEREN Dokument
|
||||
# erfüllt sind (z.B. § 36 VSBG / OS-Link in AGB/Legal), nicht als Finding
|
||||
# zeigen. Konservative Allowlist in cross_doc_reconcile.
|
||||
from compliance.services.cross_doc_reconcile import reconcile_doc_findings
|
||||
other = [(e.get("doc_type"), e.get("text") or e.get("content") or "")
|
||||
for e in (snap.get("doc_entries") or [])
|
||||
if e.get("doc_type") != doc_type
|
||||
and (e.get("text") or e.get("content"))]
|
||||
reconcile_doc_findings(result, agent_id, other)
|
||||
return result
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user