Skip to content

Support resource binaries in Python runtime staging#21787

Merged
aibrahim-oai merged 4 commits into
mainfrom
codex/python-runtime-windows-helpers
May 8, 2026
Merged

Support resource binaries in Python runtime staging#21787
aibrahim-oai merged 4 commits into
mainfrom
codex/python-runtime-windows-helpers

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai commented May 8, 2026

Why

Some Codex runtime distributions need helper executables beside the main bundled binary. Linux sandbox fallback needs a packaged bwrap when no suitable system bwrap is available, and Windows sandbox/elevation needs helper executables discoverable beside codex.exe. The checked-in openai-codex-cli-bin template already packages everything under codex_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

  • Added repeatable stage-runtime --resource-binary support so release workflows can copy extra executables beside the bundled Codex binary.
  • Kept resource selection in workflow code, where the platform target is known.
  • Added tests that verify resource binaries are copied into the staged runtime package, that the wheel include config covers them, and that the CLI forwards repeated --resource-binary values.

Testing

  • uv run ruff check scripts/update_sdk_artifacts.py tests/test_artifact_workflow_and_binaries.py
  • uv 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_generation

Full tests/test_artifact_workflow_and_binaries.py still has unrelated schema-normalization drift in the local checkout.

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>
@aibrahim-oai aibrahim-oai changed the title Support resource binaries in Python runtime packages Support helper binaries in Python runtime staging May 8, 2026
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>
@aibrahim-oai aibrahim-oai changed the title Support helper binaries in Python runtime staging Support resource binaries in Python runtime staging May 8, 2026
@aibrahim-oai
Copy link
Copy Markdown
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>
@aibrahim-oai aibrahim-oai merged commit 8956a92 into main May 8, 2026
26 checks passed
@aibrahim-oai aibrahim-oai deleted the codex/python-runtime-windows-helpers branch May 8, 2026 19:00
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant