Files
leocrm/docs/test-bugs.md
T

93 lines
3.2 KiB
Markdown
Raw Normal View History

# 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)
*Wird während der Test-Ausführung gefüllt.*