Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/cli/mcp_server_error_codes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ func TestMCPServer_ErrorCodes_InternalError(t *testing.T) {
if _, hasError := envelope["error"]; !hasError {
t.Errorf("Expected 'error' field in audit JSON response, got: %s", textContent.Text)
}
if _, hasRunID := envelope["run_id_or_url"]; !hasRunID {
t.Errorf("Expected 'run_id_or_url' field in audit JSON response, got: %s", textContent.Text)
if _, hasRunID := envelope["run_ids_or_urls"]; !hasRunID {
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The boolean variable name hasRunID no longer matches the key being checked (run_ids_or_urls). Consider renaming it (e.g., hasRunIDsOrURLs / hasRunIDs) to keep the assertion self-explanatory and avoid confusion when reading failures.

Suggested change
if _, hasRunID := envelope["run_ids_or_urls"]; !hasRunID {
if _, hasRunIDsOrURLs := envelope["run_ids_or_urls"]; !hasRunIDsOrURLs {

Copilot uses AI. Check for mistakes.
t.Errorf("Expected 'run_ids_or_urls' field in audit JSON response, got: %s", textContent.Text)
}
if _, hasSuggestions := envelope["suggestions"]; !hasSuggestions {
t.Errorf("Expected 'suggestions' field in audit JSON response, got: %s", textContent.Text)
Expand Down
Loading