test(sim): WS-frame send→recv p99 assertion — the TCP_NODELAY tripwire (deploy-A §5.1)

Joins the CI-regressed sim-bench sweep (S7 style: threshold const with
budget+slack rationale, cfg(sim-bench) test, --test-threads=1 job).
Drives the real trunk WS route through the PRODUCTION serve path
(rutster::serve::serve_with_nodelay) over a real loopback socket at the
real 20ms cadence. Healthy ~1-2ms; a Nagle regression stalls ~40ms+;
threshold 20ms splits the regimes by an order of magnitude each way.
Verified load-bearing: fails when tcp_nodelay(false) — see module doc
for the Option D socket2 TCP_QUICKACK suppression that defeats the
Linux loopback's quick-ACK heuristic so the assertion actually
catches the Nagle regression on this runner.

Signed-off-by: Aaron D. Lee <himself@adlee.work>
This commit is contained in:
2026-07-05 23:30:20 -04:00
parent 90ba131ad9
commit 49a5d8c91c
5 changed files with 205 additions and 1 deletions

5
Cargo.lock generated
View File

@@ -1523,12 +1523,17 @@ dependencies = [
name = "rutster-sim"
version = "0.0.0"
dependencies = [
"futures-util",
"rutster",
"rutster-call-model",
"rutster-media",
"rutster-tap",
"rutster-trunk",
"serde",
"socket2",
"thiserror 1.0.69",
"tokio",
"tokio-tungstenite",
"toml",
"tracing",
"url",