Skip to content

fix: accept custom request hash in RBS - #554

Merged
jbeckwith-oai merged 3 commits into
mainfrom
codex/rbs-custom-request
Aug 29, 2026
Merged

fix: accept custom request hash in RBS#554
jbeckwith-oai merged 3 commits into
mainfrom
codex/rbs-custom-request

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

  • model BaseClient#request as its runtime request-components hash in shipped RBS
  • add focused Steep coverage for the README-documented custom request call

Scope

  • no Ruby runtime request changes
  • no README API shape changes
  • no unrelated signatures

Verification

  • mise exec ruby@4.0.6 -- bundle exec ruby -Itest test/openai/request_rbs_test.rb
  • mise exec ruby@4.0.6 -- bundle exec rake validate:rbs
  • mise exec ruby@4.0.6 -- bundle exec rake lint:rbs_format
  • mise exec ruby@4.0.6 -- bundle exec rubocop test/openai/request_rbs_test.rb
  • git diff --check

Adversarial review

  • completed two consecutive clean rounds with two independent fresh-context reviewers per round
  • no in-scope findings or follow-up observations

@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner August 29, 2026 18:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T21:26:41.922385Z 02dc423 New commits
🔒 Security Review Completed 2026-08-29T21:28:18.747846Z 02dc423 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openai-sdks

openai-sdks Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 10.533s for Ruby SDK PR #554.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 210ms
tests/chat-completions-create.test.ts ✅ Passed 238ms
tests/chat-completions-stream.test.ts ✅ Passed 130ms
tests/files-content-binary.test.ts ✅ Passed 151ms
tests/files-create-multipart.test.ts ✅ Passed 174ms
tests/files-list-pagination.test.ts ✅ Passed 150ms
tests/initialize-config.test.ts ✅ Passed 189ms
tests/instance-isolation.test.ts ✅ Passed 214ms
tests/models-list.test.ts ✅ Passed 239ms
tests/responses-background-lifecycle.test.ts ✅ Passed 229ms
tests/responses-body-method-errors.test.ts ✅ Passed 489ms
tests/responses-cancel-timeout.test.ts ✅ Passed 265ms
tests/responses-cancel.test.ts ✅ Passed 267ms
tests/responses-compact-retries.test.ts ✅ Passed 236ms
tests/responses-compact.test.ts ✅ Passed 242ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 149ms
tests/responses-create-advanced.test.ts ✅ Passed 242ms
tests/responses-create-disconnect.test.ts ✅ Passed 986ms
tests/responses-create-errors.test.ts ✅ Passed 411ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 139ms
tests/responses-create-retries.test.ts ✅ Passed 298ms
tests/responses-create-stream-failures.test.ts ✅ Passed 146ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 227ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.418s
tests/responses-create-stream.test.ts ✅ Passed 154ms
tests/responses-create-terminal-states.test.ts ✅ Passed 405ms
tests/responses-create-timeout.test.ts ✅ Passed 320ms
tests/responses-create.test.ts ✅ Passed 270ms
tests/responses-delete.test.ts ✅ Passed 226ms
tests/responses-input-items-errors.test.ts ✅ Passed 198ms
tests/responses-input-items-list.test.ts ✅ Passed 184ms
tests/responses-input-items-options.test.ts ✅ Passed 229ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 391ms
tests/responses-input-tokens-count.test.ts ✅ Passed 249ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.114s
tests/responses-not-found-errors.test.ts ✅ Passed 419ms
tests/responses-parse.test.ts ✅ Passed 187ms
tests/responses-retrieve-retries.test.ts ✅ Passed 333ms
tests/responses-retrieve.test.ts ✅ Passed 252ms
tests/responses-stored-method-errors.test.ts ✅ Passed 971ms
tests/retry-behavior.test.ts ✅ Passed 3.258s
tests/sdk-error-shape.test.ts ✅ Passed 484ms

View OkTest run #33276032887

