test(server): pin git config for fixtures and compare native realpaths#9570

merged1
windows-tests/directory-fsync
windows-tests/git-fixtures
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

Git for Windows installs with core.autocrlf=true, so every repository the suite creates checked committed LF files out as CRLF and byte-exact content assertions in GitManager, CheckpointReactor, and the orchestration engine integration test compared 'v2\r\n' against 'v2\n'. A vitest setup file now pins autocrlf, filemode, longpaths, gpgsign, and the default branch through GIT_CONFIG_* so every git child the driver spawns sees them, ahead of whatever the host's ~/.gitconfig says.

Two tests compared an Effect realPath of os.tmpdir() against git's own report of the same directory; on GitHub's Windows runners the temp dir is spelled with its 8.3 short name (RUNNER~1) and only realpathSync.native expands it. The newline-in-worktree-path test is skipped on Windows, where NTFS rejects the name outright.

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

Pin Git config for test fixtures and switch path comparisons to native realpath

  • Adds gitConfig.setup.ts to inject fixed Git defaults (no autocrlf, no signing, no filemode, longpaths, main branch) into the test environment, and loads it via vite.config.ts before server tests run
  • Replaces Effect FileSystem realpath calls with Node's native realpath in RepositoryIdentityResolver and GitVcsDriverCore tests so path comparisons match platform behavior, including Windows short-name canonicalization
  • Skips the newline-path worktree listing test on win32 because NTFS disallows newline characters in file names
  • Behavioral Change: Git subprocesses spawned by server tests now inherit the pinned config entries; path equality assertions use native realpath rather than Effect's implementation

Macroscope summarized 11da79b.


Note

Low Risk Test-only changes (Vitest setup, assertions, and one conditional skip); no production Git or VCS behavior is modified.

Overview Hardens the server test suite on Windows and mixed host Git configs without changing production code.

A new Vitest setup file injects fixed Git settings (core.autocrlf=false, no GPG signing, init.defaultBranch=main, etc.) through GIT_CONFIG_* so every git child process in tests ignores the developer’s ~/.gitconfig and Git for Windows defaults that were breaking byte-exact content checks.

Path equality assertions in RepositoryIdentityResolver and GitVcsDriverCore tests now use NodeFS.realpathSync.native instead of Effect’s realPath, so comparisons match Git’s long paths when temp dirs appear as 8.3 short names on Windows runners. The worktree test that uses a newline in a path is skipped on win32 because NTFS cannot create that name.

Reviewed by Cursor Bugbot for commit 11da79bf1749dd38c5d89072ca3db3b5a684400f. 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.5 KiBβ€”15.1 KiBβœ…
CodexThread snapshot wireβ€”7.0 KiBβ€”7.3 KiBβœ…
CodexLive turn WebSocket wireβ€”6.5 KiBβ€”7.8 KiBβœ…
CodexLive turn WebSocket decodedβ€”57.0 KiBβ€”66.4 KiBβœ…
CodexLive turn messagesβ€”8β€”21βœ…
ClaudeTotal thread wireβ€”13.6 KiBβ€”15.1 KiBβœ…
ClaudeThread snapshot wireβ€”7.0 KiBβ€”7.3 KiBβœ…
ClaudeLive turn WebSocket wireβ€”6.5 KiBβ€”7.8 KiBβœ…
ClaudeLive turn WebSocket decodedβ€”57.8 KiBβ€”66.4 KiBβœ…
ClaudeLive turn messagesβ€”9β€”21βœ…

Baseline: unavailable Β· PR result: 11da79b Β· 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 are limited to test portability and deterministic Git fixture setup, with no product-runtime behavior change. However, both test files add file-level directives disabling the nodeBuiltinImport static-analysis diagnostic, which requires human review.

No code changes detected at 11da79b. Prior analysis still applies.

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

Added 1 commit

  • test(server): pin git config for fixtures and compare native realpaths11da79b