🎯 Repository Quality Improvement: Validation Error Experience #10683
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-01-26T13:30:04.725Z. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🎯 Repository Quality Improvement Report - Validation Error Experience
Analysis Date: 2026-01-19
Focus Area: Validation Error Experience
Strategy Type: Custom
Custom Area: Yes - This focus area is specific to gh-aw's core function as a workflow compiler with extensive validation
Executive Summary
gh-aw has invested significantly in validation infrastructure (83 validation files, 20,492 LOC, 205 test cases), demonstrating a strong commitment to workflow correctness. The repository includes sophisticated error types (
ValidationError,ConfigurationError,OperationError) with structured fields for suggestions and context. However, analysis reveals that while the validation infrastructure is excellent, the user-facing error experience has inconsistencies that could impact developer productivity when workflows fail validation.Key Findings:
console.FormatErrorMessagevs 1,122 directfmt.Fprintlncalls in CLIfmt.Errorfinstead ofValidationErrorThe validation system is technically sound, but error message consistency, actionability, and discoverability could be significantly improved to reduce user friction when debugging failed workflows.
Full Analysis Report
Focus Area: Validation Error Experience
Current State Assessment
gh-aw's validation system is one of the most comprehensive in the repository, reflecting the critical importance of ensuring workflows compile correctly before execution. The analysis examined error message quality, consistency, and user-facing presentation across 83 validation files.
Metrics Collected:
Findings
Strengths
Sophisticated Error Infrastructure
ValidationError,ConfigurationError,OperationError) with dedicated fields for suggestions and contextValidateRequired,ValidateMaxLength,ValidateInList, etc.)Quality Testing
error_message_quality_test.gothat validates error messages contain examples and aren't too vagueMCP Validation Leadership
"tool '%s' mcp configuration property '%s' must be a string, got %T. Example:\nmcp-servers:\n %s:\n %s: \"my-value\""Troubleshooting Documentation
copilot-schema-validation-error.md,copilot-schema-validation-deep-analysis.md)Areas for Improvement
Suggestion Underutilization (Critical)
ValidationErrorhaving aSuggestionfield, only 1 out of 88 usages (1%) provides explicit suggestionsfmt.Errorfinstead of structuredValidationErrortypeConsole Formatting Inconsistency
console.FormatErrorMessagecalls but 1,122 directfmt.Fprintln(os.StderrcallsError Terseness
"invalid engine"without listing valid optionsBypass of Structured Error Types
fmt.Errorfdirectly instead ofNewValidationError()or similar constructorsreturn fmt.Errorf("invalid mount at index %d", i)instead of usingValidationErrorREADME Validation Guidance
Detailed Analysis
Error Message Quality Patterns
Excellent Example (MCP Validation):
✅ Shows what's wrong, why it's wrong, valid values, and a concrete example
Room for Improvement (Sandbox Validation):
ValidationErrorwith suggestion fieldInconsistent Pattern:
Test Coverage vs Error Quality
The
error_message_quality_test.gofile demonstrates awareness of error quality importance, testing that errors:However, these quality standards aren't consistently applied across all 83 validation files.
🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: The following tasks are designed for GitHub Copilot agent execution. Please split these into individual work items for Claude to process.
Improvement Tasks
The following code regions and tasks should be processed by the Copilot agent. Each section is marked for easy identification by the planner agent.
Task 1: Standardize Validation Errors to Use Structured Types
Priority: High
Estimated Effort: Large
Focus Area: Validation Error Infrastructure
Description:
Convert validation errors across the codebase from plain
fmt.Errorfto structured error types (ValidationError,ConfigurationError,OperationError). This ensures all validation errors include proper suggestions, context, and formatting.Acceptance Criteria:
fmt.Errorfin validation filesCode Region:
pkg/workflow/*validation*.goPriority files:
Testing:
After changes, test with intentionally invalid workflows to verify error messages display with proper formatting (colors, structure, readability).
[timestamp] Validation failed for field 'field-name'
Value: actual-value
Reason: explanation of what's wrong
Suggestion: how to fix it (with example if applicable)
2. MCP Server Configuration Errors
Error:
tool 'xyz' missing required property 'command'Fix: Specify either
commandorcontainerfor stdio-type MCP serversExample:
3. Safe Outputs Domain Validation
Error:
invalid domain patternFix: Use specific domain patterns (wildcards allowed)
Example:
Detailed Troubleshooting
For in-depth troubleshooting guides, see:
Debugging Tips
gh aw compile --verbose workflow.mdInvalid:
MCP Server Configuration Errors
Missing Required Property
Error Pattern:
tool 'xyz' missing required property 'command'Cause: MCP server configuration is missing a required field.
Solution: Specify either
command(for host execution) orcontainer(for containerized execution).Type Property Errors
Error Pattern:
tool 'xyz' mcp configuration 'type' must be a string, got intCause: The
typefield must be a string value.Valid Types:
stdio,http,local(deprecated, treated asstdio)Solution:
[Continue with all validation error categories...]
For each category:
Goal: Increase test coverage from 10 to 30+ validation error scenarios, ensuring all errors meet quality standards.
Beta Was this translation helpful? Give feedback.
All reactions