test(scripts): keep Windows packaging checks host-portable#9589

merged1
windows-tests/theme-nofollow
windows-tests/tar-probe
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago
1 unresolved thread · Jump to file
Selected thread: scripts/build-desktop-artifact.test.ts:1083 — ### Wrong tests gated on tar **Medium Severity** <!-- DESCRIPTION START --> `tarSupported` is attached to payload tests that never spawn `tar`, while fixtures that set `wslRuntime` and the live `stageWslRuntimeArchive` case still run. On Windows those remaining tests still fail with spawn UNKNOWN, and the gated cases drop coverage they do not need. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: a376944d-5075-4d95-a735-4c17c6194ddf --> <!-- LOCATIONS START scripts/build-desktop-artifact.test.ts#L1052-L1084 scripts/build-desktop-artifact.test.ts#L1460-L1480 scripts/build-desktop-artifact.test.ts#L1121-L1160 LOCATIONS END --> <details> <summary>Additional Locations (2)</summary> - [`scripts/build-desktop-artifact.test.ts#L1460-L1480`](https://github.com/pingdotgg/t3code/blob/eeb923a7f2330ad8673521cc514e58820281253d/scripts/build-desktop-artifact.test.ts#L1460-L1480) - [`scripts/build-desktop-artifact.test.ts#L1121-L1160`](https://github.com/pingdotgg/t3code/blob/eeb923a7f2330ad8673521cc514e58820281253d/scripts/build-desktop-artifact.test.ts#L1121-L1160) </details> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjAyZmMxNGE4LTdiNjItNGMwMi1hYjllLTMwZmEzZWEwYjFmMSIsImVuY3J5cHRpb25LZXkiOiJZX1JLclBQdFNKRU9lTTB1SXUxQVVtNFVyOWh5N0gtQ0xOTjRfLVplSk5VIiwiYnJhbmNoIjoid2luZG93cy10ZXN0cy90YXItcHJvYmUiLCJyZXBvT3duZXIiOiJwaW5nZG90Z2ciLCJyZXBvTmFtZSI6InQzY29kZSIsInByb3ZpZGVyIjoiZ2l0aHViIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjAyZmMxNGE4LTdiNjItNGMwMi1hYjllLTMwZmEzZWEwYjFmMSIsImVuY3J5cHRpb25LZXkiOiJZX1JLclBQdFNKRU9lTTB1SXUxQVVtNFVyOWh5N0gtQ0xOTjRfLVplSk5VIiwiYnJhbmNoIjoid2luZG93cy10ZXN0cy90YXItcHJvYmUiLCJyZXBvT3duZXIiOiJwaW5nZG90Z2ciLCJyZXBvTmFtZSI6InQzY29kZSIsInByTnVtYmVyIjo5NTg5LCJjb21taXRTaGEiOiJlZWI5MjNhN2YyMzMwYWQ4NjczNTIxY2M1MTRlNTg4MjAyODEyNTNkIiwicHJvdmlkZXIiOiJnaXRodWIifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eeb923a7f2330ad8673521cc514e58820281253d. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
0 / 2 viewed2 files changedLine totals unavailable

scripts/build-desktop-artifact.test.ts · Earlier revision eeb923a7 · right 1083

Original diff
@@ -1040,38 +1050,40 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
     ),
   );
 
-  it.effect("validates every ASAR-unpacked native in the packaged Windows payload", () =>
-    Effect.scoped(
-      Effect.gen(function* () {
-        const fs = yield* FileSystem.FileSystem;
-        const path = yield* Path.Path;
-        const fixture = yield* makeWindowsPayloadFixture({ copyUnpackedNatives: true });
-        const result = yield* validateWindowsPackagedPayload({
-          stageDistDir: fixture.stageDistDir,
-          appExecutableName: fixture.appExecutableName,
-          targetArch: "x64",
-        });
-
-        const secondAsarPath = path.join(path.dirname(fixture.generatedAsarPath), "second.asar");
-        yield* packWindowsServerAsar({
-          sourceDir: fixture.sourceDir,
-          asarPath: secondAsarPath,
-          arch: "x64",
-        });
-        const [firstAsar, secondAsar] = yield* Effect.all([
-          fs.readFile(fixture.generatedAsarPath),
-          fs.readFile(secondAsarPath),
-        ]);
+  it.effect.skipIf(!tarSupported)(
+    "validates every ASAR-unpacked native in the packaged Windows payload",
+    () =>
+      Effect.scoped(
+        Effect.gen(function* () {
+          const fs = yield* FileSystem.FileSystem;
+          const path = yield* Path.Path;
+          const fixture = yield* makeWindowsPayloadFixture({ copyUnpackedNatives: true });
+          const result = yield* validateWindowsPackagedPayload({
+            stageDistDir: fixture.stageDistDir,
+            appExecutableName: fixture.appExecutableName,
+            targetArch: "x64",
+          });
 
-        assert.equal(result.packagedAppDir, fixture.packagedAppDir);
-        assert.deepStrictEqual(result.unpackedFiles, ["node_modules/native/addon.node"]);
-        assert.isBelow(result.fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT);
-        assert.deepStrictEqual(secondAsar, firstAsar);
-      }),
-    ),
+          const secondAsarPath = path.join(path.dirname(fixture.generatedAsarPath), "second.asar");
+          yield* packWindowsServerAsar({
+            sourceDir: fixture.sourceDir,
+            asarPath: secondAsarPath,
+            arch: "x64",
+          });
+          const [firstAsar, secondAsar] = yield* Effect.all([
+            fs.readFile(fixture.generatedAsarPath),
+            fs.readFile(secondAsarPath),
+          ]);
+
+          assert.equal(result.packagedAppDir, fixture.packagedAppDir);
+          assert.deepStrictEqual(result.unpackedFiles, ["node_modules/native/addon.node"]);
+          assert.isBelow(result.fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT);
+          assert.deepStrictEqual(secondAsar, firstAsar);
+        }),
+      ),
C
cursorBotSep 4, 2026

Wrong tests gated on tar

Medium Severity

tarSupported is attached to payload tests that never spawn tar, while fixtures that set wslRuntime and the live stageWslRuntimeArchive case still run. On Windows those remaining tests still fail with spawn UNKNOWN, and the gated cases drop coverage they do not need.

Additional Locations (2)

Reviewed by Cursor Bugbot for commit eeb923a7f2330ad8673521cc514e58820281253d. Configure here.