In StreamingResponse.stream response() , normalize memoryview chunks before sending them to the ASGI…
In StreamingResponse.stream response() , normalize memoryview chunks before sending them to the ASGI…: a task in harness-adapters: Agentic coding environments (Harbor dataset). Apply the same normalization that Response.render() already applies: - If the memoryview is C-contiguous, cast it to…
The task
Apply the same normalization that `Response.render()` already applies: - If the `memoryview` is C-contiguous, cast it to format `"B"` (byte format), so `len()` equals the byte count. - If it is not C-contiguous, convert it to `bytes` via `.tobytes()`.
Part of harness-hub/harness-adapters.