Skip to content

[codex] Avoid Windows EBUSY when packaging Qwen runtime#9

Merged
DragonnZhang merged 1 commit into
mainfrom
dragon/fix-windows-qwen-runtime-ebusy
Jun 8, 2026
Merged

[codex] Avoid Windows EBUSY when packaging Qwen runtime#9
DragonnZhang merged 1 commit into
mainfrom
dragon/fix-windows-qwen-runtime-ebusy

Conversation

@DragonnZhang

Copy link
Copy Markdown
Collaborator

What this PR does

Moves the vendored Qwen Code runtime out of regular Windows files copying and into win.extraResources, matching the existing Windows workaround for Bun, Codex, and uv. The runtime still lands at resources/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 locked while copying apps/electron/vendor/qwen-code/cli.js into release/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 same extraResources path.

Reviewer Test Plan

How to verify

Re-run the Desktop Release workflow for version 0.0.2. The Windows job should proceed past the previous EBUSY copy failure for vendor/qwen-code/cli.js. macOS and Linux should be unaffected because this changes only the win section 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-config succeeded, apps/electron/electron-builder.yml parsed as YAML, generated config contains both !vendor/qwen-code/**/* under win.files and vendor/qwen-code -> app/vendor/qwen-code under win.extraResources, and git diff --check HEAD~1..HEAD passed.

Tested on

OS Status
🍏 macOS ✅ tested
🪟 Windows ⚠️ not tested locally
🐧 Linux ⚠️ not tested locally

Environment (optional)

Local macOS shell in /Users/dragon/Documents/openwork; hosted Windows failure inspected with gh.

Risk & Scope

  • Main risk or tradeoff: Qwen runtime placement now follows the extraResources copy path on Windows, but the destination stays under resources/app/vendor/qwen-code to preserve packaged runtime resolution.
  • Not validated / out of scope: a full hosted Windows Desktop Release rerun has not completed yet from this PR branch.
  • Breaking changes / migration notes: none.

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.jsEBUSY copy failure。macOS 和 Linux 不应该受影响,因为这次只改 electron-builder config 的 win section。

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

OS Status
🍏 macOS ✅ tested
🪟 Windows ⚠️ not tested locally
🐧 Linux ⚠️ not tested locally

Environment (optional)

本地 macOS shell,目录 /Users/dragon/Documents/openwork;托管 Windows 失败日志通过 gh 查看。

Risk & Scope

  • Main risk or tradeoff: Windows 上 Qwen runtime 现在走 extraResources copy path,但目标位置仍然保持在 resources/app/vendor/qwen-code,以维持 packaged runtime resolution。
  • Not validated / out of scope: 还没有从这个 PR 分支完整跑完一次 hosted Windows Desktop Release。
  • Breaking changes / migration notes: 无。

Linked Issues

References https://github.com/modelstudioai/openwork/actions/runs/27131379021

@DragonnZhang DragonnZhang merged commit bd08d77 into main Jun 8, 2026
1 check passed
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