Skip to content

Fix 7 pre-existing test failures on Windows#213

Merged
PureWeen merged 2 commits intomainfrom
fix/windows-test-failures
Feb 25, 2026
Merged

Fix 7 pre-existing test failures on Windows#213
PureWeen merged 2 commits intomainfrom
fix/windows-test-failures

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

Summary

Fixes 7 test failures that occur on Windows (all 1325 tests now pass).

Fix 1: DiffParser - CRLF line ending handling

DiffParser.Parse() splits on \n but did not strip trailing \r, causing all parsed content to have trailing \r on Windows.

Fix: Added .TrimEnd('\r') to the line variable (1 line change).

Fix 2: ServerManagerTests - IPv4/IPv6 mismatch

Test creates TcpListener(IPAddress.Loopback, 0) which binds IPv4 only, but connects via localhost which may resolve to IPv6 first on Windows, causing the 1s timeout.

Fix: Changed test to use 127.0.0.1 to match the IPv4-only listener (1 line, test-only).

Verification

  • All 1325 tests pass after fixes
  • Reviewed and approved by both Claude Opus and Claude Sonnet

PureWeen and others added 2 commits February 25, 2026 15:47
- DiffParser: TrimEnd('\r') after splitting on '\n' to handle CRLF line endings
- ServerManagerTests: Use '127.0.0.1' instead of 'localhost' to match IPv4-only TcpListener

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All production callers of CheckServerRunning used 'localhost' which can
resolve to IPv6 (::1) on Windows while the copilot server binds IPv4.
This caused the server to be incorrectly reported as not running,
triggering spurious re-launches.

Changed default parameter and all 5 call sites from 'localhost' to
'127.0.0.1' to match the IPv4 loopback the server actually listens on.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen merged commit 67affbb into main Feb 25, 2026
@PureWeen PureWeen deleted the fix/windows-test-failures branch February 25, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant