Skip to content

Restore structured JSON payload offloads before yielding results - #601

Closed
werk24 wants to merge 1 commit into
mainfrom
fix/2055-structured-payload-offload
Closed

werk24 wants to merge 1 commit into
mainfrom
fix/2055-structured-payload-offload

Conversation

@werk24

@werk24 werk24 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Large structured WebSocket responses currently fail at the server's 128 KiB limit. This is the client prerequisite for W24-Service-GmbH/core-reader#2055: recognize payload_encoding: "json", download and decrypt the existing payload_url, and deserialize its JSON into payload_dict using the same v1/v2 response models as inline results. Unmarked downloads—including JSON files—remain in payload_bytes; malformed structured JSON fails explicitly.

Prepare version 2.9.0 so the server can gate offloading on a reported client version that supports this contract. Release this client before enabling the companion server change (https://github.com/W24-Service-GmbH/core-reader/pull/2535). Upgrade crew-api's client dependency to 2.9.0 when rolling out synchronous HTTP support: the result is reconstructed before that adapter clears payload_bytes. Older clients retain the existing explicit oversize failure rather than silently receiving data in a different field.

Validation: 71 tests passed across structured offloads, shared HTTPS/download ordering, read deadlines/retries, and callback contracts. Includes typed v1 PMI and v2 round trips, a large Unicode payload, binary compatibility, corrupt JSON, and preservation through the synchronous HTTP adapter's serialization behavior. Ruff and whitespace checks passed. Tests ran on Python 3.12.8; no live S3 or production deployment was performed.

@jmtts jmtts closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants