Skip to content

release: consume standalone zsh artifacts - #30116

Merged
bolinfest merged 1 commit into
mainfrom
pr30116
Jun 25, 2026
Merged

release: consume standalone zsh artifacts#30116
bolinfest merged 1 commit into
mainfrom
pr30116

Conversation

@bolinfest

@bolinfest bolinfest commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Why

Once #30114 publishes zsh independently, regular Rust releases should reuse that protected, versioned artifact set instead of rebuilding identical zsh binaries for every Codex version. Keeping the zsh release tag explicit in the workflow also makes future artifact upgrades deliberate and easy to review.

This PR assumes the first standalone artifact release will be published as codex-zsh-v0.1.0 before this change lands.

What changed

  • Added CODEX_ZSH_RELEASE_TAG near the top of .github/workflows/rust-release.yml, initially pinned to codex-zsh-v0.1.0.
  • Download the standalone release’s generated codex-zsh DotSlash manifest before assembling Linux and macOS Codex packages.
  • Added a --zsh-manifest package-builder override so release packaging fetches the matching target archive and verifies the size and SHA-256 digest recorded in that manifest.
  • Removed the reusable zsh build job from regular Rust releases.
  • Stopped copying zsh archives into each Rust release and stopped regenerating a zsh DotSlash manifest there.

Windows packaging remains unchanged because the patched zsh resource is only shipped for supported Unix targets.

Testing

  • Added package-helper coverage that supplies a standalone manifest override and verifies the extracted zsh bytes.
  • Ran the scripts/codex_package unit test suite.
  • Validated .github/scripts/build-codex-package-archive.sh with bash -n.

@bolinfest
bolinfest requested a review from a team as a code owner June 25, 2026 20:28
@bolinfest
bolinfest changed the base branch from main to pr30114 June 25, 2026 20:28

@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: b2f1426016

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

--entrypoint-dir "target/${TARGET}/release" \
--archive-dir "dist/${TARGET}"
--archive-dir "dist/${TARGET}" \
--zsh-manifest "${RUNNER_TEMP}/codex-zsh"

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.

P1 Badge Emit a sha256 zsh DotSlash manifest before consuming it

When this step passes the generated codex-zsh release manifest into the package builder, the build will reject the manifest that .github/workflows/rust-release-zsh.yml publishes because facebook/dotslash-publish-release defaults platform entries to hash: "blake3", while scripts/codex_package/dotslash.py still hard-fails unless the hash is exactly sha256. The same failure applies to the macOS copy of this step, so release package archives will fail with Unsupported codex-zsh hash 'blake3' unless the zsh DotSlash config explicitly requests sha256 or the fetcher learns BLAKE3 first.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to sha256 in #30114.

@bolinfest
bolinfest requested review from cconger and viyatb-oai June 25, 2026 20:35
bolinfest added a commit that referenced this pull request Jun 25, 2026
## Why

The patched zsh artifacts rarely change, but
`.github/workflows/rust-release-zsh.yml` currently runs as part of every
Rust release. Rebuilding the same four binaries for each Codex version
wastes release capacity and ties an independently versioned runtime
dependency to the main release cadence.

This establishes the producer side of a build-once flow. The existing
Rust release workflow remains unchanged until the first standalone
artifact release has been published and the checked-in DotSlash
manifests can be updated with its URLs and checksums.

## What changed

- Run the zsh release workflow for protected `codex-zsh-vX.Y.Z` tags
instead of as a reusable workflow.
- Validate the semantic release tag before starting the platform builds.
- Publish the four zsh archives to a GitHub prerelease so the release
never becomes the repository latest release.
- Publish the generated `codex-zsh` DotSlash manifest alongside the
archives.
- Document how to publish the next artifact version after changing the
pinned zsh commit or patch.

## Tag protection

An active repository tag ruleset named `codex-zsh-v*.*.*` targets
`refs/tags/codex-zsh-v*.*.*`. It restricts tag creation, updates,
deletion, and non-fast-forward changes; requires linear history; and
limits bypass to the configured repository role.

This was verified with:

```shell
gh api repos/openai/codex/rulesets/18140982
```

The response reported `"enforcement":"active"`, the expected tag
condition, and the `creation`, `update`, `deletion`, `non_fast_forward`,
and `required_linear_history` rules.

## Rollout

After this lands, publish the first `codex-zsh-vX.Y.Z` release. A
follow-up can then update the checked-in DotSlash manifests and remove
the zsh rebuild from `.github/workflows/rust-release.yml`.



---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/30114).
* #30116
* __->__ #30114
Base automatically changed from pr30114 to main June 25, 2026 20:56
@bolinfest
bolinfest requested a review from a team June 25, 2026 21:05
@bolinfest
bolinfest merged commit e23e7cb into main Jun 25, 2026
46 of 61 checks passed
@bolinfest
bolinfest deleted the pr30116 branch June 25, 2026 21:05
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 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.

2 participants