Skip to content

Commit 8d23bc5

Browse files
committed
fix(package): raise unpacked size budget to 210 MiB
1 parent 4048b57 commit 8d23bc5

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎scripts/lib/npm-pack-budget.mts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { resolveNpmJsonEntries } from "./npm-json-output.mts";
44
// 2026.3.12 ballooned to ~213.6 MiB unpacked and correlated with low-memory
55
// startup/doctor OOM reports. 2026.4.12 intentionally stages Matrix runtime
66
// dependencies, including crypto wasm, so packaged installs do not miss Docker
7-
// and gateway runtime dependencies. Keep the budget below the 2026.3.12 bloat
8-
// level while allowing that mirrored runtime surface and the installed agent's
9-
// bundled user documentation.
10-
const NPM_PACK_UNPACKED_SIZE_BUDGET_BYTES = 204 * 1024 * 1024;
7+
// and gateway runtime dependencies. The 2026.8.1 package reached ~208.8 MiB
8+
// through required root dist growth without a duplicate packaged tree. Keep the
9+
// budget below the 2026.3.12 bloat level while retaining a narrow regression
10+
// margin for that audited runtime surface.
11+
const NPM_PACK_UNPACKED_SIZE_BUDGET_BYTES = 210 * 1024 * 1024;
1112

1213
function formatMiB(bytes: number): string {
1314
return `${(bytes / (1024 * 1024)).toFixed(1)} MiB`;

‎test/release-check.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ describe("createPackedPluginSdkTypescriptSmokeProject", () => {
898898
describe("collectPackUnpackedSizeErrors", () => {
899899
it("accepts pack results within the unpacked size budget", () => {
900900
expect(
901-
collectPackUnpackedSizeErrors([makePackResult("openclaw-2026.3.14.tgz", 120_354_302)]),
901+
collectPackUnpackedSizeErrors([makePackResult("openclaw-2026.8.1.tgz", 218_962_508)]),
902902
).toStrictEqual([]);
903903
});
904904

@@ -914,7 +914,7 @@ describe("collectPackUnpackedSizeErrors", () => {
914914
expect(
915915
collectPackUnpackedSizeErrors([makePackResult("openclaw-2026.3.12.tgz", 224_002_564)]),
916916
).toEqual([
917-
"openclaw-2026.3.12.tgz unpackedSize 224002564 bytes (213.6 MiB) exceeds budget 213909504 bytes (204.0 MiB). Investigate duplicate channel shims, copied extension trees, or other accidental pack bloat before release.",
917+
"openclaw-2026.3.12.tgz unpackedSize 224002564 bytes (213.6 MiB) exceeds budget 220200960 bytes (210.0 MiB). Investigate duplicate channel shims, copied extension trees, or other accidental pack bloat before release.",
918918
]);
919919
});
920920

0 commit comments

Comments
 (0)