You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[deep-report] Replace brittle strings.Contains(err.Error()) checks with structured errorutil helpers #54315
The Error Handling Consistency & Panic Safety report (discussion #54241, 2026-08-20) found 3 brittle strings.Contains(err.Error(), "...") checks outside test/linter fixtures that would break silently if the wrapped CLI's error text changes: pkg/cli/project_command.go:385 (INSUFFICIENT_SCOPES), pkg/cli/update_extension_check.go:439, and pkg/cli/add_interactive_git.go:22 (already merged/MERGED). Verified all three sites exist. Only add_interactive_git.go documents the exception with a nolint-style justification for the project's own errstringmatch linter convention; the other two are unflagged/inconsistent.
Expected Impact
Removes a class of silent breakage risk (wrapped CLI changing its error text drops these checks with no compile-time or lint signal) and brings all three sites in line with the project's existing errstringmatch linter convention.
Suggested Agent
New Agent — add structured error-detection helpers to pkg/cli/errorutil (e.g., typed sentinel errors or exit-code/JSON-based checks where the wrapped CLI supports them) and replace the two unflagged string-matching sites; add a nolint-style justification comment to any that remain string-based by necessity.
Activity
github-actions commentedon Aug 21, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