docs: architecture repair progress - plan v3, session status, bug statuses

This commit is contained in:
Agent Zero
2026-08-23 16:11:01 +02:00
parent 90a367089d
commit ed8ee5cda1
3 changed files with 550 additions and 16 deletions
+16 -16
View File
@@ -801,19 +801,19 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/services/plugin_service.py:94, app/plugins/registry.py:612
- **Problem:** registry.activate() ruft on_activate() auf und setzt record.active=True BEVOR plugin_service.py Permissions registriert (Zeile 99-114). Bei Fehlern ist Plugin aktiv ohne Permissions.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-002: Plugin on_activate() wird pro Tenant mehrfach aufgerufen
- **Datei:** app/main.py:292-302
- **Problem:** `for tenant_id in all_tenant_ids: plugin.on_activate(plugin_db, container, event_bus)` — dieselbe Plugin-Instanz bekommt on_activate() pro Tenant. Event-Handler werden doppelt registriert.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-003: /plugins/active-manifests hängt an plugins:read
- **Datei:** app/routes/plugins.py:95
- **Problem:** Normaler User ohne plugins:read bekommt keine Plugin-Menüs/Routes.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-004: Workspace/Sidebar is_visible nicht konsistent
- **Datei:** frontend/src/store/workspaceStore.ts:100
@@ -855,7 +855,7 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** scripts/check_cross_plugin_imports.py:233
- **Problem:** `default=BUILTINS_DIR` — ohne --path wird nur app/plugins/builtins/ gescannt, nicht Core.
- **Schweregrad:** Medium
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-011: 27 Core→Plugin direkte Imports
- **Dateien:** app/ai/ (8), app/core/ (7), app/routes/ (2), app/workflows/ (7), app/services/ (1), app/main.py (2)
@@ -895,7 +895,7 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/plugins/builtins/contracts.py:88-89
- **Problem:** get_contract() macht _try_lazy_load() auch nach unregister(). Deaktivierte Plugins werden wieder sichtbar.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-015: Notification-Type Lifecycle — Sync-Reihenfolge
- **Datei:** app/plugins/registry.py:181-244,622-623
@@ -931,7 +931,7 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/core/event_bus.py:38
- **Problem:** `self._handlers[event_name].append(handler)` — gleicher Handler kann mehrfach registriert werden.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-021: Sidebar.tsx statische UND dynamische Menüs
- **Datei:** frontend/src/components/layout/Sidebar.tsx:54-60
@@ -985,19 +985,19 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/core/trigger_dispatcher.py:123-127
- **Problem:** `AutomationDefinition = automation_contract.Automation` (Zeile 123) wird ausgeführt BEVOR `if automation_contract is None` (Zeile 127). Wenn Contract None ist → AttributeError.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-030: step_handlers.py — Contract.get_function() existiert nicht
- **Datei:** app/workflows/step_handlers.py:221,261,306,351,394
- **Problem:** `MailContract.get_function("send_email")` — MailContract ist eine Klasse ohne get_function() Methode. Alle 5 Step-Handler Contracts haben dieses Problem.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-031: knowledge/plugin.py — uuid nicht importiert (NameError zur Laufzeit)
- **Datei:** app/plugins/builtins/knowledge/plugin.py:28,30
- **Problem:** `uuid.UUID(str(tenant_id))` und `uuid.UUID(str(article_id))` werden in `on_wiki_create` und `on_wiki_update` verwendet, aber `uuid` wird nie importiert. NameError bei erstem Wiki-Artikel-Ereignis.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-032: knowledge/plugin.py + wiki/plugin.py — unregister_actions_by_owner mit falscher Signatur
- **Dateien:** app/plugins/builtins/knowledge/plugin.py:66, app/plugins/builtins/wiki/plugin.py:41
@@ -1039,7 +1039,7 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/core/worker.py:168, app/plugins/base.py
- **Problem:** Worker ruft `plugin.register_event_handlers(event_bus)` auf, aber BasePlugin hat keine solche Methode. `hasattr(plugin, 'register_event_handlers')` ist immer False. Im Worker werden Event-Handler NIE registriert — alle Events die über den Worker laufen (outbox events) werden nicht von Plugins verarbeitet.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-039: worker.py — cleanup jobs verwenden datetime.utcnow() (naive datetime)
- **Datei:** app/core/worker.py:cleanup_audit_log_job, cleanup_trash_job, cleanup_knowledge_job
@@ -1051,13 +1051,13 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/core/worker.py:cleanup_knowledge_job
- **Problem:** `from app.plugins.builtins.knowledge.models import KnowledgeExtraction` — Core importiert direkt von Plugin. Sollte über Contract laufen.
- **Schweregrad:** Medium
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-041: trigger_dispatcher.py — _dispatch_matching_agents hat None-Check nach Verwendung
- **Datei:** app/core/trigger_dispatcher.py:172-173
- **Problem:** `AgentDefinition = automation_contract.AgentDefinition` (Zeile 172) wird ausgeführt BEVOR `if automation_contract is None` (Zeile 173). Wenn Contract None ist → AttributeError. Gleicher Bug wie ARCH-029.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-042: calendar/contracts.py + dms/contracts.py — get_contract() erzeugt neue Instanz statt registrierte zu nutzen
- **Dateien:** app/plugins/builtins/calendar/contracts.py:get_contract, app/plugins/builtins/dms/contracts.py:get_contract
@@ -1087,13 +1087,13 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/routes/compliance.py:22
- **Problem:** `from app.plugins.builtins.automation.models import AgentDefinition` — Core Route importiert direkt von Plugin Model. Sollte über Contract laufen.
- **Schweregrad:** Medium
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-047: step_handlers.py — SearchContract statt UnifiedSearchContract
- **Datei:** app/workflows/step_handlers.py:306
- **Problem:** `from app.plugins.builtins.unified_search.contracts import SearchContract` — die Klasse heißt `UnifiedSearchContract`, nicht `SearchContract`. ImportError zur Laufzeit.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-048: engine.py — register_workflow_event_handlers nutzt falschen payload key
- **Datei:** app/workflows/engine.py:register_workflow_event_handlers
@@ -1105,7 +1105,7 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/workflows/engine.py:94,95
- **Problem:** `from app.plugins.builtins.kommunikation.models import CommConversation` — Core importiert direkt von Plugin. Sollte über Contract laufen.
- **Schweregrad:** Medium
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-050: engine.py — acquire_lock awaitet nicht-async get_redis()
- **Datei:** app/workflows/engine.py:acquire_lock
@@ -1135,7 +1135,7 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
- **Datei:** app/routes/entity_permissions.py:259
- **Problem:** `model_info = ENTITY_MODELS.get(entity_type)` gibt eine Model-Klasse zurück, nicht ein dict. `model_info["model"]` wirft TypeError. Sollte `model = ENTITY_MODELS.get(entity_type)` sein.
- **Schweregrad:** High
- **Status:** ⏳ Nicht gefixt
- **Status:** ✅ Gefixt 2026-08-23 (Block H/A)
### ARCH-055: errors.py — error.userAgent statt error.user_agent
- **Datei:** app/routes/errors.py:124