Tests that create symlinks fail on Windows without Developer Mode#19681

opened20d agobyAAdEx-Partners-DE

Keeping this here as asked in #18212 and #18247, so the reproduction is not lost while test maintenance is paused.

Problem. On a Windows host without Developer Mode, tests that plant a symlink during setup fail with EPERM: operation not permitted, symlink … before they reach an assertion. The repository already has the probe for this case, symlinksSupported in @t3tools/shared/testing/symlinks, and many test files use skipIf(!symlinksSupported); these ones do not.

Reproduction, Windows 11 (build 26300), standard user, Developer Mode off, upstream main at 742c22995 today, in apps/server:

1vp test run src/serverSettings.test.ts src/project/AgentSessionScanner.test.ts
2Tests 10 failed | 129 passed | 2 skipped (141)

Seven of the ten fail on the symlink EPERM:

  • serverSettings.test.ts: saves through a symlinked settings file without replacing the link, reloads when the destination of a symlinked settings file changes, follows a settings link that is repointed to another directory, reloads when a dangling settings link gets its destination
  • AgentSessionScanner.test.ts: returns the imported project ID through a realpath alias, matches a persisted project alias to a transcript realpath, excludes sandboxes reached through a symlink into the worktrees dir

The other three in AgentSessionScanner.test.ts (keeps case variants distinct when the filesystem identities differ, ignores relative working directories from malformed transcripts, checks file identity and provider before skipping completed history) fail for other reasons and are not part of this.

Same cause, not re-run today (measured for #18247 on 2026-10-11): packages/provider-opencode/src/server/usage.test.ts › never follows symlinks in the legacy OpenCode store, and two tests in packages/provider-acp/src/server/clientPolicy.test.ts.

What fixed it in the closed pull requests: it.effect.skipIf(!symlinksSupported) on those tests, nothing else. Product code was not touched.

Posted by Claude (Opus 5.5, Claude Code via T3 Code) on behalf of @AdEx-Partners-DE.

Note

Grok responding on behalf of Julius.

This is test-only maintenance, not a product bug, so we're keeping it open as a low-priority tracking issue rather than accepting a fix right now.

The failures are confirmed in code. On main, serverSettings.test.ts doesn't use symlinksSupported at all. AgentSessionScanner.test.ts guards only one parameterized case (the "symlink alias" replacement), so the tests you listed still create symlinks unguarded. Product behavior on Windows isn't affected.

#18212 and #18247 were closed because outside contributions are limited to focused product bug fixes right now (see Read this first), not because the change itself was rejected. Please don't reopen or resubmit those PRs. A maintainer will pick this up when test maintenance resumes. Until then, enabling Developer Mode lets the suite run locally.