🎯 Repository Quality Improvement Report - Error Experience Engineering #9231
Replies: 1 comment 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Analysis Date: 2026-01-07
Focus Area: Error Experience Engineering
Strategy Type: Custom
Custom Area: Yes - This focus area addresses the holistic developer experience when errors occur in gh-aw, encompassing error message clarity, recovery paths, debugging support, visual formatting, and proactive error prevention.
Executive Summary
This analysis examines Error Experience Engineering - a custom focus area specifically designed for gh-aw's unique needs as a workflow compilation and execution platform. Unlike traditional "error handling" reviews, this assessment evaluates the complete developer experience when things go wrong, from first error encounter through resolution.
Key Findings: The codebase shows strong foundation with 809 wrapped errors (55.8%) preserving context and 295 validation errors offering suggestions. However, significant gaps exist: only 44 console-formatted error messages vs 178 raw error outputs, 51 anti-pattern fmt.Print calls to stdout, and 80 plain errors.New() calls losing context. With 1,450 error creation sites across 63 validation files (14,642 LOC), systematic improvements to error visibility, actionability, and debugging support would dramatically enhance developer experience.
Full Analysis Report
Focus Area: Error Experience Engineering
Current State Assessment
Metrics Collected:
Findings
Strengths
Areas for Improvement
Detailed Analysis
1. Error Visibility & Formatting (Critical Issue)
Problem: Only 3% of error sites use console formatting, creating inconsistent user experience.
Examples of Good Error Formatting:
Examples Found Needing Improvement:
pkg/cli/access_log.go- Raw error outputpkg/cli/actions_build_command.go- Raw error outputpkg/cli/audit_report_render.go- Raw error outputpkg/workflow/mcp_renderer.go- Uses fmt.Printf for errorspkg/workflow/cache.go- Uses fmt.Printf for warningsImpact: Users see inconsistent error presentations - some beautifully formatted with colors and structure, others as raw text dumps.
2. Error Context & Actionability
Strong Example (from validation):
Weak Example (context loss):
Gap: 80 instances of errors.New() that should wrap underlying errors with %w.
3. Debugging Support
Current State:
Missing Capabilities:
4. High-Impact Error Sites
Files with most error returns (top 5):
compiler_orchestrator.go: 44 error returnssafe_outputs_config_generation.go: 854 LOC validation (from previous analysis)mcp-config.go: 999 LOC with complex error pathsruntime_setup.go: 1,016 LOC with setup errorspermissions.go: 953 LOC with security errors5. Anti-Patterns Found
Stdout Errors (51 instances):
Raw Error Output (178 instances):
6. Validation Error Quality
Strengths:
Opportunities:
🤖 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: Console Format Error Messages in CLI Commands
Priority: High
Estimated Effort: Medium
Focus Area: Error Visibility & User Experience
Description:
Convert all raw error outputs in CLI command files to use console.FormatErrorMessage() for consistent, professional error presentation. This addresses the critical gap where only 3% of errors use proper formatting despite AGENTS.md requirements.
Acceptance Criteria:
Code Region:
pkg/cli/*_command.go,pkg/cli/audit*.go,pkg/cli/compile_*.goHigh-priority files:
pkg/cli/access_log.gopkg/cli/actions_build_command.gopkg/cli/add_command.gopkg/cli/audit.gopkg/cli/audit_report_render.gopkg/cli/compile_batch_operations.gopkg/cli/compile_helpers.gopkg/cli/compile_orchestration.goEnsure all files import "github.com/githubnext/gh-aw/pkg/console" and follow the console formatting guidelines from AGENTS.md.
Focus on these high-priority files first:
Verify no errors are printed to stdout - all should go to stderr.
Priority files with plain errors.New() usage:
Ensure wrapped errors use %w (not %v) to preserve error chains for errors.Is() and errors.As() checks.
Focus on these high-impact files:
Follow logger naming convention: "workflow:filename" (e.g., "workflow:compiler_orchestrator")
Task 5: Implement Panic Recovery for Critical Operations
Priority: Low
Estimated Effort: Small
Focus Area: Resilience & Stability
Description:
Add panic recovery mechanisms with proper error conversion for critical operations in workflow compilation, MCP server initialization, and CLI orchestration. Currently 0 defer recover() implementations exist, leaving crashes unhandled.
Acceptance Criteria:
Code Region:
pkg/workflow/compiler_orchestrator.gopkg/workflow/mcp-config.gopkg/cli/compile_command.gopkg/cli/run_command.goAdd panic recovery to these critical entry points:
Ensure recovered panics:
Next Steps
make testandmake lintafter each taskCustom Focus Area Rationale:
Error Experience Engineering was selected as a custom focus area because gh-aw is a workflow compilation and execution platform where errors are the primary interface during development. Unlike typical applications where errors are edge cases, gh-aw developers constantly encounter validation errors, configuration errors, and compilation errors. The quality of these error messages directly impacts:
This analysis revealed a significant gap between the excellent error handling foundation (55.8% wrapped errors, 295 actionable validations) and the inconsistent user experience (only 3% console formatted). By treating "error experience" holistically - covering visibility, actionability, debugging, and recovery - we can transform errors from frustrating blockers into helpful guides.
The 5 tasks prioritize immediate user-facing improvements (console formatting) → structural improvements (context preservation) → operational improvements (debug logging) → documentation → resilience (panic recovery), providing a clear path to dramatically better developer experience.
Generated by Repository Quality Improvement Agent
Next analysis: 2026-01-08 - Focus area will be selected based on diversity algorithm
Beta Was this translation helpful? Give feedback.
All reactions