You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/buzz-acp/README.md
+4-38Lines changed: 4 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,10 @@ Forum event kinds:
270
270
4.**Prompting** — When events are pending and no prompt is in flight for that channel, drains all queued events for the oldest channel into a single batched prompt via ACP `session/prompt`.
271
271
5.**Agent response** — The agent processes the prompt and uses the Buzz CLI (`send_message`, `get_messages`, etc.) to interact with Buzz.
272
272
6.**Recovery** — If the agent crashes, the harness respawns it. If the relay disconnects, the harness reconnects with a `since` filter to avoid missing events.
273
+
If the inbound queue overflows, the harness attempts replay for affected
274
+
subscriptions when capacity and relay quota permit, with at least five seconds
275
+
between attempts. Recovery depends on available relay history and the consumer
276
+
making progress; complete delivery is not guaranteed.
273
277
274
278
Each channel has at most one prompt in flight. Multiple channels can be processed concurrently when agents > 1.
275
279
@@ -351,41 +355,3 @@ See the [root TESTING.md](../../TESTING.md) for the full integration testing gui
351
355
## License
352
356
353
357
Apache-2.0
354
-
355
-
### Transport overflow recovery
356
-
357
-
The bounded event queue can overflow if the consumer falls behind. The socket
358
-
owner records the oldest dropped timestamp per channel (and for membership
359
-
notifications), removes dropped IDs from transport dedup, and coalesces recovery.
360
-
It attempts **one affected subscription at most every five seconds**, only when
361
-
at least half the consumer queue is free and the shared relay quota gate permits
362
-
it. Least-recently-attempted selection prevents a busy channel from monopolizing
363
-
recovery. Healthy subscriptions are not swept. A failed write retains the pending
364
-
cursor and is paced as well; there is no retry-count cutoff that abandons loss.
365
-
Actual connection loss still uses the existing reconnect/restore path.
366
-
367
-
The five-second cooldown starts at the **end of an actual attempt**, including a
368
-
failed write, not at an unsuccessful capacity check. Once cooldown and quota
369
-
permit work, the socket owner's select waits on the consumer channel's capacity
370
-
notification. It does not poll headroom on a timer. The first eligible attempt
371
-
has no extra timer delay; draining between old timer ticks can trigger recovery.
372
-
The select-local capacity reservation is released before any frame or command is
373
-
handled, so it cannot take space away from live delivery. No capacity waiter or
374
-
recovery timer runs without eligible pending loss.
375
-
376
-
IDs, filters, five-second timestamp overlap and replay-attempt semantics are
377
-
unchanged: a successful REQ write retires the pending drop cursor, **not because
378
-
it proves delivery**. A new overflow records another cursor. EOSE is not a
379
-
consumer receipt, and overlapping stable-ID requests cannot certify exact replay
380
-
completion. Missing history/EOSE, loss after a successful write followed by a
381
-
disconnect, relay history limits, additive proxy watch replay and downstream
382
-
agent processing retain their existing limitations. No exactly-once or durable
383
-
catch-up guarantee is introduced here.
384
-
385
-
Progress requires recurring consumer headroom and available relay history. A
386
-
permanently stalled consumer cannot recover; pending attempts wait rather than
387
-
amplifying its backlog. An individual WebSocket write can still occupy the socket
388
-
owner up to the existing ten-second send timeout; recovery no longer performs a
389
-
paced all-subscription loop between socket reads. This bound covers overflow
390
-
recovery, not initial subscriptions, genuine reconnects, CLOSED recovery, or HTTP
0 commit comments