feat: add execution/audit tables and decompose admin routes (#87)#126
Merged
feat: add execution/audit tables and decompose admin routes (#87)#126
Conversation
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>
Contributor
There was a problem hiding this comment.
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.yamlloads 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. |
Contributor
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Contributor
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase C of admin config decomposition (closes #87).
What's included
Database tables (already in V1Store ):
workflow_executions— tracks workflow execution runsexecution_steps— individual pipeline step resultsexecution_logs— structured log entries per workflowaudit_log— user action audit trailiam_provider_configs— IAM provider configurationiam_role_mappings— external role → internal role mappingsDecomposed admin routes (already in
admin/config.yaml):New tests added:
TestV1Store_ExecutionLifecycle— insert/complete/count executionsTestV1Store_ExecutionStepLifecycle— insert/complete/ordering of stepsTestV1Store_ExecutionLogs— multi-level log insert and countTestV1Store_AuditLog— audit entry insert and queryTestV1Store_PhaseCTablesExist— verifies all 6 Phase C tables createdTestV1Store_ExecutionFailure— error message propagationTestLoadConfig_Parses— admin config YAML parses without errorTestLoadConfig_HasExpectedModules— required modules presentTestLoadConfig_HasWorkflows— workflows section non-emptyVerification
go build -o server ./cmd/server✅go test ./... -timeout 180s✅go vet ./...✅go fmt ./...✅golangci-lint run✅