Replace rtt_min_ms (static floor) with Kalman filter value as the
propagation delay estimate in EDPF predicted arrival calculation.
The Kalman-smoothed RTT reflects current link conditions including
cellular handovers, while rtt_min_ms only captures the historical
minimum. Falls back to rtt_min_ms if Kalman hasn't initialized.
EWMA is now only used for rtt_avg_delta (symmetric alpha=0.2). Remove
asymmetric constructor and is_initialized from production API since
smooth_rtt and fast_rtt EWMAs were replaced by the Kalman filter.
Asymmetric tests removed accordingly.
Remove smooth_rtt and fast_rtt EWMA trackers from RttTracker. The Kalman
filter now serves as the sole smooth RTT source — its value() provides
the smoothed estimate and velocity() provides trend detection (replacing
the fast tracker's spike-catching role).
EWMA::asymmetric and is_initialized gated behind test-internals since
no production code uses them after this change. Stats export renamed
fast_rtt_ms → rtt_velocity to reflect the new semantics.
- Introduced a new `harness.rs` module for managing integration tests.
- Added common utilities for integration tests in `mod.rs`.
- Implemented basic connectivity tests in `netns_basic.rs` to validate registration and data forwarding.
- Created failure and recovery tests in `netns_failure.rs` to ensure link failure detection and recovery.
- Developed impairment tests in `netns_impairment.rs` to validate adaptation to network conditions.
- Added scenario-driven tests in `netns_scenario.rs` to assess stability under evolving impairments.
- Updated `Cargo.toml` and `Cargo.lock` to include `tempfile` dependency.
- Enhanced `lib.rs` to expose new test harness functionalities.
- Introduced a new workspace with a `network-sim` crate for simulating network conditions.
- Implemented `ImpairmentConfig` for configuring network impairments using `tc netem`.
- Added `GemodelConfig` for modeling bursty packet loss with Gilbert-Elliott model.
- Created `Scenario` and `ScenarioConfig` for generating deterministic random-walk impairment scenarios.
- Implemented `Namespace` management for Linux network namespaces, including veth link creation.
- Added tests for impairment application and scenario generation to ensure functionality.
Before REG3, forward_via_connection() tracks data packets in packet_log,
creating phantom in-flight counts that never get ACKed. Early NAKs from
these packets also penalize quality scoring. This cascading penalty
starves connections of traffic, causing the system to get stuck at low
throughput after startup.
Reset packet_log, in_flight_packets, congestion state, and quality cache
when REG3 is received so every connection starts with a clean slate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Increase SWITCH_THRESHOLD from 1.02 to 1.10 so a new connection must be
10% better before traffic is moved to it. With the shorter 15ms cooldown,
hysteresis is now the primary stability mechanism; 2% was too small to
prevent noise-driven flip-flopping between connections with similar scores.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>