docs: 84 Architektur-Fehler (ARCH-001 bis ARCH-084) durch systematisches Code-Review dokumentiert
This commit is contained in:
@@ -1232,3 +1232,87 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
|
|||||||
- **Problem:** `from app.services.entity_permission_service import ENTITY_MODELS` — entity_permission_service importiert permission_resolver (Zeile 1-10). Zirkuläre Abhängigkeit.
|
- **Problem:** `from app.services.entity_permission_service import ENTITY_MODELS` — entity_permission_service importiert permission_resolver (Zeile 1-10). Zirkuläre Abhängigkeit.
|
||||||
- **Schweregrad:** Medium
|
- **Schweregrad:** Medium
|
||||||
- **Status:** ⏳ Nicht gefixt
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-071: permissions/contracts.py — get_contract() umgeht Registry
|
||||||
|
- **Datei:** app/plugins/builtins/permissions/contracts.py:28-33
|
||||||
|
- **Problem:** get_contract() erstellt neue Instanz statt Registry zu verwenden. Gleicher Fehler wie ARCH-061.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-072: graph_rag/contracts.py — get_contract() umgeht Registry
|
||||||
|
- **Datei:** app/plugins/builtins/graph_rag/contracts.py:28-33
|
||||||
|
- **Problem:** Gleicher Fehler wie ARCH-061 und ARCH-071.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-073: calendar/contracts.py — get_contract() umgeht Registry
|
||||||
|
- **Datei:** app/plugins/builtins/calendar/contracts.py:28-33
|
||||||
|
- **Problem:** Gleicher Fehler wie ARCH-061, ARCH-071, ARCH-072.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-074: permissions/public_routes.py — Plugin→Plugin ohne dependencies
|
||||||
|
- **Datei:** app/plugins/builtins/permissions/public_routes.py:14
|
||||||
|
- **Problem:** `from app.plugins.builtins.dms.contracts import DmsContract` — permissions hat dependencies=[] aber importiert von dms.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-075: permissions/routes.py — permissions:admin aber Manifest hat keine permissions
|
||||||
|
- **Datei:** app/plugins/builtins/permissions/routes.py:24, app/plugins/builtins/permissions/plugin.py:35
|
||||||
|
- **Problem:** Routes erfordern `permissions:admin` aber Manifest hat `permissions=[]`. Permission wird nie registriert.
|
||||||
|
- **Schweregrad:** High
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-076: mail/services.py — Core→Plugin Kette über notifications
|
||||||
|
- **Datei:** app/plugins/builtins/mail/services.py:38
|
||||||
|
- **Problem:** `from app.core.notifications import create_notification` — notifications.py importiert wiederum von plugins.builtins.contracts. Indirekte Plugin→Core→Plugin Kette.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-077: dms/routes.py — Permission Model wird beim Modul-Import geladen
|
||||||
|
- **Datei:** app/plugins/builtins/dms/routes.py:40-43
|
||||||
|
- **Problem:** `_perms_contract = get_perms_contract()` und `Permission = _perms_contract.Permission` werden beim Modul-Import ausgeführt. Wenn permissions Plugin nicht aktiv ist, schlägt der Import fehl.
|
||||||
|
- **Schweregrad:** High
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-078: dms/models.py — Spalten vor __table_args__ (SQLAlchemy Anti-Pattern)
|
||||||
|
- **Datei:** app/plugins/builtins/dms/models.py:48-51
|
||||||
|
- **Problem:** `indexed_at`, `content_tsv`, `content_text`, `embedding` werden vor `__table_args__` definiert. SQLAlchemy erwartet alle Spalten vor __table_args__, aber die Reihenfolge ist unüblich und kann zu Verwirrung führen.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-079: calendar/models.py — Spalten vor __table_args__
|
||||||
|
- **Datei:** app/plugins/builtins/calendar/models.py:52-54
|
||||||
|
- **Problem:** Gleicher Fehler wie ARCH-078.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-080: tags/models.py — Spalten vor __table_args__
|
||||||
|
- **Datei:** app/plugins/builtins/tags/models.py:27-28
|
||||||
|
- **Problem:** Gleicher Fehler wie ARCH-078.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-081: mail/models.py — MailAccount.user_id ohne ForeignKey
|
||||||
|
- **Datei:** app/plugins/builtins/mail/models.py:38
|
||||||
|
- **Problem:** `user_id: Mapped[uuid.UUID]` hat keine ForeignKey auf users.id. Datenintegrität nicht gewährleistet.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-082: knowledge/models.py — KnowledgeExtraction ohne OwnedMixin
|
||||||
|
- **Datei:** app/plugins/builtins/knowledge/models.py:16
|
||||||
|
- **Problem:** `KnowledgeExtraction(Base, TenantMixin)` — kein OwnedMixin. Kein owner_id, keine Visibility-Filterung möglich.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-083: ai_assistant/models.py — AIProvider.api_key als Plaintext
|
||||||
|
- **Datei:** app/plugins/builtins/ai_assistant/models.py:35
|
||||||
|
- **Problem:** `api_key: Mapped[str] = mapped_column(Text, nullable=False, default="")` — API-Key als Plaintext in DB. Sollte verschlüsselt sein (wie mail/models.py encrypted_password).
|
||||||
|
- **Schweregrad:** High
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-084: automation/models.py — hardcoded default LLM model
|
||||||
|
- **Datei:** app/plugins/builtins/automation/models.py:38
|
||||||
|
- **Problem:** `llm_model: Mapped[str] = mapped_column(String(100), nullable=False, default="ollama/deepseek-v4-flash")` — hardcoded Model-Name. Sollte aus Settings kommen.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|||||||
Reference in New Issue
Block a user