test(desktop): make path fixtures and timeouts host-portable#9568

merged1
windows-tests/fake-cli
windows-tests/desktop-paths
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

Desktop path fixtures mixed POSIX literals with values built by the host Path implementation, while the macOS launcher helpers used host-native joins for paths that are always inside a macOS bundle. Those assumptions fail when the suite runs on Windows.

Build test expectations with the injected Path service, use POSIX joins for macOS bundle-internal paths, and keep the fcntl-only Firefox lock case off Windows. The broad Windows lane runs package suites concurrently, so desktop tests now get a 15-second budget instead of Vitest’s 5-second default; this covers the filesystem-heavy observability case without weakening its assertions.

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

Use injected Path service in tests and fix macOS launcher POSIX paths

  • Refactors desktop tests to build expected paths via the injected Effect Path service instead of hardcoded slash-separated literals, making assertions platform-independent
  • Fixes electron-launcher.mjs resolveMacLauncherPaths and resolveMacLauncherIconPaths to use POSIX path joining for macOS bundle-internal paths instead of the host platform's default separator
  • Wraps the Firefox fcntl parent-lock test in a Windows guard so it is skipped on Windows hosts
  • Adds a 15-second test timeout in vite.config.ts for filesystem-heavy desktop integration tests on Windows
  • Behavioral Change: resolveMacLauncherPaths and resolveMacLauncherIconPaths now emit POSIX-style paths regardless of the build host OS; check in-tree consumers of these paths on Windows build hosts to confirm they tolerate forward slashes

Macroscope summarized 391e4ab.


Note

Low Risk Changes are mostly test fixtures and CI timeout; the launcher POSIX join only affects macOS bundle path strings when Electron is built from a non-macOS host.

Overview Makes the desktop test suite reliable on Windows CI by aligning path construction with the host OS and fixing macOS-bundle path helpers when the build machine is not macOS.

Launcher: resolveMacLauncherIconPaths and resolveMacLauncherPaths now use NodePath.posix.join for paths inside .app bundles (with a short comment that bundle internals are always macOS-style), so a Windows build host does not emit backslash paths into bundle layout.

Tests: Connection catalog, saved environments, and browser-import tests build expected paths via Effect Path.Path / context.path.join instead of hard-coded / segments; launcher icon assertions accept / or \ for repo asset paths. The Firefox fcntl .parentlock integration test is skipped on win32.

Vitest: Desktop testTimeout is raised to 15s for filesystem-heavy tests under concurrent Windows lanes.

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

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.8 KiB—15.1 KiB✅
CodexThread snapshot wire—7.0 KiB—7.3 KiB✅
CodexLive turn WebSocket wire—6.7 KiB—7.8 KiB✅
CodexLive turn WebSocket decoded—58.5 KiB—66.4 KiB✅
CodexLive turn messages—10—21✅
ClaudeTotal thread wire—13.7 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: 391e4ab · 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.

Synced from GitHub

Approvability

Verdict: Approved at 465996c

Macroscope's review found this PR approvable — This is a focused cross-platform test and development-tooling maintenance change: production behavior is unchanged, while macOS bundle paths and filesystem-heavy test execution become host-portable. It adds no user-facing capability, product-default change, schema change, or static-analysis suppression.

No code changes detected at 391e4ab. Prior analysis still applies.

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

Added 1 commit

  • test(desktop): make path fixtures and timeouts host-portable391e4ab