Build: ship launcher-only release zips by default

IMPECCABLE_BUNDLE_ENGINE=1 opts in to staging the engine binaries into the
dist skill copies. Bundling every target into every provider copy put
dist/universal.zip near 340 MB, past the 25 MB Cloudflare Pages file cap
that impeccable install downloads through.

Prepared with AI assistance (Claude Code).
This commit is contained in:
Paul Bakaus
2026-08-31 19:59:21 -07:00
parent 567b3cfd8c
commit 4f7fdeca6b
3 changed files with 16 additions and 13 deletions
+14 -11
View File
@@ -514,10 +514,11 @@ function syncRootHookManifests(rootDir) {
/**
* Every skill copy in dist gets the engine binaries the launcher looks for
* (`scripts/bin/<os>-<arch>/impeccable[.exe]`), so the release zips are
* self-contained for installs without egress. Called only in release mode,
* and only after the root harness dirs and ./plugin have been synced from
* dist: those are git-delivered and must stay launcher-only (the binaries
* are gitignored and the launcher downloads them on first run).
* self-contained for installs without egress. Opt-in only
* (IMPECCABLE_BUNDLE_ENGINE=1 on a release build), and only after the root
* harness dirs and ./plugin have been synced from dist: those are
* git-delivered and must stay launcher-only (the binaries are gitignored and
* the launcher downloads them on first run).
*
* Source: skill/scripts/bin/, filled by scripts/fetch-engine.mjs --all. A
* target that could not be fetched is reported and left out; the launcher
@@ -854,13 +855,15 @@ async function build() {
const openAiPluginRoot = stageOpenAIPlugin(ROOT_DIR, DIST_DIR);
await createProviderZip(openAiPluginRoot, DIST_DIR, 'openai-plugin');
// Release builds ship the engine binaries inside every dist skill copy so
// universal.zip is self-contained. This runs after the root harness dirs,
// ./plugin, and the OpenAI plugin were staged from dist: git-delivered
// trees stay launcher-only.
// IMPECCABLE_BUNDLE_ENGINE=0 keeps the release zip launcher-only (the size
// grows by roughly 4 MB per target per provider copy otherwise).
if (BUILD_OPTIONS.syncRootOutputs && process.env.IMPECCABLE_BUNDLE_ENGINE !== '0') {
// Release zips ship launcher-only by default: the launcher downloads the
// pinned engine on first run. IMPECCABLE_BUNDLE_ENGINE=1 opts in to staging
// every fetched target into every dist skill copy for offline installs.
// That was the default once and put universal.zip at ~340 MB (five targets
// times every provider copy), past the 25 MB Cloudflare Pages file cap that
// `impeccable install` downloads through. Staging runs after the root
// harness dirs, ./plugin, and the OpenAI plugin were staged from dist, so
// git-delivered trees stay launcher-only either way.
if (BUILD_OPTIONS.syncRootOutputs && process.env.IMPECCABLE_BUNDLE_ENGINE === '1') {
await stageEngineBinaries(ROOT_DIR, DIST_DIR);
}