deploy slice A: engine hygiene — TCP_NODELAY + WS pings + trunk config #24
Reference in New Issue
Block a user
Delete Branch "deploy-a/engine-hygiene"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What lands
crates/rutster/src/serve.rsserve_with_nodelayhelper (the single production serve path; Task 3 sim-bench'snodelay.rsassertion regresses exactly whatmain.rsruns).RUTSTER_WS_PING_SECS(default 20);0/garbage fail the boot. New thirdselect!branch in the trunk pump emitsMessage::Ping, drop+observe+continue on send failure (hot-path policy honored).RUTSTER_TWILIO_WEBHOOK_BASE(kills hardcodedws://127.0.0.1:8080at routes.rs);config::twilio_credentialswired into startup validation (parsed-but-never-called since slice-5, now fail-fast); trusted-proxy public-URL reconstruction honoringRUTSTER_TRUSTED_PROXIESCIDR list (empty default = headers ignored, fail-closed).config.rsfail-fast parsers (ws_ping_interval,trusted_proxies) — same pureOption<String>convention as the existing slice-5 patterns.ipnet = "2"(workspace-pinned; already in Cargo.lock transitively via reqwest; MIT OR Apache-2.0).socket2 = "0.6"(transitive-to-direct promotion via tokio at 0.6.4;allfeature forset_tcp_quickack; Linux-only API cfg-gated) — used to defeat the loopback TCP_QUICKACK heuristic so the Task 3 NODELAY assertion is load-bearing on this runner.Done-criteria (spec §5.1 + §5.2 + §5.3)
--features=sim-bench).deny.toml:84's"GPL-3.0-or-later"SPDX expression. CI usesEmbarkStudios/cargo-deny-action@v2(cargo-deny 0.19.x) which is the authoritative license gate.ipnet 2.12.0license manually verified as MIT OR Apache-2.0, both allow-listed indeny.toml [licenses] allow.[tool_registry]incrates/rutster/src/lib.rsline 92, NOT introduced by Plan A — that file is untouched by this slice). The CI workflow file (.github/workflows/ci.ymlline 2) gates only fmt + clippy + test + deny, NOT cargo doc.crates/rutster-media/src/{loop_driver.rs,rtc_session.rs}byte-identical (verified744bf314edf7f4925c8bb3bd0f5176dbc88f8113+f47d63b9a2883d37066a93c9daa0e2cf8816bec4unchanged across all 5 commits).empty_trusted_list_default_ignores_headers+untrusted_peer_headers_are_ignoredtests).Foundation note
Merge instructions
Signed-off-by: Aaron D. Lee <himself@adlee.work>on all 5 commitsdocs/deployment-topology-spec:deploy-a-engine-hygiene-mergedCommits (5 atomic, all DCO-signed)
186149c— feat(serve): TCP_NODELAY on every accepted HTTP/WS socket (deploy-A §5.1) — Task 1ac3670b— feat(trunk): app-level WS ping on the media-stream WS, RUTSTER_WS_PING_SECS default 20 (deploy-A §5.2) — Task 249a5d8c— test(sim): WS-frame send→recv p99 assertion — the TCP_NODELAY tripwire (deploy-A §5.1) — Task 390ba131— fix(trunk): derive TwiML Stream URL from RUTSTER_TWILIO_WEBHOOK_BASE; wire twilio_credentials into startup (deploy-A §5.3) — Task 483d827d— feat(trunk): trusted-proxy posture — RUTSTER_TRUSTED_PROXIES + public-URL reconstruction helper (deploy-A §5.3) — Task 5Reviews (PM-flagged)
crates/rutster-sim/src/nodelay.rsdocuments the WHY.