Skip to content

fix: create upload example fixtures in private directories - #3686

Merged
apcha-oai merged 1 commit into
mainfrom
apcha/private-upload-fixtures
Aug 19, 2026
Merged

fix: create upload example fixtures in private directories#3686
apcha-oai merged 1 commit into
mainfrom
apcha/private-upload-fixtures

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Summary

  • Generate each upload fixture pair in a fresh private temporary directory, refuse existing output files, and clean up incomplete generation.
  • Print the generated directory for explicit use by the upload example; retain disk and in-memory modes and document caller cleanup.
  • Add a bounded byte-count option and focused local regression tests. No SDK runtime, API, dependency, Python-version, or generated-code changes; no Castiron follow-up is needed.

Validation

  • 20 focused tests passed using fake/local fixtures and a mocked upload client.
  • Shell syntax, Python compilation, repository-wide Ruff, focused formatting, mypy, and repository-pinned Pyright passed.
  • Independent read-only Codex review round 1 was clean (no actionable P0–P2 findings).
  • No live-service probes or full-size fixture generation.

This is an independent PR against public main. SDK CODEOWNER review requested for the example file-handling change.

@apcha-oai
apcha-oai marked this pull request as ready for review August 19, 2026 21:02
@apcha-oai
apcha-oai requested a review from a team as a code owner August 19, 2026 21:02
@apcha-oai
apcha-oai enabled auto-merge August 19, 2026 21:03
@openai-sdks

openai-sdks Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 11.311s for Python SDK PR #3686.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 170ms
tests/chat-completions-create.test.ts ✅ Passed 223ms
tests/chat-completions-stream.test.ts ✅ Passed 132ms
tests/files-content-binary.test.ts ✅ Passed 223ms
tests/files-create-multipart.test.ts ✅ Passed 198ms
tests/files-list-pagination.test.ts ✅ Passed 166ms
tests/initialize-config.test.ts ✅ Passed 175ms
tests/instance-isolation.test.ts ✅ Passed 206ms
tests/models-list.test.ts ✅ Passed 143ms
tests/responses-background-lifecycle.test.ts ✅ Passed 259ms
tests/responses-body-method-errors.test.ts ✅ Passed 329ms
tests/responses-cancel-timeout.test.ts ✅ Passed 190ms
tests/responses-cancel.test.ts ✅ Passed 233ms
tests/responses-compact-retries.test.ts ✅ Passed 382ms
tests/responses-compact.test.ts ✅ Passed 298ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 403ms
tests/responses-create-advanced.test.ts ✅ Passed 216ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.183s
tests/responses-create-errors.test.ts ✅ Passed 207ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 267ms
tests/responses-create-retries.test.ts ✅ Passed 288ms
tests/responses-create-stream-failures.test.ts ✅ Passed 126ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 237ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.793s
tests/responses-create-stream.test.ts ✅ Passed 99ms
tests/responses-create-terminal-states.test.ts ✅ Passed 226ms
tests/responses-create-timeout.test.ts ✅ Passed 203ms
tests/responses-create.test.ts ✅ Passed 240ms
tests/responses-delete.test.ts ✅ Passed 218ms
tests/responses-input-items-errors.test.ts ✅ Passed 406ms
tests/responses-input-items-list.test.ts ✅ Passed 337ms
tests/responses-input-items-options.test.ts ✅ Passed 371ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 228ms
tests/responses-input-tokens-count.test.ts ✅ Passed 214ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.871s
tests/responses-not-found-errors.test.ts ✅ Passed 269ms
tests/responses-parse.test.ts ✅ Passed 422ms
tests/responses-retrieve-retries.test.ts ✅ Passed 290ms
tests/responses-retrieve.test.ts ✅ Passed 208ms
tests/responses-stored-method-errors.test.ts ✅ Passed 542ms
tests/retry-behavior.test.ts ✅ Passed 3.148s
tests/sdk-error-shape.test.ts ✅ Passed 320ms

View OkTest run #32301823806

SDK merge (21a99596d083) · head (604d735ff685) · base (600aa8daade4) · OkTest (2b1bdfd25e98)

@apcha-oai
apcha-oai disabled auto-merge August 19, 2026 21:04

@jbeckwith-oai jbeckwith-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.

Independent two-pass security review of the complete true-merge-base diff found no actionable issues. Upload examples use private temporary directories, restrictive fixture permissions and exclusive creation, reject existing/symlinked paths, clean up on failures/signals, preserve explicitly supplied caller-owned files, and exercise both upload modes with meaningful regression coverage. No SDK runtime, dependency, or API changes; substantive CI and CodeQL are green.

@apcha-oai
apcha-oai added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit f36e6f7 Aug 19, 2026
21 checks passed
@apcha-oai
apcha-oai deleted the apcha/private-upload-fixtures branch August 19, 2026 21:17
@openai-sdks openai-sdks Bot mentioned this pull request Aug 19, 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