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
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:
@@ -48,7 +48,6 @@ static ALLOCATOR: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
|
||||
mod config_override_args;
|
||||
mod daemon_install;
|
||||
mod daemon_telemetry;
|
||||
mod doctor;
|
||||
#[cfg(test)]
|
||||
#[path = "exec_args_tests.rs"]
|
||||
@@ -579,23 +578,10 @@ struct AppServerCommand {
|
||||
#[arg(long, hide = true)]
|
||||
managed_daemon: bool,
|
||||
|
||||
/// Controls whether analytics are enabled by default.
|
||||
///
|
||||
/// Analytics are disabled by default for app-server. Users have to explicitly opt in
|
||||
/// via the `analytics` section in the config.toml file.
|
||||
///
|
||||
/// However, for first-party use cases like the VSCode IDE extension, we default analytics
|
||||
/// to be enabled by default by setting this flag. Users can still opt out by setting this
|
||||
/// in their config.toml:
|
||||
///
|
||||
/// ```toml
|
||||
/// [analytics]
|
||||
/// enabled = false
|
||||
/// ```
|
||||
///
|
||||
/// See https://developers.openai.com/codex/config-advanced/#metrics for more details.
|
||||
#[arg(long = "analytics-default-enabled")]
|
||||
analytics_default_enabled: bool,
|
||||
/// Deprecated and ignored: aKode never collects usage data. Accepted only so
|
||||
/// existing launchers that still pass this legacy flag keep working.
|
||||
#[arg(long = "analytics-default-enabled", hide = true)]
|
||||
_legacy_usage_data_flag: bool,
|
||||
|
||||
#[command(flatten)]
|
||||
auth: codex_websocket_auth::WebsocketAuthArgs,
|
||||
@@ -762,7 +748,6 @@ fn run_update_action(
|
||||
println!("Updating the local background server...");
|
||||
let status = std::process::Command::new(executable)
|
||||
.args(source.command_args())
|
||||
.env(codex_app_server_daemon::telemetry::HANDOFF_ENV, "1")
|
||||
.status()?;
|
||||
anyhow::ensure!(
|
||||
status.success(),
|
||||
@@ -1207,8 +1192,8 @@ async fn dispatch_cli(
|
||||
listen,
|
||||
stdio,
|
||||
managed_daemon,
|
||||
analytics_default_enabled,
|
||||
auth,
|
||||
..
|
||||
} = app_server_cli;
|
||||
let strict_config = app_server_strict_config || root_strict_config;
|
||||
reject_strict_config_for_app_server_subcommand(strict_config, subcommand.as_ref())?;
|
||||
@@ -1262,7 +1247,6 @@ async fn dispatch_cli(
|
||||
root_config_overrides,
|
||||
LoaderOverrides::default(),
|
||||
strict_config,
|
||||
analytics_default_enabled,
|
||||
transport,
|
||||
codex_protocol::protocol::SessionSource::VSCode,
|
||||
auth,
|
||||
@@ -1336,13 +1320,6 @@ async fn dispatch_cli(
|
||||
daemon_install::confirm_install(request, yes)
|
||||
})
|
||||
.await;
|
||||
daemon_telemetry::record_command(
|
||||
&root_config_overrides,
|
||||
analytics_default_enabled,
|
||||
"this_cli",
|
||||
&result,
|
||||
)
|
||||
.await;
|
||||
if let Some(output) = result? {
|
||||
println!("{}", serde_json::to_string(&output)?);
|
||||
}
|
||||
@@ -1380,13 +1357,6 @@ async fn dispatch_cli(
|
||||
let result = codex_app_server_daemon::update(http_client_factory)
|
||||
.await
|
||||
.map(Some);
|
||||
daemon_telemetry::record_command(
|
||||
&root_config_overrides,
|
||||
analytics_default_enabled,
|
||||
"public_stable",
|
||||
&result,
|
||||
)
|
||||
.await;
|
||||
if let Some(output) = result? {
|
||||
println!("{}", serde_json::to_string(&output)?);
|
||||
}
|
||||
@@ -4111,9 +4081,8 @@ enabled = true
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn app_server_analytics_default_disabled_without_flag() {
|
||||
fn app_server_defaults_to_stdio_transport() {
|
||||
let app_server = app_server_from_args(["codex", "app-server"].as_ref());
|
||||
assert!(!app_server.analytics_default_enabled);
|
||||
assert_eq!(
|
||||
app_server.listen,
|
||||
codex_app_server::AppServerTransport::Stdio
|
||||
@@ -4131,10 +4100,13 @@ enabled = true
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn app_server_analytics_default_enabled_with_flag() {
|
||||
fn app_server_accepts_and_ignores_legacy_usage_data_flag() {
|
||||
let app_server =
|
||||
app_server_from_args(["codex", "app-server", "--analytics-default-enabled"].as_ref());
|
||||
assert!(app_server.analytics_default_enabled);
|
||||
assert_eq!(
|
||||
app_server.listen,
|
||||
codex_app_server::AppServerTransport::Stdio
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user