Skip to content

Install standalone archives with checksum verification#18901

Draft
efrazer-oai wants to merge 1 commit intoefrazer/standalone-installer-artifactsfrom
efrazer/installer-checksums
Draft

Install standalone archives with checksum verification#18901
efrazer-oai wants to merge 1 commit intoefrazer/standalone-installer-artifactsfrom
efrazer/installer-checksums

Conversation

@efrazer-oai
Copy link
Copy Markdown
Contributor

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

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: formatter check, installer syntax checks, checksum parsing smoke tests, and a local fake-release installer smoke covering checksum download, standalone archive download, verification, extraction, install, and visible codex --version.

@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
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

@efrazer-oai efrazer-oai Apr 21, 2026

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
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.

1 participant