examples: write streamed images in binary mode - #506
Conversation
Castiron custom code✅ No new custom-code files detected. 48 mixed files remain; 0 existing customizations changed. Compared 48 existing customizations unchanged
8 more in the full report. A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 32447293012 --repo openai/openai-ruby \
--name castiron-custom-code-32447293012-1 --dir /tmp/castiron-custom-code-32447293012-1
git apply --stat /tmp/castiron-custom-code-32447293012-1/custom-code.patch
cat /tmp/castiron-custom-code-32447293012-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 851f53438f5afc7f32e3ccbe866fd03bbade576a ccc119f58ed385c49ecdbd287bcfbf749eb9b0be
python3 scripts/castiron/custom_code_report.py report \
--base 851f53438f5afc7f32e3ccbe866fd03bbade576a \
--head ccc119f58ed385c49ecdbd287bcfbf749eb9b0be --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-ccc119f58ed3
cat /tmp/castiron-custom-code-ccc119f58ed3/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
26b465d to
ccc119f
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
File.binwriteEvidence
The example decodes base64 PNG data and previously passed the resulting binary string to
File.write. Text-mode writes can translate byte sequences on platforms with text/binary distinctions. The fixture includes CRLF and control-byte sequences and verifies both generated files byte-for-byte.Blast radius and compatibility
This changes only the handwritten image streaming example and its focused test. It does not change the SDK runtime, generated code, public API, type signatures, dependencies, serialization, transport, or authentication behavior.
Generator ownership
examples/and this test are handwritten repository artifacts and are not generator-owned.Validation
bundle exec ruby -Itest test/openai/image_stream_example_test.rb— 1 run, 11 assertions, passedbundle exec rake test:examples:inventory— passedbundle exec rake lint— RuboCop, rubyfmt, RBI, and RBS validation passed./scripts/testwith a privateTMPDIR— 1,088 runs, 9,799 assertions, 0 failures, 1 unrelated local error in the unchanged realtime HTTP proxy invariantgit diff --check— passed