Dashboardopencode-loreGateway request-stream sequencing, erro…

Gateway request-stream sequencing, error delivery, and bounded cleanup

Category: gotcha
Confidence: 1.00
ID: 01a0a149-e56b-7083-bad3-3c39f4bccb88
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 1
Source session: 0W6wLLJmii0mbMzg9
Created: 2026-08-24 06:07:31
Updated: 2026-09-14 18:59:29

Cross-Project Recalls

ProjectHitsLast recalled
opencode 1 8d ago

Content

Never await a queued request or producer before consuming a predecessor body when admission may depend on body consumption; retain pending promises, release predecessor streams, and use explicit gates. On malformed or stalled request/upstream bodies, return only sanitized errors and never await EOF indefinitely. Bound diagnostic reads and drains by timeout, abort, or connection close, then cancel/destroy readers and decoders without awaiting a hostile generator's return(). Decoder backpressure waits must settle on drain, error, close, or abort and remove all listeners. For invalid streamed JSON, use closingErrorResponse() with Connection: close so the 400 is delivered before Node cancels the upload. Test non-settling chunked uploads, malformed gzip under backpressure, prompt rejection, socket closure, and unlocked readers.

Move to: