Skip to content

Preserve binary downloads and verify cross-language client parity - #275

Merged
kdubb merged 5 commits into
mainfrom
codex/python-binary-responses
Oct 16, 2026
Merged

kdubb merged 5 commits into
mainfrom
codex/python-binary-responses

Conversation

@kdubb

@kdubb kdubb commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Generated Python and TypeScript binary downloads must preserve response bytes even when the server advertises JSON or text. Emit explicit binary-response metadata for whole-body binary schemas, named aliases, and unions whose branches are all binary. Mixed unions and structured binary fields retain media decoding. Also correct Python multi-media tuple formatting.

Addresses outfoxx/sunday-python#12.

Coordinated runtime dependencies

Both runtime release dependencies are satisfied. The remaining rollout is to merge/release the generator and regenerate consuming clients. Runtime updates alone cannot add binary metadata to older generated clients. Keep issue #12 open until generator rollout and consumer verification complete.

Validation

  • Generator compilation and ktlint passed.
  • All 183 tests in the TypeScript generator suite and Python/Kotlin/Swift/TypeScript binary-response coverage passed against published runtimes, with SUNDAY_TYPESCRIPT_PATH, SUNDAY_PYTHON_PATH, and SUNDAY_SWIFT_PATH unset and a fresh npm cache.
  • Compiler-backed OpenAPI/RAML clients cover direct binary responses, aliases, all-binary unions, nested unions, and mixed unions through both operation result APIs. Python additionally covers AsyncAPI, composed inputs, and concrete/multiple/wildcard media declarations.
  • A fresh npm version-based install independently passed explicit image/png Accept negotiation and exact-byte preservation of a JSON-typed download through both runtime result APIs.
  • Empty-body behavior is explicitly tested: Kotlin/Swift retain their no-data errors; TypeScript/Python accept empty successful 200 binary bodies.
  • The runtime release workflow ran lint, type checking, all 806 runtime tests, and build before publishing. Prior Python validation passed all 189 generator tests, and the released wheel and Git-tag install each passed 53 runtime binary cases.

Hosted checks for the latest PR head are separate from the local verification above.

Emit response-specific binary metadata, including scalar aliases, and correct multiple-media tuple formatting. Add compiler-backed frontend coverage and document the coordinated Python runtime release requirement.
Pin compiler fixtures to the published runtime tag, require 2.0.0b11, and document the satisfied runtime dependency and remaining generator rollout.
@kdubb
kdubb marked this pull request as ready for review October 16, 2026 00:34
@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Python and TypeScript clients now mark whole-body binary responses so downloads retain their bytes instead of being decoded as JSON or text.

  • Generated Python and TypeScript clients preserve bytes for whole-body binary responses.
  • Python response media types keep the right tuple shape.

Reviews (2) 路 Last reviewed commit: "Pin published Sunday TypeScript beta.12 ..." 路 Reviewed by Greptile

Follow named and inline union alternatives through scalar aliases, marking a response binary only when every branch is binary. Cover all-binary and nested unions plus mixed-union media decoding with compiled generated clients.
Emit binary response metadata for binary schemas, aliases, and nested all-binary unions. Compile and execute OpenAPI and RAML download clients for Kotlin, Swift, and TypeScript, including mixed unions and explicit empty-body contracts. Update the compiled snapshot and document the coordinated TypeScript runtime release dependency.
@kdubb kdubb changed the title Preserve Python binary downloads with response metadata Preserve binary downloads and verify cross-language client parity Oct 16, 2026
@kdubb
kdubb marked this pull request as draft October 16, 2026 01:20
Update compiler fixture dependency and integrity-checked lockfile to the released runtime. Document satisfied coordinated runtime dependencies and verify 183 generator tests against published packages without local runtime overrides.
@kdubb
kdubb marked this pull request as ready for review October 16, 2026 01:39
@sonarqubecloud

Copy link
Copy Markdown

@kdubb
kdubb merged commit 8da9995 into main Oct 16, 2026
14 checks passed
@kdubb
kdubb deleted the codex/python-binary-responses branch October 16, 2026 02:06
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.

1 participant