Skip to content

Bound streamed exec-server HTTP response bodies - #32112

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/be9205fef44b0ec96b84b31a8e059b1cb9cd3f3b
Jul 10, 2026
Merged

Bound streamed exec-server HTTP response bodies#32112
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/be9205fef44b0ec96b84b31a8e059b1cb9cd3f3b

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bound streamed exec-server HTTP response bodies

Why

Frame-count backpressure does not bound the amount of executor-controlled data
retained in streamed HTTP response queues, and a single body delta could exceed
the intended wire size.

What changed

  • Limit each decoded http/request/bodyDelta payload to 1 MiB, split locally
    produced response chunks at that boundary, and reject oversized incoming
    deltas.
  • Apply a shared 16 MiB byte budget across queued HTTP response streams. Release
    capacity as deltas are consumed and fail a stream when the budget is
    exhausted.

Testing

Added coverage for rejecting an oversized delta and for failing a stream after
its queued deltas exhaust the shared byte budget.

## Why

Frame-count backpressure does not bound the amount of executor-controlled data
retained in streamed HTTP response queues, and a single body delta could exceed
the intended wire size.

## What changed

- Limit each decoded `http/request/bodyDelta` payload to 1 MiB, split locally
  produced response chunks at that boundary, and reject oversized incoming
  deltas.
- Apply a shared 16 MiB byte budget across queued HTTP response streams. Release
  capacity as deltas are consumed and fail a stream when the budget is
  exhausted.

## Testing

Added coverage for rejecting an oversized delta and for failing a stream after
its queued deltas exhaust the shared byte budget.

GitOrigin-RevId: be9205fef44b0ec96b84b31a8e059b1cb9cd3f3b
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/be9205fef44b0ec96b84b31a8e059b1cb9cd3f3b branch from e8abd63 to 4ba2815 Compare July 10, 2026 09:57
@copyberry
copyberry Bot merged commit 4ba2815 into main Jul 10, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/be9205fef44b0ec96b84b31a8e059b1cb9cd3f3b branch July 10, 2026 09:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants