Epic: Input Validation Framework #291

Open
opened 2026-03-16 01:59:21 +00:00 by freemo · 0 comments
Owner

Background and Context

The current command dispatch system in Aethyr lacks a formal parameter validation layer. Command handlers manually parse and validate input, leading to inconsistent error messages, duplicated validation logic, and brittle code. This epic introduces a comprehensive Input Validation Framework that provides a declarative Parameter DSL, a multi-step validation pipeline, object resolution with ambiguity handling, and standardized error messages — all integrated into the action middleware pipeline.

This epic falls under the Modern Command Dispatch Architecture legendary (#97) and provides the foundation for reliable, player-friendly command handling.

Expected Behavior

When complete, command handlers will declare their parameter expectations using a concise DSL. Input will flow through a 5-step validation pipeline that tokenizes, matches, type-checks, resolves references, and produces either a validated params hash or clear error messages. The framework integrates as middleware (priority 15) in the action pipeline.

Acceptance Criteria

  • A Parameter DSL supporting 12 parameter types is available to all command handlers.
  • A 5-step validation pipeline processes all command input before handler execution.
  • Object resolution handles ambiguity with player-facing disambiguation prompts.
  • Direction and player-online validators are available as specialized validators.
  • 15 standardized error message templates cover all validation failure modes.
  • ValidationMiddleware at priority 15 integrates the framework into the action pipeline.
  • All child issues are completed, reviewed, and merged.

Child Issues

All child issues for this epic are tracked as individual issues with dependency links.

Definition of Done

This issue is complete when all child issues are merged to master and the full validation framework is operational.

## Background and Context The current command dispatch system in Aethyr lacks a formal parameter validation layer. Command handlers manually parse and validate input, leading to inconsistent error messages, duplicated validation logic, and brittle code. This epic introduces a comprehensive Input Validation Framework that provides a declarative Parameter DSL, a multi-step validation pipeline, object resolution with ambiguity handling, and standardized error messages — all integrated into the action middleware pipeline. This epic falls under the **Modern Command Dispatch Architecture** legendary (#97) and provides the foundation for reliable, player-friendly command handling. ## Expected Behavior When complete, command handlers will declare their parameter expectations using a concise DSL. Input will flow through a 5-step validation pipeline that tokenizes, matches, type-checks, resolves references, and produces either a validated params hash or clear error messages. The framework integrates as middleware (priority 15) in the action pipeline. ## Acceptance Criteria - [ ] A Parameter DSL supporting 12 parameter types is available to all command handlers. - [ ] A 5-step validation pipeline processes all command input before handler execution. - [ ] Object resolution handles ambiguity with player-facing disambiguation prompts. - [ ] Direction and player-online validators are available as specialized validators. - [ ] 15 standardized error message templates cover all validation failure modes. - [ ] ValidationMiddleware at priority 15 integrates the framework into the action pipeline. - [ ] All child issues are completed, reviewed, and merged. ## Child Issues All child issues for this epic are tracked as individual issues with dependency links. ## Definition of Done This issue is complete when all child issues are merged to `master` and the full validation framework is operational.
freemo self-assigned this 2026-03-16 01:59:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#291
No description provided.