mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
The bridge forward reads the host response body after the fetch resolves. A mutating request may have committed on the host by then. A body over the size limit, or a stream read error, made the forward reject. The duplex broker and the file bridge both mapped that rejection to a retryable 502. A retry then sent a new request id outside the broker deduplication set, so the host applied the mutation twice. The forward now catches a response-body read failure and returns a non-retryable 504 with the indeterminate outcome marker. The in-sandbox server maps the indeterminate 504 to a non-retryable 409 for both transports, so a caller never repeats a possibly-committed mutation. Add broker and integration coverage. Co-authored-by: Paperclip <noreply@paperclip.ing>