Skip to content

feat: Admin Decomposition Phase D — pre-processing steps for domain routes (#88)#129

Merged
intel352 merged 1 commit intomainfrom
feat/issue-88-admin-decomp-d
Feb 23, 2026
Merged

feat: Admin Decomposition Phase D — pre-processing steps for domain routes (#88)#129
intel352 merged 1 commit intomainfrom
feat/issue-88-admin-decomp-d

Conversation

@intel352
Copy link
Contributor

Summary

Implements Phase D+ of the admin config decomposition (issue #88): adds pre-processing pipeline steps before delegation for key domain routes.

New Pipeline Step Types

Three new config-driven pipeline step types registered in the pipelinesteps plugin:

Step Type Purpose
step.validate_path_param Validates path parameters exist and match a format (e.g. UUID)
step.validate_pagination Validates/normalises page/limit query params with configurable defaults and max
step.validate_request_body Parses JSON request body and validates required fields are present

Updated Admin Routes

Pre-processing steps added before delegation on 7 routes:

Execution routes (admin-queries):

  • GET /executions — pagination validation (max 100, default 20)
  • GET /executions/{id} — UUID format validation on path param
  • GET /executions/{id}/steps — UUID validation + pagination validation

DLQ routes (admin-commands):

  • POST /dlq/{id}/retry — path param parse → UUID validation → rate limit (30/min)
  • POST /dlq/{id}/discard — path param parse → UUID validation → rate limit (30/min)

Engine routes (admin-commands):

  • POST /engine/reload — rate limit (5/min, burst 2) → audit log before delegate
  • POST /engine/validate — request body validation (requires config field)

Testing

  • All new step types have comprehensive unit tests
  • All existing tests pass (go test ./...)
  • golangci-lint run reports 0 issues

Closes #88

… domain routes (#88)

Add three new pipeline step types for request pre-processing:
- step.validate_path_param: validates path parameters exist and match format (UUID)
- step.validate_pagination: validates/normalises page/limit query params with defaults
- step.validate_request_body: parses JSON body and validates required fields

Update admin/config.yaml with pre-processing steps on key domain routes:
- GET /executions: pagination validation before delegate
- GET /executions/{id}: UUID format validation after path param extraction
- GET /executions/{id}/steps: ID validation + pagination validation
- POST /dlq/{id}/retry: path parse, UUID validation, rate limiting before delegate
- POST /dlq/{id}/discard: path parse, UUID validation, rate limiting before delegate
- POST /engine/reload: rate limiting (5 req/min) + audit logging before delegate
- POST /engine/validate: request body validation (requires config field) before delegate

Register all three new step types in the pipelinesteps plugin alongside existing
generic step types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 23, 2026 11:22
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

This PR implements Phase D+ of the admin config decomposition by adding three new pre-processing pipeline step types (step.validate_path_param, step.validate_pagination, step.validate_request_body) and applying them to 7 domain routes in the admin API configuration.

Changes:

  • Three new pipeline step types registered in the pipelinesteps plugin for input validation before delegation
  • Pre-processing steps added to engine management routes (body validation, rate limiting, audit logging)
  • Pre-processing steps added to execution query routes (UUID validation, pagination validation)
  • Pre-processing steps added to DLQ command routes (UUID validation, rate limiting)

Reviewed changes

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

Show a summary per file
File Description
plugins/pipelinesteps/plugin.go Registered three new step types and updated plugin description/manifest
plugins/pipelinesteps/plugin_test.go Updated test expectations to reflect 16 total step factories
module/pipeline_step_validate_path_param.go Implemented path parameter validation with UUID format checking
module/pipeline_step_validate_path_param_test.go Comprehensive tests for path parameter validation
module/pipeline_step_validate_pagination.go Implemented pagination query parameter validation with defaults
module/pipeline_step_validate_pagination_test.go Comprehensive tests for pagination validation
module/pipeline_step_validate_request_body.go Implemented JSON body parsing and required field validation
module/pipeline_step_validate_request_body_test.go Comprehensive tests for request body validation
admin/config.yaml Added pre-processing steps to 7 admin routes (engine validate/reload, executions list/get/steps, DLQ retry/discard)
plugins/api/plugin.go Formatting change (multi-line constructor for newWorkflowRegistry)
module/query_handler_test.go Removed trailing blank line
module/command_handler_test.go Removed trailing blank line

@intel352 intel352 merged commit 62bc896 into main Feb 23, 2026
18 checks passed
@intel352 intel352 deleted the feat/issue-88-admin-decomp-d branch February 23, 2026 14:10
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: Rename delegate steps & add pre-processing for domain routes (Phase D)

2 participants