Skip to content

[codex] Publish Python runtime wheels with Python SDK releases#25906

Merged
aibrahim-oai merged 5 commits into
mainfrom
dev/publish-python-runtime-for-sdk-pin
Jun 2, 2026
Merged

[codex] Publish Python runtime wheels with Python SDK releases#25906
aibrahim-oai merged 5 commits into
mainfrom
dev/publish-python-runtime-for-sdk-pin

Conversation

@aibrahim-oai

@aibrahim-oai aibrahim-oai commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • stop publishing Python runtime wheels as a side effect of Rust releases
  • publish runtime wheels from the Python SDK release workflow, either explicitly before updating the SDK pin or immediately before a python-v* SDK release
  • resolve the runtime release from the requested version or the SDK package's exact openai-codex-cli-bin pin
  • build two musllinux-tagged wheels from the Rust-release Linux package archives alongside the six existing runtime wheels
  • validate SDK beta tags before any PyPI write

Release configuration

  • update the openai-codex-cli-bin PyPI trusted publisher to trust .github/workflows/python-sdk-release.yml and the publish-python-runtime job

Pin update flow

  • run the python-sdk-release workflow manually with the new runtime version before opening or updating the SDK pin PR
  • after the pin lands, a python-v* SDK tag republishes with skip-existing: true before publishing the SDK package

Validation

  • ran just fmt
  • validated the edited workflow YAML
  • validated the embedded publish-python-runtime Bash with bash -n
  • validated manual 0.136.0 -> rust-v0.136.0 mapping
  • validated tag-driven python-v0.1.0b3 -> 0.132.0 -> rust-v0.132.0 mapping
  • validated rejection of an invalid SDK tag before publication
  • confirmed rust-v0.136.0 contains the two required Linux package archives
  • CI will provide the full test signal

@aibrahim-oai aibrahim-oai changed the title [codex] Publish Python runtime wheels explicitly for SDK pin updates [codex] Publish Python runtime wheels with Python SDK releases Jun 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9748417caf

ℹ️ 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".

# Publish the platform-specific Python runtime wheels before building the SDK
# package that pins them. PyPI project configuration must trust this workflow
# and job for publishing.
publish-python-runtime:

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.

P2 Badge Validate the SDK tag before publishing

Because this job runs on every python-v* tag before build-python-sdk performs its beta-tag validation, an accidental tag such as python-v0.2.0 or python-vfoo in openai/codex will still execute the PyPI publishing step and can irreversibly upload the pinned openai-codex-cli-bin wheels before the SDK build later rejects the tag. Please gate this publish job on the same tag validation, or make it depend on a separate validation job that runs before any PyPI side effects.

Useful? React with 👍 / 👎.

# Publish the platform-specific Python runtime wheels before building the SDK
# package that pins them. PyPI project configuration must trust this workflow
# and job for publishing.
publish-python-runtime:

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.

P2 Badge Keep runtime publishing available before pin-update CI

Moving the only PyPI publish for openai-codex-cli-bin into this python-v* tag workflow creates a release-order deadlock for the normal SDK runtime pin update: the SDK PR workflow on pull requests runs uv sync --extra dev --frozen in .github/workflows/sdk.yml, so a PR that changes sdk/python/pyproject.toml to pin a newly released runtime will fail dependency resolution until that runtime is already on PyPI, but this job cannot run until a later Python SDK tag exists. The previous rust-release job published the runtime immediately after the rust-v* release assets were created, which made the pin-update PR installable.

Useful? React with 👍 / 👎.

aibrahim-oai added a commit that referenced this pull request Jun 2, 2026
## Summary
- pin the Python SDK runtime package to `openai-codex-cli-bin==0.136.0`
so Ubuntu/glibc installs resolve a compatible wheel
- refresh generated SDK artifacts and lock data for the runtime update
- keep newly generated client-message-id wire models internal to the
generated protocol layer

## Dependency
- merge #25906 first so the Python SDK release publishes both manylinux
and musllinux runtime wheels before publishing the package with this pin

## Validation
- ran `just fmt`
- regenerated the Python public API helpers
- validated the edited workflow YAML
- CI passed 29/29 checks
@aibrahim-oai aibrahim-oai force-pushed the dev/publish-python-runtime-for-sdk-pin branch from e0a934c to c16de8e Compare June 2, 2026 19:32
@aibrahim-oai aibrahim-oai merged commit 34dc08c into main Jun 2, 2026
31 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/publish-python-runtime-for-sdk-pin branch June 2, 2026 22:41
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 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