test: stop path and platform tests depending on the host OS#9564

merged1
main
windows-tests/path-platform
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Several tests inject a posix platform but resolve paths or executable names through the host, so on Windows they see backslashes and tailscale.exe where they assert forward slashes and tailscale.

  • tailscale: pin HostProcessPlatform to linux in the spawner test layer.
  • desktop DesktopEnvironment/DesktopAssets/DesktopAppIdentity and ssh config: provide NodePath.layerPosix alongside NodeServices so Path matches the posix-shaped fixtures.
  • ClaudeSkills: hand skillOverrideSettingsPaths the Path implementation for the platform under test, with a real win32 fixture for the win32 case.
  • ProjectFaviconResolver/ServerSecretStore: compare with path.join/basename instead of endsWith("/x").
  • mobile-showcase: resolveAndroidSdkRoot joins with the path module for the platform argument it already takes.

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

Model: Claude Fable 5 in Claude Code.

🤖 Generated with Claude Code

Note

Stop path and platform tests from depending on host OS

  • Test fixtures across desktop, server, SSH, tailscale, and mobile-showcase now explicitly inject a POSIX or Win32 NodePath layer instead of relying on the host OS default
  • Tests replace hard-coded expected path strings with path.join calls so separators match the injected platform
  • tailscale tests introduce a shared spawnerLayer helper that fixes HostProcessPlatform to Linux, ensuring command-selection logic runs deterministically
  • ClaudeSkills managed-policy test adds Win32 cases covering configured and missing PROGRAMDATA
  • Risk: resolveAndroidSdkRoot in scripts/mobile-showcase.ts now selects POSIX or Win32 path joins based on the supplied platform rather than the host; win32 callers get backslash separators where they previously got host separators

Macroscope summarized a5984ca.


Note

Low Risk Almost entirely test harness changes; the small resolveAndroidSdkRoot tweak only affects default SDK path formatting when platform is win32.

Overview Makes the test suite deterministic on Windows by pinning path and platform behavior instead of inheriting the host OS.

Desktop, SSH, and Effect tests now provide NodePath.layerPosix (or explicit Win32 Path in ClaudeSkills) so fixtures with forward slashes match what Path resolves. Server tests replace endsWith("/…") checks with regex or path.join so separators work on any OS.

Tailscale tests add a spawnerLayer helper that fixes HostProcessPlatform to linux, so assertions stay on the tailscale executable name rather than tailscale.exe.

ClaudeSkills passes the Path implementation that matches each platform under test and expands Win32 managed-policy expectations with real backslash paths.

The only non-test behavior change is resolveAndroidSdkRoot: it joins the default SDK path with NodePath.win32 or NodePath.posix according to the platform argument (including win32), not the host’s default path module.

Reviewed by Cursor Bugbot for commit a5984ca85bc58e74a12859b56e721fb51c62e594. 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.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire13.5 KiB13.7 KiB+211 B (+1.5%)15.1 KiB✅
CodexThread snapshot wire7.0 KiB7.0 KiB−4 B (−0.1%)7.3 KiB✅
CodexLive turn WebSocket wire6.5 KiB6.7 KiB+215 B (+3.2%)7.8 KiB✅
CodexLive turn WebSocket decoded57.0 KiB58.5 KiB+1.5 KiB (+2.6%)66.4 KiB✅
CodexLive turn messages910+1 (+11.1%)21✅
ClaudeTotal thread wire13.7 KiB13.8 KiB+26 B (+0.2%)15.1 KiB✅
ClaudeThread snapshot wire7.0 KiB7.0 KiB+6 B (+0.1%)7.3 KiB✅
ClaudeLive turn WebSocket wire6.7 KiB6.7 KiB+20 B (+0.3%)7.8 KiB✅
ClaudeLive turn WebSocket decoded59.3 KiB59.3 KiB0 B (0.0%)66.4 KiB✅
ClaudeLive turn messages10100 (0.0%)21✅

Baseline: bfef973 · PR result: a5984ca · 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: Not approved

Macroscope's review found this PR not approvable — The changes primarily make tests and host-side mobile showcase tooling deterministic across operating systems, with no product schema or customer-path behavior changes. A new file-level directive suppresses the nodeBuiltinImport static-analysis diagnostic, which requires human review under the repository policy.

No code changes detected at a5984ca. Prior analysis still applies.

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

Added 1 commit

  • test: stop path and platform tests depending on the host OSa5984ca