codex: fix rebase against #28122

This commit is contained in:
Adam Perry
2026-06-16 16:13:44 +00:00
parent b7da79a028
commit 13c7367a46
5 changed files with 5 additions and 21 deletions
@@ -4,7 +4,6 @@ use codex_app_server_protocol::SelectedCapabilityRoot;
use codex_extension_api::ExtensionDataInit;
use codex_protocol::models::BUILT_IN_PERMISSION_PROFILE_DANGER_FULL_ACCESS;
use codex_protocol::models::BUILT_IN_PERMISSION_PROFILE_WORKSPACE;
use codex_utils_path_uri::PathUri;
const THREAD_LIST_DEFAULT_LIMIT: usize = 25;
const THREAD_LIST_MAX_LIMIT: usize = 100;
@@ -4,7 +4,6 @@ use codex_protocol::protocol::AdditionalContextKind as CoreAdditionalContextKind
use codex_protocol::protocol::MultiAgentVersion;
use codex_protocol::protocol::SessionSource;
use codex_protocol::protocol::SubAgentSource;
use codex_utils_path_uri::PathUri;
const DIRECT_INPUT_TO_MULTI_AGENT_V2_SUBAGENT_ERROR: &str =
"direct app-server input is not allowed for multi-agent v2 sub-agents";
@@ -34,7 +34,6 @@ use codex_protocol::config_types::SERVICE_TIER_DEFAULT_REQUEST_VALUE;
use codex_protocol::config_types::TrustLevel;
use codex_protocol::openai_models::ReasoningEffort;
use codex_utils_path_uri::ApiPathString;
use codex_utils_path_uri::PathConvention;
use pretty_assertions::assert_eq;
use serde_json::Value;
use serde_json::json;
@@ -295,10 +294,7 @@ async fn thread_start_rejects_unknown_environment_as_invalid_request() -> Result
.send_thread_start_request(ThreadStartParams {
environments: Some(vec![TurnEnvironmentParams {
environment_id: "missing".to_string(),
cwd: ApiPathString::from_abs_path(
&codex_home.path().to_path_buf().try_into()?,
PathConvention::native(),
)?,
cwd: ApiPathString::from_abs_path(&codex_home.path().to_path_buf().try_into()?),
}]),
..Default::default()
})
@@ -77,7 +77,6 @@ use codex_protocol::models::ImageDetail;
use codex_protocol::openai_models::ReasoningEffort;
use codex_protocol::user_input::MAX_USER_INPUT_TEXT_CHARS;
use codex_utils_path_uri::ApiPathString;
use codex_utils_path_uri::PathConvention;
use core_test_support::responses;
use core_test_support::skip_if_no_network;
use pretty_assertions::assert_eq;
@@ -1328,10 +1327,7 @@ async fn turn_start_rejects_unknown_environment_before_starting_turn() -> Result
}],
environments: Some(vec![TurnEnvironmentParams {
environment_id: "missing".to_string(),
cwd: ApiPathString::from_abs_path(
&codex_home.path().to_path_buf().try_into()?,
PathConvention::native(),
)?,
cwd: ApiPathString::from_abs_path(&codex_home.path().to_path_buf().try_into()?),
}]),
..Default::default()
})
@@ -2749,10 +2745,7 @@ fn environment_params(
.map(|id| {
Ok(TurnEnvironmentParams {
environment_id: (*id).to_string(),
cwd: ApiPathString::from_abs_path(
&cwd.to_path_buf().try_into()?,
PathConvention::native(),
)?,
cwd: ApiPathString::from_abs_path(&cwd.to_path_buf().try_into()?),
})
})
.collect()
+2 -5
View File
@@ -24,7 +24,6 @@ use codex_protocol::protocol::ThreadSource;
use codex_protocol::protocol::TurnStartedEvent;
use codex_protocol::protocol::UserMessageEvent;
use codex_utils_path_uri::ApiPathString;
use codex_utils_path_uri::PathConvention;
use codex_utils_path_uri::PathUri;
use core_test_support::PathBufExt;
use core_test_support::PathExt;
@@ -370,8 +369,7 @@ async fn native_environment_selections_preserve_selected_path_syntax() {
let selections = manager
.resolve_native_environment_selections([(
"local".to_string(),
ApiPathString::from_abs_path(&config.cwd, PathConvention::native())
.expect("render native cwd"),
ApiPathString::from_abs_path(&config.cwd),
)])
.expect("resolve local selection");
@@ -398,8 +396,7 @@ async fn native_environment_selections_reject_duplicate_ids() {
config.codex_home.to_path_buf(),
Arc::new(codex_exec_server::EnvironmentManager::default_for_tests()),
);
let native_cwd = ApiPathString::from_abs_path(&config.cwd, PathConvention::native())
.expect("render native cwd");
let native_cwd = ApiPathString::from_abs_path(&config.cwd);
let error = manager
.resolve_native_environment_selections([
("local".to_string(), native_cwd.clone()),