Repository navigation
[repository-quality] Repository Quality Improvement Report - Error Message Quality and Context #69038
Replies: 0 comments
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 - Error Message Quality and Context
Analysis Date: 2026-10-15
Focus Area: Error Message Quality and Context
Strategy Type: Custom
Custom Area: Yes - 4,400+ error constructions and custom linters (errorfwrapv, errstringmatch) make error consistency a repo-specific concern.
Executive Summary
Error handling is generally healthy: 2,036 of 3,477
fmt.Errorfcalls wrap with%w,%v-with-error misuse exists only in linter testdata, anderrors.Is/Asis used (206 sites). User-facing validation errors usually include hints and examples (e.g.pkg/cli/spec.go).Main gaps: ~1,461 bare
return errinpkg/cliandpkg/workflowlose context (hot spots:workflow/safe_outputs_max_validation.go60,cli/work_command.go43,workflow/compiler_orchestrator_workflow.go29,cli/mcp_schema.go29); 34 capitalizedErrorfmessages; 69 short bareerrors.Newstrings; no package-level sentinel errors; one remainingstrings.Contains(err.Error()).Full Analysis Report
Current State Assessment
Metrics Collected:
cli/update_extension_check.go:439)workflow/agentic_engine.go:674Findings
Strengths
%wand discourage string matching.Areas for Improvement
unknown engine: %sdoes not list valid engines.🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: Split the following tasks into individual work items.
Improvement Tasks
Task 1: Add context to bare error returns in hot-spot files
Priority: High
Estimated Effort: Medium
Focus Area: Error Message Quality
Description: Wrap bare
return errin the four highest-count files where the callee does not already add context.Acceptance Criteria:
Code Region:
pkg/workflow/safe_outputs_max_validation.go,pkg/cli/work_command.go,pkg/workflow/compiler_orchestrator_workflow.go,pkg/cli/mcp_schema.goTask 2: Improve unknown-engine error with valid options
Priority: Medium
Estimated Effort: Small
Focus Area: Usability
Description:
unknown engine: %sshould list supported engines.Acceptance Criteria:
Code Region:
pkg/workflow/agentic_engine.go:674Task 3: Audit capitalized error messages
Priority: Low
Estimated Effort: Small
Focus Area: Code Quality
Description: 34
fmt.Errorfmessages start with a capital letter; lowercase those that are not proper nouns or acronyms.Acceptance Criteria:
Code Region:
pkg/**/*.go(grep for Errorf with a leading capital)Task 4: Introduce sentinel errors for branching on errors
Priority: Medium
Estimated Effort: Medium
Focus Area: Code Organization
Description: Replace the string match in
update_extension_check.go:439with sentinels anderrors.Is; define sentinels for repeated bare errors callers branch on (e.g. no releases found).Acceptance Criteria:
strings.Contains(err.Error(), ...)inupdate_extension_check.goCode Region:
pkg/cli/update_extension_check.go,pkg/cli/update_workflows.go,pkg/cli/run_push.go📊 Historical Context
Previous Focus Areas
🎯 Recommendations
Immediate Actions (This Week)
Short-term Actions (This Month)
Long-term Actions (This Quarter)
📈 Success Metrics
Next Steps
Generated by Repository Quality Improvement Agent
Next analysis: 2026-10-16 — Focus area selected by diversity algorithm
All reactions