Skip to content

fix: keep releases in sync across platforms (Windows updates) - #98

Merged
mbuckaway merged 2 commits into
fork/mainfrom
fix/win32-update-sync
Aug 31, 2026
Merged

fix: keep releases in sync across platforms (Windows updates)#98
mbuckaway merged 2 commits into
fork/mainfrom
fix/win32-update-sync

Conversation

@mbuckaway

Copy link
Copy Markdown
Owner

Fixes Windows native updates and guarantees every release stays in sync across all six supported platforms.

Why Windows didn't update

  • The Windows box runs 0.39.1-MB.1.31, which predates the zip-extraction fix (shipped in 1.37) — its staged updater downloads the manifest-referenced zip and stages it verbatim, and the startup swap rejects the non-executable. A pre-fix CLI cannot pull the fixed CLI automatically (needs a one-time manual install of the fixed release).
  • Even the 1.37 win32 extraction was PATH-fragile: it used bare tar, which Git-for-Windows GNU tar (which cannot read zips) can shadow, and which is absent pre-Win10-1803/Server 2016. The repo already resolves %SystemRoot%\System32\tar.exe for this exact reason (fd-detect.ts).
  • Nothing in the release pipeline failed if a supported platform's artifacts were missing.

Changes

  • native-stage.ts: win32 extraction resolves System32 tar.exe and falls back to PowerShell Expand-Archive via -EncodedCommand (literal-path safe: spaces/apostrophes/backslashes). Unix path unchanged.
  • produce-manifest.mjs: fails loudly (exit 1) if any of the six supported platforms (darwin/linux/win32 × arm64/x64) is missing; KIMI_CODE_REQUIRED_PLATFORMS override for single-platform tests.
  • native-manifest.ts: unsupported-arch error lists the supported platforms + remediation (keeps the existing not found contract).
  • Tests: win32 extraction happy-path + forced-fallback cases (run on the re-enabled Windows CI job); the exec-bit assertion and the linux unzip test are gated off win32; the release-artifacts guard is covered.
  • ci.yml: re-enable test-windows, scoped to test/cli/update + test/scripts/native (the full suite was disabled for Windows flakiness).
  • Changeset: @moonshot-ai/kimi-code patch.

Operator step (after this release ships)

The Windows box needs a one-time manual install of the fixed release (its 1.31 CLI cannot self-upgrade); afterwards kimi upgrade works. Steps are in the plan (close kimi, rename-aside, replace %USERPROFILE%\.kimi-code\bin\kimi.exe).

Windows native updates were failing end-to-end: pre-1.37 CLIs staged the
downloaded zip verbatim (swap rejects it), and even the 1.37 win32
extraction was PATH-fragile (bare tar can be shadowed by Git-for-Windows
GNU tar, which cannot read zips). The pipeline also silently omitted any
platform whose build was missing.

- native-stage.ts: resolve System32 tar.exe for win32 extraction, falling
  back to PowerShell Expand-Archive via -EncodedCommand (literal-path
  safe); unix path unchanged.
- produce-manifest.mjs: fail loudly if any of the six supported platforms
  is missing (KIMI_CODE_REQUIRED_PLATFORMS override for tests).
- native-manifest.ts: unsupported-arch error now lists the supported
  platforms and remediation.
- Tests: win32 extraction happy-path + forced-fallback cases
  (run on the re-enabled Windows CI job); exec-bit assertion and linux
  unzip test gated off win32; release-artifacts guard covered.
- ci.yml: re-enable test-windows, scoped to the update + native-script
  suites.
- changeset: @moonshot-ai/kimi-code patch.
preflight.test.ts package-manager detection (npm/pnpm/yarn/bun -g) is
Windows-incompatible and predates this change; exclude it so the Windows
job covers the win32 staged-updater paths it was re-enabled for.
@mbuckaway
mbuckaway merged commit 640202e into fork/main Aug 31, 2026
12 checks passed
@mbuckaway
mbuckaway deleted the fix/win32-update-sync branch August 31, 2026 04:11
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