From 6458b593c0044e6eb47369b2d6b08bf041d58f0c Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 09:06:16 +0000 Subject: [PATCH] build(cli): shrink publish artifact to unblock build-vscode download The kilo-cli artifact ballooned from ~1 GB to 1.83 GB after the codebase indexing PR started emitting external sourcemaps and copying tree-sitter wasms per target. The resulting 1.83 GB artifact triggered a silent partial-extract in actions/download-artifact@v4 during build-vscode, causing the 2026-04-29 publish run to fail with 'CLI binary not found'. - Skip external sourcemaps in release builds (~620 MB saved across 12 targets); dev builds still emit maps for local debugging. - Exclude any stray .map files from the CI artifact and skip zstd compression on binaries (saves ~60 s on upload and reduces the chance of partial-extract bugs on the download side). Refs: PR #6966 (commit f74d54c4), run 25096325401 --- .github/workflows/publish.yml | 7 ++++++- packages/opencode/script/build.ts | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1a419e32fb3..63e4fb67cdf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -96,7 +96,12 @@ jobs: - uses: actions/upload-artifact@v4 with: name: kilo-cli - path: packages/opencode/dist + path: | + packages/opencode/dist + !packages/opencode/dist/**/*.map + # Binaries don't compress meaningfully; skip the ~60s zstd pass and + # reduce the chance of partial-extract bugs on the download side. + compression-level: 0 outputs: version: ${{ needs.version.outputs.version }} diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts index d54830e3914..2b2cd3149ff 100755 --- a/packages/opencode/script/build.ts +++ b/packages/opencode/script/build.ts @@ -219,7 +219,9 @@ for (const item of targets) { conditions: ["browser"], tsconfig: "./tsconfig.json", plugins: [plugin], - sourcemap: "external", // kilocode_change + // kilocode_change start - skip sourcemaps for release builds (each .js.map adds ~50 MB per target → ~600 MB total) + sourcemap: Script.release ? "none" : "external", + // kilocode_change end external: ["node-gyp", ...LanceDBRuntime.external], // kilocode_change format: "esm", minify: true,