Skip to content

ci: standardize custom-code budget reporting - #4018

Merged
apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-194
Oct 2, 2026
Merged

apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-194

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Aligns the existing custom-code budget tooling with the shared generated templates, including generated-file headers, documentation, and publisher test-fixture formatting.

The existing API reference, runtime behavior, public API, and repository-owned budget policy remain unchanged.

Validation: SDK formatting and all 59 offline custom-code tests passed locally, including the compiler hash contract.

Castiron-Internal-PR: openai/openai-python-internal#194
Castiron-Source-SHA: 4c76a24dc83e1f5081c2822c27d87e8d0dbc9fb1
Castiron-Public-Base-SHA: e5de2e5
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: e5de2e5656fb3d4fa70f050195382e6a4d59f806.

✅ No new custom-code files detected.

47 mixed files remain; 0 existing customizations changed; 12 customizations removed; 19 generated baselines changed.

Compared e5de2e5656fb → 2b754bbecf2f. Generated baselines verified.

File Result Current custom patch
scripts/castiron/CUSTOM_CODE.md Now generated; already existed None
scripts/castiron/README.md Generated baseline changed None
scripts/castiron/custom_code_budget.py Now generated; already existed None
scripts/castiron/custom_code_report.py Generated baseline changed None
scripts/castiron/custom_code_test_support.py Now generated; already existed None
scripts/castiron/fixtures/github_publisher.cjs Now generated; already existed None
scripts/castiron/test_custom_code_budget.py Now generated; already existed None
scripts/castiron/test_custom_code_github.py Now generated; already existed None
scripts/castiron/test_custom_code_publication.py Now generated; already existed None
scripts/castiron/test_custom_code_report.py Generated baseline changed None
src/openai/resources/audio/speech.py Generated baseline changed None
src/openai/resources/beta/agents/agents.py Generated baseline changed None
src/openai/resources/beta/agents/sessions/sessions.py Generated baseline changed +81 / −11
src/openai/resources/beta/assistants.py Generated baseline changed None
src/openai/resources/beta/responses/input_tokens.py Generated baseline changed None
src/openai/resources/beta/responses/responses.py Generated baseline changed +140 / −107
src/openai/resources/beta/threads/runs/runs.py Generated baseline changed +1290 / −181
src/openai/resources/beta/threads/threads.py Generated baseline changed +390 / −7
src/openai/resources/chat/completions/completions.py Generated baseline changed +603 / −1
src/openai/resources/completions.py Generated baseline changed None
src/openai/resources/embeddings.py Generated baseline changed +27 / −21
src/openai/resources/images.py Generated baseline changed None
src/openai/resources/moderations.py Generated baseline changed None
src/openai/resources/realtime/calls.py Generated baseline changed None
src/openai/resources/responses/input_tokens.py Generated baseline changed None
src/openai/resources/responses/responses.py Generated baseline changed +1026 / −137
40 existing customizations unchanged
  • api.md
  • src/openai/init.py
  • src/openai/_client.py
  • src/openai/resources/audio/transcriptions.py
  • src/openai/resources/audio/translations.py
  • src/openai/resources/beta/agents/environments/files.py
  • src/openai/resources/beta/agents/sessions/artifacts.py
  • src/openai/resources/beta/beta.py
  • src/openai/resources/files.py
  • src/openai/resources/live/forks.py
  • src/openai/resources/live/live.py
  • src/openai/resources/live/sideband.py
  • src/openai/resources/realtime/api.md
  • src/openai/resources/realtime/realtime.py
  • src/openai/resources/uploads/uploads.py
  • src/openai/resources/vector_stores/file_batches.py
  • src/openai/resources/vector_stores/files.py
  • src/openai/resources/videos.py
  • src/openai/resources/webhooks/init.py
  • src/openai/resources/webhooks/webhooks.py
  • src/openai/types/beta/agent_session_message.py
  • src/openai/types/beta/session_turn_error.py
  • src/openai/types/chat/init.py
  • src/openai/types/chat/chat_completion_message_tool_call.py
  • src/openai/types/fine_tuning/fine_tuning_job_integration.py
  • src/openai/types/realtime/conversation_item_input_audio_transcription_delta_event.py
  • src/openai/types/realtime/realtime_error_event.py
  • src/openai/types/responses/init.py
  • src/openai/types/responses/response.py
  • src/openai/types/responses/response_function_web_search.py
  • src/openai/types/responses/response_function_web_search_param.py
  • src/openai/types/responses/responses_client_event.py
  • src/openai/types/responses/responses_client_event_param.py
  • src/openai/types/responses/tool.py
  • src/openai/types/responses/tool_param.py
  • src/openai/types/webhooks/init.py
  • src/openai/types/webhooks/live_call_incoming_webhook_event.py
  • src/openai/types/webhooks/unwrap_webhook_event.py
  • src/openai/types/webhooks/webhook_endpoint_with_secret.py
  • tests/api_resources/test_videos.py

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 37027714203 --repo openai/openai-python \
  --name castiron-custom-code-37027714203-1 --dir /tmp/castiron-custom-code-37027714203-1
