Skip to content

Bound exec-server pending RPCs#31578

Merged
jif-oai merged 2 commits into
mainfrom
jif/exec-server-rpc-limits
Jul 8, 2026
Merged

Bound exec-server pending RPCs#31578
jif-oai merged 2 commits into
mainfrom
jif/exec-server-rpc-limits

Conversation

@jif-oai

@jif-oai jif-oai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Why

An untrusted exec-server can stop reading requests, never answer them, or send guessed responses before queued requests are written. Without client-side admission, the orchestrator can retain unbounded RPC call futures and request payloads.

We need a hard bound without adding a blanket timeout, because individual operations already own their timeout and cleanup semantics.

What changed

  • hold one of 64 shared admission permits for the full lifetime of each regular RPC call, so an early response cannot free capacity while the call remains queued
  • allow process/terminate and fs/close to use one additional cleanup permit
  • close the transport and fail pending calls if the cleanup permit is also stuck, allowing teardown or recovery to release remote resources
  • leave the wire format and existing timeout behavior unchanged

Tests

  • rpc_client_call_has_no_implicit_deadline verifies that ordinary calls remain untimed
  • rpc_client_bounds_in_flight_calls_and_preserves_cleanup covers the regular-call cap, guessed early responses, cleanup admission, and the cleanup circuit breaker

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48b5c1d242

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/exec-server/src/rpc.rs Outdated
Comment thread codex-rs/exec-server/src/rpc.rs Outdated
Comment thread codex-rs/exec-server/src/rpc.rs Outdated
@jif-oai jif-oai force-pushed the jif/exec-server-rpc-limits branch from 48b5c1d to 5834a74 Compare July 8, 2026 14:44
@jif-oai jif-oai force-pushed the jif/exec-server-rpc-limits branch from b89d367 to 3fe6c5f Compare July 8, 2026 15:07
@jif-oai

jif-oai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 3fe6c5f234

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai jif-oai merged commit a14b4c2 into main Jul 8, 2026
35 checks passed
@jif-oai jif-oai deleted the jif/exec-server-rpc-limits branch July 8, 2026 18:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 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.

3 participants