Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Overview
The V1Store only creates 4 tables (companies, projects, workflows, workflow_versions). Many admin routes (executions, audit, IAM, permissions, logs) delegate to admin-v1-mgmt which doesn't handle those paths — they silently return 404. Add the missing tables and decompose ~20 routes into working pipeline primitives.
Reference: docs/ADMIN_CONFIG_DECOMPOSITION.md — Phase C
Depends on: Phase B (#86)
New Tables for V1Store (module/api_v1_store.go)
Add to initSchema():
| Table | Purpose |
|---|---|
workflow_executions |
Execution tracking (id, workflow_id, trigger_type, status, output_data, error_message, timestamps) |
execution_steps |
Per-step execution data (execution_id, step_name, step_type, input/output, status, sequence) |
execution_logs |
Workflow logs (workflow_id, execution_id, level, message, module_name) |
audit_log |
Audit trail (user_id, action, resource_type, resource_id, details, ip_address) |
iam_provider_configs |
IAM provider configuration (company_id, provider_type, name, config, enabled) |
iam_role_mappings |
IAM role mappings (provider_id, external_identifier, resource_type, role) |
Routes to Decompose (~20)
Execution routes (currently 404):
- GET
/admin/workflows/{id}/executions— db_query workflow_executions - GET
/admin/executions/{id}— db_query single execution - GET
/admin/executions/{id}/steps— db_query execution_steps - POST
/admin/executions/{id}/cancel— db_exec UPDATE status='cancelled' - POST
/admin/workflows/{id}/trigger— db_exec INSERT execution status='pending' - GET
/admin/workflows/{id}/status— db_query SELECT status
Log/audit routes (currently 404):
- GET
/admin/workflows/{id}/logs— db_query execution_logs - GET
/admin/audit— db_query audit_log
IAM routes (currently 404):
- GET/POST/PUT/DELETE
/admin/iam/providers/{id}— full CRUD on iam_provider_configs - POST
/admin/iam/providers/{id}/test— stub response - GET/POST
/admin/iam/providers/{id}/mappings— CRUD on iam_role_mappings - DELETE
/admin/iam/mappings/{id}
Other (currently 404):
- GET
/admin/workflows/{id}/permissions— stub empty array - GET
/admin/workflows/{id}/dashboard— workflow + execution counts - GET
/admin/workflows/{id}/events— db_query execution events
SSE streaming routes — keep as delegates with meaningful step names
Files to Modify
module/api_v1_store.go— add 6 CREATE TABLE statementsadmin/config.yaml— decompose ~20 route pipelines
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
feat: add execution/audit tables and decompose admin routes (#87)
feat: add execution/audit tables and decompose admin routes (#87) (#126)