aKode fase 5: test e snapshot adeguati alla rinomina, 429 distinto (ProviderRateLimited), cargo fmt dopo il cambio dei prefissi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 12:47:01 +01:00
parent 8b73331037
commit ad43f9281a
919 changed files with 2358 additions and 2430 deletions

View File

@@ -4,13 +4,6 @@ use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;
use anyhow::Context;
use anyhow::Result;
use axum::Router;
use axum::extract::State;
use axum::extract::WebSocketUpgrade;
use axum::response::IntoResponse;
use axum::routing::any;
use akode_api::AuthProvider;
#[cfg(unix)]
use akode_exec_server::EnvironmentConnectionState;
@@ -46,6 +39,13 @@ use akode_http_client::NetworkPolicy;
use akode_http_client::NetworkPolicyController;
use akode_http_client::OutboundProxyPolicy;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use anyhow::Result;
use axum::Router;
use axum::extract::State;
use axum::extract::WebSocketUpgrade;
use axum::response::IntoResponse;
use axum::routing::any;
use common::exec_server::DisconnectableWebSocketProxy;
use futures::SinkExt;
use futures::StreamExt;

View File

@@ -1,7 +1,6 @@
//! V2 RPC metadata refresh and sandbox isolation over a real connection.
mod common;
use anyhow::Context;
use akode_exec_server::CAPABILITIES_DISCOVER_V2_METHOD;
use akode_exec_server::DiscoverV2CapabilitiesRequest;
use akode_exec_server::DiscoverV2CapabilitiesResponse;
@@ -9,6 +8,7 @@ use akode_exec_server::InitializeResponse;
use akode_exec_server::SkillDiscoveryRoot;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use common::exec_server::ExecServerHarness;
use common::exec_server::exec_server_with_env;
use pretty_assertions::assert_eq;

View File

@@ -6,10 +6,6 @@ mod fake_bwrap;
#[path = "capability_discovery/mount_watch.rs"]
mod mount_watch;
#[cfg(target_os = "linux")]
use anyhow::Context as _;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use akode_exec_server::CAPABILITY_ROOTS_DISCOVER_METHOD;
use akode_exec_server::CapabilityRootDiscovery;
use akode_exec_server::CapabilityRootsDiscoverParams;
@@ -42,6 +38,10 @@ use akode_protocol::permissions::FileSystemSpecialPath;
use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_path_uri::PathUri;
#[cfg(target_os = "linux")]
use anyhow::Context as _;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use common::exec_server::exec_server;
#[cfg(target_os = "linux")]
use common::exec_server::exec_server_with_env;

View File

@@ -5,13 +5,13 @@ use super::common::exec_server::exec_server;
use super::discover_root;
use super::initialize;
use super::write_file;
use anyhow::Context as _;
use akode_exec_server_protocol::FS_MISSING_CHANGED_METHOD;
use akode_exec_server_protocol::FS_WATCH_MISSING_METHOD;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCNotification;
use akode_exec_server_protocol::JSONRPCResponse;
use akode_utils_path_uri::PathUri;
use anyhow::Context as _;
use pretty_assertions::assert_eq;
use std::path::Path;
use std::process::Command;

View File

@@ -4,11 +4,11 @@ use std::path::PathBuf;
use std::process::Stdio;
use std::time::Duration;
use anyhow::anyhow;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCNotification;
use akode_exec_server_protocol::JSONRPCRequest;
use akode_exec_server_protocol::RequestId;
use anyhow::anyhow;
use futures::SinkExt;
use futures::StreamExt;
use tempfile::TempDir;

View File

@@ -1,8 +1,6 @@
use std::sync::Arc;
use std::sync::Mutex;
use anyhow::Context;
use anyhow::Result;
use akode_api::AuthProvider;
use akode_exec_server::ExecServerClient;
use akode_exec_server::NoiseChannelIdentity;
@@ -11,6 +9,8 @@ use akode_exec_server::NoiseRendezvousConnectBundle;
use akode_exec_server::RemoteEnvironmentConfig;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use anyhow::Context;
use anyhow::Result;
use http::HeaderMap;
use http::HeaderValue;
use tokio::net::TcpListener;

View File

