14bd4e33fb
- 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
1.7 KiB
1.7 KiB
T03 — Plugin System Framework — COMPLETE ✅
Date: 2026-06-29 01:20
Commit: 7a5a48f (pushed to Forgejo)
Tests: 47/47 T03 tests pass, 103/103 full suite pass
Coverage: 85.92% for plugin modules (target: 85% ✅)
Migration: 0003_plugin_system.py applied (plugins + plugin_migrations tables)
Files Created (12 new)
- app/plugins/__init__.py, manifest.py, base.py, registry.py, migration_runner.py
- app/plugins/builtins/__init__.py, test_sample.py, migrations/0001_test_plugin.sql, migrations/0001_bad_migration.sql
- app/models/plugin.py, app/schemas/plugin.py, app/services/plugin_service.py, app/routes/plugins.py
- alembic/versions/0003_plugin_system.py
- tests/test_plugins.py (47 tests, 14 ACs + 33 unit tests)
Files Modified (8)
- app/main.py (plugins router + registry init in lifespan)
- app/models/__init_.py, app/routes/__init_.py, app/schemas/__init__.py, app/services/__init__.py
- tests/conftest.py (plugin tables in TRUNCATE list)
Bugs Fixed by Subagent
- Unterminated f-string in registry.py
- Migration runner DB connection visibility (now uses session's own connection)
- Route unregistration by path match (FastAPI wraps routes differently)
- Dollar-quote SQL splitting (flush after closing $$)
- AC11 assertion type (dict vs string for HTTPException detail)
Verification (Orchestrator Independent)
- pytest tests/test_plugins.py -v: 47/47 PASS
- pytest tests/ -v: 103/103 PASS (zero regressions)
- Coverage: 85.92% (manifest 100%, base 88%, registry 88%, migration_runner 79%)
- Migration 0003 applied via alembic upgrade head
- No forbidden patterns found
- Pushed to Forgejo: 6bf0746..7a5a48f