Consolidate CLI validation issue types - #51098
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Consolidates duplicate CLI validation models into the shared ValidationIssue type while preserving JSON fields.
Changes:
- Replaces
ErrorInfoandCompileValidationError. - Updates compile, audit, MCP, rendering, and analysis paths.
- Adds JSON compatibility tests and documentation.
Show a summary per file
| File | Description |
|---|---|
pkg/cli/validation_issue.go |
Defines the shared type. |
pkg/cli/validation_issue_test.go |
Tests JSON compatibility. |
pkg/cli/README.md |
Updates exported-type documentation. |
pkg/cli/mcp_tools_readonly.go |
Migrates MCP validation warnings. |
pkg/cli/compile_workflow_processor.go |
Migrates workflow validation issues. |
pkg/cli/compile_validation.go |
Migrates validation sanitization. |
pkg/cli/compile_repository_manifest.go |
Migrates manifest issues. |
pkg/cli/compile_pipeline.go |
Migrates pipeline issues. |
pkg/cli/compile_config.go |
Updates validation result fields. |
pkg/cli/compile_command_test.go |
Updates compile tests. |
pkg/cli/audit_test.go |
Updates audit tests. |
pkg/cli/audit_report.go |
Migrates audit issue handling. |
pkg/cli/audit_report_test.go |
Updates audit-report tests. |
pkg/cli/audit_report_render.go |
Migrates console rendering. |
pkg/cli/audit_report_analysis.go |
Migrates audit analysis. |
pkg/cli/audit_agent_output_test.go |
Updates findings tests. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 16/16 changed files
- Comments generated: 1
- Review effort level: Balanced
| return ValidationIssue{ | ||
| Type: e.Type, | ||
| Message: stringutil.SanitizeErrorMessage(e.Message), | ||
| Line: e.Line, |
|
@copilot Please address the remaining review feedback, refresh the branch if GitHub can update it cleanly, and run the Open items to address (newest first):
Branch refresh was requested. Run context: https://github.com/github/gh-aw/actions/runs/31197566542
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in the latest commit. |
|
🎉 This pull request is included in a new release. Release: |
ErrorInfoandCompileValidationErrormodeled the same validation issue shape separately inpkg/cli, with only audit reports carrying an optional file field. This PR consolidates them while preserving existing JSON field names.ValidationIssuewith commontype,message,line, and optionalfilefields.Call-site cleanup
ErrorInfoandCompileValidationErrorusages across audit extraction/rendering, findings generation, compile validation, MCP validation injection, and tests.Compatibility coverage
fileomitted for compile issues unless set.