Skip to content

fix(ci): prevent corrupted Metal wheel releases - #2379

Open
provoke210 wants to merge 2 commits into
abetlen:mainfrom
provoke210:fix/metal-wheel-integrity
Open

provoke210 wants to merge 2 commits into
abetlen:mainfrom
provoke210:fix/metal-wheel-integrity

Conversation

@provoke210

Copy link
Copy Markdown

Problem

The Metal workflow built the same py3-none-macosx_11_0_arm64.whl filename on both macos-14 and macos-15, then downloaded both artifacts into one dist2 directory with merge-multiple: true. The published v0.3.36 Metal wheel has a broken ZIP entry (lib/cmake/ggml/ggml-config.cmake), while both original artifacts from run 36821195139 pass ZIP CRC validation. Their SHA-256 prefixes are 37c2f21e (macos-14) and 9b459c85 (macos-15), but the released wheel's is 64c98e6a. The released file starts with 327,369 bytes identical to the macos-15 artifact and ends with 671,538 bytes identical to the macos-14 artifact. This byte-level mix shows the collision damaged the wheel during artifact merging, after each build completed.

Change

Build one Metal wheel on macos-14 using the package's py3-none wheel setting. Download that artifact by name, and verify every ZIP member both before artifact upload and before publishing the release. Require exactly one wheel at each stage.

Validation

  • The validator accepts the published v0.3.30 Metal wheel and rejects the damaged v0.3.34 and v0.3.36 wheels.
  • Built a v0.3.36 Metal wheel locally from its source distribution; the resulting py3-none archive passes the new validator.
  • Verified the workflow YAML parses, the script compiles, and git diff --check passes.
  • The release workflow itself requires GitHub Actions to run; existing damaged release assets still need a maintainer rebuild/reupload.

Refs #2352.

AI assistance

Assisted by OpenAI Codex for root-cause analysis, implementation, local validation, and this PR description.

Build one py3-none Metal wheel and download its artifact by name so two
macOS jobs cannot write different wheels to the same release path.
Verify the wheel ZIP before artifact upload and before release.

Assisted-by: OpenAI Codex
Signed-off-by: Haozhe Jiang <162801044+provoke210@users.noreply.github.com>
Assisted-by: OpenAI Codex
Signed-off-by: Haozhe Jiang <162801044+provoke210@users.noreply.github.com>

This branch has not been deployed

No deployments
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