@@ -6,7 +6,6 @@ use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use std::time::Duration;
use anyhow::Context;
use akode_exec_server::EnvironmentManager;
use akode_exec_server::ExecutorCapabilityDiscoveryCache;
use akode_exec_server::REMOTE_ENVIRONMENT_ID;
@@ -26,6 +25,7 @@ use akode_protocol::permissions::FileSystemSandboxEntry;
use akode_protocol::permissions::FileSystemSandboxPolicy;
use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use common::exec_server::exec_server;
use futures::SinkExt;
use futures::StreamExt;

View File

@@ -92,9 +92,7 @@ private_startup_value = "unselected-private-value"
toml: toml::to_string(&projected_toml)?,
}],
},
requirements: EnvironmentConfigLayerStack {
layers: Vec::new(),
},
requirements: EnvironmentConfigLayerStack { layers: Vec::new() },
}
);

View File

@@ -13,8 +13,6 @@ use std::collections::BTreeMap;
use std::collections::HashMap;
use std::sync::Arc;
use anyhow::Context;
use anyhow::Result;
use akode_exec_server::Environment;
use akode_exec_server::ExecBackend;
#[cfg(unix)]
@@ -60,6 +58,8 @@ use akode_protocol::permissions::FileSystemSpecialPath;
#[cfg(unix)]
use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use anyhow::Result;
use pretty_assertions::assert_eq;
use tempfile::TempDir;
use test_case::test_case;

View File

@@ -1,8 +1,5 @@
mod common;
#[cfg(unix)]
use anyhow::Context;
use anyhow::Result;
use akode_exec_server::Environment;
use akode_exec_server::ExecServerClient;
use akode_exec_server::ExecServerError;
@@ -18,6 +15,9 @@ use akode_exec_server::RemoteExecServerConnectArgs;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use akode_utils_path_uri::PathUri;
#[cfg(unix)]
use anyhow::Context;
use anyhow::Result;
use futures::StreamExt;
use futures::TryStreamExt;
use pretty_assertions::assert_eq;

View File

@@ -1,5 +1,3 @@
use anyhow::Context;
use anyhow::Result;
use akode_exec_server::CopyOptions;
use akode_exec_server::CreateDirectoryOptions;
use akode_exec_server::EnvironmentAccess;
@@ -34,6 +32,8 @@ use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_sandboxing::policy_transforms::effective_file_system_sandbox_policy;
use akode_sandboxing::policy_transforms::effective_network_sandbox_policy;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use anyhow::Result;
use futures::TryStreamExt;
use pretty_assertions::assert_eq;
use std::path::Path;

View File

@@ -1,7 +1,6 @@
use std::fmt;
use std::sync::Arc;
use anyhow::Result;
use akode_exec_server::Environment;
use akode_exec_server::ExecServerRuntimeOptions;
use akode_exec_server::ExecutorFileSystem;
@@ -17,6 +16,7 @@ use akode_protocol::permissions::FileSystemSpecialPath;
use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_path_uri::PathUri;
use anyhow::Result;
use crate::common::exec_server::ExecServerHarness;
use crate::common::exec_server::TestCodexHelperPaths;

View File

@@ -26,8 +26,6 @@ use std::time::Duration;
#[cfg(target_os = "linux")]
use std::time::UNIX_EPOCH;
use anyhow::Context;
use anyhow::Result;
use akode_exec_server::CopyOptions;
use akode_exec_server::CreateDirectoryOptions;
#[cfg(target_os = "linux")]
@@ -51,6 +49,8 @@ use akode_protocol::permissions::FileSystemSandboxPolicy;
use akode_protocol::permissions::FileSystemSpecialPath;
use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use anyhow::Result;
use pretty_assertions::assert_eq;
use tempfile::TempDir;
use test_case::test_case;

View File

@@ -14,8 +14,6 @@ use std::path::Path;
use std::process::Command;
use std::time::Duration;
use anyhow::Context as _;
use anyhow::Result;
use akode_exec_server::CreateDirectoryOptions;
use akode_exec_server::FileSystemSandboxContext;
use akode_exec_server::GetMetadataOptions;
@@ -33,6 +31,8 @@ use akode_protocol::permissions::NetworkSandboxPolicy;
use akode_sandboxing::SandboxType;
use akode_utils_path_uri::PathUri;
use akode_windows_sandbox_test_support::WindowsSandboxAccountTestGuard;
use anyhow::Context as _;
use anyhow::Result;
use futures::TryStreamExt;
use pretty_assertions::assert_eq;
use test_case::test_case;

