Repository Quality Improvement Report — Validation Error Consistency (2026-03-13) #20798
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-03-14T13:39:03.121Z.
|
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 Consistency
Analysis Date: 2026-03-13
Focus Area: Validation Error Consistency and Actionability (Custom)
Strategy Type: Custom
Custom Area: Yes — gh-aw has an exceptionally rich validation system (90+ validation files, 340+ error messages in
pkg/workflow/alone). This focus area targets the user experience quality of those errors: are they consistent, noise-free, and actionable enough to guide users toward a fix?Executive Summary
The gh-aw validation system is impressive in breadth and coverage, but has several consistency gaps that degrade the user experience when compilation fails. Three patterns stand out:
Timestamp noise: The structured
WorkflowValidationError,OperationError, andConfigurationErrortypes each prepend an RFC3339 timestamp (e.g.,[2026-03-13T10:30:00Z]) to their.Error()output. This is unusual for CLI tools and makes errors harder to read without adding value for end users.Missing "what to use instead" in feature-incompatibility errors: When users configure
max-turnsormax-continuationson an engine that doesn't support them, the error says "engine X does not support this feature" — but never says which engine does. Only Claude supportsmax-turns; only Copilot supportsmax-continuations.Hardcoded outdated URLs in strict_mode_validation.go: Seven error messages reference
https://github.github.com/gh-aw/reference/…— a different domain/path format from theconstants.DocsSandboxURL/DocsNetworkURLstyle used everywhere else. Missing constants (DocsSafeOutputsURL) force the workaround.Fixing these will improve error clarity without touching any logic or changing any validation behavior.
Full Analysis Report
Focus Area: Validation Error Consistency and Actionability
Current State Assessment
Metrics Collected:
fmt.Errorfinpkg/workflow/NewValidationErrorcallsstrict_mode_validation.goFindings
Strengths
mcp_config_validation.go,engine_validation.go,docker_validation.go— include rich inline YAML examples andSee:doc links in almost every errorWorkflowValidationError/OperationError/ConfigurationErrortypes have a cleanSuggestionfield architectureformatCompilerError/formatCompilerMessageprovide IDE-navigable output with file/line context — widely usedAreas for Improvement
WorkflowValidationError.Error(),OperationError.Error(),ConfigurationError.Error()all include[2026-03-13T10:30:00Z]timestamp prefixes — unnecessary noise for user-facing CLI outputvalidateMaxTurnsSupport/validateMaxContinuationsSupportinagent_validation.goreport unsupported features without naming the engine that does support them; also bypassformatCompilerErrorso the error lacks file contextstrict_mode_validation.gouses 7 hardcodedhttps://github.github.com/gh-aw/reference/…URLs that don't match any existing constant — both pointing to a different domain and lacking theDocsSafeOutputsURLconstantlabels_validation.goandrepo_memory_validation.gouse rawfmt.ErrorfwithoutformatCompilerError, losing the consistent file-context formatting other validation files provideDetailed Analysis
Timestamp noise in structured error types:
The timestamp is useful in log aggregation but actively hurts readability in a terminal. No other validator in this repo includes timestamps in the error text.
Feature-incompatibility errors without alternatives (
agent_validation.go):Hardcoded URLs in
strict_mode_validation.go:🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: The following tasks are designed for GitHub Copilot coding agent execution. Please split these into individual work items for the agent to process sequentially.
Task 1: Remove RFC3339 Timestamps from WorkflowValidationError, OperationError, and ConfigurationError
Priority: High
Estimated Effort: Small
Focus Area: Validation Error Consistency
Description:
The
Error()methods onWorkflowValidationError,OperationError, andConfigurationErrorinpkg/workflow/workflow_errors.goeach prepend an RFC3339 timestamp (e.g.,[2026-03-13T10:30:00Z]) to the error string. This is unusual for CLI tools and creates noisy output. TheTimestampfield should remain (for programmatic use / logging) but should not appear in the user-facing.Error()string.Acceptance Criteria:
WorkflowValidationError.Error()no longer includes the[timestamp]prefixOperationError.Error()no longer includes the[timestamp]prefixConfigurationError.Error()no longer includes the[timestamp]prefixTimestampfield is retained on each structpkg/workflow/continue to pass (go test ./pkg/workflow/...)make fmtpassesCode Region:
pkg/workflow/workflow_errors.goTask 2: Improve Feature-Incompatibility Errors in agent_validation.go
Priority: High
Estimated Effort: Small
Focus Area: Validation Error Actionability
Description:
validateMaxTurnsSupportandvalidateMaxContinuationsSupportinpkg/workflow/agent_validation.goproduce "not supported" errors that:fmt.Errorfinstead offormatCompilerError, so they lack file contextFix both issues:
max-turnsis supported only byclaudeenginemax-continuationsis supported only bycopilotengineAcceptance Criteria:
validateMaxTurnsSupporterror includes "Engines that support max-turns: claude" guidancevalidateMaxContinuationsSupporterror includes "Engines that support max-continuations: copilot" guidancemarkdownPath stringas a new parameter and useformatCompilerErrorfor error formattingmarkdownPathSee:link toconstants.DocsEnginesURLgo test ./pkg/workflow/...)Code Region:
pkg/workflow/agent_validation.gofmt.Errorf(...)invalidateMaxContinuationsSupportwith:Add
"github.com/github/gh-aw/pkg/constants"import if not present.Find all call sites of these two functions in the codebase and add the
markdownPathargument (search forvalidateMaxTurnsSupport(andvalidateMaxContinuationsSupport().Run
make fmtandgo test ./pkg/workflow/...to validate.Step 2: Update
pkg/workflow/strict_mode_validation.go:Add
"github.com/github/gh-aw/pkg/constants"to imports if not already present.Replace each hardcoded URL:
https://github.github.com/gh-aw/reference/safe-outputs/→constants.DocsSafeOutputsURLhttps://github.github.com/gh-aw/reference/network/#available-ecosystem-identifiers→constants.DocsNetworkURLhttps://github.github.com/gh-aw/reference/network/→constants.DocsNetworkURLhttps://github.github.com/gh-aw/reference/sandbox/→constants.DocsSandboxURLhttps://github.github.com/gh-aw/reference/engines/→constants.DocsEnginesURLRun
make fmtandgo test ./pkg/workflow/...to validate.with:
markdownPath stringto function signatures if not already present, and update all call sites.fmt.Errorf("failed to ...: %w", err)style wrapping errors unchanged.Run
make fmtandgo test ./pkg/workflow/...to validate.Beta Was this translation helpful? Give feedback.
All reactions