Skip to content

fix(tests): disable IPv6 in e2e testnet to fix Windows/macOS CI#81

Merged
mickvandijke merged 2 commits intoWithAutonomi:mainfrom
grumbach:fix/e2e-windows-ipv6
Apr 27, 2026
Merged

fix(tests): disable IPv6 in e2e testnet to fix Windows/macOS CI#81
mickvandijke merged 2 commits intoWithAutonomi:mainfrom
grumbach:fix/e2e-windows-ipv6

Conversation

@grumbach
Copy link
Copy Markdown
Collaborator

Summary

The e2e test harness creates loopback-only nodes on 127.0.0.1 but left ipv6 at its default (true), which makes saorsa-core try to bind a dual-stack v6 socket on top. Windows GitHub Actions runners — and some macOS runners — can't do that. Result: every recent CI run hits

Failed to create node 0: Transport error: Setup failed:
Failed to create dual-stack network nodes: Failed to create transport

and the testnet startup fans out into the next 70+ tests reporting the same error.

What landed

Pin .ipv6(false) in CoreNodeConfig::builder() for testnet.rs. Loopback-only tests don't need v6 — the bind addr is already Ipv4Addr::LOCALHOST. Matching change is already present in ant-client's tests/support/mod.rs:246.

Visible failures this fixes

From the merged v0.11.0 release CI:

  • replication::test_verification_with_paid_list_check
  • security_attacks::test_attack_proof_too_large
  • All Merkle E2E (macos-latest) tests in ant-client repo

Test plan

  • cargo check --tests --features test-utils: clean
  • cargo clippy --tests --features test-utils -- -D warnings: clean
  • cargo fmt --all -- --check: clean
  • CI on Windows + macOS (via this PR)

The e2e test harness creates loopback-only nodes on 127.0.0.1 but
left `ipv6` at its default (true), which makes saorsa-core try to
bind a dual-stack v6 socket on top. On Windows GitHub Actions runners
and some macOS runners that bind fails outright, producing:

  Failed to create node 0: Transport error: Setup failed:
  Failed to create dual-stack network nodes: Failed to create transport

Two e2e tests visibly broke on the merged v0.11.0 RC:

  test replication::test_verification_with_paid_list_check ... FAILED
  test security_attacks::test_attack_proof_too_large ... FAILED

(These tests run later in the suite, after the dual-stack failure
fans out to subsequent node creations.)

Fix: pin `ipv6(false)` in `CoreNodeConfig::builder()` for the test
testnet. Loopback-only tests don't need v6 — the existing
`SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), port)` already
locks the bind to v4 anyway. Matching change is already present in
ant-client's `tests/support/mod.rs` (line 246).
Copilot AI review requested due to automatic review settings April 27, 2026 03:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes cross-platform CI failures in the e2e test harness by ensuring loopback-only testnet nodes don’t attempt to create dual-stack (IPv6) sockets on Windows/macOS runners.

Changes:

  • Disable IPv6 in the e2e TestNetwork node startup config via CoreNodeConfig::builder().ipv6(false).
  • Add inline rationale explaining the Windows/macOS dual-stack bind failure and why IPv6 isn’t needed for loopback-only tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Same dual-stack bind issue as e2e/testnet.rs. Currently the tests in
live_testnet.rs are #[ignore]'d pending a dht_put/dht_get rewrite for
saorsa-core >= 0.16, so this doesn't fix anything observable today.
Apply the fix preventatively so the bug doesn't resurface when those
tests are revived.
@mickvandijke mickvandijke merged commit b7ede42 into WithAutonomi:main Apr 27, 2026
11 checks passed
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.

3 participants