Skip to content

Add exec-server process and filesystem RPCs#15090

Merged
starr-openai merged 2 commits intomainfrom
starr/exec-server-exec-fresh
Mar 19, 2026
Merged

Add exec-server process and filesystem RPCs#15090
starr-openai merged 2 commits intomainfrom
starr/exec-server-exec-fresh

Conversation

@starr-openai
Copy link
Copy Markdown
Contributor

@starr-openai starr-openai commented Mar 18, 2026

Rebased onto current main after #15091 landed separately.

This PR now carries the surviving exec-server process RPC and filesystem RPC implementation on top of the current exec-server stub / websocket-only / environment-abstraction shape on main.

It also includes the rust-ci sccache guard for macos-15-xlarge + x86_64-apple-darwin so this branch does not reproduce the same mixed-architecture ring failure that hit the earlier stack.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 18, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
Contributor

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

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: 79b46e346d

ℹ️ 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 on lines +452 to +454
if let Some(process) = processes.get_mut(&process_id) {
process.exit_code = Some(exit_code);
}
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.

P1 Badge Remove exited processes from the process map

watch_exit only sets exit_code and never evicts the RunningProcess entry. Each finished process keeps retained output (up to RETAINED_OUTPUT_BYTES_PER_PROCESS) and session state until connection shutdown, so long-lived connections that run many short-lived processes can accumulate unbounded memory/state.

Useful? React with 👍 / 👎.

Comment on lines +296 to +299
if let Some(process) = process_map.get(&params.process_id) {
process.session.terminate();
true
} else {
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.

P1 Badge Return running=false for already exited processes

terminate returns running: true whenever process_id exists in the map, without checking whether the process has already exited. Since exited entries are retained, terminate can claim a process is running when it is not, which breaks caller logic that relies on this flag.

Useful? React with 👍 / 👎.

Comment on lines +95 to +101
loop {
let (stream, peer_addr) = listener.accept().await?;
tokio::spawn(async move {
match accept_async(stream).await {
Ok(websocket) => {
run_connection(JsonRpcConnection::from_websocket(
websocket,
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.

P1 Badge Require authentication on websocket exec transport

The websocket listener accepts any incoming peer and immediately starts a JSON-RPC exec session. Combined with unauthenticated initialize flow, binding to non-loopback addresses allows arbitrary remote clients to call process/start and execute commands (unauthenticated RCE).

Useful? React with 👍 / 👎.

@starr-openai starr-openai force-pushed the starr/exec-server-exec-fresh branch 2 times, most recently from c5071a9 to 84a6cbe Compare March 18, 2026 21:54
stream,
chunk: chunk.clone(),
});
while process.retained_bytes > RETAINED_OUTPUT_BYTES_PER_PROCESS {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

unified exec needs the tail. we might need the same "drop middle strategy" as used in core.

Base automatically changed from starr/exec-server-stub-fresh to main March 19, 2026 00:30
@starr-openai starr-openai enabled auto-merge (squash) March 19, 2026 17:38
@starr-openai starr-openai force-pushed the starr/exec-server-exec-fresh branch from 54d4423 to dd1416a Compare March 19, 2026 17:56
@starr-openai starr-openai changed the title Add exec-server exec RPC implementation Add exec-server process and filesystem RPCs Mar 19, 2026
@starr-openai starr-openai merged commit 1d210f6 into main Mar 19, 2026
54 of 56 checks passed
@starr-openai starr-openai deleted the starr/exec-server-exec-fresh branch March 19, 2026 19:00
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 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.

2 participants