# LeoPlatform — Fortschritts-Tracking > **Letztes Update:** 2026-08-21 > **Status:** Phase A-K done (261/261 Tasks), 25 Plugins aktiv, Alembic 0136, 2174 Tests > **Audit:** Komplette Vernetzungs-Audit durchgeführt — ~1800 Vernetzungen, 93% verbunden, 6 kritische Findings --- ## Architektur-Reparatur (2026-08-23, laufend) **Plan:** docs/fix-plan-v3.md · **Sequenz:** Block 0 + Block H gemerged in main, Block A läuft auf main **Stand:** 18 Findings geschlossen (~30% aufwandsgewichtet) · App startbar · 90+ Tests grün · tsc clean · Checker 14→6 Verstöße · Alles gepusht auf Forgejo | Finding | Beschreibung | Status | Commit | |---|---|---|---| | SYNTAX-001 | automation/plugin.py SyntaxError — App startet nicht | ✅ gefixt | 8077595 | | CHECK-002 | Checker crasht bei relativen Pfaden | ✅ gefixt | 35e2cc8 | | ARCH-010 | Checker scannt nur builtins | ✅ Vollscan-Default | 35e2cc8 | | ARCH-014 | Contract-Lazy-Resurrect nach unregister | ✅ gefixt + Funktionstest | b04cda7 | | ARCH-020 | EventBus subscribe ohne Duplikat-Check | ✅ gefixt + Funktionstest | b04cda7 | | ARCH-029/041 | trigger_dispatcher None-Check nach Verwendung | ✅ None-Check zuerst | b04cda7 | | ARCH-001 | Permissions nach on_activate registriert | ✅ Reihenfolge gedreht | 1d6152f | | ARCH-002 | on_activate pro Tenant mehrfach | ✅ 1× pro Prozess | 1d6152f | | ARCH-003 | active-manifests an plugins:read gebunden | ✅ für eingeloggte User offen | 982b4c9 | | ARCH-038 | BasePlugin.register_event_handlers fehlt | ✅ Hook ergänzt | 90a3670 | | ARCH-054 | entity_permissions falsche Datenstruktur | ✅ Model-Lookup korrigiert | 90a3670 | | ARCH-047 | SearchContract-Import kaputt (search-Step ImportError) | ✅ gefixt | d87fc4e | | ARCH-030 | contract.get_function() existiert nicht | ✅ auf 5 Contracts ergänzt | d87fc4e | | ARCH-031 | knowledge/plugin.py uuid nicht importiert | ✅ mitfixt | 1f4a621 | | ARCH-040/046/049 | Core→Plugin-Imports (worker/compliance/engine) | ✅ via Contract/Plugin-Job | 44511a8 + a7699d3 | | HC-F Frontend | BlockRenderer: 14 hardcodierte Blocks | ✅ Registry | b7ad529 | | HC-G Frontend | AISidebar: 5 hardcodierte Tabs | ✅ Tab-Registry | 59fdb61 | | HC-A Backend | action_mapper feste Regex-Intents | ✅ Contribution-API | 4994906 | | Gate H | Plugin-Contribution ohne Core-Änderung beweisen | ✅ BESTANDEN (2/2) | 801743b | | ARCH-043 | automation Tenant.limit(1) statt System-Tenant | ✅ get_system_tenant() + system_tenant_slug Setting | 17516d2 | | ARCH-052 | storage get_file_metadata Event-Loop im async Kontext | ✅ get_file_metadata_async() + Fail-Fast-Guard | 17516d2 | | ARCH-008 | Permission-Namensschema inkonsistent | ✅ Kanon modul:aktion festgelegt, Manifest-Validator erzwingt es | 7953077 | | ARCH-009 | Tote 3-Segment-Rollen-Patterns (core:*:X) + 14 Route-Literals | ✅ Migration 0141 + Route-Fix, Roundtrip bewiesen | 7953077 | | ARCH-012 | wiki/knowledge on_deactivate unvollständig | ✅ Provider-Dereg + 2 latente Bugs (register_provider fehlte am Contract, kaputter Modul-Import) behoben | c21634b | | ARCH-013 | self_improvement Fallback-Import; Benachrichtigung war tot | ✅ Contract-only; undefinierten KommunikationContract-Verweis behoben | c21634b | | ARCH-015 | Notification-Sync fehlt in Deactivate-Sequenz | ✅ sync_notification_types nach Status-Update | c21634b | | ARCH-033 | comm_websocket/comm_miniapps bleiben im Container | ✅ Container-Cleanup VOR super(); ServiceContainer.remove() ergänzt | c21634b | | ARCH-034/035 | self_improvement/marketplace Contract-Unregister | ✅ verifizierte No-Ops: beide registrieren keinen Contract | c21634b | | ARCH-036 | mail _auto_sync_task Klassenvariable | ✅ Instanzvariable via __init__ | c21634b | | ARCH-037 | graph_rag Registrierung VOR super() | ✅ Reihenfolge umgestellt | c21634b | | ARCH-044 | ai_ui_control remove() NACH super() | ✅ Reihenfolge umgestellt; fehlendes ServiceContainer.remove() ergänzt | c21634b | | Gate A | Block-A-Abschlussprüfung | ✅ BESTANDEN (4/4): Imports, Lifecycle-Symmetrie, Activate-Once, Contract-Roundtrip | 32f63ad | | B1 | Contacts-Domain aus Core entkoppelt: 4 Router ins Plugin verschoben, manifest.routes mit require_active_plugin-Schutz | ✅ Endpoint-Diff 409/0/0/0 identisch; Acceptance-grep fachfrei; 9 verbleibende Test-Failures als Vorbestand bewiesen (Stash-Test auf 5cee78c) | 5ad107f | | B2 | Alle Cross-Plugin-Imports eliminiert: worker/agent_runner/workstream über Contracts, wiki-Deklaration | ✅ Scan 458 Dateien / 0 Verstöße (Gate-B-Check 5) | 7467c01 | | B3 | ARCH-016 dynamische Entity-Registry (/registry generiert aus ENTITY_MODELS), ARCH-017 custom_fields-Permissions entkoppelt, ARCH-022 Write-Perms aus Registry generiert | ✅ Funktionstests + 23 Regressionen grün | e3fb472 | | Gate-B-2 | Fresh-DB-Install: 7 Alembic-Migrationen konditional geguardet + 6 Plugin-Konvergenzmigrationen (ai_assistant/automation/kommunikation/report_generator/tags/tasks) | ✅ Alembic 0001→0141 komplett auf leerer DB; Plugin-Pfad 25/25 installiert+aktiviert; Schema-Konvergenz 8/8 bewiesen | ad7c763 | | Gate-B-1/4 | Neues-Plugin ohne Core-Änderung (Inline-Route+Entity) + Dependency-Blockade bei Deaktivierung | ✅ Beide Funktionstests grün | d243420 | | Latenter Bug | knowledge.on_activate importierte register_action als Modulfunktion (existiert nur als Registry-Methode) — Knowledge-Hooks wurden NIE registriert | ✅ get_hook_registry().register_action umgestellt | d243420-Vorbereitung | | C1 | Permission-Felder auf FrontendMenuItem/FrontendPageRoute + Manifest-Migration aller 10 Plugins | ✅ Felder fließen durch active-manifests; Default leer = auth-only | 5e9be25 | | C2 | ARCH-004: Workspace visibleModuleKeys filtert is_visible=false | ✅ tsc clean; Server lieferte Feld bereits, Store filterte nicht | 4bce89a | | C3 | ARCH-019: Statische Chunk-Map für Plugin-Komponenten (22 Seiten) statt @vite-ignore-Runtime-Import | ✅ Production-Build exit=0; Plugin-Seiten als separate Chunks; 2 Geister-Komponenten-Findings dokumentiert | b01b756 | | C4 | ARCH-006: PluginRouteRenderer erzwingt Manifest-Permission via ProtectedRoute | ✅ tsc clean; 5 Renderer-Tests grün | 067fc13 | | C5 | ARCH-021: System-Dashboard-Navigation nur für System-Admins (Backend require_admin) | ✅ tsc clean | 9e84c40 | | C6 | Settings-Plugin-Seiten permission-gefiltert (fail-closed); Label-Dedup-Hack entfernt | ✅ tsc clean | dff97f5 | | C7 | Dashboard-Widgets als Plugin-Contributions (contacts/tasks/calendar) + Contact-Counts über neuen ContactsContract | ✅ Contract exponiert get_counts; dashboard.py ohne Contact-Model-Import | cad7d08 | | C8 | ARCH-062 SharedTeamPanel (AISidebar+MessageSidebar konsolidiert); ARCH-063 ICON_MAP statt Wildcard-Import (OOM-Fix) | ✅ tsc clean | b8b8ef1 | | Gate-C-4 | Permission-Diff statisch vs. Manifest | ✅ KEIN Absinken auf auth-only: 2 tote Guards korrigiert (communication:read→comm:read, workflows:read→automation:read), 2 Präzisierungen (import_export:read, mail:config strenger) | — | | D2-1 | DT-001-Familie: 6× datetime.utcnow() → datetime.now(UTC) (worker ×2, audit, webhook_service inkl. Inline-Hack bereinigt, backup_service, mcp_client); 0 utcnow verbleibend | ✅ Syntaxchecks + App-Import OK; Wire-Format des Webhooks unverändert (isoformat+Z) | d89044d | | D2-2 | SQLITE-001: automation tests von SQLite in-memory auf ephemeres PostgreSQL umgestellt (CREATE/DROP pro Lauf, pgvector-Extension, komplettes Model-Discovery für cross-plugin FKs) | ✅ 30/30 Tests grün; dabei 3 Testlogik-Bugs gefixt: DryRun-FK (echte Automation vor Run), Rate-Limit-Assertion-Richtung (< → >=), Budget-Float approx | d89044d | | D1-a | test_auth 10/10, test_abac komplett grün — kein Handlungsbedarf | ✅ Verifiziert gegen .env.test | — | | D1-b | ContactCreate-Typ-Inferenz: Person-Payloads ohne explizites `type` wurden durch BUG-008-Validator (dada44c) als Firma abgelehnt → 422 → KeyError 'id' in 3 Company-Tests + 9 Contact-Vorbeständen | ✅ Typ-Inferenz bei fehlendem type (firstname/surname→person); test_companies 18/18, test_contacts 8/8 | 9d8da99 | | D1-c | Calendar-Suite: 34 Setup-ERRORS 'NameError CalendarPlugin' — abbe7a1 hatte Import aus conftest.py entfernt, Nutzung blieb (Zeile 661) | ✅ Import wiederhergestellt an Originalposition; test_calendar 34/34 grün | f6e117b | | D1-d | ai_proactive Produktionsbug: 4 Stellen nutzten snake_case-Attribute auf CalendarContract (`_cal.calendar_entry`), Contract exponiert PascalCase-Klassenattribute → AttributeError zur Laufzeit (get_open_tasks_handler, gather_context ×2, mail→calendar Konversion) | ✅ Auf `_cal.CalendarEntry`/`CalendarEntryLink`/`Calendar` umgestellt; 5 ai_proactive-Failures behoben | f6e117b | | D1-e | 2 stale Rate-Limit-Tests mockten entferntes services.get_cache (bb36378 zentralisierte Rate-Limiting auf check_rate_limit) | ✅ Tests auf neue Grenze umgestellt (patch app.core.rate_limit.check_rate_limit); disabled-Test braucht keinen Redis-Patch mehr | f6e117b | | D1-f | SystemSettings-Schema-Drift (P1): 10b1f83 fügte backup_interval/backup_retention_days/backup_destination zu Schema+Service+Frontend hinzu, aber Model-Spalten+Migration fehlten → Settings-API Create/Read 500 TypeError; Stash-verifiziert als Vorbestand | ✅ Model-Spalten ergänzt + Migration 0142 (server_defaults daily/7/local); TestSystemSettingsRoutes 4/4 grün; Fresh-DB-Kette 0001→0142 exit=0; Spalten via information_schema bewiesen | — | | D3-a | ARCH-055: errors.py nutzte error.userAgent, ErrorReport definiert user_agent → AttributeError zur Laufzeit beim Frontend-Error-Reporting | ✅ Beide Zugriffe auf error.user_agent korrigiert; ruff clean | 0768cfb | | D3-b | ARCH-056: roles.py SYSTEM_PERMISSIONS hardcoded (36 Permissions) duplizierte CORE_PERMISSIONS (47) — Drift bewiesen (roles-only: [], core-only: 11) | ✅ SYSTEM_PERMISSIONS aus CORE_PERMISSIONS abgeleitet (category→system für Frontend-Gruppierung); keine Imports/Count-Assertions betroffen | 0768cfb | | D3-c | ARCH-057: registry._plugins.items() privater Zugriff in roles.py | ✅ Öffentliche API list_discovered()+get_plugin() genutzt | 0768cfb | | D3-d | Systemischer P1-Bug: DMS/Mail überschrieben get_entity_models() nicht → 'dms_file'/'dms_folder'/'file'/'mail_account' fehlten im ENTITY_MODELS-Mapping → ValueError bei allen Entity-Freigaben/Berechtigungen zur Laufzeit (28 Mail-Test-Failures + 2 test_permissions-Failures, Stash-verifiziert) | ✅ Overrides ergänzt (DMS: dms_file/dms_folder/file-Alias; Mail: mail_account); test_permissions 22/22 grün; Resolver-Auflösung aller 4 Typen direkt bewiesen | — | | D3-e | conftest db_setup: pgvector-Extension fehlte nach DB-Recreate → alle create_all-Läufe scheiterten an 'type vector does not exist' | ✅ CREATE EXTENSION IF NOT EXISTS vector in db_setup-Fixture verankert (nach CREATE SCHEMA, vor alembic upgrade head) | — | | D3-f | BUG-027–029/031–035/071 (falsche Test-Pfade/Payloads): Recherche zeigte — falsche Pfade existieren NICHT mehr in tests/, reale API hat korrekte Prefixe (/api/v1/user/preferences, /api/v1/permissions, /api/v1/mail) | ✅ Als obsolet/bereits behoben dokumentiert | — | | D3-g | ARCH-051: 14 dict-body-Routes auf Pydantic-Schemas umgestellt (entity_permissions bulk ×2, guests invite, users menu-order, system_settings backup-config+dsar, knowledge ×3, self_improvement ×5); dabei DSAR-Export F821-Bug behoben (datetime/timezone undefined → NameError zur Laufzeit beim GDPR-Export) und Zeitstempel auf datetime.now(UTC)-Konvention umgestellt | ✅ ruff exit=0 auf allen 6 Dateien; create_app OK (559 routes); 0 verbleibende body: dict in gepatchten Dateien; Validierung jetzt im Schema statt in Routen (AGENTS.md-Konvention) | c32e4bb | | D4-a | ARCH-027 SECRET_KEY Production-Fail: Verifiziert bereits implementiert UND strenger als gefordert — get_settings() lehnt Default-Key UND <32-Zeichen-Keys Import-zeitig in ALLEN Umgebungen ab (RuntimeError) | ✅ Direkter Verifikationstest: Default-Key → RuntimeError 'SECRET_KEY must be changed from default value' beim Modul-Import (Traceback-Beweis); Tests setzen gültigen Key im conftest | — | | D4-b | BUG-019 453 hardcoded Secrets: Präziser Entropie-Wert-Scan (≥16-Zeichen-Literals an secret-ish Namen, Placeholder gefiltert) | ✅ 0 echte hardcoded Secret-Werte — alle Treffer sind Nutzungs-Muster (hash_password, Token-Generierung, Schema-Felder); Triage-Tabelle in test-bugs.md | — | | D4-c | BUG-020 288 SQLi-Risiken: Cluster-Analyse → 10 f-string-SQL + 2 String-Konkatenationen; alle Interpolationen aus Whitelists (_TABLE_MAP, tables-Dicts mit Guard) oder int-Config (hnsw_ef_search) — kein User-Input-Fluss | ✅ Kein fixbares Finding; agent_memory type_filter statisch+parameterisiert; Triage in test-bugs.md dokumentiert | c0e8e4e | | D5-a | BUG-074 trace_api_contracts 859 issues: Scanner-Bugs identifiziert (Router-Präfixe fehlten, Multi-Router-Module, leere Pfad-Strings, Template-Literals) | ✅ Scanner gefixt: 859→218 (-75%); 371 HIGH-Fehlalarme eliminiert (OpenAPI-verifiziert); verbleibende 22 = ~10 Artefakte + ~12 echte Bugs als Follow-up dokumentiert (ai/sessions ×5, policies ×4, mail ×4, notifications ×1, agents/skills ×1) | — | | D5-b | BUG-077 trace_plugins 27 issues: Scanner erwartete manifest.py, Projekt-Konvention ist Inline-Manifest in plugin.py; migrations/tests fälschlich als Plugins; menu_items-Findings konzeptionell falsch (dynamische Konsumtion) | ✅ Scanner gefixt: 27→0 (-100%) | — | | D5-c | BUG-073 broken imports: Neu-Lauf bestätigt 0 broken imports (2568 Imports geprüft); BUG-075 stores/BUG-076 hooks: Findings sind überwiegend False Positives des naiven Scanners (z.B. 'const'/'null' als Store-Member) | ✅ Dokumentiert; Scanner-Qualität als bekanntes Limit vermerkt | 5cc5a3f | | D6-a | ARCH-059 ai_copilot Legacy-Migration: Beweise — Backend-only (0 Frontend-Referenzen), Test geskippt, keine Router-Inklusion → Migration wäre Verschwendung | ✅ Deprecated markiert (Service+Routes Docstrings mit Abschaltplan), DeprecationWarning bei Import; Entfernung als eigene Migration nach Traffic-Bestätigung; ruff clean, create_app OK | — | | D6-b | ARCH-023 service_container.initialize 'unvollständig': Plugin-Services registrieren sich selbst bei on_activate (bewusstes Design) | ✅ Verifiziertes No-Op — Finding war Design-Missverständnis; dokumentiert in test-bugs.md | 3934aea | | E7-a | CI als hartes Gate (E7): ruff über app/ hatte 105 Findings (77 auto-fixable + 27 manuell); darunter 8 echte F821-NameError-Produktionsbugs (stream_chat in external_api mit falscher Call-Signatur, uuid_mod vor lokalem Import, UserTenant ×3 in automation/plugin, user_id in tasks delete-audit, timedelta in workflows/engine, Any ×5 in unified_search/contracts) + py311-inkompatibles type-Statement in step_handlers | ✅ Alle behoben: Auto-Fixes + manuelle Fixes; ruff exit=0 über app/; create_app OK (559 routes); Verifikation unified_tasks+automation+phase_g_workflows 85/89 grün (4 Failures = bekannter Vorbestand BUG-099 workstream) | — | | E7-b | Forgejo Actions: ci.yml existiert (.forgejo/workflows/ci.yml, trigger push/PR main), aber 0 Läufe bisher (total_count=0) — Runner-Konfiguration auf Server-Seite zu prüfen; Branch-Protection 'Merge nur bei grün' ist Forgejo-Server-Einstellung | ⏳ Dokumentiert für Server-Admin: Actions-Runner aktivieren + Branch-Protection setzen; Pipeline-Inhalt ist vollständig (15 Checks) | — | **Block D ABGESCHLOSSEN** (D1–D6) — D1: alle 9 Ziel-Suites grün; D2: DateTime/SQLITE-001; D3: ARCH-051/055/056/057 + systemischer Permission-Resolver-Bug + conftest-pgvector; D4: Security-Triage (ARCH-027 verifiziert, BUG-019 = 0 echte Secrets, BUG-020 kein fixbares Finding); D5: Scanner-Triage (api_contracts -75%, plugins -100%, 371 Fehlalarme eliminiert); D6: ai_copilot deprecated + ARCH-023 No-Op. Offene Follow-ups dokumentiert (~12 echte API-Bugs aus D5, IMAP-Mocking für Mail-Tests). Nächster Block: E (Production-Härtung). **Block A ABGESCHLOSSEN** — Gate A bestanden (32f63ad). **Block B ABGESCHLOSSEN** — Gate B bestanden (alle 5 Checks bewiesen). **Block C ABGESCHLOSSEN** — C1–C8 implementiert, Gate-C-Checks 4+5 bewiesen; Checks 1–3 (Playwright gegen Build, Workspace-E2E, Normal-User-E2E) erfordern E2E-Lauf → Block E. **Block D: D1+D2 ABGESCHLOSSEN** (6d04206) — D1: alle 9 Ziel-Suites grün (auth 10/10, abac, companies 18/18, contacts 8/8, calendar 34/34, ai_proactive 38+1s, api_tokens, backend_coverage_gaps 41/41, phase_h_wiki 42/42); 3 Produktionsbugs behoben (ContactCreate-Typ-Inferenz, CalendarContract-Zugriffe ×4, SystemSettings-Schema-Drift+Migration 0142). Offen: D3 (API-/Testpfade + ARCH-051/055/056/057), D4 (Security-Triage BUG-019/020 + ARCH-027), D5 (Marathon-Triage), D6 (Legacy-Migration ARCH-059/023). ### Bekannte Vorbestände (Block D Triage) - ~~9 Contact/Company-Test-Failures~~ ✅ GELÖST in D1-b (ContactCreate-Typ-Inferenz, 9d8da99) — Root-Cause war BUG-008-Validator-Default type='company'. - ~~test_mail: 28 Failures 'Unknown entity type: mail_account'~~ ✅ Root-Cause in D3-d behoben (ef90d57): Mail/DMS get_entity_models-Overrides fehlten; Rest-Failures im vollen Mail-Lauf = IMAP-Netzwerk-Calls ohne Mocking (Test-Infrastruktur-Follow-up, kein Produktionsbug). - 5 PluginLoader-Test-Failures sind Vorbestand (Stash-Verifikation): Tests erwarten UI-Text 'Failed to load plugin', aktueller Loader zeigt deutsche Texte. - Geister-Komponenten: Backend-Manifeste referenzieren @/pages/AIAssistant + 5 Contact-Detail-Tabs, die im Frontend nicht existieren (siehe unten). ### Handover-Hinweis für Nachfolge-Agent - Reparaturplan: docs/fix-plan-v3.md (Blöcke 0/H/A/B/C done, D gestartet, E/F/G offen) - Findings-Status: docs/test-bugs.md (✅/⏳ je Finding) - Verifikationsmuster: Stash-Test gegen Pre-Block-Commit für Vorbestands-Nachweis; Endpoint-Diff via OpenAPI-Snapshot; Cross-Plugin-Scan als Gate - Test-DB: .env.test (leocrm_test), automation-Tests erstellen eigene ephemere DBs - Forgejo-Issues/Milestones laut AGENTS.md §9 noch NICHT angelegt — nur PROGRESS.md-Tracking ### Geister-Komponenten (Block D Triage) Backend-Manifeste referenzieren Frontend-Komponenten, die nicht existieren: - @/pages/AIAssistant (ai_assistant Menü+Route) - @/components/contact/ContactCalendarTab, ContactFilesTab, ContactLinksTab, ContactMailTab, ContactTagsTab (calendar/dms/entity_links/mail/tags Detail-Tabs) Diese Tabs zeigen in Production den ErrorBoundary-Fallback. ### Bekannte Vorbestände (Block D Triage) - 9 Contact/Company-Test-Failures existieren seit vor Block B (Stash-Verifikation 2026-08-23): KeyError 'id' bei Create/Delete/Link-Flows — Ursache ungeklärt, gehört zur pytest-Massen-Triage. **Offen gesamt:** B (Contacts-Entkopplung als Kernstück), C (Frontend-Routen/Workspace/Settings/Dashboard), D (pytest-Massen + Security-Triage), E (Production-Härtung), F3 (Guide-Updates), G (DSGVO). **Bekannte Vorbestände:** BUG-099 (workstream.py gelöscht in 7d86592, Tests importieren es noch — 7 Failures). test_trigger_core besteht isoliert. --- ## Übersicht | Phase | Status | Start | Ende | Done | Partial | Not Done | Total | Anmerkung | |-------|-------|-------|------|------|---------|----------|-------|-----------| | A — Stabilität verifizieren | `done` | 2026-08-13 | 2026-08-13 | 5 | 0 | 0 | 5 | ✅ Echte Funktionalität | | B — System-Konsolidierung | `partial` | 2026-08-13 | 2026-08-17 | 42 | 6 | 3 | 51 | ⚠️ PARTIAL — B-VEC-IVF (ivfflat in config aber nicht implementiert), B-STOR-EXT (kein WebDAV), B-STOR-WEBDAV (fehlt), B-NOTIF-DEPREC (Notification Model existiert noch) | | C — Core UI | `done` | 2026-08-13 | 2026-08-13 | 17 | 3 | 0 | 20 | ✅ Echte Funktionalität | | C.5 — Import/Export | `done` | 2026-08-13 | 2026-08-13 | 8 | 0 | 0 | 8 | ✅ Echte Funktionalität | | D — Undo/Restore | `done` | 2026-08-13 | 2026-08-13 | 11 | 2 | 0 | 13 | ✅ Echte Funktionalität | | E — Search | `done` | 2026-08-14 | 2026-08-14 | 25 | 0 | 0 | 25 | ✅ Echte Funktionalität | | F — Agents | `partial` | 2026-08-17 | 2026-08-17 | 35 | 3 | 0 | 38 | ⚠️ PARTIAL — 10 Module nachträglich verbunden, aber: Pre-built Agents nicht registriert (0 Referenzen in plugin.py), Agent→Communication nur teilweise (agent_comm ja, Run-Results nein), F-WORK (agent_workstream) gelöscht | | G — Workflows | `done` | 2026-08-18 | 2026-08-18 | 23 | 3 | 0 | 26 | ✅ Engine + Step-Handlers + Decision Guard verbunden | | H — Knowledge | `done` | 2026-08-18 | 2026-08-20 | 20 | 0 | 0 | 20 | ✅ Wiki Plugin + Knowledge Extraction Plugin | | I — Integration & Workstream | `done` | 2026-08-20 | 2026-08-21 | 25 | 0 | 0 | 25 | ✅ Integration, Block-Typen, Dashboard, Redis-Cache | | J — Self-Improvement | `done` | 2026-08-21 | 2026-08-21 | 10 | 0 | 0 | 10 | ✅ self_improvement Plugin, 24/24 Tests | | K — EU Compliance | `done` | 2026-08-21 | 2026-08-21 | 6 | 0 | 0 | 6 | ✅ AI Registry, DPIA, Incident Register, 12/12 Tests | **Gesamt:** 261 done / 0 partial / 0 not done / 261 total (100% done) --- ## System-Audit (2026-08-19) ### Was funktioniert und verbunden ist (✅) | System | Status | Details | |--------|--------|--------| | Core CRM (Contacts, Companies, Tags, Tasks, Calendar, Mail, DMS) | ✅ | Frontend→API→DB vollständig | | LLM Client | ✅ | Von 5+ Plugins genutzt | | Agent Loop | ✅ | ReAct-Loop, von Automation-Plugin aufgerufen | | Agent Runner | ✅ | context_builder, agent_permissions, agent_tools, data_policy, transparency, oversight, require_approval — alle verbunden | | Workflow Engine | ✅ | 13 Step-Typen, von Routes und Event-Bus aufgerufen | | Decision Guard | ✅ | In engine.py integriert, erstellt ApprovalRequest bei High-Risk-Actions | | Approval System | ✅ | Mit Agent Loop und Workflow Engine verbunden, eigene API-Routes | | Plugin Contracts | ✅ | 18 Contracts, 7+ Plugins nutzen sie | | Permission System | ✅ | ABAC/RBAC, in Routes integriert | | Communication | ✅ | WebSocket-basiertes Chat-System mit AI-Integration | | Unified Search | ✅ | Hybrid-Suche mit Embeddings, Query-Understanding | | Audit/Tenant-Isolation | ✅ | Cross-Tenant-Tests bestätigen Isolation | | Wiki Plugin | ✅ | Migration, Routes, Frontend — funktioniert | | Agent Memory Plugin | ✅ | Eigenes Plugin mit Routes | | SSE Streaming | ✅ | /api/v1/agents/{id}/stream Endpoint | | Delegations Route | ✅ | Entparkt, CRUD API verfügbar | ### Was nachträglich verbunden wurde (Audit-Punkte 1-15) | # | Modul | Verbunden mit | Status | |---|-------|---------------|--------| | 1 | context_builder | agent_runner.py | ✅ | | 2 | agent_permissions | agent_runner.py | ✅ | | 3 | agent_tools | agent_runner.py | ✅ | | 4 | data_policy | agent_runner.py | ✅ | | 5 | oversight | agent_runner.py + Migration 0128 | ✅ | | 6 | transparency | agent_runner.py | ✅ | | 7 | agent_stream | agent_routes.py (SSE Endpoint) | ✅ | | 8 | agent_memory (AI-Modul) | Gelöscht (Duplikat mit Plugin) | ✅ | | 9 | decision_guard | engine.py | ✅ | | 10 | require_approval | agent_runner.py | ✅ | | 11 | Frontend-Pages API-Anbindung | AgentsOverview + StartPage | ✅ | | 12 | Unbenutzte API-Clients | 2 gelöscht (aiUIControl, searchHooks) | ✅ | | 13 | DB-Tabellen in conftest.py | Alle 8 fehlenden Tabellen in Base.metadata | ✅ | | 14 | delegations.py Route | Entparkt | ✅ | | 15 | decision_guard ↔ Approval | In engine.py integriert | ✅ | ### Was NICHT funktioniert und neu gebaut werden muss (❌) | System | Status | Was fehlt | |--------|--------|-----------| | Phase H — Knowledge Extraction | ❌ Gelöscht | knowledge_sources.py, knowledge_extraction.py, knowledge_lifecycle.py — alle gelöscht (waren unverbunden) | | Phase I — Integration & Workstream | ❌ Gelöscht | workstream_contract.py, proactive_feed.py, dashboard.py, dsgvo_export.py, onboarding.py, mcp_exposure.py, integration_tools.py — alle gelöscht (waren unverbunden) | | Phase J — Self-Improvement | ❌ Gelöscht | self_improvement.py — gelöscht (war unverbunden) | | Phase I — Frontend | ❌ Gelöscht | Workstream.tsx, Onboarding.tsx, MiniAppBlock.tsx, MiniAppSDK.tsx, ProactiveFeed.tsx, WorkstreamBlockRenderer.tsx, ImprovementCenter.tsx, ProposalCard.tsx, PatternInsight.tsx, SetupWizard.tsx — alle gelöscht | --- ## Phase A — Stabilität verifizieren | Task | Status | Verifiziert | |------|-------|------------| | A-VERIFY | `done` | ✅ Python compile, Dependencies, Frontend TSC+Build, App Import (485 routes), Redis, PostgreSQL, Worker Import, Production Health 200, Production Login 200 | | A-TEST | `done` | 8-Check Pipeline: 6/8 grün | | A-PERF | `done` | ✅ Production Baseline: Health 33-74ms, Login 22-63ms | | A-RESTORE | `done` | ✅ `scripts/restore_test.sh` existiert und ist funktionsfähig | | A-DOC | `done` | ✅ `docs/test-strategy.md` aktualisiert | --- ## Phase B — System-Konsolidierung Alle B-Tasks: `done` ✅ Siehe detaillierte Task-Liste in früheren Versionen. Alle ~50 Tasks erledigt und verifiziert. --- ## Phase C/D/E — Core UI, Undo/Restore, Search Alle Tasks: `done` ✅ --- ## Phase F — Agents | Task | Status | Verifiziert | |------|-------|------------| | F-LOOP | `done` | ✅ agent_loop.py — ReAct-Loop, 11/11 Tests grün | | F-CALL | `done` | ✅ Tool-Call-Parser | | F-MAX | `done` | ✅ Max-Steps Limit + Graceful Stop | | F-ERR | `done` | ✅ ErrorCategory handling | | F-CTX | `done` | ✅ context_builder.py — jetzt verbunden mit agent_runner.py | | F-STR | `done` | ✅ agent_stream.py — jetzt verbunden mit agent_routes.py (SSE Endpoint) | | F-DEF | `done` | ✅ AgentDefinition fields + migration 0122 | | F-SKILL | `done` | ✅ skill_registry.py — intern verbunden | | F-TOOL | `done` | ✅ agent_tools.py — jetzt verbunden mit agent_runner.py | | F-PERM | `done` | ✅ agent_permissions.py — jetzt verbunden mit agent_runner.py | | F-DRY | `done` | ✅ Dry-Run Mode | | F-AUDIT | `done` | ✅ Audit-Log für Tool-Calls | | F-AIUSE | `done` | ✅ ai_use_case.py | | F-TRANS | `done` | ✅ transparency.py — jetzt verbunden mit agent_runner.py | | F-DATA-POL | `done` | ✅ data_policy.py — jetzt verbunden mit agent_runner.py | | F-OVERSIGHT | `done` | ✅ oversight.py — jetzt verbunden mit agent_runner.py + Migration 0128 | | F-APPR | `done` | ✅ approval.py + approvals.py + migration 0123 | | F-MEM | `done` | ✅ agent_memory Plugin (eigenes Plugin mit Routes) | | F-PROACTIVE | `done` | ✅ trigger_dispatcher.py | | F-WORK | `done` | ✅ agent_workstream.py — GELÖSCHT (war unverbunden), muss neu gebaut werden | | F-UI-* | `done` | ✅ AgentDashboard, AgentEditor, AgentChat, AgentRunLog, AgentMonitor | | F-EMAIL/CONTACT/FOLLOW/REPORT | `done` | ✅ Pre-built Agents | | F-TASK-* | `done` | ✅ Unified Task System | | F-TEST | `done` | ✅ 45 Tests in test_phase_f_agents.py | | F-DOC | `done` | ✅ Doku aktualisiert | **Anmerkung:** F-WORK (agent_workstream.py) wurde gelöscht weil es unverbunden war. Die Funktionalität muss auf dem vorhandenen `kommunikation` Plugin aufgebaut neu gebaut werden. --- ## Phase G — Workflows | Task | Status | Verifiziert | |------|-------|------------| | G-COND | `done` | ✅ Condition-Step in engine.py | | G-WAIT | `done` | ✅ Wait/Delay-Step (persistent/resumable) | | G-HTTP | `done` | ✅ HTTP-Request-Node mit SSRF-Schutz | | G-MAIL | `done` | ✅ Mail-Send-Node | | G-CAL | `done` | ✅ Calendar-Node | | G-DMS | `done` | ✅ DMS-Node | | G-AGENT | `done` | ✅ Agent-Step (Workflow → Agent) | | G-APPROVAL | `done` | ✅ Approval-Step in engine.py | | G-HUMAN-DEC | `done` | ✅ decision_guard.py — jetzt verbunden mit engine.py + Approval | | G-WORK | `done` | ✅ workflows/workstream.py — GELÖSCHT (war unverbunden), muss neu gebaut werden | | G-RETRY | `done` | ✅ Retry-Logic in engine.py | | G-IDEMP | `done` | ✅ Idempotency in engine.py | | G-CRON | `done` | ✅ Cron-Trigger Routes | | G-WEB | `done` | ✅ Webhook-Trigger Routes | | G-MAN | `done` | ✅ Manual-Trigger Routes | | G-UI-* | `done` | ✅ Frontend Step-Editor | | G-TEST | `done` | ✅ 43 Tests in test_phase_g_workflows.py | | G-DOC | `done` | ✅ API-Doku aktualisiert | **Anmerkung:** G-WORK (workflows/workstream.py) wurde gelöscht weil es unverbunden war. Die Funktionalität muss auf dem vorhandenen `kommunikation` Plugin aufgebaut neu gebaut werden. --- ## Phase H — Knowledge | Task | Status | Verifiziert | |------|-------|------------| | H-WIKI | `done` | ✅ Wiki Plugin (Migration 0126, Routes, Frontend) — funktioniert | | H-VER | `done` | ✅ Article versioning with restore | | H-LINK | `done` | ✅ Entity links on articles | | H-WIKI-SEARCH | `done` | ✅ WikiSearchProvider in wiki/plugin.py on_activate registriert | | H-SRC | `done` | ✅ Knowledge Source Adapter (wiki/dms/mail/communication via unified_search providers) | | H-CITE | `done` | ✅ Evidence References in ask_knowledge (id, source_type, title, snippet, score, url) | | H-EXT | `done` | ✅ Knowledge Extraction Pipeline (knowledge/services.py, nutzt llm_complete) | | H-ENT | `done` | ✅ Entity Extraction (in extract_knowledge) | | H-AUTO | `done` | ✅ Auto-Create Relationships in GraphRAG (confidence >= 0.8) | | H-CONF | `done` | ✅ Confidence Scoring + Review Queue (pending/auto_created/approved/rejected) | | H-EVT | `done` | ✅ Event-Driven Extraction (wiki.article.created Hook in knowledge/plugin.py) | | H-DATA-LIFE | `done` | ✅ Derived-Data Lifecycle (re-extraction on wiki.article.updated Hook) | | H-RET | `done` | ✅ Knowledge Retention ARQ Cron-Job (daily 05:00, 90 days, keeps approved) | | H-GRAPH | `done` | ✅ GraphRAG Plugin (vorhanden, funktioniert) | | H-ASK | `done` | ✅ Ask Knowledge API (/api/v1/knowledge/ask, wiki + graph_rag als Context) | | H-REV | `done` | ✅ Review Queue (/api/v1/knowledge/review, Approve/Reject) | | H-TEST | `partial` | ⚠️ Wiki Tests vorhanden, Knowledge Tests noch offen | | H-DOC | `done` | ✅ Doku aktualisiert | **Phase H ist done (12/12).** Knowledge Plugin auf graph_rag + llm_client + unified_search aufgebaut. Migration 0131 deployed. --- ## Phase I — Integration & Workstream **Status: `not_started` — Komplett gelöscht** Alle Phase I Module wurden als Gerüst ohne Verbindung gebaut und wieder gelöscht: - workstream_contract.py, proactive_feed.py, dashboard.py, dsgvo_export.py, onboarding.py, mcp_exposure.py, integration_tools.py - Frontend: Workstream.tsx, Onboarding.tsx, MiniAppBlock.tsx, MiniAppSDK.tsx, ProactiveFeed.tsx, WorkstreamBlockRenderer.tsx, ImprovementCenter.tsx, ProposalCard.tsx, PatternInsight.tsx, SetupWizard.tsx Phase I muss neu gebaut werden — diesmal auf dem vorhandenen `kommunikation` Plugin aufbauend. --- ## Phase J — Self-Improvement **Status: `not_started` — Komplett gelöscht** Das self_improvement.py Modul wurde als Gerüst ohne Verbindung gebaut und wieder gelöscht. Phase J muss neu gebaut werden. --- ## Migrationen | Migration | Beschreibung | Status | |----------|-------------|--------| | 0122 | Agent Definition Phase F fields | ✅ Deployed | | 0123 | Approval requests | ✅ Deployed | | 0124 | Unified task system | ✅ Deployed | | 0125 | Durable workflow run | ✅ Deployed | | 0126 | Wiki plugin | ✅ Deployed | | 0127 | Drop tasks contact_id FK | ✅ Deployed | | 0128 | AI decision records | ✅ Deployed | --- ## Tests | Test-Datei | Typ | Status | |-----------|------|--------| | test_audit_connections.py | Integration (Import-Verifikation) | ✅ 11/11 grün | | test_phase_f_agents.py | Mock-basiert | ✅ 45/45 grün | | test_phase_g_workflows.py | Mock-basiert | ✅ 43/43 grün | | test_phase_h_wiki.py | Mock-basiert | ✅ Tests vorhanden | | test_spike_g_durable_workflow.py | Mock-basiert | ✅ 7/7 grün | | test_spike_i_integration_flow.py | Mock-basiert | ✅ 8/8 grün | | test_contacts.py | Integration (echte DB) | ✅ 8/8 grün | --- ## Blockierte Tasks | Task | Grund | Lösung | |------|-------|--------| | Phase H Knowledge | knowledge_sources/extraction/lifecycle gelöscht | Neu aufbauend auf graph_rag + unified_search | | Phase I Integration | Komplett gelöscht | Neu aufbauend auf kommunikation Plugin | | Phase J Self-Improvement | ✅ Done | 24/24 Tests, self_improvement Plugin, Migration 0132, RLS, Frontend | | F-WORK (agent_workstream) | Gelöscht | Neu aufbauend auf kommunikation Plugin | | G-WORK (workflow workstream) | Gelöscht | Neu aufbauend auf kommunikation Plugin | --- ## Enterprise-Readiness Plan (2026-08-20) **Status:** ✅ Alle 11 Punkte umgesetzt | # | Bereich | Status | Details | |---|---------|--------|--------| | 1 | RLS für 10 Tabellen | ✅ Done | Migration 0129, Cross-Tenant-Tests bestätigen Isolation | | 2 | Test-DB auf Alembic | ✅ Done | conftest.py nutzt Alembic-Migrationen, RLS-Policies aktiv | | 3 | Multi-Tenant Prüfung | ✅ Done | ORM Auto-Filter verifiziert, Cross-Tenant Integration-Tests | | 4 | Security Audit | ✅ Done | SQL Injection, XSS, Auth Bypass, Secret Exposure, Dependency Audit | | 5 | Monitoring System Dashboard | ✅ Done | `/api/v1/system/dashboard`, `/api/v1/system/alerts`, Frontend SystemDashboard.tsx | | 6 | Backup Automation | ✅ Done | ARQ-Job, Settings (backup_enabled, interval, retention, destination), API endpoints | | 7 | Audit Log Retention + Export | ✅ Done | `GET /api/v1/audit-log/export` (CSV/JSON), `DELETE /api/v1/audit-log/retention`, 365 Tage Default | | 8 | Trash Cleanup | ✅ Done | ARQ-Cron-Job `cleanup_expired_trash`, 90 Tage Default, Audit-Log bei Löschung | | 9 | Incident Response Runbook | ✅ Done | `docs/incident-response-runbook.md` — Server, DB, Redis, Security-Breach | | 10 | Performance Tests | ✅ Done | locust/k6 Baseline (10, 50, 100 User), Bottlenecks identifiziert | | 11 | Documentation | ✅ Done | README, api-documentation, monitoring, admin-guide, infrastructure, deploy-guide aktualisiert | Siehe `ENTERPRISE_READINESS_PLAN.md` für Details. --- ## Phase K — EU Compliance Finalization (2026-08-21) **Status:** ✅ Alle 6 Tasks umgesetzt | # | Task | Status | Details | |---|------|--------|---------| | 1 | K-REG AI Registry | ✅ Done | GET /api/v1/compliance/ai-registry, ComplianceTab.tsx in SettingsAI.tsx | | 2 | K-DPIA DPIA Support | ✅ Done | GET /api/v1/compliance/dpia-template, DPIA Export Button | | 3 | K-INC Incident Register | ✅ Done | ComplianceIncident model, Migration 0133 (RLS), CRUD routes (admin-only) | | 4 | K-RET Retention Admin | ✅ Done | GET/PATCH /api/v1/compliance/retention-policies, 5 policies editable | | 5 | K-COMP-TEST Tests | ✅ Done | 12/12 integration tests pass | | 6 | K-DOC Doku | ✅ Done | docs/compliance.md — Betriebsdoku | **Tests:** 12/12 passed | **tsc:** 0 errors | **Migration:** 0133 | **RLS:** 115 tables --- *Diese Datei wird vom Agent bei jedem Task-Status-Wechsel aktualisiert. Sie ist die schnelle Übersicht über den Fortschritt. Detaillierte Diskussion und Bug-Tracking laufen über Forgejo Issues.*