feat(gateway): add configurable lane queue mode, cap, and overflow

This commit is contained in:
William Valentin
2026-02-16 11:48:45 -08:00
parent 527602fd8a
commit f7284a4ef1
9 changed files with 178 additions and 5 deletions
+18
View File
@@ -797,6 +797,24 @@ server:
violation_window_ms: 10000
```
## Gateway Lane Queue Policy
Per-session FIFO queue policy for concurrent gateway requests (`agent.send`).
```yaml
server:
queue:
mode: collect # collect | steer | interrupt
cap: 50 # max pending requests per session lane
overflow: drop_old # drop_old | drop_new
```
Notes:
- `collect` keeps all queued requests (subject to `cap`).
- `steer` and `interrupt` keep only the latest pending request while one is active.
- `interrupt` currently does not force-stop already running work; use `agent.cancel` for active cancellation.
- On overflow, `drop_old` evicts the oldest pending request, `drop_new` rejects the new request.
## Gateway Request Body Limit
Cap inbound HTTP POST body size (webhooks and Gmail push) to reduce memory-DoS risk.