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
Remove the freebuff session grace environment variable and use the fixed server-side grace window from free-session config.
Also refresh the default deps comment to describe the current config getter and test injection path.
Copy file name to clipboardExpand all lines: docs/freebuff-waiting-room.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,8 @@ The entire system is gated by the env flag `FREEBUFF_WAITING_ROOM_ENABLED`. When
18
18
# Disable entirely (both the gate on chat/completions and the admission loop)
19
19
FREEBUFF_WAITING_ROOM_ENABLED=false
20
20
21
-
# Other knobs (only read when enabled)
21
+
# Other knob (only read when enabled)
22
22
FREEBUFF_SESSION_LENGTH_MS=3600000 # 1 hour
23
-
FREEBUFF_SESSION_GRACE_MS=1800000 # 30 min — drain window after expiry
24
23
```
25
24
26
25
Flipping the flag is safe at runtime: existing rows stay in the DB and will be admitted / expired correctly whenever the flag is flipped back on.
@@ -161,7 +160,7 @@ The final tick result carries a `queueDepthByModel` map and a single `skipped` r
161
160
|`FIREWORKS_DEPLOYMENT_MAP`|`web/src/llm-api/fireworks-config.ts`|`glm-5.1`| Models with dedicated Fireworks deployments. Models not listed are treated as `healthy` (serverless fallback) — drop this default when they migrate to their own deployments. |
162
161
|`HEALTH_CACHE_TTL_MS`|`fireworks-health.ts`| 25000 | Fleet probe cache TTL. Sits just under the Fireworks 30s exporter cadence and 6 req/min rate limit. |
|`FREEBUFF_SESSION_GRACE_MS`|env| 1_800_000 | Drain window after expiry — gate still admits requests so an in-flight agent can finish, but the CLI is expected to block new prompts. Hard cutoff at `expires_at + grace`. |
163
+
|`SESSION_GRACE_MS`|`web/src/server/free-session/config.ts`| 1_800_000 | Drain window after expiry — gate still admits requests so an in-flight agent can finish, but the CLI is expected to block new prompts. Hard cutoff at `expires_at + grace`. |
165
164
166
165
## HTTP API
167
166
@@ -275,7 +274,7 @@ When the waiting room is disabled, the gate returns `{ ok: true, reason: 'disabl
275
274
276
275
## Drain / Grace Window
277
276
278
-
We don't want to kill an agent mid-run just because the user's session ticked over. After `expires_at`, the row enters a "draining" state for `FREEBUFF_SESSION_GRACE_MS` (default 30 min). During the drain window:
277
+
We don't want to kill an agent mid-run just because the user's session ticked over. After `expires_at`, the row enters a "draining" state for `SESSION_GRACE_MS` (30 min). During the drain window:
279
278
280
279
-`checkSessionAdmissible` returns `{ ok: true, reason: 'draining', gracePeriodRemainingMs }` — chat completions still go through.
281
280
-`getSessionState` / `requestSession` return `{ status: 'ended', instanceId, ... }` on the wire. The CLI hides the input and shows the Enter-to-rejoin banner while still forwarding the instance id so in-flight agent work can keep streaming.
0 commit comments