FM-048 API Interoperability and Operational Behavior

Streaming and Large-Response Handling Failures

Chunk boundaries mishandled, interrupted connections not resumed, or slow consumers cause incomplete data delivery or memory exhaustion.

Failure explanation

An API streams data or returns a large response, but the server or client mishandles chunk boundaries, backpressure, cancellation, or connection interruption. A client may buffer the entire response and exhaust memory, parse partial chunks as complete records, or fail to detect truncation. Streaming protocols also need clear completion and error semantics.

Example

An export endpoint streams newline-delimited JSON. A proxy closes the connection halfway through the export, but the client treats the received records as a complete file because there is no completion marker or integrity check.

How to test

  • Test slow consumers, large result sets, chunk boundaries, and connection drops.
  • Cancel streams and verify server resource cleanup.
  • Validate framing and parsing across arbitrary chunk boundaries.
  • Test documented resume, cursor, or integrity mechanisms where supported.

Expected behavior

Streaming framing and completion semantics are explicit. Consumers can detect incomplete transfers, apply backpressure, cancel safely, and avoid treating truncated data as a complete result.

Runnable examples

Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.