From e76fe5101e96cd4513598de90b278eb965fcab28 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Apr 2026 11:28:02 +0000 Subject: [PATCH 1/2] Initial plan From 06040db074738ec9e66d8d5adf722ea3e9a82dfe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Apr 2026 11:47:21 +0000 Subject: [PATCH 2/2] refactor: rename awInfoHasMCPServers to extractMCPServerNamesFromAwInfo Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f2d50124-f902-4cb1-979e-32673e238573 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/cli/audit_expanded.go | 7 ++++--- pkg/cli/audit_expanded_test.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/cli/audit_expanded.go b/pkg/cli/audit_expanded.go index 1f08924cb8b..110535cd918 100644 --- a/pkg/cli/audit_expanded.go +++ b/pkg/cli/audit_expanded.go @@ -136,7 +136,7 @@ func extractEngineConfig(logsPath string) *EngineConfig { } // Extract MCP server names from aw_info.json steps metadata - if mcpNames, ok := awInfoHasMCPServers(logsPath); ok { + if mcpNames, ok := extractMCPServerNamesFromAwInfo(logsPath); ok { config.MCPServers = mcpNames } @@ -458,10 +458,11 @@ func buildSlowestToolCalls(calls []MCPToolCall, topN int) []MCPSlowestToolCall { return result } -// awInfoHasMCPServers checks if aw_info.json has MCP server configuration in steps. +// extractMCPServerNamesFromAwInfo extracts MCP server names from aw_info.json steps metadata +// and returns them along with a boolean indicating whether any servers were found. // We need to inspect the raw JSON since AwInfoSteps.MCPServers may not be // deserialized as a map for all formats. -func awInfoHasMCPServers(logsPath string) ([]string, bool) { +func extractMCPServerNamesFromAwInfo(logsPath string) ([]string, bool) { awInfoPath := findAwInfoPath(logsPath) if awInfoPath == "" { return nil, false diff --git a/pkg/cli/audit_expanded_test.go b/pkg/cli/audit_expanded_test.go index 874118368fa..e420ef9cb63 100644 --- a/pkg/cli/audit_expanded_test.go +++ b/pkg/cli/audit_expanded_test.go @@ -668,7 +668,7 @@ func TestAwInfoHasMCPServers(t *testing.T) { err := os.WriteFile(filepath.Join(targetDir, "aw_info.json"), []byte(tt.awInfoContent), 0644) require.NoError(t, err, "Should write aw_info.json") - names, hasMCP := awInfoHasMCPServers(tmpDir) + names, hasMCP := extractMCPServerNamesFromAwInfo(tmpDir) assert.Equal(t, tt.expectedHasMCP, hasMCP, "Has MCP servers should match") if tt.expectedHasMCP { assert.Equal(t, tt.expectedNames, names, "MCP server names should match")