View File

@@ -5,9 +5,6 @@ mod relay_support;
use std::collections::HashMap;
use anyhow::Result;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use akode_exec_server::ExecOutputStream;
use akode_exec_server::ExecParams;
use akode_exec_server::ExecServerError;
@@ -16,6 +13,9 @@ use akode_exec_server::FsWriteFileParams;
use akode_exec_server::ProcessId;
use akode_exec_server::ReadParams;
use akode_utils_path_uri::PathUri;
use anyhow::Result;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use pretty_assertions::assert_eq;
use relay_support::RelayTest;
use relay_support::TEST_TIMEOUT;

View File

@@ -1,9 +1,6 @@
use std::future::Future;
use std::time::Duration;
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use akode_exec_server::ExecServerClient;
use akode_exec_server::HttpHeader;
use akode_exec_server::HttpRedirectPolicy;
@@ -21,6 +18,9 @@ use akode_exec_server_protocol::MAX_HTTP_BODY_DELTA_BYTES;
use akode_exec_server_protocol::RequestId;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use futures::SinkExt;
use futures::StreamExt;
use pretty_assertions::assert_eq;

View File

@@ -1,6 +1,5 @@
mod common;
use anyhow::Context;
use akode_build_info::BuildInfo;
use akode_build_info::build_id;
use akode_exec_server::CAPABILITIES_DISCOVER_V2_METHOD;
@@ -13,6 +12,7 @@ use akode_exec_server_protocol::JSONRPCError;
use akode_exec_server_protocol::JSONRPCErrorError;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCResponse;
use anyhow::Context;
use common::TEST_BUILD_COMMIT;
use common::exec_server::ExecServerHarness;
use common::exec_server::exec_server_with_env;

View File

@@ -15,9 +15,9 @@ use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use std::time::Duration;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use anyhow::Result;
use akode_utils_path_uri::PathUri;
use futures::TryStreamExt;
use pretty_assertions::assert_eq;
use tokio::process::Command;

View File

@@ -3,7 +3,6 @@ mod common;
use std::collections::HashMap;
use std::time::Duration;
use anyhow::Context;
use akode_exec_server::EnvironmentInfo;
use akode_exec_server::EnvironmentStatus;
use akode_exec_server::EnvironmentStatusKind;
@@ -20,6 +19,7 @@ use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCResponse;
use akode_exec_server_protocol::ProcessSandboxType;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use common::exec_server::exec_server;
use common::exec_server::exec_server_with_env;
use pretty_assertions::assert_eq;

View File

@@ -12,10 +12,6 @@ use std::sync::Mutex;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use anyhow::Context;
use anyhow::Result;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use akode_exec_server::EnvironmentConnectionState;
use akode_exec_server::EnvironmentManager;
use akode_exec_server::EnvironmentReadyInfo;
@@ -36,6 +32,10 @@ use akode_http_client::cache_system_proxy_route_for_test;
use akode_protocol::capabilities::CapabilityRootLocation;
use akode_protocol::capabilities::SelectedCapabilityRoot;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use anyhow::Result;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use futures::future::BoxFuture;
use pretty_assertions::assert_eq;
use relay_support::ENVIRONMENT_ID;

View File

@@ -5,9 +5,9 @@ use std::sync::Arc;
use std::sync::Mutex;
use std::time::Duration;
use akode_exec_server::NoiseChannelPublicKey;
use anyhow::Context;
use anyhow::Result;
use akode_exec_server::NoiseChannelPublicKey;
use futures::SinkExt;
use futures::StreamExt;
use prost::Message as ProstMessage;

View File

@@ -2,8 +2,6 @@
mod common;
#[cfg(target_os = "linux")]
use anyhow::Context;
#[cfg(target_os = "linux")]
use akode_exec_server::Environment;
use akode_exec_server::InitializeParams;
@@ -15,6 +13,8 @@ use akode_exec_server_protocol::JSONRPCResponse;
use akode_utils_absolute_path::AbsolutePathBuf;
#[cfg(target_os = "linux")]
use akode_utils_path_uri::PathUri;
#[cfg(target_os = "linux")]
use anyhow::Context;
use common::exec_server::exec_server;
use pretty_assertions::assert_eq;
#[cfg(target_os = "linux")]