Repository navigation
chore: clean up repo, package ARM64 npm targets, and ship Portato installers - #432
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…tallers - Repo cleanup: remove legacy scripts/, experiments/, archival research/validation/spec docs, desktop spike, orphaned BGE fixtures, broken script-importing tests, and unused deps/scripts; fix dangling references, rewrite CONTRIBUTING.md and examples/README.md, move Rust shard runner to .github/scripts/run-rust-lib-shard.ts, and harden vite.config.ts. - ARM64 npm packaging: add @mlx-node/core-win32-arm64-msvc (with openblas.dll and include/), enable Linux/Windows ARM64 optionalDependencies, and fix CI artifact upload/verification and release version checks. - Desktop release (macOS & Windows): - Rename macOS update ZIP to Portato-<ver>-darwin-arm64.zip while keeping bundle ID ai.mlxnode.desktop and mlx-node data dir. - Rename Windows executable to Portato.exe with win32metadata and explicit AppUserModelID outside Microsoft Store MSIX. - Replace the Windows portable ZIP with a two-pass Authenticode-signed ARM64 NSIS setup installer (Portato-<ver>-win32-arm64-setup.exe), update WinGet manifests to nullsoft (MinimumOSVersion 10.0.26100.0), add a silent install/uninstall CI smoke test, and keep the unsigned Store MSIX workflow artifact.
8c0f1ff to
d9ea35c
Compare
## Problem The v0.0.25 Desktop Release ([run 46222864673](https://github.com/mlx-node/mlx-node/actions/runs/46222864673)) failed in `Package Windows ARM64` on both attempts with the same error: ``` Error: EPERM, Permission denied: 'C:\a\mlx-node\mlx-node\packages\desktop\out\.nsis-uninst\.nsis-uninst-stage' at rmSync (node:fs:1593:18) at buildWindowsUninstaller (packages/desktop/scripts/windows-nsis.ts:763:5) ``` The two-pass NSIS signing code from #432 never ran in a desktop release before v0.0.25. The `finally` block removes the stage dir about 1 s after `uninst-gen.exe` exits, and Windows still holds a handle on that freshly written and executed exe. npm 0.0.25 is published; only the desktop installers are blocked. ## Fix ``` pre-clean (before each build) rmSync + retries → still throws (needs a clean stage) finally (after each build) rmSync + retries → on failure: warn, continue ``` - `rmSync` gets `maxRetries: 10, retryDelay: 250` (about 14 s with linear back-off). Node retries `EPERM`/`EBUSY` only with `maxRetries`. - In the two `finally` blocks, a handle that outlives the retries only warns. The stage dir is outside `appPath`, and later steps use only the exact `Uninstall.exe` path (`package-windows.ts:303-325`, `desktop-release.yml:360-367`), so a leftover dir is never packaged or signed. ## Verification - `windows-nsis.test.ts`: 11 passed. Typecheck and format are clean. - The Windows job uses the `desktop-release` environment (only `main` and `v*`), so a branch dry run cannot run it. After merge, I will dispatch a desktop dry run from `main` (`dry_run=true`, `sign_windows=false`) to prove the Windows packaging, then cut 0.0.26. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
… test (#441) ## Summary The desktop dry run from `main` ([46233085390](https://github.com/mlx-node/mlx-node/actions/runs/46233085390)) failed in "Smoke-test silent NSIS install and uninstall" with `Uninstall.exe was not self-removed after silent uninstall`. The installer came with #432, and no CI run reached this step before. The uninstaller works. The smoke test stopped waiting too early: ``` Uninstall.exe /S (launcher) ├─ copies itself to %TEMP%\~nsuN.tmp\Un.exe ├─ starts "Un.exe /S _?=<dir>" └─ exits 0 at once <- the old test watched only this, for 60 s Un.exe <- does the real uninstall (~8,400 manifest entries) └─ removes files, ARP key, shortcuts, Uninstall.exe (~75-80 s at CI speed) ``` - **Smoke test:** it waits for the launcher, then finds its ` _?=` child by `ParentProcessId`. It waits up to 10 minutes for the child and fails on a non-zero exit code, with a list of the files left. All the old file and registry checks still run after that. - **Uninstaller:** it exits 1 when `Uninstall.exe` is still there after the final `Delete`. Before, a locked `Uninstall.exe` left the copy exiting 0, so the failure was silent. ## Verification I ran the exact step script on a real Windows 11 ARM64 machine, over SSH (non-interactive, like the runner). The payload was the v0.0.24 app (7,618 files, 1.86 GB, signatures stripped). A CPU cap made the install as slow as on CI (~140 s against ~135 s). | Generator + smoke | Condition | Result | |---|---|---| | main + main | CI-speed cap | **FAIL** with the CI error (step 212 s, CI 196 s); `Un.exe` still running, finished ~78 s after start | | main + fixed | CI-speed cap | PASS, uninstall 74 s | | fixed + fixed | CI-speed cap | PASS, uninstall 78 s | | fixed + fixed | real speed | PASS, uninstall 22 s | | main + fixed | `Uninstall.exe` held open | the copy exits **0** and the file stays (silent success) | | fixed + fixed | `Uninstall.exe` held open | **FAIL**, `Silent NSIS uninstall failed with exit code 1`, files listed | - I ruled out a `MessageBox` in silent mode: every box sits under `${IfNot} ${Silent}`. - `vp test packages/desktop/__test__/windows-nsis.test.ts`: 14 passed. The new tests fail when their part of the fix is reverted. - `yarn typecheck`, lint and `vp fmt --check` pass on the touched files. - CI cannot run the Windows job from this branch, because the `desktop-release` environment allows only `main` and `v*` tags. A dry run from `main` after the merge is the real check. ## Review decisions (no change) - **The test can miss an `Un.exe` that exits before the first process query.** It cannot in practice. `Un.exe` deletes about 8,400 manifest entries, which took 13-22 s at full speed and 75-80 s at CI speed on the test machine. The process query runs less than 1 s after the launcher exits. A `Win32_ProcessStopTrace` subscription needs admin rights and makes the test more complex, for a window that does not occur. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Single consolidated commit covering repo cleanup, ARM64 native npm packaging, and desktop release packaging updates for macOS and Windows.
1. Repo cleanup
scripts/,experiments/,.claude/skills/perf-tracker/,.mlx-agent/workflows/,bench_code_prompt.txt,packages/desktop/spike/, orphanedfixtures/rerank/bge/*(keepingcases.jsonandmanifest.json), and archivaldocs/research/,docs/validation/,docs/superpowers/specs/, and superseded design specs.cli,trl, anddesktopmanifests and syncedyarn.lock.scripts/and fixed dangling references across code, tests, workflows, and docs; rewroteCONTRIBUTING.mdandexamples/README.md..github/scripts/run-rust-lib-shard.tswith pinned Node 26 in_rust-lib-shard.yml, hardenedvite.config.ts(Windows paths,**/*.cu.incfmt ignore), and fixedcargo fmt.2. ARM64 npm packaging
packages/core/npm/win32-arm64-msvc(shippingopenblas.dllandinclude/) and enabled bothlinux-arm64-gnuandwin32-arm64-msvcoptional dependencies on@mlx-node/core..github/workflows/ci.ymlto verify/upload Windows runtime files and check commit subjects (%s) during release checks.3. Desktop releases (
Portato)mlx-node-<ver>-darwin-arm64.ziptoPortato-<ver>-darwin-arm64.zip(+.blockmapandlatest-mac.yml) while preservingBUNDLE_ID(ai.mlxnode.desktop),updaterCacheDirName,mlx-nodedata directory, and DMG naming.mlx-node.exetoPortato.exe, addedwin32metadata, and setapp.setAppUserModelId('ai.mlxnode.desktop')outside Store MSIX..zipwith a two-pass Authenticode-signed ARM64 NSIS setup installer (Portato-<ver>-win32-arm64-setup.exe, including signedUninstall.exe):zlibcompression (< 2 GiB ceiling, fast installs, Komac-compatible).26100) on ARM64 in.onInitand WinGetMinimumOSVersion: 10.0.26100.0..portato-manifest.txtfor upgrade/uninstall cleanup (preserving user data in%APPDATA%\mlx-nodeand%USERPROFILE%\.mlx-node, plus any non-manifested files).$INSTDIRPIDs only, setsSystem.AppUserModel.IDon Start Menu and Desktop shortcuts, and verifiesInstallLocationbefore removing shared shortcuts/ARP entries.komac updateworkflow tonullsoft, added a Windows CI silent install/uninstall smoke test, and preserved the unsigned Microsoft Store.msixworkflow artifact.Verification
yarn typecheck&yarn lint(0 warnings, 0 errors)vp test run --project pure-ts --project darwin-ts(371 passed / 8,660 tests, including all 46 desktop test files / 709 tests)cargo fmt --all -- --check,cargo check -p mlx-core --lib --tests,cargo test -p mlx-core --lib marker_sanitizer_list_matches_spec_token_tableruby -ryaml) &actionlintoxnode packages/desktop/scripts/check-release.ts resolve --manifest packages/desktop/package.jsongpt-6.2-sol)Note
Before cutting the next npm release tag, make sure npm Trusted Publishing is configured for
@mlx-node/core-linux-arm64-gnuand@mlx-node/core-win32-arm64-msvc.