Files
PaperClipAI/packages
Priya RamanandPaperclip d0c4968e97 fix(sandbox): make a post-commit response-read failure non-retryable
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>
2026-08-20 06:19:27 +00:00
..