mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
* fix(terminal): send one ACK overflow recovery image per drained window Recovery snapshots bypass ACK windows, so on a link slower than a flooding TUI each ACK while overflowed published another full-screen image behind the queued window. Measured through real orcad over a 1 Mbit/s shaped link this queued images without bound: keystroke echo grew from 22s to 50s over a 45s flood and the pane took 51s to settle. Holding the next image until the output sent ahead of the previous one is acknowledged bounds that queue to the window plus one image (echo <= 18s, settle 7s, 10x fewer snapshot bytes). Server-only; no protocol change. * fix(terminal): let adaptive ACK pacing engage under overflowing TUI floods Through real orcad on a shaped 1 Mbit/s link, ORCA_TERMINAL_ADAPTIVE_ACK_WINDOW=1 never paced a 60fps full-screen TUI: once its queue overflowed, recovery images cleared the queue, so later sends counted as idle trickle and the estimate never collected window-limited samples. When it did, the images (never acked) inflated paced RTT and tripped the divergence fallback. - A stream whose output outran the window stays backlogged until an ACK finds its queue empty, so sends after a recovery still measure the link. - The estimate records recovery images: they count as queue ahead of later sends (no drained/paced samples behind them) and as delivered bytes once an ACK of a later send confirms them. Shaped-link soak (1 Mbit/s, 50ms): echo p50 13s -> 2.2s, settle 7s -> 1.1s. Bench gains a 6.4 MB/s TUI scenario: paced 7.7s -> 1.2s.