aKode fase 2c: eliminato il codice di invio dati (crate analytics, otel-trace-websocket, sentry, esportatori OTLP); /feedback salva solo in locale; chiavi legacy [analytics]/[otel] accettate e ignorate; test di analytics/OTLP/upload rimossi
Some checks failed
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled

This commit is contained in:
Andrea
2026-11-09 18:45:41 +01:00
parent 981745ccc8
commit 60532b6337
509 changed files with 2043 additions and 46606 deletions

View File

@@ -6,6 +6,7 @@ use anyhow::Result;
use app_test_support::ChatGptAuthFixture;
use app_test_support::TestAppServer;
use app_test_support::create_final_assistant_message_sse_response;
use app_test_support::mount_chatgpt_account;
use app_test_support::to_response;
use app_test_support::write_chatgpt_auth;
use app_test_support::write_mock_responses_config_toml_with_chatgpt_base_url;
@@ -38,9 +39,6 @@ use tokio::process::Child;
use tokio::process::Command;
use tokio::time::timeout;
use super::analytics::mount_analytics_capture;
use super::analytics::wait_for_matching_analytics_event;
const READ_TIMEOUT: Duration = Duration::from_secs(20);
const EXECUTOR_ID: &str = "executor-1";
const EXECUTOR_ENV_NAME: &str = "MCP_EXECUTOR_MARKER";
@@ -78,7 +76,7 @@ async fn selected_plugin_mcp_startup_respects_explicit_mentions(
let explicitly_mentioned = !matches!(mention, PluginMention::Unmentioned);
let responses_server = responses::start_mock_server().await;
let fixture = selected_capability_fixture(&responses_server.uri(), &responses_server.uri())?;
mount_analytics_capture(&responses_server, fixture.codex_home.path()).await?;
mount_chatgpt_account(&responses_server, fixture.codex_home.path()).await?;
let config_path = fixture.codex_home.path().join("config.toml");
let config = std::fs::read_to_string(&config_path)?.replace(
"executor_capability_discovery = true",
@@ -146,7 +144,7 @@ async fn selected_plugin_mcp_startup_respects_explicit_mentions(
app_server.read_stream_until_response_message(RequestId::Integer(request_id)),
)
.await??;
let TurnStartResponse { turn } = to_response(response)?;
let _: TurnStartResponse = to_response(response)?;
wait_for_pid_file(&fixture.pid_file).await?;
if explicitly_mentioned {
// An explicit mention must outwait the optional one-second grace.
@@ -173,17 +171,6 @@ async fn selected_plugin_mcp_startup_respects_explicit_mentions(
explicitly_mentioned,
);
let event = wait_for_matching_analytics_event(&responses_server, READ_TIMEOUT, |event| {
event["event_type"] == "codex_turn_event"
&& event["event_params"]["thread_id"] == thread_id
&& event["event_params"]["turn_id"] == turn.id
})
.await?;
assert_eq!(
event["event_params"]["active_plugin_ids_at_turn_start"],
json!([PLUGIN_ID])
);
exec_server.kill().await?;
Ok(())
}