Support resource binaries in Python runtime staging#21787
Merged
Conversation
Allow runtime package staging to include extra executables beside the bundled Codex binary so Windows runtime wheels can carry sandbox helpers. Co-authored-by: Codex <noreply@openai.com>
Document why helper executables are copied beside the bundled Codex binary during runtime package staging. Co-authored-by: Codex <noreply@openai.com>
Use generic resource fixture names and comments so runtime package staging can support Linux bwrap as well as Windows helpers. Co-authored-by: Codex <noreply@openai.com>
Collaborator
Author
|
@codex review |
Assert staged runtime resource binaries land under the wheel include path so packaged helpers are not dropped during build. Co-authored-by: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Some Codex runtime distributions need helper executables beside the main bundled binary. Linux sandbox fallback needs a packaged
bwrapwhen no suitable systembwrapis available, and Windows sandbox/elevation needs helper executables discoverable besidecodex.exe. The checked-inopenai-codex-cli-bintemplate already packages everything undercodex_cli_bin/bin/**, but the staging script only copied the main Codex binary into that directory.This PR adds the generic staging primitive needed by release workflows to build complete platform runtime wheels without baking platform-specific helper names into the package template.
What changed
stage-runtime --resource-binarysupport so release workflows can copy extra executables beside the bundled Codex binary.--resource-binaryvalues.Testing
uv run ruff check scripts/update_sdk_artifacts.py tests/test_artifact_workflow_and_binaries.pyuv run --extra dev pytest tests/test_artifact_workflow_and_binaries.py::test_stage_runtime_release_copies_resource_binaries tests/test_artifact_workflow_and_binaries.py::test_runtime_resource_binaries_are_included_by_wheel_config tests/test_artifact_workflow_and_binaries.py::test_stage_runtime_stages_binary_without_type_generationFull
tests/test_artifact_workflow_and_binaries.pystill has unrelated schema-normalization drift in the local checkout.