Repository navigation
fix(release): raise prepared package size limit to 96 MB (#6687) - #6691
Conversation
The assertPreparedPackageSize check introduced after v0.19.8 set an 80 MB ceiling, but the current package is 80.58 MB — 597 KB over — causing the Docker sandbox build to fail during the v0.19.9 release. Bump to 96 MB to accommodate normal growth with ample headroom.
E2E Test ReportSummaryThe v0.19.9 release failed because the Root CauseThe FixIncreased Verification
Package Size Breakdown (current)
|
Co-authored-by: Qwen-Coder <[email protected]>
|
🤖 Addressed the latest review feedback (round 1/5). What changed, and what I pushed back on: Address Review Summary — PR #6691Feedback Triage1. Merge conflict — main has 85 MiB from PR #6688 (Required)Decision: Fixed. Merged 2. Test at scripts/tests/package-assets.test.js:328 hardcodes 85 MiB (Required)Decision: Fixed. Updated the test "enforces a 96 MiB default unpacked size budget":
Conflict NotesMerged Changes Made
Verification Results
Base-conflict check: conflicted with main — resolved in this push. Re-review when you have a moment. After round 5 this bot stops and leaves the PR for a human. |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
…ed package early (QwenLM#10784) * fix(release): raise the package size budget and stop hiding sandbox build failures The docker sandbox build in `integration_docker` has been failing every release since 0.22.3-release-7df5ac68. The build itself is fine; what fails is `npm run prepare:package` inside the Dockerfile's builder stage: Error: Prepared package unpacked size 101897869 bytes exceeds 100663296 bytes `assertPreparedPackageSize`'s 96 MiB budget was set in QwenLM#6691 when the prepared package was ~80.6 MiB. It has grown with ordinary feature work since — 96,802,417 bytes at 0.22.1, 98,582,313 at the 08-31 nightly, 101,897,869 now, with the OpenTUI migration batches carrying two UI stacks at once — and it crossed the ceiling. Raise the budget to 112 MiB, the same "headroom, not target" call QwenLM#6688 and QwenLM#6691 made before it. vendor/ripgrep (24 MiB, five platform binaries) and web-shell/assets (18 MiB, mostly shiki grammars, mermaid and cytoscape) are the two places worth trimming if we would rather bring the package down than keep raising the ceiling; that is a separate change. The reason a one-line size error cost a 20-minute release run to diagnose is the other half of this commit: - `build_sandbox.js` sent the image build's output to /dev/null unless VERBOSE was set, so the failure surfaced as an execSync stack trace with `stdout: null` and no way to tell what broke without rebuilding by hand. `e2e.yml` had already worked around this by setting VERBOSE; the release workflow had not. Now CI streams the output, and a quiet local build keeps it and prints the tail when the build fails. - Nothing ran `prepare:package` before the publish job, so its guards were first exercised by the Dockerfile — the slowest consumer in the pipeline. `quality_build` now runs bundle + prepare:package after uploading its build artifact, which reports the same failure in minutes without touching what downstream jobs consume. * fix(release): close sandbox output review gaps Co-authored-by: Qwen-Coder <[email protected]> --------- Co-authored-by: Qwen-Coder <[email protected]>
What this PR does
Raises the prepared npm package size ceiling from 80 MB to 96 MB in the
prepare-package.jsrelease script. TheassertPreparedPackageSizecheck, introduced after v0.19.8, was set at 80 MB, but the current package is 80.58 MB — 597 KB over — which blocked the Docker sandbox build during the v0.19.9 release.Why it's needed
The size guard is a safety net to prevent accidentally shipping oversized packages, not a performance target. The package has grown naturally through feature additions (web-shell UI, expanded locales, additional CLI chunks) and is only marginally over the original estimate. Raising the limit to 96 MB provides ~19% headroom for future growth while still catching runaway size regressions.
Reviewer Test Plan
How to verify
npm run build && npm run bundle && npm run prepare:package— the prepare step should complete without the "Prepared package unpacked size … exceeds … bytes" error that previously occurred.npx vitest run scripts/tests/package-assets.test.js— all 16 tests should pass, including the oversize-budget test (which uses its own 50 KB limit, independent of the default).Evidence (Before & After)
Before:
After:
Tested on
Environment (optional)
Verified on Linux with
npm run build,npm run typecheck,npm run lint,npm run prepare:package, and focused Vitest runs.Risk & Scope
Linked Issues
Fixes #6687
中文说明
此 PR 的作用
将
prepare-package.js发布脚本中 npm 包解包大小的上限从 80 MB 提高到 96 MB。在 v0.19.8 之后引入的assertPreparedPackageSize检查设置为 80 MB,但当前包大小为 80.58 MB — 超出 597 KB — 导致 v0.19.9 发布时 Docker 沙箱构建失败。为什么需要
大小检查是一个安全网,用于防止意外发布过大的包,而不是性能目标。包大小通过功能添加(Web Shell UI、扩展的本地化、额外的 CLI 代码块)自然增长,仅略微超过最初的估计。将限制提高到 96 MB 为未来增长提供了约 19% 的余量,同时仍能捕获失控的大小回归。
审核者测试计划
如何验证
npm run build && npm run bundle && npm run prepare:package— prepare 步骤应完成,不再出现之前发生的"Prepared package unpacked size … exceeds … bytes"错误。npx vitest run scripts/tests/package-assets.test.js— 所有 16 个测试应通过,包括超预算测试(该测试使用自己的 50 KB 限制,与默认值无关)。证据(修复前与修复后)
修复前:
修复后:
测试环境
风险与范围
关联 Issue
修复 #6687