fix: prune stale hop mux sessions #71

Merged
ada merged 2 commits from fix/harden-hop-mux-churn into master 2026-05-16 07:01:52 +00:00
Collaborator

Summary

  • Prune finished HopMux outbound sessions before opening/reusing a session so peer churn does not leave stale outbound sessions resident indefinitely.
  • Add a regression test that reproduces stale-session accumulation across peer churn.
  • Update unsupported-features documentation to record the covered peer-churn hardening slice while leaving broader NAT/keepalive/MTU/load validation as remaining work.

Validation

  • docker run --rm -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; rustup component add rustfmt >/dev/null; cargo fmt --check"
  • docker run --rm -e CARGO_TARGET_DIR=/src/target -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; cargo test -p portal-relay relay::hop_mux::tests::hop_mux_prunes_finished_outbound_sessions_when_peer_churns -- --nocapture"
  • docker run --rm -e CARGO_TARGET_DIR=/src/target -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; cargo test --locked -p portal-relay"
  • docker run --rm -e CARGO_TARGET_DIR=/src/target -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; rustup component add clippy >/dev/null; cargo clippy --locked -p portal-relay --all-targets -- -D warnings"
  • git diff --check
## Summary - Prune finished HopMux outbound sessions before opening/reusing a session so peer churn does not leave stale outbound sessions resident indefinitely. - Add a regression test that reproduces stale-session accumulation across peer churn. - Update unsupported-features documentation to record the covered peer-churn hardening slice while leaving broader NAT/keepalive/MTU/load validation as remaining work. ## Validation - docker run --rm -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; rustup component add rustfmt >/dev/null; cargo fmt --check" - docker run --rm -e CARGO_TARGET_DIR=/src/target -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; cargo test -p portal-relay relay::hop_mux::tests::hop_mux_prunes_finished_outbound_sessions_when_peer_churns -- --nocapture" - docker run --rm -e CARGO_TARGET_DIR=/src/target -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; cargo test --locked -p portal-relay" - docker run --rm -e CARGO_TARGET_DIR=/src/target -v "$PWD:/src" -w /src rust:1 bash -lc "set -euo pipefail; . /usr/local/cargo/env; rustup component add clippy >/dev/null; cargo clippy --locked -p portal-relay --all-targets -- -D warnings" - git diff --check
fix: prune stale hop mux sessions
All checks were successful
Rust CI / Format, lint, and test (pull_request) Successful in 43s
f9b42395f1
docs: clarify development self-merge policy
All checks were successful
Rust CI / Format, lint, and test (pull_request) Successful in 51s
9bd19caf20
ada merged commit a96d959f33 into master 2026-05-16 07:01:52 +00:00
ada referenced this pull request from a commit 2026-05-16 07:01:54 +00:00
Author
Collaborator

Released as v2.2.2+rs.2: https://code.rly.best/gofix/portal-tunnel-rs/releases/tag/v2.2.2+rs.2

Production image: code.rly.best/gofix/portal-tunnel-rs:v2.2.2-rs.2

Released as v2.2.2+rs.2: https://code.rly.best/gofix/portal-tunnel-rs/releases/tag/v2.2.2+rs.2 Production image: `code.rly.best/gofix/portal-tunnel-rs:v2.2.2-rs.2`
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gofix/portal-tunnel-rs!71
No description provided.