Skip to content

feat: add execution/audit tables and decompose admin routes (#87)#126

Merged
intel352 merged 2 commits intomainfrom
feat/issue-87-admin-decomp-c
Feb 23, 2026
Merged

feat: add execution/audit tables and decompose admin routes (#87)#126
intel352 merged 2 commits intomainfrom
feat/issue-87-admin-decomp-c

Conversation

@intel352
Copy link
Contributor

Summary

Implements Phase C of admin config decomposition (closes #87).

What's included

Database tables (already in V1Store ):

  • workflow_executions — tracks workflow execution runs
  • execution_steps — individual pipeline step results
  • execution_logs — structured log entries per workflow
  • audit_log — user action audit trail
  • iam_provider_configs — IAM provider configuration
  • iam_role_mappings — external role → internal role mappings

Decomposed admin routes (already in admin/config.yaml):

  • Execution CRUD: list, get, steps, cancel, trigger
  • Workflow status query
  • Workflow logs and events (with SSE streaming delegates)
  • Permissions stubs (501 until memberships wired)
  • Audit log query
  • IAM provider CRUD + role mappings
  • Workflow dashboard with execution counts

New tests added:

  • TestV1Store_ExecutionLifecycle — insert/complete/count executions
  • TestV1Store_ExecutionStepLifecycle — insert/complete/ordering of steps
  • TestV1Store_ExecutionLogs — multi-level log insert and count
  • TestV1Store_AuditLog — audit entry insert and query
  • TestV1Store_PhaseCTablesExist — verifies all 6 Phase C tables created
  • TestV1Store_ExecutionFailure — error message propagation
  • TestLoadConfig_Parses — admin config YAML parses without error
  • TestLoadConfig_HasExpectedModules — required modules present
  • TestLoadConfig_HasWorkflows — workflows section non-empty

Verification

  • go build -o server ./cmd/server
  • go test ./... -timeout 180s
  • go vet ./...
  • go fmt ./...
  • golangci-lint run

Add tests for Phase C database tables (workflow_executions, execution_steps,
execution_logs, audit_log) and validate the admin config parses correctly.

Tests cover:
- Execution lifecycle (insert, complete, count by status)
- Execution step lifecycle (insert, complete, ordering)
- Execution logs (insert, count by level)
- Audit log (insert, query)
- Phase C table existence verification
- Execution failure handling
- Admin config parsing and module validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 23, 2026 10:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Phase C validation tests around the v1 SQLite store’s execution/audit schema and introduces basic tests ensuring the embedded admin YAML config parses and contains expected modules/workflows.

Changes:

  • Add Phase C v1 store tests covering execution lifecycle, steps, logs, audit log, and table existence.
  • Add tests verifying the embedded admin/config.yaml loads and contains required modules/workflows.
  • Minor formatting/cleanup in API plugin constructor and handler tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugins/api/plugin.go Minor constructor literal formatting cleanup.
module/query_handler_test.go Removes trailing whitespace at EOF.
module/command_handler_test.go Removes trailing whitespace at EOF.
module/api_v1_test.go Adds Phase C store/schema tests for executions/steps/logs/audit/tables.
admin/admin_test.go Adds tests for embedded admin config parsing and expected structure.

@intel352
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 23, 2026

@intel352 I've opened a new pull request, #140, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* fix: check all errors in Phase C store tests per review feedback

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
@intel352 intel352 merged commit 2c0cd78 into main Feb 23, 2026
14 checks passed
@intel352 intel352 deleted the feat/issue-87-admin-decomp-c branch February 23, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin Decomposition: Add missing DB tables & decompose broken routes (Phase C)

3 participants