Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Mergedjuliusmarmingemerged 1 commit intowindows-tests/directory-fsync fromrefs/pull/9570/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

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](https://cursor.com/bugbot) for commit 11da79bf1749dd38c5d89072ca3db3b5a684400f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      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.

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged this12b6d02

    5. juliusmarminge closed this

Sign in to join this conversation.