Make local environment optional in EnvironmentManager (#23369)

## Summary
- make `EnvironmentManager` local environment/runtime paths optional
- simplify constructor surface around snapshot materialization
- rename local env accessors to `require_local_environment` /
`try_local_environment`

## Validation
- devbox Bazel build for touched crate surfaces
- `//codex-rs/exec-server:exec-server-unit-tests`
- `//codex-rs/app-server-client:app-server-client-unit-tests`
- filtered touched `//codex-rs/core:core-unit-tests` cases
This commit is contained in:
starr-openai
2026-05-19 12:55:34 -07:00
committed by GitHub
parent 7f4d7ae3a4
commit 5c43a64e2b
26 changed files with 853 additions and 298 deletions
+2 -1
View File
@@ -116,7 +116,8 @@ async fn run_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> {
)?;
let thread_store = thread_store_from_config(&config, state_db.clone());
let environment_manager = Arc::new(
EnvironmentManager::from_codex_home(config.codex_home.clone(), local_runtime_paths).await?,
EnvironmentManager::from_codex_home(config.codex_home.clone(), Some(local_runtime_paths))
.await?,
);
let installation_id = resolve_installation_id(&config.codex_home).await?;
let thread_manager = ThreadManager::new(