# test: skip symlink fixtures where the host cannot create symlinks · PR \#9566 · pingdotgg/t3code

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

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

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: windows-tests/symlinks

Target branch: windows-tests/posix-fixtures

Head commit: 00bf96a629144b9d6e92112ade8c6ce35e6f7f3e

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

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

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

## Description

---

Creating a symlink on Windows needs Developer Mode or elevation, so every
test that plants one to prove containment or escape detection failed at
setup there. workflowScriptQuery planted its link at module scope and took
the whole file down at collection.

Add a once-per-process probe, @t3tools/shared/testing/symlinks, and gate
those tests on it across server, desktop, and scripts.

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]
> ### Skip symlink-dependent tests on hosts without symlink support
> - Adds `symlinksSupported` probe in [symlinks.ts](https://github.com/pingdotgg/t3code/pull/9566/files#diff-5da0095fa6fc504e666defac3f17421b2445b2032e6beae93d72cd19d217059f), exported via `./testing/symlinks` in [package.json](https://github.com/pingdotgg/t3code/pull/9566/files#diff-3752b1e4e3e2032593e21e9268ec0379680a59e4e7b8517d0d5492a71530d3e8)
> - Wraps symlink fixture tests across server, desktop, and scripts in conditional skips using the new probe
> - Risk: none — test-only change; production code is unchanged
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 00bf96a.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Test-only changes; production behavior is unchanged. Symlink security tests are skipped on hosts without symlink support rather than run vacuously.
> 
> **Overview**
> Adds **`symlinksSupported`** (`@t3tools/shared/testing/symlinks`), a one-time probe that detects whether the host can create symlinks without elevation (notably missing on default Windows).
> 
> Symlink-dependent tests across **desktop**, **server**, and **scripts** are gated with **`skipIf(!symlinksSupported)`** so they skip instead of failing during fixture setup. **`workflowScriptQuery.test.ts`** only plants its module-scope escape symlink when symlinks work, avoiding collection-time failures on restricted hosts.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0f033b505abc42842e5de3fea67d06548e9a9ce. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->


