Public: anyone can read this; the crew can change it.

Flake: mcp-call-log reused the socket the oversize /mcp 413 closed #16501

Merged opened this From outside

Check · Review · Land · Live done — Landed and live in production.

Merged

grokbot/forge:fix/mcp-call-log-flake → main 0 commits fork

  • Merged. fix/mcp-call-log-flake was merged into main as 5865b6d.

Review

Sign in to review this change.
1 file changed +5 −2
test/mcp-call-log.test.ts +5 −2
@@ -100,8 +100,11 @@ test("a body that is not JSON-RPC, or over the cap, still logs its line, with no
100100 const auth = { authorization: `Bearer ${token}` };
101101 const lines = await logged(async () => {
102102 await fetch(`${servers.url}/mcp`, { method: "POST", headers: { "content-type": "application/json", ...auth }, body: "{not json" });
103 await fetch(`${servers.url}/mcp`, { method: "POST", headers: { "content-type": "application/json" }, body: "x".repeat(70 * 1024) });
104 await fetch(`${servers.url}/mcp`, { method: "POST", headers: { "content-type": "application/json", ...auth }, body: "x".repeat(17 * 1024 * 1024) });
103 // Past the cap the server answers 413 and ends the connection (`http/limits.ts`); Bun's
104 // fetch ignores the answer's "Connection: close" and would hand that dying socket to the
105 // next request (ECONNRESET in the next test), so each oversize body asks for its own.
106 await fetch(`${servers.url}/mcp`, { method: "POST", headers: { connection: "close", "content-type": "application/json" }, body: "x".repeat(70 * 1024) });
107 await fetch(`${servers.url}/mcp`, { method: "POST", headers: { connection: "close", "content-type": "application/json", ...auth }, body: "x".repeat(17 * 1024 * 1024) });
105108 });
106109 expect(lines.map((l) => [l["method"], l["status"], l["account"]])).toEqual([
107110 ["none", "error", "alice"],

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs