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

The Windows payload fixture uses a text placeholder for t3code.exe. On a Windows host, the validator tried to run that placeholder for its primary native-load probe and failed before reaching the archive and self-containment assertions. In the broad lane, the cold pnpm-store dependency scan also exceeded the 60-second root timeout while four filesystem-heavy workspace suites ran concurrently.

Pin only the payload probe’s HostProcessPlatform service to Linux in the three affected cases. Host-native paths, real tar extraction, WSL archive and digest validation, ASAR unpacking, and self-containment checks still execute on Windows. Give the dependency scan a focused 120-second budget without weakening its closure assertions. The browser-secret and macOS signing expectations now accept host-native separators too.

Part of the Windows test-suite stack rooted at #9564; the manual Windows lane comes from #9538.

Originally prepared with Claude Fable 5 in Claude Code; finalized with GPT-5.6 Sol in T3 Code.


Note

Low Risk All changes are test-only; production build and packaging code is unchanged.

Overview Makes desktop build script tests reliable on Windows CI without weakening what they assert.

Windows payload validation: Three cases that run the primary native-load probe now inject HostProcessPlatform as "linux" because the fixture’s t3code.exe is a text stub that fails when executed on a real Windows host. Tar/archive, ASAR, WSL digest, and self-containment checks still exercise host-native behavior where they don’t depend on that probe.

Path portability: The Linux browser-secret staging test builds the expected --output path with Effect’s Path service instead of a hardcoded POSIX string. The signed macOS build config test accepts / or \ in the sign-macos.ts path.

CLI external closure: The pnpm-store “finds runtime-external packages on disk” test gets a 120s per-test timeout so a cold filesystem walk doesn’t hit the default limit when the Windows lane runs several heavy suites in parallel.

Reviewed by Cursor Bugbot for commit 0c3eaef92cc9538c0228c83031cf2a6e03895a78. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Make build-desktop-artifact and cli-external-packages tests host-portable

  • Windows packaging tests now provide HostProcessPlatform as Linux so host-native load probes run on non-Windows hosts instead of relying on the real host OS
  • browser-secret helper test uses the injected Path service to build the expected output path rather than hardcoding slash separators
  • macOS signing-script assertion accepts both / and \ path separators
  • Runtime-external package discovery test in cli-external-packages.test.ts gets a 120-second timeout
  • Risk: none — all changes are test-only and do not alter production behavior

Macroscope summarized 0c3eaef.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—13.6 KiB—15.1 KiB✅
CodexThread snapshot wire—7.0 KiB—7.3 KiB✅
CodexLive turn WebSocket wire—6.6 KiB—7.8 KiB✅
CodexLive turn WebSocket decoded—57.1 KiB—66.4 KiB✅
CodexLive turn messages—10—21✅
ClaudeTotal thread wire—13.8 KiB—15.1 KiB✅
ClaudeThread snapshot wire—7.0 KiB—7.3 KiB✅
ClaudeLive turn WebSocket wire—6.7 KiB—7.8 KiB✅
ClaudeLive turn WebSocket decoded—59.3 KiB—66.4 KiB✅
ClaudeLive turn messages—10—21✅

Baseline: unavailable · PR result: 0c3eaef · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

CcursorBotreviewed · 1 inline threadSep 4, 2026
Synced from GitHub

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but a cloud agent failed to start.

Reviewed by Cursor Bugbot for commit eeb923a7f2330ad8673521cc514e58820281253d. Configure here.

scripts/build-desktop-artifact.test.tsline 1083Outdated · eeb923aOpen thread
……@@ -1040,38 +1050,40 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
1080+ assert.isBelow(result.fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT);
1081+ assert.deepStrictEqual(secondAsar, firstAsar);
1082+ }),
1083+ ),
CcursorBoton line 1083Sep 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.

Synced from GitHub

Approvability

Verdict: Approved at 11d0075

Macroscope's review found this PR approvable — The changes are limited to making packaging tests host-portable and extending a filesystem-heavy test's timeout. They affect CI/test execution only and do not alter shipped product behavior or defaults.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

No code changes detected at 0c3eaef. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Added 1 commit

  • test(scripts): keep Windows packaging checks host-portable0c3eaef