tests(iroh): add patchbay test matrix for switching uplinks#4095
Merged
tests(iroh): add patchbay test matrix for switching uplinks#4095
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4095/docs/iroh/ Last updated: 2026-04-14T12:30:54Z |
20f7ab4 to
7f19d9a
Compare
This was referenced Apr 10, 2026
7f19d9a to
509504b
Compare
matheus23
approved these changes
Apr 14, 2026
Comment on lines
+31
to
+37
| enum SwitchKind { | ||
| V4ToV4, | ||
| V4ToV6, | ||
| V6ToV4, | ||
| V6ToV6, | ||
| DualToDual, | ||
| } |
Member
There was a problem hiding this comment.
What about Dual -> V4?
Why have this enum instead of struct SwitchKind { from: IpSupport, to: IpSupport }?
Or just pass from: IpSupport and to: IpSupport to run_switch_uplink.
509504b to
b0e837f
Compare
Pass `from: IpSupport` and `to: IpSupport` directly to run_switch_uplink instead of using a SwitchKind enum. Covers the full 3x3 matrix of IP family transitions (18 tests), adding the 8 previously missing cross combinations (Dual<->V4, Dual<->V6, V4->Dual, V6->Dual). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collect all known remote addrs before the switch and reject any path that was already open. This fixes a measurement artifact where dual-stack "from" tests would instantly match on a pre-existing backup IP path before the real re-holepunch completed.
matheus23
approved these changes
Apr 14, 2026
Member
matheus23
left a comment
There was a problem hiding this comment.
Nice. Good catch on the latest bug fix too.
matheus23
reviewed
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds a patchbay test matrix for testing uplink switching across IP family transitions (v4/v6/dual-stack) for both client and server side. Each test holepunches a direct path, replugs the switching side to a different router, and verifies that a new direct path is selected and data flows over it.
The tests all pass. Initially, the server side tests failed, and this uncovered two issues which are now fixed:
handle_network_changeonly checks whether a path is recoverable on the client side; the server side always assumed paths were recoverable, so dead direct paths were never proactively abandoned after a server replug. See fix(proto): let server-side paths use recoverability hint on network change noq#579