[codex] Avoid Windows EBUSY when packaging Qwen runtime#9
Merged
Conversation
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.
What this PR does
Moves the vendored Qwen Code runtime out of regular Windows
filescopying and intowin.extraResources, matching the existing Windows workaround for Bun, Codex, and uv. The runtime still lands atresources/app/vendor/qwen-code, which is one of the packaged lookup paths used by the desktop runtime resolver.Why it's needed
The Desktop Release run https://github.com/modelstudioai/openwork/actions/runs/27131379021 failed only on Windows after vendoring and building succeeded. electron-builder reached the packaging phase and then failed with
EBUSY: resource busy or lockedwhile copyingapps/electron/vendor/qwen-code/cli.jsintorelease/win-unpacked/resources/app/vendor/qwen-code/cli.js. The existing config already documents this Windows file-locking class for other vendored runtime binaries, so Qwen Code should use the sameextraResourcespath.Reviewer Test Plan
How to verify
Re-run the Desktop Release workflow for version
0.0.2. The Windows job should proceed past the previousEBUSYcopy failure forvendor/qwen-code/cli.js. macOS and Linux should be unaffected because this changes only thewinsection of the electron-builder config.Evidence (Before & After)
Before: Build Windows failed in run https://github.com/modelstudioai/openwork/actions/runs/27131379021/job/80072953167 with
EBUSY: resource busy or locked, copyfile ... vendor\qwen-code\cli.js ... release\win-unpacked\resources\app\vendor\qwen-code\cli.js.After: Local
CRAFT_BRAND=openwork bun run electron:builder-configsucceeded,apps/electron/electron-builder.ymlparsed as YAML, generated config contains both!vendor/qwen-code/**/*underwin.filesandvendor/qwen-code -> app/vendor/qwen-codeunderwin.extraResources, andgit diff --check HEAD~1..HEADpassed.Tested on
Environment (optional)
Local macOS shell in
/Users/dragon/Documents/openwork; hosted Windows failure inspected withgh.Risk & Scope
resources/app/vendor/qwen-codeto preserve packaged runtime resolution.Linked Issues
References https://github.com/modelstudioai/openwork/actions/runs/27131379021
中文说明
What this PR does
这个 PR 把 vendored Qwen Code runtime 从 Windows 的普通
files复制路径移到win.extraResources,和现有 Bun、Codex、uv 的 Windows workaround 保持一致。runtime 最终仍然会落在resources/app/vendor/qwen-code,这是 desktop runtime resolver 已经会查找的 packaged 路径之一。Why it's needed
Desktop Release run https://github.com/modelstudioai/openwork/actions/runs/27131379021 只有 Windows 失败,而且 vendoring 和 build 都已经成功。electron-builder 进入 packaging 阶段后,在把
apps/electron/vendor/qwen-code/cli.js复制到release/win-unpacked/resources/app/vendor/qwen-code/cli.js时失败,错误是EBUSY: resource busy or locked。当前 config 已经为其他 vendored runtime binary 记录了同类 Windows 文件锁问题,所以 Qwen Code runtime 也应该走同样的extraResources路径。Reviewer Test Plan
How to verify
重新运行 Desktop Release workflow,版本填
0.0.2。Windows job 应该跑过之前vendor/qwen-code/cli.js的EBUSYcopy failure。macOS 和 Linux 不应该受影响,因为这次只改 electron-builder config 的winsection。Evidence (Before & After)
Before: Build Windows 在 run https://github.com/modelstudioai/openwork/actions/runs/27131379021/job/80072953167 里失败,错误是
EBUSY: resource busy or locked, copyfile ... vendor\qwen-code\cli.js ... release\win-unpacked\resources\app\vendor\qwen-code\cli.js。After: 本地
CRAFT_BRAND=openwork bun run electron:builder-config成功,apps/electron/electron-builder.yml可解析为 YAML,生成配置里确认win.files包含!vendor/qwen-code/**/*,win.extraResources包含vendor/qwen-code -> app/vendor/qwen-code,并且git diff --check HEAD~1..HEAD通过。Tested on
Environment (optional)
本地 macOS shell,目录
/Users/dragon/Documents/openwork;托管 Windows 失败日志通过gh查看。Risk & Scope
resources/app/vendor/qwen-code,以维持 packaged runtime resolution。Linked Issues
References https://github.com/modelstudioai/openwork/actions/runs/27131379021