examples: validate stream resume prerequisites - #516
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 32748376996 --repo openai/openai-ruby \
--name castiron-custom-code-32748376996-1 --dir /tmp/castiron-custom-code-32748376996-1
git apply --stat /tmp/castiron-custom-code-32748376996-1/custom-code.patch
cat /tmp/castiron-custom-code-32748376996-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin edfb30b2973d68b4a19ce3f86f1de7313f730702 579672e64a25c4c94fb068abe3ed4a65974a40db
python3 scripts/castiron/custom_code_report.py report \
--base edfb30b2973d68b4a19ce3f86f1de7313f730702 \
--head 579672e64a25c4c94fb068abe3ed4a65974a40db --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-579672e64a25
cat /tmp/castiron-custom-code-579672e64a25/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
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. |
apcha-oai
left a comment
There was a problem hiding this comment.
[sdk codex review] Approved at 579672e64a25c4c94fb068abe3ed4a65974a40db after two independent, full code reviews and reconciliation of existing feedback. No actionable findings.
The plain and structured flows now reject empty initial streams and missing/empty captured response IDs before dereferencing, waiting, or resuming. All seven regression/characterization cases were examined, including successful resume IDs, cursors, and structured output. The successful behavior and public SDK surface are unchanged.
Existing hosted CI for the reviewed head merged with edfb30b2973d68b4a19ce3f86f1de7313f730702 passed on Ruby 3.3, 3.4, and 4.0: 1,198 tests and 10,646 assertions per version, with no failures, errors, or skips. Lint, type checks, packaging, Bedrock, and current required checks also passed. Source review plus existing hosted CI only; no local test execution or live-API validation.
Summary
Evidence and scope
NoMethodError, while missing created events or empty response IDs attempted an invalid resumed request.CONTRIBUTING.mdexplicitly identifiesexamples/as handwritten and never modified by the generator; wholly handwritten files are outside the Castiron custom-code budget.Verification
bundle exec ruby test/openai/streaming_previous_response_example_test.rb— 7 tests, 52 assertions.bundle exec ruby test/openai/resources/responses/streaming_test.rb— 25 tests, 95 assertions.bundle exec ruby test/openai/structured_outputs_responses_function_calling_example_test.rb— 3 tests, 17 assertions.TMPDIR=/private/tmp ./scripts/test— 1,198 tests, 10,645 assertions, 0 failures/errors, 1 existing skip. CanonicalTMPDIRavoids an unrelated existing macOS/varversus/private/varexpectation inFastFormatTestwithout changing repository code.bundle exec rake lint— Sorbet clean, 1,239 RBS files validated, and 2,747 Ruby files inspected with no RuboCop offenses.bundle exec rake test:examples:inventory.python3 -m unittest discover -s scripts/castiron -p 'test_custom_code*.py'— 51 tests passed, 1 existing skip.python3 -B -I scripts/castiron/custom_code_budget.py check --repo /path/to/sdk --base edfb30b2973d68b4a19ce3f86f1de7313f730702 --head 579672e64a25c4c94fb068abe3ed4a65974a40db --public --fetch --out /tmp/custom-code-budget— isolation passed; 2,659 custom lines under the 4,000-line limit, with 1,341 lines of headroom.git diff --check, exact-base path/scope review, extensive general review, and thermo-nuclear maintainability review.