git apply --stat /tmp/castiron-custom-code-37027714203-1/custom-code.patch
cat /tmp/castiron-custom-code-37027714203-1/custom-code.patch

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

git fetch --no-tags origin e5de2e5656fb3d4fa70f050195382e6a4d59f806 2b754bbecf2fb94a8cff277411f56f95b51f1e7a
python3 scripts/castiron/custom_code_report.py report \
  --base e5de2e5656fb3d4fa70f050195382e6a4d59f806 \
  --head 2b754bbecf2fb94a8cff277411f56f95b51f1e7a --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-2b754bbecf2f
cat /tmp/castiron-custom-code-2b754bbecf2f/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

@apcha-oai
apcha-oai marked this pull request as ready for review October 2, 2026 15:32
@apcha-oai
apcha-oai requested a review from a team as a code owner October 2, 2026 15:32
@apcha-oai
apcha-oai enabled auto-merge October 2, 2026 15:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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-10-02T15:33:41.171914Z 2b754bb Draft marked ready
🔒 Security Review ✅ Completed 2026-10-02T15:34:46.814423Z 2b754bb Draft marked ready
ℹ️ 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 Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 8.8s for Python SDK PR #4018.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 114ms
tests/chat-completions-create.test.ts ✅ Passed 197ms
tests/chat-completions-stream.test.ts ✅ Passed 104ms
tests/files-content-binary.test.ts ✅ Passed 211ms
tests/files-create-multipart.test.ts ✅ Passed 250ms
tests/files-list-pagination.test.ts ✅ Passed 152ms
tests/initialize-config.test.ts ✅ Passed 96ms
tests/instance-isolation.test.ts ✅ Passed 152ms
tests/models-list.test.ts ✅ Passed 146ms
tests/responses-background-lifecycle.test.ts ✅ Passed 153ms
tests/responses-body-method-errors.test.ts ✅ Passed 272ms
tests/responses-cancel-timeout.test.ts ✅ Passed 174ms
tests/responses-cancel.test.ts ✅ Passed 203ms
tests/responses-compact-retries.test.ts ✅ Passed 274ms
tests/responses-compact.test.ts ✅ Passed 223ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 112ms
tests/responses-create-advanced.test.ts ✅ Passed 160ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.01s
tests/responses-create-errors.test.ts ✅ Passed 128ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 80ms
tests/responses-create-retries.test.ts ✅ Passed 179ms
tests/responses-create-stream-failures.test.ts ✅ Passed 90ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 216ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.516s
tests/responses-create-stream.test.ts ✅ Passed 285ms
tests/responses-create-terminal-states.test.ts ✅ Passed 168ms
tests/responses-create-timeout.test.ts ✅ Passed 185ms
tests/responses-create.test.ts ✅ Passed 387ms
tests/responses-delete.test.ts ✅ Passed 170ms
tests/responses-input-items-errors.test.ts ✅ Passed 332ms
tests/responses-input-items-list.test.ts ✅ Passed 221ms
tests/responses-input-items-options.test.ts ✅ Passed 203ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 227ms
tests/responses-input-tokens-count.test.ts ✅ Passed 132ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.779s
tests/responses-not-found-errors.test.ts ✅ Passed 214ms
tests/responses-parse.test.ts ✅ Passed 240ms
tests/responses-retrieve-retries.test.ts ✅ Passed 171ms
tests/responses-retrieve.test.ts ✅ Passed 136ms
tests/responses-stored-method-errors.test.ts ✅ Passed 485ms
tests/retry-behavior.test.ts ✅ Passed 3.131s
tests/sdk-error-shape.test.ts ✅ Passed 307ms

View OkTest run #37027669397

SDK merge (b3d8ba15d34a) · head (2b754bbecf2f) · base (e5de2e5656fb) · OkTest (6f7cbf36976b)

@markstuart-oai markstuart-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 2b754bbecf2f. This diff changes generated ownership headers, documentation, fixture formatting and generation metadata; the workflows and reporter are unchanged from its base. No introduced correctness or structural issue found, and no new 1,000-line crossing. The shared publication issues identified in the companion SDK reviews are already present in this PR's base, rather than introduced here.

Source-only review; no repository workloads run. All reported hosted checks in the inspected exact-head snapshot were successful or skipped, including the relevant custom-code checks. Approval covers this diff, not execution of the author's local tests.

@apcha-oai
apcha-oai added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit b6ca5b5 Oct 2, 2026
28 checks passed
@apcha-oai
apcha-oai deleted the castiron/promotions/pr-194 branch October 2, 2026 16:16
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