[Windows] the npm package acceptance cannot run on Windows, and docs/installation.md says so
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 10/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- github-actions, node.js, typescript
- 領域
- build-system, ci-cd, cli
研究方向
The issue describes changes across scripts/verify-cli-release.mjs, scripts/verify.mjs, and the Windows smoke and BYOK test runs; it also reports that an implementation already passes on a contributor branch. Read those scripts and the branch evidence first, then check which changes, if any, remain unmerged. Done means Windows package acceptance runs successfully and docs/installation.md reflects the verified behavior.
由索引模型根據 Issue 內容生成。
描述
Labels requested: ci, documentation, needs-triage
Product or interface
Source build or repository tooling — the npm package acceptance of the CLI release.
Version
- Source:
main@3c21163(repository version0.7.2), tagv0.7.2=c6c7f28 - Node.js v24.18.0, pnpm 9.12.0
Platform
Windows
OS version and architecture
Windows 11 x64 (build 26200)
Issue area
Build / CI / source distribution
What happens
docs/installation.md states, in the installation section:
validated on Linux and macOS; Windows package acceptance is currently not run
That gap is still open, and it is not only a documentation statement — the acceptance itself cannot run on Windows today. scripts/verify-cli-release.mjs refuses the platform outright, and the release validator assumes a POSIX installation layout.
Steps to reproduce
scripts/verify-cli-release.mjsstarts with a platform guard that throws for anything that is not Linux or macOS.- The validator then assumes the POSIX npm layout (
<prefix>/lib/node_modules/…), the POSIX launcher (<prefix>/bin/mcode), and runsnpmas a command — which Node cannot start on Windows, where the executable isnpm.cmd. - The cleanup at the end of the run removes the temporary installation with a single
rmSyncwithout retries, which fails withEPERMon Windows while the freshly installed files are still closing. scripts/verify.mjsblocks thepackageprofile on Windows a second time, independently of the validator.
Expected and actual behavior
- Expected: the package acceptance runs on Windows like it runs on Linux and macOS, and the documentation line reflects what is actually verified.
- Actual: the acceptance is Windows-incompatible in five places, and
pnpm verify --profile packagecannot be executed on a Windows host at all.
What I changed
Branch: ci/windows-package-acceptance (commits f5ef17b, b029b41, a8cf597, ade841c, f719a0a, based on main @ 3c21163)
- The platform guard allows
win32alongsidelinuxanddarwin; the POSIX behaviour is unchanged. - npm is started without a command shell. The previous attempt built a
cmd.exe /ccommand line, which is not safe to quote:cmd.exehas no backslash escape, so a path containing"would end the quoted section and the rest would be parsed as command syntax, and%would still expand. npm now runs through its JavaScript entry point withprocess.execPath, the same pattern the repository already uses intest/windows-contract.test.mjs. - The installation layout and launcher are resolved for Windows (
<prefix>/node_modules/@minimax-ai/codeandmcode.cmd); the POSIX branch is byte-identical. - The cleanup retries with a delay and warns instead of failing the acceptance when Windows still holds a lock on a just-closed file.
- The
packageprofile is no longer blocked on Windows inscripts/verify.mjs.
The test step needed room on Windows
The acceptance ends with node --test test/smoke.test.mjs test/byok.test.mjs. On Windows those two files need substantially more time than the 240 s the wrapper allowed — measured on this host:
| file | duration | of which |
|---|---|---|
test/smoke.test.mjs |
175 036 ms (20 pass / 0 fail) | the proxy subtest alone 107 707 ms for eight children |
test/byok.test.mjs |
242 315 ms (2 pass / 0 fail) | first test 235 394 ms |
| sum | ~417 s | against the previous 240 s budget |
The reason is structural rather than incidental: test/smoke.test.mjs allows runtimeTimeoutMs = 30000 on Windows for each of the eight children in the proxy subtest, so 8 × 30 s = 240 s is already the entire outer budget before byok contributes anything. On Linux and macOS the per-child budget is 15 s, which still fits.
The wrapper's budget was raised accordingly, and the proxy subtest was brought down to 37 305 ms without weakening it: it still checks all eight variable names individually, and with the proxy handling in the child process broken, all eight cases fail (mutation evidence in the branch report).
Evidence
The acceptance passes on Windows with the branch applied:
MCODE_RELEASE_TAG=v0.7.2 \
MCODE_RELEASE_ARCHIVE=<...>/minimax-code-0.7.2.tar.gz \
MCODE_VERIFY_REPORT_DIR=<...> \
pnpm verify --profile package
→ test:release-package: PASS
The report the acceptance writes confirms the platform and the revision:
{
"status": "PASS",
"version": "0.7.2",
"revision": "ade841c08eed06f6327dc767f5b87e95470c3dcd",
"platform": "win32",
"arch": "x64",
"node": "v24.18.0"
}
The revision above is the commit before the documentation change, so the ordering is verifiable: the acceptance was green, and only then did docs/installation.md change. A second run on the earlier commit b029b41 is green as well, and a run on the final commit f719a0a takes 223.6 s.
The installed CLI itself is exercised by the acceptance — the npm global install, mcode.cmd --version, the SQLite binding, the bundled ripgrep, and the smoke and BYOK suites all run against the installed package, not against the source tree.
One caveat about the runtime
The acceptance is time-sensitive, and the eight proxy cases in the smoke suite now start their CLI children concurrently. On a machine that is already busy — for example when another acceptance run is in flight — those children compete for CPU and the step can fail intermittently. On an idle Windows host the step passes in ~224 s against the 600 s budget. If the step is ever added to a CI matrix, it should not run in parallel with other heavy jobs on the same runner.
What is deliberately not changed
The release matrix in scripts/lib/cli-release.mjs (cliReleaseTargets = ['ubuntu-latest', 'macos-latest']) and the workflow file are not touched — that is a release-pipeline decision. The four edits that would add a Windows job are prepared as a diff in the branch report and left for the maintainers:
scripts/lib/cli-release.mjs:30— addwindows-latesttocliReleaseTargets.github/workflows/cli-release.yml— the install job matrixscripts/publish-cli-release.mjs:24and:49— the publish targets
Before submitting
- I have searched existing issues.
- I have included my version and removed sensitive information.
- 主要語言
- TypeScript
- 星號
- 2.3k
- 分支
- 315
- 平均合併
- 3 小時 54 分鐘
- 30 天內合併 PR
- 9
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
MiniMax-AI/minimax-code 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
MiniMax-AI/minimax-code#639 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
MiniMax-AI/minimax-code#636 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
MiniMax-AI/minimax-code#615 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
MiniMax-AI/minimax-code#556 · 4 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
MiniMax-AI/minimax-code#507 ·
維護者通常 1 天內回覆
查看 MiniMax-AI/minimax-code 的全部 Issue
相似的 Issue
-
[Bug]: A Markdown link with both a :line suffix and a #L fragment opens a path containing ":line"未關閉
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
status:needs-triage type:bug workstream:refimpl
難度 2/5 1-3 小時 新手友好度 76/100
GenAI-Security-Project/agent-control-standard#764 ·
維護者通常 1 天內回覆
-
good first issue
難度 2/5 1-3 小時 新手友好度 85/100
TanbirRamim/vibereel#39 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 72/100
lingdojo/kana-dojo#34988 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