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:
@@ -113,7 +113,7 @@ async def run_agent(
|
||||
mail_contract = get_contract("mail")
|
||||
if mail_contract and hasattr(mail_contract, "Mail"):
|
||||
from sqlalchemy import select as _select
|
||||
Mail = mail_contract.Mail
|
||||
Mail = mail_contract.Mail # noqa: N806 — class alias
|
||||
async with factory() as db:
|
||||
mail_q = await db.execute(
|
||||
_select(Mail)
|
||||
@@ -378,7 +378,7 @@ async def run_agent(
|
||||
# ── Post agent result to Communication (F-COMM) ──
|
||||
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:
|
||||
async with factory() as db:
|
||||
# Find or create agent conversation room via contract
|
||||
|
||||
Reference in New Issue
Block a user