Commit fee791d
committed
fix: flush the stream pacer backlog when the wire goes quiet
The smoothing pacer reveals buffered content_block_delta bursts at a fixed
32 KB/s. When the model delivers a burst then pauses (between bursts, or
finished a paragraph and is thinking), that burst sits in pending_stream and
dribbles out while the wire is silent — the "it pauses, then slowly scrolls
in the text it already had" stall. The pacer only earns its keep while bytes
are actively flowing; once last_event_at goes stale (>90 ms, bumped on every
SSE event incl. heartbeats) there is nothing left to smooth against, so flush
the whole backlog in one tick.
Pairs with maya 560edd4 (residue-drain gate fix) — together they stop
already-received bytes from appearing later than they should. Bumps maya.1 parent d7c0dcc commit fee791d
2 files changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
123 | 142 | | |
124 | 143 | | |
125 | 144 | | |
| |||
145 | 164 | | |
146 | 165 | | |
147 | 166 | | |
148 | | - | |
149 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
150 | 172 | | |
151 | 173 | | |
152 | 174 | | |
| |||
0 commit comments