Skip to content

fix(release): build and publish Windows x86_64 wheels#1735

Closed
ashishpatel26 wants to merge 1 commit into
headroomlabs-ai:mainfrom
ashishpatel26:fix/1144-windows-wheel-core-ext
Closed

fix(release): build and publish Windows x86_64 wheels#1735
ashishpatel26 wants to merge 1 commit into
headroomlabs-ai:mainfrom
ashishpatel26:fix/1144-windows-wheel-core-ext

Conversation

@ashishpatel26

Copy link
Copy Markdown
Contributor

Summary

  • release.yml's wheel matrix never had a Windows target — only linux x86_64/arm64 and macOS arm64 wheels are built. No Windows wheel has ever shipped, so pip install headroom-ai on Windows falls back to source (or fails outright), leaving headroom._core missing and every compressor silently no-op'ing (compress() catches ModuleNotFoundError and returns input unchanged).
  • Rust side is already Windows-ready: dynamic ORT loading via ort-load-dynamic on cfg(windows) landed for the AVX2 SIGILL fix (fix(core): load ONNX Runtime dynamically so headroom._core imports on non-AVX2 x86-64 #1715), and ort-sys ships prebuilt ONNX Runtime binaries for x86_64-pc-windows-msvc — no CMake/source build needed the way x86_64-apple-darwin requires.
  • Adds a windows-2022 / x86_64-pc-windows-msvc row to build-wheels, plus a matching smoke-import-wheels entry (PowerShell) that installs the built wheel into a clean venv and imports headroom._core, gating publish the same way the Linux/macOS rows do.

Fixes #1144 (Bug 1 — missing Windows wheel).

Bug 2 in that issue (headroom --help crashing with ModuleNotFoundError: fastapi on a core-only install) is already fixed on main: headroom.proxy.server is lazily imported inside the proxy command, not at CLI module load time. Verified locally by invoking headroom --help with fastapi import blocked via a meta-path finder — exits 0.

Test plan

  • tests/test_release_workflows.py — 28 passed, 1 pre-existing unrelated failure (test_no_native_tls_in_wheel_build_tree, reproduces on clean main too — local cargo tree environment issue)
  • .github/workflows/release.yml parses as valid YAML
  • Verified headroom --help doesn't require fastapi on current main (Bug 2 already fixed)
  • CI run of the new build-wheels / smoke-import-wheels Windows matrix rows on this PR (release.yml triggers a dry-run on PRs touching crates/headroom-py/**... this PR only touches release.yml itself, which is also in the path filter, so the dry-run should fire)

The release.yml wheel matrix never had a Windows target — only
linux x86_64/arm64 and macOS arm64 wheels were built. Since no
prebuilt Windows wheel exists, `pip install headroom-ai` on Windows
falls back to a source build (or fails outright on 0.21.0-0.26.0,
which shipped no Windows-compatible sdist path either), leaving
headroom._core missing and every compressor silently no-op'ing.

Rust side was already Windows-ready (dynamic ORT loading via
ort-load-dynamic on cfg(windows), added for the AVX2 SIGILL fix in
headroomlabs-ai#1715) and ort-sys ships prebuilt ONNX Runtime binaries for
x86_64-pc-windows-msvc, so no CMake/source build is needed the way
it is for x86_64-apple-darwin.

Adds a windows-2022 / x86_64-pc-windows-msvc row to build-wheels and
a matching smoke-import-wheels entry that installs the built wheel
into a clean venv and imports headroom._core, gating publish the
same way the Linux/macOS rows do.

Fixes headroomlabs-ai#1144 (Bug 1). Bug 2 in that issue (headroom --help crashing
on missing fastapi) was already fixed previously — headroom.proxy.server
is lazily imported inside the proxy command, not at CLI module load.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

PR governance

This PR does not yet satisfy the required template fields:

  • Missing required section Description.
  • Missing required section Type of Change.
  • Missing required section Changes Made.
  • Missing required section Testing.
  • Missing required section Real Behavior Proof.
  • Missing required section Review Readiness.
  • Check I have performed a self-review before requesting human review.
  • Check This PR is ready for human review or convert the PR back to draft.

Please update the PR body, or move the PR back to draft while it is still in progress.

@github-actions github-actions Bot added status: needs author action Pull request body or readiness checklist still needs author updates status: has conflicts Pull request has merge conflicts with the base branch labels Jul 3, 2026
@ashishpatel26

Copy link
Copy Markdown
Contributor Author

Closing — duplicate. Upstream already fixed this in #1335 (merged 2026-06-24), which added a more thorough windows-latest wheel row (explicit actions/setup-python, better abi3 fallback matching) than what I proposed here. Issue #1144 (Bug 1) is resolved by that merge; just needs the issue closed/labeled stale.

@ashishpatel26 ashishpatel26 deleted the fix/1144-windows-wheel-core-ext branch July 3, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: has conflicts Pull request has merge conflicts with the base branch status: needs author action Pull request body or readiness checklist still needs author updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] PyPI wheel missing _core Rust extension — compress() silently no-ops; CLI crashes on --help

1 participant