SDK merge (3620011504e6) · head (02dc42368c96) · base (f8b128cf0db3) · OkTest (2b1bdfd25e98)

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

47 mixed files remain; 0 existing customizations changed.

Compared f8b128cf0db302dc42368c96. Generated baselines verified.

47 existing customizations unchanged
  • lib/openai.rb
  • lib/openai/client.rb
  • lib/openai/models/chat/chat_completion_message.rb
  • lib/openai/models/chat/chat_completion_message_function_tool_call.rb
  • lib/openai/models/chat/completion_create_params.rb
  • lib/openai/models/response_format_json_schema.rb
  • lib/openai/models/responses/function_tool.rb
  • lib/openai/models/responses/response.rb
  • lib/openai/models/responses/response_create_params.rb
  • lib/openai/models/responses/response_format_text_config.rb
  • lib/openai/models/responses/response_format_text_json_schema_config.rb
  • lib/openai/models/responses/response_function_tool_call.rb
  • lib/openai/models/responses/response_function_web_search.rb
  • lib/openai/models/responses/response_output_text.rb
  • lib/openai/models/responses/tool.rb
  • lib/openai/resources/beta/threads.rb
  • lib/openai/resources/chat/completions.rb
  • lib/openai/resources/files.rb
  • lib/openai/resources/responses.rb
  • lib/openai/resources/vector_stores/file_batches.rb
  • lib/openai/resources/vector_stores/files.rb
  • lib/openai/resources/webhooks.rb
  • rbi/openai/client.rbi
  • rbi/openai/models/chat/chat_completion_message.rbi
  • rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi
  • rbi/openai/models/chat/completion_create_params.rbi
  • rbi/openai/models/response_format_json_schema.rbi
  • rbi/openai/models/responses/response.rbi
  • rbi/openai/models/responses/response_create_params.rbi
  • rbi/openai/models/responses/response_function_tool_call.rbi
  • rbi/openai/models/responses/response_function_web_search.rbi
  • rbi/openai/models/responses/response_output_text.rbi
  • rbi/openai/resources/chat/completions.rbi
  • rbi/openai/resources/files.rbi
  • rbi/openai/resources/responses.rbi
  • rbi/openai/resources/vector_stores/file_batches.rbi
  • rbi/openai/resources/vector_stores/files.rbi
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py

7 more in the full report.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 33276046691 --repo openai/openai-ruby \
  --name castiron-custom-code-33276046691-1 --dir /tmp/castiron-custom-code-33276046691-1
git apply --stat /tmp/castiron-custom-code-33276046691-1/custom-code.patch
cat /tmp/castiron-custom-code-33276046691-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin f8b128cf0db3198a297caec7e7ca8dfa991f16e8 02dc42368c961ac1b44c9c494d53f39070d603a1
python3 scripts/castiron/custom_code_report.py report \
  --base f8b128cf0db3198a297caec7e7ca8dfa991f16e8 \
  --head 02dc42368c961ac1b44c9c494d53f39070d603a1 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-02dc42368c96
cat /tmp/castiron-custom-code-02dc42368c96/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: caad85c772

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread test/openai/request_rbs_test.rb
Comment thread sig/openai/internal/transport/base_client.rbs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c544dd8430

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sig/openai/internal/transport/base_client.rbs Outdated

@HAYDEN-OAI HAYDEN-OAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed a7003bc. No substantive findings. The request signature now matches the runtime's single request hash, including documented symbol/string query and header keys. The security hash models the recognized authentication keys with boolean flag values, without the previous empty-record union.

Static implementation review only.

@jbeckwith-oai
jbeckwith-oai force-pushed the codex/rbs-custom-request branch from a7003bc to 02dc423 Compare August 29, 2026 21:25
@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Aug 29, 2026
Merged via the queue into main with commit 8d32aa1 Aug 29, 2026
19 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/rbs-custom-request branch August 29, 2026 21:30
@openai-sdks openai-sdks Bot mentioned this pull request Aug 29, 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.

2 participants