Skip to content

Install standalone archives with checksum verification#18901

Closed
efrazer-oai wants to merge 2 commits into
efrazer/standalone-installer-artifactsfrom
efrazer/installer-checksums
Closed

Install standalone archives with checksum verification#18901
efrazer-oai wants to merge 2 commits into
efrazer/standalone-installer-artifactsfrom
efrazer/installer-checksums

Conversation

@efrazer-oai

@efrazer-oai efrazer-oai commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR changes the standalone installers to use the release files from #18910.

Before this change, the installers downloaded the npm tarball and reached into package/vendor/... to find the native files. That made the installer depend on npm package internals.

Now the installers download the standalone archive for the current platform, download codex-installer_SHA256SUMS, verify the archive hash, and then unpack the archive into the managed standalone release directory.

The install flow is:

  1. Resolve the Codex version.
  2. Pick the matching codex-standalone-<platform>-<version>.tar.gz archive.
  3. Download codex-installer_SHA256SUMS.
  4. Check the archive SHA-256 before extraction.
  5. Stage and activate the release.

This keeps npm packaging and standalone install packaging separate.

Stack

  1. Publish standalone installer release archives #18910: publish standalone installer archives and their checksum file.
  2. Install standalone archives with checksum verification #18901, this PR: make the Unix and Windows installers download those archives and verify them before install.

Tests

Tests: installer shell syntax check, checksum parsing checks, a local fake-release Unix installer smoke covering checksum download, standalone archive download, verification, extraction, install, and visible codex --version, plus a local handoff smoke where this installer consumed a standalone archive produced by #18910's staging script.

@efrazer-oai efrazer-oai marked this pull request as ready for review April 21, 2026 22:31
@efrazer-oai efrazer-oai requested a review from bolinfest April 21, 2026 22:31

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

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


step "Downloading Codex CLI"
expected_digest="$(release_asset_digest "$asset" "$resolved_version")"
download_file "$(release_url_for_asset "codex-installer_SHA256SUMS" "$resolved_version")" "$checksums_path"

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 Add fallback when checksum asset is missing for old releases

This now always downloads codex-installer_SHA256SUMS for the requested --release. Historical tags published before this workflow change will not contain that asset, so pinned installs fail early (404) even when the tarball exists. The previous path used release metadata and remained compatible with older versions.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Imo it's worth forcing installs past this point to require a checksum.

Write-Step "Downloading Codex CLI"
Invoke-WebRequest -Uri $assetMetadata.Url -OutFile $archivePath
Test-ArchiveDigest -ArchivePath $archivePath -ExpectedDigest $assetMetadata.Sha256
Invoke-WebRequest -Uri $checksumsUrl -OutFile $checksumsPath

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 Keep Windows installer compatible with pre-checksum releases

The PowerShell installer now unconditionally fetches codex-installer_SHA256SUMS from the target release. Older release tags that predate this new asset will fail installation for explicit -Version/--release requests, even though the archive is present. A compatibility fallback is needed to avoid regressing pinned-version installs.

Useful? React with 👍 / 👎.

@efrazer-oai efrazer-oai Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as above, but could be wrong. Will leave to @viyatb-oai and @bolinfest to decide.

@efrazer-oai efrazer-oai requested a review from viyatb-oai April 21, 2026 22:40
@efrazer-oai efrazer-oai force-pushed the efrazer/installer-checksums branch from 5921501 to f96b06b Compare April 22, 2026 00:04
@efrazer-oai efrazer-oai changed the title Verify standalone installer archives with release checksums Install standalone archives with checksum verification Apr 22, 2026
@efrazer-oai efrazer-oai changed the base branch from main to efrazer/standalone-installer-artifacts April 22, 2026 00:05
@efrazer-oai efrazer-oai marked this pull request as draft April 22, 2026 00:05
@efrazer-oai efrazer-oai force-pushed the efrazer/installer-checksums branch from f96b06b to a45f5ce Compare April 22, 2026 01:08
@efrazer-oai efrazer-oai force-pushed the efrazer/installer-checksums branch from a45f5ce to a2cb4ee Compare April 28, 2026 23:02
@efrazer-oai efrazer-oai force-pushed the efrazer/standalone-installer-artifacts branch from 3cb7390 to 85a00e8 Compare April 29, 2026 20:26
@efrazer-oai efrazer-oai force-pushed the efrazer/installer-checksums branch from a2cb4ee to 9c24168 Compare April 29, 2026 20:26
@efrazer-oai efrazer-oai force-pushed the efrazer/installer-checksums branch from 9c24168 to 0f248b8 Compare April 30, 2026 17:25
@efrazer-oai efrazer-oai marked this pull request as ready for review April 30, 2026 18:45
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this May 15, 2026
@viyatb-oai viyatb-oai reopened this May 15, 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