mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-19 17:25:19 +03:00
The controller itself, as a pure thing with no I/O, so the decisions can be tested away from a connection. It is driven by the receiver's report rather than by this end's view of the path, because this end's view was measured being wrong when it mattered most: 182 ms round trip, zero QUIC packet loss, and a client watching arrivals fall from 1776 to 239 datagrams a second. Some of that is structural -- `send_datagram` evicts the oldest queued datagrams and returns `Ok`, so a sender overrunning a path is told nothing at all. Round-trip time and congestion window remain as a fallback for when the far end has gone quiet, and nothing else. Backing off anchors on measured goodput rather than on a fraction of what was being asked for, which is what makes it quick: at 10 Mbps into a 3 Mbps path the next target is under what actually arrived, so one step does what twenty multiplicative decreases would. The test that matters reproduces the reported failure -- 10 Mbps offered, no frame completing at all -- and requires it corrected within five seconds. Belief and actuation are separate, and that is not tidiness. Folding them together stalls the climb: the step up is a fraction of the ceiling, so past half the ceiling every step falls under the deadband, and a target that only moved when it actuated could never accumulate past that point. The tests caught it. Belief moves every second; saying so is rationed. The first decision is always stated even when nothing changed, because the encoder started at whatever its environment gave it and this end cannot know that matches. Standing down is explicit in three cases: a person set the bitrate by hand, the encoder is under constant quality and has no bitrate to decide, or nothing has been heard and nothing can be seen -- and that last one decays rather than holds, since holding a high target on no evidence is precisely how the original failure sustained itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>