mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 02:44:50 +01:00
The pinned transport replaced platform fetch, and with it undici's headersTimeout/bodyTimeout. Only the gateway tools/call path passes an AbortSignal; the OAuth discovery, registration and token-exchange callers pass none, so a remote server that accepted the connection and then stayed silent would hold the request open indefinitely. That is a hang the code this replaced did not have. Adds a 300s default matching undici, applied as a hard headers deadline (not req.setTimeout, which is socket-idle based and a dribbling server could reset forever) plus an idle deadline between body chunks so a half-sent body rejects in response.text() instead of hanging the caller. Both new tests hang to the vitest timeout when the deadlines are removed. Refs PAP-17098