fix(release): use relative postinstall patch dir - #5973
Conversation
|
Thanks for the PR, @yiliang114! Template looks good ✓ — all required sections present, bilingual body included, linked issue #5969. On direction: this is a clear-cut release pipeline fix. The Docker sandbox build step failed because On approach: minimal and correct — one line to compute Moving on to code review. 🔍 中文说明感谢贡献,@yiliang114! 模板完整 ✓ — 所有必填部分齐全,包含中英双语,关联了 issue #5969。 方向:这是一个明确的发布流水线修复。Docker sandbox 构建步骤因为 方案:最小化且正确 — 一行计算 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Code ReviewThe fix is clean and correct. One observation: the TestingBefore/After: generated postinstall argvThe before path is absolute (rejected by Unit test results (PR branch)All 12 tests pass, including the postinstall regression case that verifies CI also green: 中文说明代码审查修复简洁正确。 一个观察: 测试所有 12 个测试通过,包括验证生成 — Qwen Code · qwen3.7-max |
|
Straightforward fix, cleanly implemented. The release pipeline was broken — Test updated to match, all 12 tests pass, CI green. The before/after evidence clearly shows the absolute-to-relative conversion. If I had to maintain this in six months, I'd thank the author — one line of logic, obvious intent, no surprises. Approving. ✅ 中文说明简洁的修复,实现干净。发布流水线坏了 — 测试已更新匹配,12 个测试全部通过,CI 绿色。前后对比清楚展示了绝对路径到相对路径的转换。 如果六个月后需要维护这段代码,我会感谢作者 — 一行逻辑,意图明确,没有意外。批准 ✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No review findings. Downgraded from Approve to Comment: CI still running.
— qwen3.7-max via Qwen Code /review
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
— qwen3.7-max via Qwen Code /review
What this PR does
This change makes the published CLI postinstall patch step pass a patch directory relative to the package install root instead of an absolute path.
Why it's needed
The release Docker sandbox build installs the packed CLI globally before running Docker integration tests. The new postinstall patching path passed an absolute directory to
patch-package, butpatch-packagerejects absolute--patch-dirvalues. That caused the sandbox image build to fail before the Docker integration tests could start.Reviewer Test Plan
How to verify
Run the package asset script test and confirm the postinstall regression case records
--patch-dir patcheswhile the full package asset suite passes.Evidence (Before & After)
Before: the regression test failed because the generated postinstall command passed an absolute patch directory. After:
npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/package-assets.test.jspasses with 12 tests.Tested on
Environment (optional)
Node.js local script tests via Vitest.
Risk & Scope
Linked Issues
Fixes #5969
中文说明
What this PR does
这个改动让发布后的 CLI postinstall 补丁步骤传入相对于安装根目录的 patch 目录,而不是绝对路径。
Why it's needed
Release 的 Docker sandbox 构建会先全局安装打包后的 CLI,再运行 Docker 集成测试。新的 postinstall 补丁逻辑把绝对目录传给了
patch-package,但patch-package会拒绝绝对--patch-dir,导致 sandbox 镜像构建在 Docker 集成测试开始前失败。Reviewer Test Plan
How to verify
运行 package asset 脚本测试,确认 postinstall 回归用例记录到的是
--patch-dir patches,并且整个 package asset 测试文件通过。Evidence (Before & After)
Before:回归测试失败,因为生成的 postinstall 命令传入了绝对 patch 目录。After:
npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/package-assets.test.js通过,共 12 个测试。Tested on
Environment (optional)
通过 Vitest 运行 Node.js 本地脚本测试。
Risk & Scope
Linked Issues
Fixes #5969