diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index 507c5d87d3346..853c18f42c569 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -1682,7 +1682,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { const cacheDir = path.join(fixture.packagedAppDir, "resources", "server-compile-cache"); yield* fs.makeDirectory(cacheDir, { recursive: true }); - for (let index = result.fileCount; index < 99; index++) { + for (let index = result.fileCount; index < WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT; index++) { yield* fs.writeFileString(path.join(cacheDir, String(index)), "prepared bytecode"); } const validate = validateWindowsPackagedPayload({ @@ -1691,12 +1691,12 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { targetArch: "x64", appVersion: WINDOWS_PAYLOAD_FIXTURE_VERSION, }); - assert.equal((yield* validate).fileCount, 99); + assert.equal((yield* validate).fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT); yield* fs.writeFileString(path.join(cacheDir, "unexpected"), "extra file"); const error = yield* validate.pipe(Effect.flip); assert.instanceOf(error, WindowsPackagedPayloadValidationError); assert.equal(error.reason, "file-limit-exceeded"); - assert.equal(error.fileCount, 100); + assert.equal(error.fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT + 1); }), ).pipe(Effect.provideService(HostProcess.Platform, "linux")), ); diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index 0eadc0d6de989..ac2ead34d736c 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -1085,8 +1085,10 @@ export function resolveWindowsServerAsarIgnoreGlobs(arch: typeof BuildArch.Type) ]; } -// The Windows release has 76 runtime files plus 22 prepared server cache entries and their manifest. -export const WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT = 99; +// The Windows release has 76 runtime files plus one prepared server cache entry per bundled +// server module the packaged engine compiles, and their manifest. The bundle now splits the +// @opencode/client service-probe chunk into its own module, so that is 23 entries and 100 files. +export const WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT = 100; export const WINDOWS_SERVER_RESOURCE_SOURCE_DIR = "apps/desktop/prod-resources/windows-server"; export const WINDOWS_SERVER_EXTRA_RESOURCES = [ {