chore(mcp): remove temporary HTTP diagnostics#5795
Conversation
Reverts the temporary McpHttpDiag instrumentation from #5782 now that it has served its purpose: it confirmed the OAuth fetch fix (#5789) makes the flow reach and complete the token exchange, and it isolated a separate, pre-existing transport-initialize stall (Gauge returns 200 + session then no body for 30s, reproducible only from the staging egress — not from a fresh IP, and not with the SDK/h2/pinning/tee in isolation). - Delete apps/sim/lib/mcp/http-diagnostics.ts. - Restore client.ts transport fetch to `...(pinned ? { fetch: pinned.fetch } : {})`. - Restore oauth/auth.ts fetchFn to the plain SSRF-guarded default. - Drop the diagnostic-specific test assertion. Removes the body tee() from the transport hot path so the streamable-HTTP connection runs clean while the transport stall is investigated separately.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
The OAuth transport test expectation drops the diagnostic-only Reviewed by Cursor Bugbot for commit be2038d. Configure here. |
Greptile SummaryThis PR removes temporary MCP HTTP diagnostics and restores the earlier fetch paths.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "chore(mcp): remove temporary HTTP diagno..." | Re-trigger Greptile |
Summary
McpHttpDiaginstrumentation added in diag(mcp): comprehensive HTTP logging for OAuth + streamable-HTTP transport #5782. It did its job: it confirmed the OAuth fetch fix (fix(mcp): bound and tear down one-shot OAuth fetches so auth can't hang #5789) makes the flow reach and complete the token exchange (200, tokens saved, "Server Authorized"), and it isolated a separate, pre-existing transport-initializestall — Gauge returns200 application/json+Mcp-Session-Idthen sends no body for 30s, reproducible only from the staging egress IP (a fresh IP + the real SDK + h2 + pinning + even the diagnostic's bodytee()all connect in ~600ms).client.tsandoauth/auth.tsto their exact pre-diagnostic form and deleteshttp-diagnostics.ts. Also removes thetee()from the transport hot path so the streamable-HTTP connection runs clean while the transport stall is investigated on its own.What changed
apps/sim/lib/mcp/http-diagnostics.ts(−176).client.ts: transport fetch back to...(pinned ? { fetch: pinned.fetch } : {})(identical to pre-diag(mcp): comprehensive HTTP logging for OAuth + streamable-HTTP transport #5782).oauth/auth.ts:fetchFnback tooptions.fetchFn ?? createSsrfGuardedMcpFetch().client.test.ts: drop the diagnostic-onlyfetch: expect.any(Function)assertion (identical to pre-diag(mcp): comprehensive HTTP logging for OAuth + streamable-HTTP transport #5782).sanitizeUrlForLogandgetMcpSafeErrorDiagnostics— pre-existing shared utils with other consumers.Type of Change
Testing
lib/mcpsuite green (371 tests); tsc clean; biome clean.client.ts/client.test.tsare byte-identical to the pre-diagnostic originals;auth.tsdiffers only in biome line-wrapping.Checklist