codex/codex-rs/codex-api/src
jif 7769bccbb2 Avoid WebSocket connection waits in Guardian v2 classification (#43408)
## Why

When no healthy pooled WebSocket is available, classification waits for a new connection to open and can stall on its handshake.

## What changed

- Use HTTP streaming when no healthy idle WebSocket is ready, and replenish the pool in the background with a five-minute cooldown after connection timeouts.
- Share concurrency limits and the sampling retry budget across both transports, and bound the wait for HTTP response headers.
- Cancel superseded requests while awaiting response headers and stop SSE polling when the consumer closes.

## Testing

Add coverage for HTTP fallback and recovery after cooldown, shared transport capacity, stalled response headers, and cancellation before headers or during body draining. Update sampler and extension tests to cover fallback after socket expiry, authentication changes, and transient failures.

GitOrigin-RevId: 0b23ccc1bfb2dfdbc8d2791d097706cd4dd44f39
History 2026-09-07 09:24:03 +00:00
..
endpoint Replace Guardian tickets with parent response IDs (#43002) 2026-09-05 13:02:49 +00:00
requests [codex] Assign response item IDs when recording history (#28814) 2026-06-18 17:30:55 -07:00
sse Avoid WebSocket connection waits in Guardian v2 classification (#43408) 2026-09-07 09:24:03 +00:00
api_bridge.rs Expose resumable misalignment details through app server (#40952) 2026-08-26 18:42:44 +00:00
api_bridge_tests.rs Expose resumable misalignment details through app server (#40952) 2026-08-26 18:42:44 +00:00
auth.rs Support workload identity in remote exec-server auth (#38610) 2026-08-14 17:32:37 +00:00
common.rs Replace Guardian tickets with parent response IDs (#43002) 2026-09-05 13:02:49 +00:00
error.rs Expose resumable misalignment details through app server (#40952) 2026-08-26 18:42:44 +00:00
files.rs Finalize reserved PDF uploads with creation context (#39807) 2026-08-20 22:59:37 +00:00
images.rs Add typed Images client to codex-api (#23989) 2026-05-22 14:10:55 -07:00
lib.rs Replace Guardian tickets with parent response IDs (#43002) 2026-09-05 13:02:49 +00:00
provider.rs Disable storage for Azure Responses requests (#38060) 2026-08-11 19:35:05 +00:00
rate_limits.rs Add Luna Reserve usage fallback to the TUI (#42372) 2026-09-02 21:50:51 +00:00
safety_buffering.rs [codex] Read buffering metadata from response events (#31064) 2026-07-05 00:07:53 +00:00
search.rs Expose structured standalone web search results (#32898) 2026-07-13 23:37:35 +00:00
telemetry.rs Add auth 401 observability to client bug reports (#14611) 2026-03-14 15:38:51 -07:00