fix(integration): F17 (Astra P1) — 6 Aufrufer von nicht existierender Registry.get() auf get_contract() umstellen

Vorher: ContractRegistry besitzt get_contract(), aber 6 Produktionsstellen
riefen get_contract_registry().get(...) auf → AttributeError. Betroffen:
Agenten-/Workflow-Kommunikation (Nachrichten an Raeume), Miniapp-Tools,
proaktive KI-Hinweise und Report-Jobs — teils nur geloggt, erwartete
Nachrichten/Ergebnisse fehlten STILL.

Fix: Alle 6 Aufrufer auf die echte Methode get_contract() umgestellt
(Astra-Empfehlung: Aufrufer fixen statt Alias — die Registry ist kein
dict, ein get()-Alias haette die Fehlersuche kaschiert):
- automation/agent_runner.py (Kommunikations-Raum)
- report_generator/jobs.py (DMS-Contract)
- ai_proactive/services.py (Kommunikations-Raum)
- workflows/engine.py (Kommunikations-Raum)
- ai/miniapp_tools.py (Kommunikations-Contract)
- ai/agent_loop.py (Approval-Posting)
+ N806 noqa am pre-existing Mail-Klassenalias

Abnahme (Astra): Betroffene Funktionen laufen jetzt auf die echte
Registry-Methode — persistierende Aufrufketten durch die bestehenden
Miniapp-/Workflow-Suites abgedeckt (67/67).

Tests: test_agent_loop + test_phase_g_workflows + test_m4_system_miniapps
67/67. ruff clean.
This commit is contained in:
Agent Zero
2026-09-18 11:10:35 +02:00
parent 5169b12795
commit 8c5682f669
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -495,7 +495,7 @@ async def run_react_loop(
if agent_run_id:
try:
from app.plugins.builtins.contracts import get_contract_registry
komm = get_contract_registry().get("kommunikation")
komm = get_contract_registry().get_contract("kommunikation")
if komm:
agent_id = getattr(agent_definition, "id", uuid.uuid4())
room_title = f"Agent: {getattr(agent_definition, 'name', 'Agent')}"