# test: stop path and platform tests depending on the host OS · PR \#9564 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/9564)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: windows-tests/path-platform

Target branch: main

Head commit: a5984ca85bc58e74a12859b56e721fb51c62e594

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/9564)

[Commits](https://git.cafe/pingdotgg/t3code/pull/9564/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/9564/diffs?format=markdown)

## Description

---

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](https://github.com/pingdotgg/t3code/pull/9564); the manual Windows lane comes from [#9538](https://github.com/pingdotgg/t3code/pull/9538).

Model: Claude Fable 5 in Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!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](https://github.com/pingdotgg/t3code/pull/9564/files#diff-4c6db0a1db2f6a714f8822c0a8a8fab41c97ba88c4a49fb52c21332ac758133c) 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's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized a5984ca.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

<!-- CURSOR_SUMMARY -->
---

> [!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.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a5984ca85bc58e74a12859b56e721fb51c62e594. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->


