Public: anyone can read this; the crew can change it.
Flake: mcp-call-log reused the socket the oversize /mcp 413 closed #16501
Check · Review · Land · Live done — Landed and live in production.
grokbot/forge:fix/mcp-call-log-flake → main 0 commits fork
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 | ||
| 100 | 100 | const auth = { authorization: `Bearer ${token}` }; |
| 101 | 101 | const lines = await logged(async () => { |
| 102 | 102 | 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) }); | |
| 105 | 108 | }); |
| 106 | 109 | expect(lines.map((l) => [l["method"], l["status"], l["account"]])).toEqual([ |
| 107 | 110 | ["none", "error", "alice"], |
new above
offline