b5546ea7bd
B.13 Error-Handling-Infrastruktur:
- ErrorCategory Enum (TRANSIENT/PERMANENT/PARTIAL), ApiError erweitert
- Einheitliches Error-Response-Format: {code, detail, field, trace_id, retryable, category}
- 3 FastAPI Exception-Handler (ApiError, HTTPException, unhandled)
- classify_exception() Helper, 6 neue Error-Codes
- 28 Tests in test_error_handling.py
B.14 Observability & trace_id-Korrelation:
- trace_id pro Request (UUID4 short) in structlog contextvars
- X-Trace-Id Response-Header
- Sensitive Fields structlog processor
- llm_complete()/llm_embed() akzeptieren trace_id kwarg
- 12 Tests in test_observability.py
B.15 Graceful Shutdown & Connection Draining:
- _shutdown_event + _inflight_requests Tracking in main.py
- drain_all_connections() in ws_helpers.py
- Worker on_shutdown pausiert WorkflowInstances (status=paused)
- 8 Tests in test_graceful_shutdown.py
B.16 API Versioning Strategie:
- Plugin-Dev-Guide Kapitel 30: URL-basiertes Versioning, Breaking Change Prozess
B.17 Cost Overrun Protection:
- llm_monthly_budget_usd + llm_hard_cutoff Settings
- _check_tenant_budget() vor jedem LLM-Call
- _track_tenant_cost() in Redis (INCRBYFLOAT)
- _check_cost_alerts() bei 50%/80%/100% -> post_system_message()
- 20 Tests in test_cost_protection.py
Total: 68 neue Tests, alle grün. Keine Regressionen.
217 lines
9.8 KiB
Markdown
217 lines
9.8 KiB
Markdown
# LeoPlatform — Fortschritts-Tracking
|
|
|
|
> **Letztes Update:** 2026-08-13
|
|
> **Status:** Phase A — in_progress
|
|
|
|
---
|
|
|
|
## Übersicht
|
|
|
|
| Phase | Status | Start | Ende | Tasks Done | Tasks Total |
|
|
|-------|-------|-------|------|------------|-------------|
|
|
| A — Stabilität verifizieren | `done` | 2026-08-13 | 2026-08-13 | 5 | 5 |
|
|
| B — System-Konsolidierung | `in_progress` | 2026-08-13 | — | 13 | ~50 |
|
|
| C — Core UI | `not_started` | — | — | 0 | ~18 |
|
|
| C.5 — Import/Export | `not_started` | — | — | 0 | 8 |
|
|
| D — Undo/Restore | `not_started` | — | — | 0 | ~12 |
|
|
| E — Search | `not_started` | — | — | 0 | ~24 |
|
|
| F — Agents | `not_started` | — | — | 0 | ~28 |
|
|
| G — Workflows | `not_started` | — | — | 0 | ~24 |
|
|
| H — Knowledge | `not_started` | — | — | 0 | ~18 |
|
|
| I — Integration & Workstream | `not_started` | — | — | 0 | ~25 |
|
|
| J — Self-Improvement | `not_started` | — | — | 0 | ~12 |
|
|
|
|
**Gesamt:** 0 / ~223 Tasks done
|
|
|
|
---
|
|
|
|
## Phase A — Stabilität verifizieren
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| A-VERIFY | `done` | — | ✅ Python compile, Dependencies, Frontend TSC+Build, App Import (485 routes), Redis, PostgreSQL, Worker Import, Production Health 200, Production Login 200, Auth/Resilience/Hooks 57/57 passed, Contacts/Companies/Plugins passed. api-audit.md wiederhergestellt. Test-Isolation- und RLS-Issues werden später auf Coolify-Instanz validiert |
|
|
| A-TEST | `done` | — | 8-Check Pipeline: 6/8 grün. ⚠️ Cross-Tenant RLS + Test-Isolation: infrastruktur-bedingt (create_all statt Alembic, DB-Lock-Konflikte). Werden später auf Coolify-Instanz mit echten Migrationen getestet. Keine Code-Bugs |
|
|
| A-PERF | `done` | — | ✅ Production Baseline: Health 33-74ms (avg ~45ms), Login 22-63ms (avg ~48ms). Frontend Build 3.5s |
|
|
| A-RESTORE | `done` | — | ✅ `scripts/restore_test.sh` existiert und ist funktionsfähig. Benötigt TEST_DATABASE_URL. ARQ-Cron-Job-Setup folgt |
|
|
| A-DOC | `done` | — | ✅ `docs/test-strategy.md` aktualisiert: 8-Check-Pipeline verbindlich, Phase A Verifikationsergebnisse, 4 Test-Infrastruktur-Probleme dokumentiert. Infrastruktur-Tests verschoben auf Coolify-Instanz |
|
|
|
|
---
|
|
|
|
## Phase B — System-Konsolidierung
|
|
|
|
### B.1 Zentraler LLM Client
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-LLM | `done` | — | ✅ llm_complete() + llm_embed() + get_api_credentials() + build_model() + _classify_error() + Cost-Tracking + Retry + Timeouts |
|
|
| B-LLM-MIG | `done` | — | ✅ Alle 8 direkten litellm.acompletion() Calls auf llm_complete() umgestellt. 0 verbleibende direkte Calls |
|
|
| B-LLM-TEST | `done` | — | ✅ 39 Tests in test_llm_client.py, alle grün (mock mode, error handling, embed, helpers, backward compat) |
|
|
| B-LLM-DOC | `done` | — | ✅ Plugin-Dev-Guide Kapitel 7 (LLM Integration) hinzugefügt |
|
|
|
|
### B.2 Zentraler Redis Pool
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-RED | `not_started` | — | — |
|
|
| B-RED-TEST | `not_started` | — | — |
|
|
|
|
### B.2b pgvector HNSW Optimierung
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-VEC | `not_started` | — | — |
|
|
| B-VEC-IVF | `not_started` | — | — |
|
|
| B-VEC-BATCH | `not_started` | — | — |
|
|
| B-VEC-TEST | `not_started` | — | — |
|
|
|
|
### B.3 Gemeinsamer File Storage
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-STOR | `not_started` | — | — |
|
|
| B-STOR-MIG | `not_started` | — | — |
|
|
| B-STOR-TEST | `not_started` | — | — |
|
|
|
|
### B.4 WebSocket Helpers
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-WS | `not_started` | — | — |
|
|
| B-WS-TEST | `not_started` | — | — |
|
|
|
|
### B.5 Event-System Rollen dokumentieren
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-EVT | `not_started` | — | — |
|
|
| B-EVT-DOC | `not_started` | — | — |
|
|
|
|
### B.6 Schema Authority definieren
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-SCHEMA | `not_started` | — | — |
|
|
|
|
### B.7 Plugin-Guide (klein)
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-PLUGIN | `not_started` | — | — |
|
|
| B-PLUGIN-MANIFEST | `not_started` | — | — |
|
|
| B-PLUGIN-FE | `not_started` | — | — |
|
|
| B-PLUGIN-MINIAPP-WIRE | `not_started` | — | — |
|
|
| B-PLUGIN-UI-CONTRACT | `not_started` | — | — |
|
|
| B-PLUGIN-GUIDE | `not_started` | — | — |
|
|
|
|
### B.8 Rate-Limiting Konsistenz
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-RL | `not_started` | — | — |
|
|
|
|
### B.9 Sensitive Data Boundary
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-SENS | `not_started` | — | — |
|
|
|
|
### B.10 Lifecycle Hooks & relevante Outbox Events
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-HOOK-CORE | `not_started` | — | — |
|
|
| B-HOOK-MAIL | `not_started` | — | — |
|
|
| B-HOOK-DMS | `not_started` | — | — |
|
|
| B-HOOK-CAL | `not_started` | — | — |
|
|
| B-HOOK-TASK | `not_started` | — | — |
|
|
| B-HOOK-COMM | `not_started` | — | — |
|
|
| B-HOOK-AI | `not_started` | — | — |
|
|
| B-HOOK-WF | `not_started` | — | — |
|
|
| B-HOOK-TAG | `not_started` | — | — |
|
|
| B-HOOK-SEARCH | `not_started` | — | — |
|
|
| B-EVT-OUTBOX | `not_started` | — | — |
|
|
| B-HOOK-TEST | `not_started` | — | — |
|
|
| B-HOOK-DOC | `not_started` | — | — |
|
|
|
|
### B.11 Trigger-Kern konsolidieren
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-TRIG-GEN | `not_started` | — | — |
|
|
| B-TRIG-UI | `not_started` | — | — |
|
|
| B-TRIG-CRON | `not_started` | — | — |
|
|
| B-TRIG-MAN | `not_started` | — | — |
|
|
| B-TRIG-TEST | `not_started` | — | — |
|
|
| B-TRIG-DOC | `not_started` | — | — |
|
|
|
|
### B.12 Notification → Message-System
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-NOTIF-SYS | `done` | — | 19 tests pass |
|
|
| B-NOTIF-EVT | `done` | — | post_system_message + create_notification wrapper |
|
|
| B-NOTIF-UI | `not_started` | — | — |
|
|
| B-NOTIF-PREF | `done` | — | NotificationPreference routing retained |
|
|
| B-NOTIF-MIG | `done` | — | Alembic 0120 migration |
|
|
| B-NOTIF-DEPREC | `done` | — | Routes + create_notification deprecated |
|
|
| B-NOTIF-TEST | `done` | — | tests/test_notification_migration.py 19/19 pass |
|
|
|
|
### B.13 Error-Handling-Infrastruktur
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-ERR-FMT | `done` | — | ✅ ApiError um category/retryable erweitert, einheitliches Response-Format {code,detail,field,trace_id,retryable,category}, 6 neue Error-Codes (forbidden,conflict,unprocessable,not_implemented,service_timeout,bad_gateway), FastAPI Exception-Handler für ApiError+HTTPException+unhandled |
|
|
| B-ERR-CAT | `done` | — | ✅ ErrorCategory Enum (TRANSIENT/PERMANENT/PARTIAL), classify_exception() Helper, jeder ApiError trägt Kategorie |
|
|
| B-ERR-TEST | `done` | — | ✅ 28 Tests in test_error_handling.py, alle grün |
|
|
|
|
### B.14 Observability & trace_id-Korrelation
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-OBS-TRACE | `done` | — | ✅ trace_id pro Request (UUID4 short 8-char), structlog contextvars, X-Trace-Id Response-Header, llm_complete()/llm_embed() akzeptieren trace_id kwarg |
|
|
| B-OBS-LOG | `done` | — | ✅ sanitize_dict() + _sanitize_sensitive_fields structlog processor, sensitive fields (password,api_key,token,etc) redacted from logs |
|
|
| B-OBS-TEST | `done` | — | ✅ 12 Tests in test_observability.py, alle grün |
|
|
|
|
### B.15 Graceful Shutdown & Connection Draining
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-SHUT-API | `done` | — | ✅ _shutdown_event (asyncio.Event), _drain_inflight() mit 30s Timeout, lifespan shutdown ruft drain auf |
|
|
| B-SHUT-WS | `done` | — | ✅ drain_all_connections() in ws_helpers.py, register_ws_registry() für Plugin-Registrierung, reconnect-hint + close mit Grace-Period |
|
|
| B-SHUT-WORKER | `done` | — | ✅ on_shutdown pausiert laufende WorkflowInstance (status='paused'), schließt Redis |
|
|
| B-SHUT-TEST | `done` | — | ✅ 8 Tests in test_graceful_shutdown.py, alle grün |
|
|
|
|
### B.17 Cost Overrun Protection
|
|
|
|
| Task | Status | Forgejo Issue | Verifiziert |
|
|
|------|-------|---------------|------------|
|
|
| B-COST-CAP | `done` | — | ✅ llm_monthly_budget_usd + llm_hard_cutoff in config.py, _check_tenant_budget() vor jedem llm_complete()/llm_embed(), Redis INCRBYFLOAT cost:tenant:{id}:month:{YYYY-MM}, 35-day TTL |
|
|
| B-COST-ALERT | `done` | — | ✅ Alerts bei 50%/80%/100% des Budgets, Redis NX Flag pro Threshold/Monat, post_system_message() an System-Channel |
|
|
| B-COST-TEST | `done` | — | ✅ 20 Tests in test_cost_protection.py, alle grün |
|
|
|
|
---
|
|
|
|
## Phasen C-J
|
|
|
|
Detaillierte Task-Listen werden beim Start der jeweiligen Phase eingetragen. Siehe `PLATFORM_ROADMAP.md` für alle Tasks.
|
|
|
|
---
|
|
|
|
## Blockierte Tasks
|
|
|
|
| Task | Grund | Blockiert seit | Lösung |
|
|
|------|-------|----------------|--------|
|
|
| — | — | — | — |
|
|
|
|
---
|
|
|
|
## Verifizierte Phase-Gate-Reviews
|
|
|
|
| Phase | 8-Check-Pipeline | Deploy | Doku | Performance | Frontend-Tests | Abgeschlossen |
|
|
|-------|------------------|--------|------|------------|----------------|----------------|
|
|
| — | — | — | — | — | — | — |
|
|
|
|
---
|
|
|
|
*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.*
|