Skip to content

[Repo Assist] Fix Windows CI: use 127.0.0.1 instead of localhost for test HTTP servers#1648

Merged
dsyme merged 2 commits intomainfrom
repo-assist/fix-windows-ci-localhost-e388a49a78dc0a12
Feb 25, 2026
Merged

[Repo Assist] Fix Windows CI: use 127.0.0.1 instead of localhost for test HTTP servers#1648
dsyme merged 2 commits intomainfrom
repo-assist/fix-windows-ci-localhost-e388a49a78dc0a12

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.

Problem

The Windows CI build was failing with:

System.IO.IOException: Failed to bind to address (localhost/redacted)
 ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.

When Kestrel binds to localhost, it tries to bind to both 127.0.0.1 (IPv4) and ::1 (IPv6). On Windows GitHub Actions runners, IPv6 socket creation is forbidden (WSAEACCES / error 10013), causing the whole server startup to fail — and with it, any test that uses the local HTTP test server.

This was causing 1 test failure out of 2847 in FSharp.Data.Core.Tests on Windows.

Fix

Replace (localhost/redacted) with (127.0.0.1/redacted) in the two test helpers that spin up a local Kestrel server:

  • tests/FSharp.Data.Core.Tests/Http.fsstartHttpLocalServer()
  • tests/FSharp.Data.Core.Tests/XmlExtensions.fsstartXmlHttpLocalServer()

Using an explicit IPv4 address bypasses the dual-stack bind and works on all platforms.

Files changed

  • tests/FSharp.Data.Core.Tests/Http.fs
  • tests/FSharp.Data.Core.Tests/XmlExtensions.fs

Test Status

Minimal two-line change in test infrastructure only. No production code changed. The fix directly addresses the error observed in CI run https://github.com/fsprojects/FSharp.Data/actions/runs/22380588390.

Generated by Repo Assist following a request by @dsyme

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@b87234850bf9664d198f28a02df0f937d0447295. View source at https://github.com/githubnext/agentics/tree/b87234850bf9664d198f28a02df0f937d0447295/workflows/repo-assist.md.

On Windows GitHub Actions runners, binding Kestrel to 'localhost' fails
because it attempts to bind to both 127.0.0.1 (IPv4) and ::1 (IPv6),
and IPv6 socket creation is forbidden (SocketException 10013: WSAEACCES).

Using '127.0.0.1' explicitly avoids the IPv6 bind attempt and makes the
tests reliable on Windows CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review February 25, 2026 20:09
@dsyme dsyme merged commit 9923dd3 into main Feb 25, 2026
2 checks passed
@dsyme dsyme deleted the repo-assist/fix-windows-ci-localhost-e388a49a78dc0a12 branch February 25, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant