2026-08-21 21:28:11 +02:00
|
|
|
# LeoCRM — Test Bug-Sammlung
|
|
|
|
|
|
|
|
|
|
> **Erstellt:** 2026-08-21
|
|
|
|
|
> **Regel:** Alle Fehler werden hier gesammelt. KEINE Fixes während des Testens.
|
|
|
|
|
> **Fixes werden erst nach Abschluss aller Tests gesammelt durchgeführt.**
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Bug-Format
|
|
|
|
|
|
|
|
|
|
Jeder Bug wird wie folgt dokumentiert:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
### BUG-XXX: <Kurze Beschreibung>
|
|
|
|
|
- **Kategorie:** API | Frontend | DB | Rechte | Security | Plugin | Performance
|
|
|
|
|
- **Modul:** <Modul-Name>
|
|
|
|
|
- **Endpoint:** <HTTP Method + Path>
|
|
|
|
|
- **Erwartet:** <Was sollte passieren>
|
|
|
|
|
- **Tatsächlich:** <Was passiert ist>
|
|
|
|
|
- **Status Code:** <HTTP Status Code>
|
|
|
|
|
- **Response:** <Fehlermeldung / Response Body>
|
|
|
|
|
- **Schweregrad:** Critical | High | Medium | Low
|
|
|
|
|
- **Getestet von:** Admin | Sales | Reader
|
|
|
|
|
- **Trace-ID:** <trace_id falls verfügbar>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Gefundene Bugs
|
|
|
|
|
|
|
|
|
|
### BUG-001: Tag Delete 500 — current_user["id"] KeyError
|
|
|
|
|
- **Kategorie:** API
|
|
|
|
|
- **Modul:** Tags
|
|
|
|
|
- **Endpoint:** DELETE /api/v1/tags/{tag_id}
|
|
|
|
|
- **Erwartet:** 204 No Content
|
|
|
|
|
- **Tatsächlich:** 500 Internal Server Error
|
|
|
|
|
- **Status Code:** 500
|
|
|
|
|
- **Response:** `{"code":"internal_error","detail":"Internal server error","trace_id":"7d902485"}`
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Getestet von:** Admin
|
|
|
|
|
- **Trace-ID:** 7d902485
|
|
|
|
|
- **Ursache:** `current_user["id"]` in `tags/routes.py:282` — Key heißt `user_id` nicht `id`
|
|
|
|
|
- **Status:** ✅ Bereits gefixt (Commit c02fc75)
|
|
|
|
|
|
|
|
|
|
### BUG-002: AI Agents list 500 — apply_visibility_filter ImportError
|
|
|
|
|
- **Kategorie:** API
|
|
|
|
|
- **Modul:** AI Assistant
|
|
|
|
|
- **Endpoint:** GET /api/v1/ai/agents
|
|
|
|
|
- **Erwartet:** 200 mit Agent-Liste
|
|
|
|
|
- **Tatsächlich:** 500 Internal Server Error
|
|
|
|
|
- **Status Code:** 500
|
|
|
|
|
- **Response:** `{"code":"internal_error","detail":"Internal server error"}`
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Getestet von:** Admin
|
|
|
|
|
- **Ursache:** `apply_visibility_filter` nicht importiert in `ai_assistant/routes.py`
|
|
|
|
|
- **Status:** ✅ Bereits gefixt (Commit d3618d8)
|
|
|
|
|
|
|
|
|
|
### BUG-003: create_provider/model/preset/agent 500 — flush vor refresh
|
|
|
|
|
- **Kategorie:** API
|
|
|
|
|
- **Modul:** AI Assistant
|
|
|
|
|
- **Endpoint:** POST /api/v1/ai/providers, /models, /presets, /agents, /folders
|
|
|
|
|
- **Erwartet:** 201 Created
|
|
|
|
|
- **Tatsächlich:** 500 Internal Server Error
|
|
|
|
|
- **Status Code:** 500
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Getestet von:** Admin
|
|
|
|
|
- **Ursache:** `db.commit()` vor `db.refresh()` — muss `db.flush()` vor `db.refresh()` sein
|
|
|
|
|
- **Status:** ✅ Bereits gefixt (Commit 37f6868)
|
|
|
|
|
|
|
|
|
|
### BUG-004: OwnedMixin Import fehlt in unified_search/models.py
|
|
|
|
|
- **Kategorie:** Code-Logik
|
|
|
|
|
- **Modul:** Unified Search
|
|
|
|
|
- **Erwartet:** Import funktioniert
|
|
|
|
|
- **Tatsächlich:** `NameError: name 'OwnedMixin' is not defined`
|
|
|
|
|
- **Schweregrad:** Medium
|
|
|
|
|
- **Ursache:** `OwnedMixin` verwendet aber nicht importiert
|
|
|
|
|
- **Status:** ✅ Bereits gefixt (Commit f0bf53f)
|
|
|
|
|
|
|
|
|
|
### BUG-005: Test-Dateien importieren entfernte AI Models
|
|
|
|
|
- **Kategorie:** Tests
|
|
|
|
|
- **Modul:** test_ai_proactive, test_ai_copilot, conftest, test_permission_system_live
|
|
|
|
|
- **Erwartet:** Tests laufen ohne ImportError
|
|
|
|
|
- **Tatsächlich:** ImportError für AIChatSession, AIChatMessage, AIConversation, AIMessage
|
|
|
|
|
- **Schweregrad:** Low
|
|
|
|
|
- **Ursache:** Models wurden in Phase 2 entfernt, Test-Dateien nicht aktualisiert
|
|
|
|
|
- **Status:** ✅ Bereits gefixt (Commit f0bf53f)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Neue Bugs (während Test-Ausführung gefunden)
|
|
|
|
|
|
2026-08-21 21:40:17 +02:00
|
|
|
### BUG-006: wiki/plugin.py hat verbotene Cross-Plugin Imports
|
|
|
|
|
- **Kategorie:** Architektur
|
|
|
|
|
- **Modul:** Wiki
|
|
|
|
|
- **Datei:** `app/plugins/builtins/wiki/plugin.py` Zeile 28-29
|
|
|
|
|
- **Erwartet:** Plugins kommunizieren über Contracts, nicht über direkte Imports
|
|
|
|
|
- **Tatsächlich:** Direkte Imports aus `unified_search` Plugin
|
|
|
|
|
- **Code:**
|
|
|
|
|
```python
|
|
|
|
|
from app.plugins.builtins.unified_search.provider_registry import get_search_registry
|
|
|
|
|
from app.plugins.builtins.unified_search.providers.wiki_provider import WikiSearchProvider
|
|
|
|
|
```
|
|
|
|
|
- **Schweregrad:** Medium
|
|
|
|
|
- **Ursache:** Wiki Plugin importiert direkt aus Unified Search Plugin statt über `get_contract("unified_search")`
|
|
|
|
|
- **Lösung:** Contract-basierten Zugriff verwenden
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt — wird gesammelt nach Test-Abschluss gefixt
|
|
|
|
|
|
2026-08-21 21:58:20 +02:00
|
|
|
### BUG-008: POST /contacts mit leerem Body erstellt Contact statt 422
|
|
|
|
|
- **Kategorie:** API / Validierung
|
|
|
|
|
- **Modul:** Contacts
|
|
|
|
|
- **Endpoint:** POST /api/v1/contacts
|
|
|
|
|
- **Erwartet:** 422 Unprocessable Entity (fehlende Pflichtfelder)
|
|
|
|
|
- **Tatsächlich:** 201 Created — Contact mit leerem displayname wird erstellt
|
|
|
|
|
- **Status Code:** 201
|
|
|
|
|
- **Response:** `{"id":"...","type":"company","displayname":"","status":"lead",...}`
|
|
|
|
|
- **Schweregrad:** Medium
|
|
|
|
|
- **Ursache:** ContactCreate Schema hat keine required fields (type, displayname etc. sind optional)
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt
|
|
|
|
|
|
2026-08-21 22:04:35 +02:00
|
|
|
### BUG-011: Playwright E2E Tests laufen gegen localhost statt Produktion
|
|
|
|
|
- **Kategorie:** Frontend / E2E Tests
|
|
|
|
|
- **Modul:** Playwright
|
|
|
|
|
- **Datei:** `frontend/playwright.config.ts`
|
|
|
|
|
- **Erwartet:** E2E Tests laufen gegen Produktion (https://crm.media-on.de)
|
|
|
|
|
- **Tatsächlich:** baseURL ist `http://localhost:5173` — Tests suchen lokalen Vite Dev Server
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Ursache:** Playwright config hat keine BASE_URL für Produktion gesetzt
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt — Tests müssen mit `BASE_URL=https://crm.media-on.de` laufen
|
|
|
|
|
|
|
|
|
|
### BUG-012: Playwright helpers.ts verwendet Mock-Daten statt echter API
|
|
|
|
|
- **Kategorie:** Frontend / E2E Tests
|
|
|
|
|
- **Modul:** Playwright helpers
|
|
|
|
|
- **Datei:** `frontend/e2e/helpers.ts`
|
|
|
|
|
- **Erwartet:** E2E Tests nutzen echte API (keine Mocks)
|
|
|
|
|
- **Tatsächlich:** helpers.ts definiert `TEST_USER`, `MOCK_CONTACTS`, `TEST_TENANT` und interceptet API Calls mit Mocks
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Ursache:** Tests wurden als Mock-Tests geschrieben, nicht als echte E2E Tests
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt — helpers.ts muss umgeschrieben werden für echte API-Tests
|
|
|
|
|
|
|
|
|
|
### BUG-013: ContactsList fehlt data-testid Attribut
|
|
|
|
|
- **Kategorie:** Frontend / E2E Tests
|
|
|
|
|
- **Modul:** Contacts
|
|
|
|
|
- **Datei:** `frontend/src/pages/ContactsList.tsx` (oder ähnlich)
|
|
|
|
|
- **Erwartet:** `data-testid="contact-list-view"` oder `data-testid="contact-list-empty"` vorhanden
|
|
|
|
|
- **Tatsächlich:** Keines der data-testid Attribute gefunden in ContactsList
|
|
|
|
|
- **Schweregrad:** Low
|
|
|
|
|
- **Ursache:** data-testid Attribute fehlen in ContactsList Komponente
|
2026-08-21 21:58:20 +02:00
|
|
|
- **Status:** ⏳ Nicht gefixt
|
2026-08-21 22:08:10 +02:00
|
|
|
|
|
|
|
|
### BUG-014: Tags Assign/Unassign 500 — current_user["id"] KeyError
|
|
|
|
|
- **Kategorie:** API
|
|
|
|
|
- **Modul:** Tags
|
|
|
|
|
- **Endpoint:** POST /api/v1/tags/assign, DELETE /api/v1/tags/assign
|
|
|
|
|
- **Erwartet:** 201 Created / 204 No Content
|
|
|
|
|
- **Tatsächlich:** 500 Internal Server Error
|
|
|
|
|
- **Status Code:** 500
|
|
|
|
|
- **Response:** `{"code":"internal_error","detail":"Internal server error","trace_id":"df33898a"}`
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Ursache:** `current_user["id"]` in `tags/routes.py:189` — Key heißt `user_id` nicht `id` (gleicher Bug wie BUG-001)
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt
|
|
|
|
|
|
|
|
|
|
### BUG-015: Cross-Plugin Imports — 6 violations
|
|
|
|
|
- **Kategorie:** Architektur
|
|
|
|
|
- **Modul:** Mehrere Plugins
|
|
|
|
|
- **Erwartet:** 0 verbotene Cross-Plugin Imports
|
|
|
|
|
- **Tatsächlich:** 6 verbotene Imports gefunden
|
|
|
|
|
- **Violations:**
|
|
|
|
|
1. `mail.models` → Use contracts instead
|
|
|
|
|
2. `kommunikation.models` → Use contracts instead
|
|
|
|
|
3. `kommunikation.models` → Use contracts instead (2nd occurrence)
|
|
|
|
|
4. `kommunikation.services` → Use contracts instead
|
|
|
|
|
5. `kommunikation.services` → Use contracts instead (2nd occurrence)
|
|
|
|
|
6. `unified_search.provider_registry` → Use contracts instead
|
|
|
|
|
7. `unified_search.providers.wiki_provider` → Use contracts instead
|
|
|
|
|
- **Schweregrad:** Medium
|
|
|
|
|
- **Ursache:** Plugins importieren direkt aus anderen Plugins statt über Contracts
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt
|
|
|
|
|
|
|
|
|
|
### BUG-016: Search Performance — 6.34s für einfache Suche
|
|
|
|
|
- **Kategorie:** Performance
|
|
|
|
|
- **Modul:** Unified Search
|
|
|
|
|
- **Endpoint:** GET /api/v1/search?q=test
|
|
|
|
|
- **Erwartet:** < 1000ms
|
|
|
|
|
- **Tatsächlich:** 6344ms (test), 6369ms (contact), 3283ms (wiki)
|
|
|
|
|
- **Schweregrad:** High
|
|
|
|
|
- **Ursache:** Search Query ist zu langsam — mögliche Ursachen: fehlende Indexes, ineffiziente Query, zu viele Provider die sequentiell suchen
|
|
|
|
|
- **Status:** ⏳ Nicht gefixt
|