WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,6 @@ use codex_app_server_protocol::CollabAgentToolCallStatus;
|
||||
use codex_app_server_protocol::CommandExecutionApprovalDecision;
|
||||
use codex_app_server_protocol::CommandExecutionRequestApprovalResponse;
|
||||
use codex_app_server_protocol::CommandExecutionStatus;
|
||||
use codex_app_server_protocol::CyberAccessProgram;
|
||||
use codex_app_server_protocol::FileChangeApprovalDecision;
|
||||
use codex_app_server_protocol::FileChangePatchUpdatedNotification;
|
||||
use codex_app_server_protocol::FileChangeRequestApprovalResponse;
|
||||
@@ -53,8 +52,6 @@ use codex_app_server_protocol::ThreadInjectItemsParams;
|
||||
use codex_app_server_protocol::ThreadItemPayload;
|
||||
use codex_app_server_protocol::ThreadLoadedListParams;
|
||||
use codex_app_server_protocol::ThreadLoadedListResponse;
|
||||
use codex_app_server_protocol::ThreadMetadataUpdateParams;
|
||||
use codex_app_server_protocol::ThreadMetadataUpdateResponse;
|
||||
use codex_app_server_protocol::ThreadSettingsUpdateParams;
|
||||
use codex_app_server_protocol::ThreadSettingsUpdatedNotification;
|
||||
use codex_app_server_protocol::ThreadShellCommandParams;
|
||||
@@ -88,9 +85,12 @@ use codex_protocol::openai_models::ReasoningEffort;
|
||||
use codex_protocol::protocol::MULTI_AGENT_MODE_OPEN_TAG;
|
||||
use codex_protocol::user_input::MAX_USER_INPUT_TEXT_CHARS;
|
||||
use codex_utils_absolute_path::test_support::PathExt;
|
||||
use core_test_support::apps_test_server::AppsTestServer;
|
||||
use core_test_support::apps_test_server::SEARCH_CALENDAR_LIST_TOOL;
|
||||
use core_test_support::apps_test_server::SEARCH_CALENDAR_NAMESPACE;
|
||||
use core_test_support::mcp_test_server::CALENDAR_LIST_EVENTS_TOOL_NAME;
|
||||
use core_test_support::mcp_test_server::CALENDAR_NAMESPACE;
|
||||
use core_test_support::mcp_test_server::DIRECT_CALENDAR_LIST_EVENTS_TOOL;
|
||||
use core_test_support::mcp_test_server::MCP_TEST_SERVER_NAME;
|
||||
use core_test_support::mcp_test_server::MCP_TEST_SERVER_PATH;
|
||||
use core_test_support::mcp_test_server::McpTestServer;
|
||||
use core_test_support::responses;
|
||||
use core_test_support::skip_if_no_network;
|
||||
use core_test_support::skip_if_remote;
|
||||
@@ -361,8 +361,8 @@ async fn tool_call_metadata_stays_out_of_raw_response_item_notifications() -> Re
|
||||
responses::ev_response_created("resp-1"),
|
||||
responses::ev_function_call_with_namespace(
|
||||
"mcp-call",
|
||||
SEARCH_CALENDAR_NAMESPACE,
|
||||
SEARCH_CALENDAR_LIST_TOOL,
|
||||
CALENDAR_NAMESPACE,
|
||||
CALENDAR_LIST_EVENTS_TOOL_NAME,
|
||||
&arguments.to_string(),
|
||||
),
|
||||
responses::ev_completed("resp-1"),
|
||||
@@ -371,17 +371,17 @@ async fn tool_call_metadata_stays_out_of_raw_response_item_notifications() -> Re
|
||||
];
|
||||
let server = responses::start_mock_server().await;
|
||||
let model = responses::mount_sse_sequence(&server, responses).await;
|
||||
let apps = AppsTestServer::mount(&server).await?;
|
||||
let calendar = McpTestServer::mount(&server).await?;
|
||||
let tool_result = json!({
|
||||
"content": [{"type": "text", "text": "Calendar result"}],
|
||||
"_meta": result_metadata,
|
||||
"isError": false,
|
||||
});
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/api/codex/ps/mcp"))
|
||||
.and(path(MCP_TEST_SERVER_PATH))
|
||||
.and(body_partial_json(json!({
|
||||
"method": "tools/call",
|
||||
"params": {"name": "calendar_list_events", "arguments": arguments},
|
||||
"params": {"name": CALENDAR_LIST_EVENTS_TOOL_NAME, "arguments": arguments},
|
||||
})))
|
||||
.respond_with(move |request: &Request| {
|
||||
let request: Value =
|
||||
@@ -400,11 +400,11 @@ async fn tool_call_metadata_stays_out_of_raw_response_item_notifications() -> Re
|
||||
MockResponsesConfig::new(&server.uri())
|
||||
.with_provider_name("OpenAI")
|
||||
.with_provider_config("supports_websockets = false")
|
||||
.with_root_config(&format!(
|
||||
"chatgpt_base_url = \"{}\"\ncli_auth_credentials_store = \"file\"",
|
||||
apps.chatgpt_base_url
|
||||
.with_root_config("cli_auth_credentials_store = \"file\"")
|
||||
.with_extra_config(&format!(
|
||||
"[mcp_servers.{MCP_TEST_SERVER_NAME}]\nurl = \"{}\"",
|
||||
calendar.mcp_url()
|
||||
))
|
||||
.enable_feature(Feature::Apps)
|
||||
.enable_feature(Feature::ExecutedToolCallMetadata)
|
||||
.write(codex_home.path())?;
|
||||
write_api_key_auth(codex_home.path())?;
|
||||
@@ -475,7 +475,7 @@ async fn tool_call_metadata_stays_out_of_raw_response_item_notifications() -> Re
|
||||
assert!(serde_json::to_string(&output["output"])?.contains("Calendar result"));
|
||||
assert_eq!(
|
||||
output["internal_chat_message_metadata_passthrough"]["executed_tool_calls"],
|
||||
json!([{"name": "mcp__codex_apps__calendar_list_events", "arguments": arguments}]),
|
||||
json!([{"name": DIRECT_CALENDAR_LIST_EVENTS_TOOL, "arguments": arguments}]),
|
||||
);
|
||||
assert_eq!(
|
||||
output["internal_chat_message_metadata_passthrough"]["tool_calls_complete"],
|
||||
@@ -674,7 +674,6 @@ async fn turn_start_steers_active_turn_and_returns_active_turn_id() -> Result<()
|
||||
turn_trigger: Some("goal".to_string()),
|
||||
parent_turn_id: Some("initiating-turn".to_string()),
|
||||
root_turn_id: Some("causal-root".to_string()),
|
||||
cyber_access_program: Some(CyberAccessProgram::DaybreakBlue),
|
||||
..Default::default()
|
||||
},
|
||||
})
|
||||
@@ -689,22 +688,6 @@ async fn turn_start_steers_active_turn_and_returns_active_turn_id() -> Result<()
|
||||
)
|
||||
.await?;
|
||||
|
||||
let updated: ThreadMetadataUpdateResponse = mcp
|
||||
.request(|request_id| ClientRequest::ThreadMetadataUpdate {
|
||||
request_id,
|
||||
params: ThreadMetadataUpdateParams {
|
||||
thread_id: thread.id.clone(),
|
||||
project_id: None,
|
||||
git_info: None,
|
||||
daybreak_enabled: Some(false),
|
||||
},
|
||||
})
|
||||
.await?;
|
||||
assert_eq!(
|
||||
(updated.thread.id, updated.thread.daybreak_enabled),
|
||||
(thread.id.clone(), Some(false))
|
||||
);
|
||||
|
||||
let TurnStartResponse { turn: steered_turn } = mcp
|
||||
.request(|request_id| ClientRequest::TurnStart {
|
||||
request_id,
|
||||
@@ -718,7 +701,6 @@ async fn turn_start_steers_active_turn_and_returns_active_turn_id() -> Result<()
|
||||
turn_trigger: Some("user".to_string()),
|
||||
parent_turn_id: Some("steering-turn".to_string()),
|
||||
root_turn_id: Some("steering-root".to_string()),
|
||||
cyber_access_program: Some(CyberAccessProgram::Standard),
|
||||
..Default::default()
|
||||
},
|
||||
})
|
||||
@@ -740,7 +722,6 @@ async fn turn_start_steers_active_turn_and_returns_active_turn_id() -> Result<()
|
||||
assert_eq!(requests.len(), 2);
|
||||
for request in requests {
|
||||
let body: Value = serde_json::from_slice(&request)?;
|
||||
assert_eq!(body["access_programs"], json!({"cyber": "daybreak_blue"}));
|
||||
let turn_metadata: Value = serde_json::from_str(
|
||||
body["client_metadata"]["x-codex-turn-metadata"]
|
||||
.as_str()
|
||||
@@ -1146,7 +1127,7 @@ async fn turn_start_emits_thread_scoped_warning_notification_for_trimmed_skills(
|
||||
assert_eq!(warning.thread_id.as_deref(), Some(thread.id.as_str()));
|
||||
assert_eq!(
|
||||
warning.message,
|
||||
"Exceeded skills context budget. All skill descriptions were removed and 6 additional skills were not included in the model-visible skills list."
|
||||
"Exceeded skills context budget. All skill descriptions were removed and 5 additional skills were not included in the model-visible skills list."
|
||||
);
|
||||
|
||||
timeout(
|
||||
@@ -3149,7 +3130,6 @@ async fn turn_start_explicit_local_environment_updates_legacy_cwd_between_turns(
|
||||
output_schema: None,
|
||||
collaboration_mode: None,
|
||||
multi_agent_mode: None,
|
||||
cyber_access_program: None,
|
||||
},
|
||||
})
|
||||
.await?;
|
||||
@@ -3200,7 +3180,6 @@ async fn turn_start_explicit_local_environment_updates_legacy_cwd_between_turns(
|
||||
output_schema: None,
|
||||
collaboration_mode: None,
|
||||
multi_agent_mode: None,
|
||||
cyber_access_program: None,
|
||||
},
|
||||
})
|
||||
.await?;
|
||||
@@ -5294,7 +5273,6 @@ async fn command_execution_notifications_include_trusted_plugin_id(
|
||||
.with_sandbox_mode("danger-full-access")
|
||||
.enable_feature(Feature::Plugins)
|
||||
.enable_feature(Feature::UnifiedExec)
|
||||
.disable_feature(Feature::RemotePlugin)
|
||||
.disable_feature(Feature::ShellSnapshot)
|
||||
.with_extra_config("[plugins.\"google-calendar@openai-api-curated\"]\nenabled = true")
|
||||
.write(codex_home.path())?;
|
||||
|
||||
Reference in New Issue
Block a user