Skip to content

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

Open
juliusmarminge wants to merge 1 commit into
windows-tests/directory-fsyncfrom
windows-tests/git-fixtures
Open

test(server): pin git config for fixtures and compare native realpaths#9570
juliusmarminge wants to merge 1 commit into
windows-tests/directory-fsyncfrom
windows-tests/git-fixtures

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 4, 2026

Copy link
Copy Markdown
Member

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 (#9577); see #9538 for the Windows lane these are verified against.

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 217c4da.


Note

Low Risk
Test-only changes (Vitest setup, assertion helpers, and a platform skip); no production server or Git driver behavior changes.

Overview
Stabilizes the server test suite on Windows and against host-specific Git settings.

Pinned Git for all server tests: A Vitest setup file sets GIT_CONFIG_* environment variables so every spawned git process gets fixed defaults (core.autocrlf=false, no GPG signing, init.defaultBranch=main, etc.), overriding ~/.gitconfig and Git for Windows defaults that were breaking byte-exact assertions.

Path assertions: Git-related tests now compare paths with NodeFS.realpathSync.native instead of Effect FileSystem.realPath, so temp directories on Windows match Git’s long-path reporting when runners use 8.3 short names.

Windows-only skip: The worktree test that uses a newline in the directory name is skipped on win32 because NTFS cannot create that path.

Reviewed by Cursor Bugbot for commit 217c4da. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.7 KiB 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.7 KiB 7.8 KiB
Codex Live turn WebSocket decoded 58.5 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.6 KiB 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 66.4 KiB
Claude Live turn messages 10 21

Baseline: unavailable · PR result: 217c4da · 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.

@juliusmarminge
juliusmarminge force-pushed the windows-tests/git-fixtures branch 2 times, most recently from 3fca4b5 to ec71d70 Compare September 4, 2026 03:22
@juliusmarminge
juliusmarminge force-pushed the windows-tests/git-fixtures branch 2 times, most recently from eec7e0d to faca097 Compare September 4, 2026 04:54
@juliusmarminge
juliusmarminge force-pushed the windows-tests/git-fixtures branch from faca097 to 4af64aa Compare September 4, 2026 07:20
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.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@juliusmarminge
juliusmarminge force-pushed the windows-tests/git-fixtures branch from 4af64aa to 217c4da Compare September 4, 2026 07:20
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Sep 4, 2026
@juliusmarminge
juliusmarminge marked this pull request as ready for review September 4, 2026 07:35
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Sep 4, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant