Split exec process into local and remote implementations#15233
Merged
starr-openai merged 5 commits intomainfrom Mar 20, 2026
Merged
Split exec process into local and remote implementations#15233starr-openai merged 5 commits intomainfrom
starr-openai merged 5 commits intomainfrom
Conversation
b0b16a2 to
7723b54
Compare
pakrym-oai
reviewed
Mar 19, 2026
| pub struct Environment { | ||
| experimental_exec_server_url: Option<String>, | ||
| remote_exec_server_client: Option<ExecServerClient>, | ||
| executor: Arc<dyn ExecProcess>, |
Collaborator
There was a problem hiding this comment.
Should we Arc the Environment instead?
pakrym-oai
reviewed
Mar 19, 2026
|
|
||
| impl ExecutorEnvironment for Environment { | ||
| fn get_executor(&self) -> Arc<dyn ExecProcess> { | ||
| self.get_executor() |
pakrym-oai
reviewed
Mar 19, 2026
|
|
||
| pub fn remote_exec_server_client(&self) -> Option<&ExecServerClient> { | ||
| self.remote_exec_server_client.as_ref() | ||
| pub fn remote_exec_server_client(&self) -> Option<ExecServerClient> { |
Collaborator
There was a problem hiding this comment.
does this need to be public?
pakrym-oai
reviewed
Mar 19, 2026
| } | ||
| } | ||
|
|
||
| pub(crate) fn initialize(&self) -> Result<InitializeResponse, JSONRPCErrorError> { |
Collaborator
There was a problem hiding this comment.
do we need this on local?
pakrym-oai
reviewed
Mar 20, 2026
|
|
||
| #[derive(Clone)] | ||
| pub(crate) struct LocalProcess { | ||
| inner: Arc<Inner>, |
Collaborator
There was a problem hiding this comment.
We already Arc the LocalProcess impl in Environment. Is there anything we can un-Arc?
pakrym-oai
reviewed
Mar 20, 2026
| } | ||
|
|
||
| #[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
| async fn exec_process_starts_and_exits_locally() -> Result<()> { |
Collaborator
There was a problem hiding this comment.
MOAR!
(later)
also use test_case
Base automatically changed from
pakrym/compare-execserverfilesystem-and
to
main
March 20, 2026 00:08
Stack this on top of PR #15232's filesystem split: expose the process trait on Environment, keep LocalProcess as the real implementation, proxy RemoteProcess over ExecServerClient, and route RPCs through a thin ProcessHandler. Co-authored-by: Codex <noreply@openai.com>
Keep Environment::default() and Environment::create(None) behavior aligned by making the default local executor ready to use immediately, and cover it with a regression test. Co-authored-by: Codex <noreply@openai.com>
Address clippy's expect-used warning in the local Environment::default() initialization path without changing behavior. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
dcef8bc to
25585b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExecProcessonEnvironmentLocalProcessthe real implementation andRemoteProcessa thin network proxy overExecServerClientProcessHandlera thin RPC adapter delegating toLocalProcessValidation
just fmtCARGO_TARGET_DIR=~/.cache/cargo-target/codex cargo test -p codex-exec-serverjust fix -p codex-exec-server