[codex] Add Qwen runtime source options to desktop release#8
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
Adds an explicit Qwen Code runtime source selector to the Desktop Release workflow. Release operators can now choose
npm_latest,source_branch, orpinned_package_version; source-branch builds check outQwenLM/qwen-codeat the requested ref and setQWEN_CODE_ROOT, npm-latest builds setQWEN_CODE_VERSION=latest, and pinned builds continue to usepackage.json'sqwenCodeRuntime.versionunless an exact npm version is entered.The vendoring script now resolves npm dist-tags through package metadata before downloading the tarball, so
QWEN_CODE_VERSION=latestresolves to the current npmlatestversion instead of trying to download a nonexistentqwen-code-latest.tgzfile.Why it's needed
The release UI previously had an optional
qwen_code_versiontext field, but leaving it empty silently packaged the pinned0.15.11runtime. That made it too easy to think a desktop release was using the current Qwen Code runtime when it was actually using the package-pinned fallback. The workflow now makes that choice visible and supports the three intended release modes: current npm latest, a Qwen Code source ref, or the pinned runtime version.Reviewer Test Plan
How to verify
Open the Desktop Release workflow dispatch form and confirm the new
qwen_code_sourcechoice containsnpm_latest,source_branch, andpinned_package_version. Forsource_branch, confirmqwen_code_refcontrols theQwenLM/qwen-codecheckout. Fornpm_latest, confirm the build logs show the real npm version resolved from thelatestdist-tag.Evidence (Before & After)
Before: running the old vendoring script with
QWEN_CODE_VERSION=latestattempted to downloadhttps://registry.npmjs.org/@qwen-code/qwen-code/-/qwen-code-latest.tgzand failed with HTTP 404.After:
QWEN_CODE_VERSION=latest bun run scripts/vendor-qwen-code.tsresolved npmlatestto0.17.1at test time and vendored@qwen-code/[email protected]; the default pinned path vendored0.15.11; a fakeQWEN_CODE_ROOTsource checkout smoke test built and vendored a localdist/cli.js.Tested on
Environment (optional)
Local macOS shell in
/Users/dragon/Documents/openwork; Bun 1.3.8, Node 26.0.0, npm 11.12.1.Risk & Scope
source_branchbuilds clone and install Qwen Code source dependencies in every platform job, which is straightforward but slower than prebuilding the runtime once and sharing it across the matrix.source_branchhas not completed yet.qwen_code_versionbehavior is preserved underpinned_package_version, which remains the default.Linked Issues
References the desktop release workflow follow-up from #5, #6, and #7.
中文说明
What this PR does
这个 PR 给 Desktop Release workflow 加了明确的 Qwen Code runtime source 选择。发版时现在可以选择
npm_latest、source_branch或pinned_package_version;source-branch 会 checkout 指定 ref 的QwenLM/qwen-code并设置QWEN_CODE_ROOT,npm-latest 会设置QWEN_CODE_VERSION=latest,pinned 则继续使用package.json里的qwenCodeRuntime.version,除非额外填写一个精确 npm version。vendoring 脚本现在会先通过 npm package metadata 解析 dist-tag,再下载 tarball,所以
QWEN_CODE_VERSION=latest会解析成当前 npmlatest对应的真实版本,而不是去下载不存在的qwen-code-latest.tgz。Why it's needed
之前发版 UI 只有一个可选的
qwen_code_version文本框,不填就会静默打包 package 里 pinned 的0.15.11runtime。这样很容易以为桌面版用了当前 Qwen Code runtime,但实际用了固定 fallback。现在 workflow 把这个选择显式暴露出来,并支持三种预期模式:当前 npm latest、某个 Qwen Code 源码 ref、或者 pinned runtime version。Reviewer Test Plan
How to verify
打开 Desktop Release workflow 的手动触发表单,确认新的
qwen_code_source选项包含npm_latest、source_branch和pinned_package_version。选择source_branch时,确认qwen_code_ref控制QwenLM/qwen-codecheckout。选择npm_latest时,确认 build log 会显示从latestdist-tag 解析出的真实 npm 版本。Evidence (Before & After)
Before: 旧脚本在
QWEN_CODE_VERSION=latest时会尝试下载https://registry.npmjs.org/@qwen-code/qwen-code/-/qwen-code-latest.tgz,并因 HTTP 404 失败。After:
QWEN_CODE_VERSION=latest bun run scripts/vendor-qwen-code.ts在测试时把 npmlatest解析为0.17.1,并成功 vendor@qwen-code/[email protected];默认 pinned 路径 vendor 了0.15.11;fakeQWEN_CODE_ROOTsource checkout smoke test 也能 build 并 vendor 本地dist/cli.js。Tested on
Environment (optional)
本地 macOS shell,目录
/Users/dragon/Documents/openwork;Bun 1.3.8,Node 26.0.0,npm 11.12.1。Risk & Scope
source_branch会在每个平台 job 里 clone 并安装 Qwen Code 源码依赖,逻辑直接但比预先构建一次 runtime 再分发给 matrix 更慢。source_branch模式。qwen_code_version行为保留在默认的pinned_package_version下。Linked Issues
References desktop release workflow 从 #5、#6、#7 延续下来的后续改进。