fix: keep releases in sync across platforms (Windows updates) - #98
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Windows native updates and guarantees every release stays in sync across all six supported platforms.
Why Windows didn't update
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).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.exefor this exact reason (fd-detect.ts).Changes
native-stage.ts: win32 extraction resolves System32tar.exeand falls back to PowerShellExpand-Archivevia-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_PLATFORMSoverride for single-platform tests.native-manifest.ts: unsupported-arch error lists the supported platforms + remediation (keeps the existingnot foundcontract).unziptest are gated off win32; the release-artifacts guard is covered.ci.yml: re-enabletest-windows, scoped totest/cli/update+test/scripts/native(the full suite was disabled for Windows flakiness).@moonshot-ai/kimi-codepatch.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 upgradeworks. Steps are in the plan (close kimi, rename-aside, replace%USERPROFILE%\.kimi-code\bin\kimi.exe).