-
Notifications
You must be signed in to change notification settings - Fork 181
Closed as not planned
Labels
Description
Description
Compiler files have inconsistent error wrapping patterns. Some files properly wrap errors with %w (89% in compiler_jobs.go) while others only wrap 50% of errors (compiler_yaml_main_job.go). Standardizing error wrapping improves error traceability and debugging.
Current State
compiler_yaml_main_job.go: 1/2 errors wrapped (50%)compiler_activation_jobs.go: 4/4 errors wrapped (100%) ✅- Issue: Line 66 in
compiler_yaml_main_job.go- error only logged, not returned
Example Issues
Before (Line 66):
if err != nil {
compilerYamlLog.Printf("Warning: failed to marshal repository imports: %v", err)
}After:
if err != nil {
return fmt.Errorf("failed to marshal repository imports for merge step: %w", err)
}Suggested Changes
- Audit all
fmt.Errorfcalls in compiler files - Ensure consistent
%wusage when wrapping errors - Fix line 66 in
compiler_yaml_main_job.go- return error instead of just logging - Add error context where missing
Files Affected
pkg/workflow/compiler_yaml_main_job.go(1 error needs fixing)pkg/workflow/compiler_activation_jobs.go(9 missing %w - if not already fixed)- Other compiler files in
pkg/workflow/compiler_*.go(audit needed)
Success Criteria
- All
fmt.Errorfcalls use%wwhen wrapping errors - No errors are only logged without being returned
- All existing tests continue to pass
- Error messages include helpful context
Priority
High - Improves error traceability and debugging experience
Estimated Effort
30-60 minutes
Source
Extracted from:
- Daily Compiler Code Quality Report - Feb 6 (#14159)
- Daily Compiler Code Quality Report - Feb 5 (#13934)
Listed as "Immediate Action" in both compiler quality reports.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 7, 2026, 9:07 PM UTC
Reactions are currently unavailable