ci: enable Docker NAT for six-peer regression test #2206
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Problem
The six-peer regression test was running without Docker NAT simulation, meaning all peers ran as local processes on localhost. This doesn't match production deployment topology where:
This limited test coverage missed bugs like #2202 where NAT peers failed to connect to gateways.
Investigation
I verified empirically that the Docker NAT simulation correctly preserves source IPs:
This means Docker NAT tests DO exercise the code path where
is_known_gatewaywould be true for gateway responses.Solution
Enable
FREENET_TEST_DOCKER_NAT=1for the six-peer regression test in CI. This:Notes
The original bug (#2202) had a timing component where responses arrived before
ongoing_connections.insert()completed. While Docker NAT doesn't guarantee timing-based bugs will be caught, it does ensure the correct code path is exercised, improving overall test fidelity.Fixes #2204
[AI-assisted - Claude]