Objective
Enhance error messages in pkg/workflow/runtime_setup.go to provide better context and actionable guidance. Currently, the file contains generic "failed to" error messages that wrap underlying errors without sufficient context.
Context
Related to #4085 - Repository Quality Improvement Report on Workflow Compilation Error Messages.
Runtime setup errors impact users working with custom workflow steps. Better error messages will help users debug configuration issues more efficiently.
Approach
Update error messages to provide better context for wrapped errors:
- "failed to parse custom steps" → Explain what custom steps are and show example
- "failed to marshal deduplicated steps" → Explain deduplication and its purpose
- Add context about which part of runtime setup failed
- Provide examples of valid runtime configurations
Even for wrapped errors, add meaningful context about what was being attempted and why it matters.
Files to Modify
- Update:
pkg/workflow/runtime_setup.go
- Update:
pkg/workflow/runtime_setup_test.go (add error message tests)
Example Transformations
Before:
fmt.Errorf("failed to parse: %w", err)
After:
fmt.Errorf("failed to parse custom workflow steps from frontmatter. Custom steps must be valid GitHub Actions step syntax. Example:\nsteps:\n - name: Setup\n run: echo 'hello'\nError: %w", err)
Before:
fmt.Errorf("failed to marshal: %w", err)
After:
fmt.Errorf("failed to marshal deduplicated workflow steps. Step deduplication removes duplicate step definitions to optimize workflow size. Error: %w", err)
Acceptance Criteria
Priority
Medium - Improves debugging experience for users with custom workflow steps.
Related to #4085
AI generated by Plan Command for discussion #4085
Objective
Enhance error messages in
pkg/workflow/runtime_setup.goto provide better context and actionable guidance. Currently, the file contains generic "failed to" error messages that wrap underlying errors without sufficient context.Context
Related to #4085 - Repository Quality Improvement Report on Workflow Compilation Error Messages.
Runtime setup errors impact users working with custom workflow steps. Better error messages will help users debug configuration issues more efficiently.
Approach
Update error messages to provide better context for wrapped errors:
Even for wrapped errors, add meaningful context about what was being attempted and why it matters.
Files to Modify
pkg/workflow/runtime_setup.gopkg/workflow/runtime_setup_test.go(add error message tests)Example Transformations
Before:
After:
Before:
After:
Acceptance Criteria
Priority
Medium - Improves debugging experience for users with custom workflow steps.
Related to #4085