Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs: state that each gateway timer bounds one phase of an authorize

Alfredo Lopez28e7d30a950e
diff --git a/deploy/base/control-plane/configmaps.yaml b/deploy/base/control-plane/configmaps.yaml
index de1227213..eed8edff3 100644
--- a/deploy/base/control-plane/configmaps.yaml
+++ b/deploy/base/control-plane/configmaps.yaml
@@ -890,11 +890,12 @@ data:
}
error_page 502 = @control_plane_unavailable;
error_page 504 = @control_plane_connect_timeout;
- # control-api holds a retained authorize for up to its queue wait
- # (40 s), body read (10 s) and work deadline (30 s), and answers
- # queue_wait or authorize_timeout itself. The server's 30 s would
- # turn those answers into nginx's own 504. control-api pauses a
- # queued body, so the send timer stalls as well as the read timer.
+ # control-api answers queue_wait or authorize_timeout itself; the
+ # server's 30 s would turn those answers into nginx's own 504. Each
+ # timer bounds the gap between two writes or reads, not the whole
+ # request: control-api pauses a queued body, so the send timer covers
+ # the queue wait (40 s), and the read timer covers the work deadline
+ # (30 s) once the body is sent.
proxy_read_timeout 90s;
proxy_send_timeout 90s;
# This exact location matches the normalized URI, but a proxy_pass
diff --git a/docs/architecture/codex-subscription-transport-contract.md b/docs/architecture/codex-subscription-transport-contract.md
index 9f9c5e6d2..a8cf15e54 100644
--- a/docs/architecture/codex-subscription-transport-contract.md
+++ b/docs/architecture/codex-subscription-transport-contract.md
@@ -147,8 +147,13 @@ order, paused before any read. One principal (JWT `sub` plus its sorted
refused after 40 s, the holder's read deadline (10 s) plus its work deadline
(30 s). These bounds limit latency and fairness, not memory; the count of one
is an uncertified ceiling (#813). The gateway's authorize location sets its
-read and send timeouts to 90 s, above the 80 s a retained authorize can take
-(queue, read and work), so control-api's own answer reaches the Host. A bare
+read and send timeouts to 90 s, so control-api's own answer reaches the
+Host. Each nginx timer bounds the gap between two successive writes or
+reads, not the whole request: the send timer covers the stall while
+control-api pauses a queued body (the 40 s queue wait, after the rate
+limiter), and the read timer covers the work once the body is sent (30 s
+plus connection teardown). The request as a whole can take longer than
+90 s without either timer firing. A bare
504 from the gateway (a read or send timeout on an accepted connection) is
read as `authorize_timeout`, never as a provider outage.
A resolved authorize has committed its ticket and budget reservation, so it is
diff --git a/docs/architecture/grok-subscription-transport-contract.md b/docs/architecture/grok-subscription-transport-contract.md
index 1433804db..70f87997b 100644
--- a/docs/architecture/grok-subscription-transport-contract.md
+++ b/docs/architecture/grok-subscription-transport-contract.md
@@ -272,8 +272,13 @@ Errors:
refused after 40 s, the holder's read deadline (10 s) plus its work deadline
(30 s). These bounds limit latency and fairness, not memory; the count of one
is an uncertified ceiling (#813). The gateway's authorize location sets its
- read and send timeouts to 90 s, above the 80 s a retained authorize can take
- (queue, read and work), so control-api's own answer reaches the Host. A bare
+ read and send timeouts to 90 s, so control-api's own answer reaches the
+ Host. Each nginx timer bounds the gap between two successive writes or
+ reads, not the whole request: the send timer covers the stall while
+ control-api pauses a queued body (the 40 s queue wait, after the rate
+ limiter), and the read timer covers the work once the body is sent (30 s
+ plus connection teardown). The request as a whole can take longer than
+ 90 s without either timer firing. A bare
504 from the gateway (a read or send timeout on an accepted connection) is
read as `authorize_timeout`, never as a provider outage.
A resolved authorize has committed its ticket and budget reservation, so it