[log] Add debug logging to mcp/connection.go helper functions - #9748
Conversation
Add logConn debug calls to four underlogged helper functions in internal/mcp/connection.go: - normalizeConnectTimeout: log when falling back to default timeout - ServerInfo: log session availability and resolved server name/version - BackendHasPromptsCapability: log session availability and capability result - requireSDKSession: log when SDK session is missing (error path) These calls help diagnose connection lifecycle issues — e.g. why prompts/list is skipped for a backend, what server version was negotiated, or why a request fails with "SDK session not available". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds targeted debug diagnostics for MCP connection lifecycle helpers.
Changes:
- Logs timeout fallback decisions.
- Logs SDK session, server metadata, and prompts capability states.
Show a summary per file
| File | Description |
|---|---|
internal/mcp/connection.go |
Adds connection helper debug logging. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Medium
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS Gateway enforces read-only via tool allowlist (22 read-only tools only). Write tools are absent from the gateway-served tool registry. References: §29788630040
|
🔒 mcpg Read-Only Stress — gvisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Notes:
Overall: ✅ PASS
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS Run: §29788630019
|
Add logConn debug calls to four underlogged helper functions in internal/mcp/connection.go: normalizeConnectTimeout, ServerInfo, BackendHasPromptsCapability, and requireSDKSession. Helps diagnose connection lifecycle issues like timeout fallbacks, server version negotiation, prompts capability detection, and missing SDK session errors.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.