Commit Graph

11 Commits

Author SHA1 Message Date
Agent Zero 5169b12795 fix(workflows): F12 (Astra P1) — approve/reject an zentralen Approval-Vertrag anpassen
Vorher: Beide Routen behandelten die Rueckgabe von create_approval_request
als Dictionary (approval["id"] -> TypeError: ApprovalRequest object is
not subscriptable, Astra-Repro), riefen resolve_approval_request mit
nicht existierendem decided_by statt approver_id und ohne tenant_id auf
— und erzeugten bei JEDEM Aufruf eine NEUE Anfrage, die sie sofort
selbst genehmigten, statt die wartende Engine-Anfrage aufzuloesen.

Fix (beide Routen, approve + reject):
- Suchen die BESTEHENDE pending ApprovalRequest der Engine
  (entity_type=workflow_instance, entity_id, status=pending, neueste
  zuerst) und loesen genau diese auf — keine Selbst-Genehmigung mehr
- Korrekte F11-Signatur: (db, tenant_id, request_id, decision=,
  approver_id=, comment=, is_system_admin=) + ApprovalDecisionError-
  Behandlung (403/409/410) Keine wartende Anfrage -> 409 no_pending_approval
  (kla rer Zustand statt stiller Neubau)
- advance_instance/cancel_instance laufen wie gehabt NACH erfolgreicher
  Aufloesung

Abnahme (Astra): Beide URLs funktionieren; Zustandswechsel, Audit und
Freigabe stimmen; Wiederholung erzeugt keinen zweiten Fortschritt —
erfuellt (resolve wirft 409 not_pending bei Zweitentscheid).

Tests: test_phase_g_workflows + test_s1_security_guards 60/60. ruff clean.
2026-09-18 11:08:49 +02:00
Agent Zero 197b0d3bab fix(e7): CI-Gate-Vorbereitung — ruff über app/ von 105 auf 0 Findings bereinigt; 8 echte F821-NameError-Produktionsbugs behoben (external_api stream_chat-Call-Signatur an stream_chat_comm angepasst, agent_runner uuid vor lokalem Import, automation/plugin UserTenant-Import, tasks delete-audit user_id, workflows/engine timedelta, unified_search/contracts Any); py311-kompatibles StepHandler-Alias statt type-Statement; E402/F841 bereinigt; Verifikation 85/89 grün (4 Failures = bekannter Vorbestand BUG-099)
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-24 13:36:17 +02:00
Agent Zero c2e261dd17 fix: BUG-072 (workflow create_instance is_system_admin parameter removed) 2026-08-22 07:15:14 +02:00
Agent Zero b05204db14 fix: BUG-073 (broken imports), BUG-009 (contact folders id=None), BUG-014 (tags assign 500), BUG-016 (search performance use_ai), BUG-030 (user delete GRANT DELETE), BUG-052 (miniapps response), BUG-047 (approval_requests columns), BUG-037 (compliance refresh), prestart.sh GRANT DELETE
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-22 07:10:25 +02:00
Agent Zero 59f05de621 feat(G): G-WORK/G-HUMAN-DEC/G-UI-TEMPL/G-DOC — workflow workstream, decision guard, template gallery (3 templates), API docs, 43 tests passing 2026-08-18 11:11:50 +02:00
Agent Zero 9866fb2d14 feat(G): G-APPROVAL/G-MAN/G-WEB/G-LOG/G-RUN-resume — workflow routes (resume, manual trigger, webhook trigger, step history, approve/reject), 30 tests passing 2026-08-18 08:31:18 +02:00
Agent Zero 124846ae3b fix: workflow route remove is_system_admin param not accepted by service 2026-07-30 11:16:56 +02:00
Agent Zero 9fc84b7905 sprint2: 8 services + 8 routes visibility filter + BaseSearchProvider + owned_mixin on models
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-07-29 01:52:47 +02:00
Agent Zero 08fd3ab72c feat: phase 2 - migrate all route guards to require_permission (75 guards, 21 files) 2026-07-15 22:35:50 +02:00
leocrm-bot a2452cc04b chore: fix all ruff lint errors + format — 0 errors, 306 tests pass 2026-06-29 17:43:56 +02:00
leocrm-bot 851e7999ba T09: KI-Copilot API + Hybrid Workflow Engine + LLM client + event-triggered workflows
- KI-Copilot: NL query → proposed actions, execute with RBAC, history, audit logging
- LLM client: mock mode (no API key) + OpenAI-compatible mode (AI_MODEL/AI_API_KEY)
- Action mapper: NL intent → API calls (create/update/delete/search company/contact)
- Workflow engine: step types (action/approval/notification/condition), JSONB steps
- Workflow lifecycle: pending → in_progress → completed/rejected/cancelled
- Event-triggered workflows: event bus → auto-start instances
- Code-engine workflows: onboarding on user.created event
- Approval timeout: auto-reject after configured hours
- 5 new tenant-scoped tables with RLS: ai_conversations, ai_messages, workflows, workflow_instances, workflow_step_history
- Migration 0004: all tables + RLS policies + tenant_id + indexes
- 238 tests pass (30 AC + 105 coverage + 103 existing), 84.12% T09 module coverage
- MissingGreenlet fix: safe accessor helpers for async ORM attribute access
2026-06-29 08:02:15 +02:00