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

@@ -9,13 +9,13 @@ use std::sync::atomic::AtomicU64;
use std::sync::atomic::Ordering;
use std::time::Duration;
use arc_swap::ArcSwap;
use arc_swap::ArcSwapOption;
use akode_exec_server_protocol::JSONRPCNotification;
use akode_network_proxy::NetworkPolicyDecider;
use akode_network_proxy::NetworkProxyAuditMetadata;
use akode_network_proxy::NetworkRequestCancellation;
use akode_network_proxy::NetworkRequestCancellationReason;
use arc_swap::ArcSwap;
use arc_swap::ArcSwapOption;
use futures::FutureExt;
use futures::future::BoxFuture;
use serde_json::Value;

View File

@@ -9,9 +9,9 @@ use std::pin::Pin;
use std::sync::Arc;
use std::sync::atomic::Ordering;
use bytes::Bytes;
use akode_http_client::HttpError;
use akode_http_client::HttpResponse;
use bytes::Bytes;
use futures::StreamExt;
use serde_json::Value;
use serde_json::from_value;

View File

@@ -86,12 +86,11 @@ impl RouteAwareHttpClient {
// Delegated HTTP targets arbitrary endpoints; route class only labels diagnostics.
ClientRouteClass::Other,
),
stop_redirects:
RouteAwareClientPool::new_without_redirects_or_request_logging(
http_client_factory,
// Proxy routing comes from the factory, not this diagnostic-only route class.
ClientRouteClass::Other,
),
stop_redirects: RouteAwareClientPool::new_without_redirects_or_request_logging(
http_client_factory,
// Proxy routing comes from the factory, not this diagnostic-only route class.
ClientRouteClass::Other,
),
}
}

View File

@@ -66,12 +66,8 @@ async fn config_read_timeout_keeps_stdio_connection_usable() {
user_home_dir: None,
codex_home_dir: cwd,
hostname: Some("original".to_string()),
config: EnvironmentConfigLayerStack {
layers: Vec::new(),
},
requirements: EnvironmentConfigLayerStack {
layers: Vec::new(),
},
config: EnvironmentConfigLayerStack { layers: Vec::new() },
requirements: EnvironmentConfigLayerStack { layers: Vec::new() },
};
// Model inline dispatch by holding valid work while the timed read queues behind it.

View File

@@ -5,9 +5,9 @@ use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use std::time::Duration;
use akode_config::ScopedSkillsConfig;
use anyhow::Result;
use bytes::Bytes;
use akode_config::ScopedSkillsConfig;
use futures::future::BoxFuture;
use pretty_assertions::assert_eq;
use tokio::net::TcpListener;

View File

@@ -3,8 +3,8 @@ use std::future::Future;
use std::sync::Arc;
use std::sync::Mutex;
use anyhow::Result;
use akode_exec_server_protocol::JSONRPCMessage;
use anyhow::Result;
use futures::FutureExt;
use futures::SinkExt;
use futures::StreamExt;

View File

@@ -6,10 +6,10 @@ use std::sync::atomic::Ordering;
use std::time::Duration;
use std::time::Instant;
use axum::extract::ws::Message as AxumWebSocketMessage;
use axum::extract::ws::WebSocket as AxumWebSocket;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCRequest;
use axum::extract::ws::Message as AxumWebSocketMessage;
use axum::extract::ws::WebSocket as AxumWebSocket;
use futures::Sink;
use futures::SinkExt;
use futures::Stream;

View File

@@ -5,8 +5,8 @@ use crate::DiscoverV2CapabilitiesRequest;
use crate::LocalFileSystem;
use crate::discover_v2::capability_locations::tests::request;
use crate::discover_v2::capability_locations::tests::write;
use anyhow::Context;
use akode_utils_path_uri::PathUri;
use anyhow::Context;
use pretty_assertions::assert_eq;
use std::time::Duration;

View File

@@ -10,13 +10,13 @@ use std::sync::Mutex;
use std::sync::RwLock;
use std::time::Duration;
use arc_swap::ArcSwapOption;
use akode_config::ScopedSkillsConfig;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use akode_protocol::capabilities::CapabilityRootLocation;
use akode_protocol::capabilities::SelectedCapabilityRoot;
use akode_protocol::shell_environment::AKODE_EXEC_SERVER_NOISE_AUTH_TOKEN_ENV_VAR;
use arc_swap::ArcSwapOption;
use crate::CapabilityRootsDiscoverParams;
use crate::CapabilityRootsDiscoverResponse;

View File

@@ -9,9 +9,9 @@ use crate::ExecServerClient;
use crate::ExecServerClientConnectOptions;
use crate::ExecServerError;
use crate::client::LazyRemoteExecServerClient;
use axum::extract::ws::WebSocket;
use akode_config::ScopedSkillsConfig;
use akode_http_client::HttpClientFactory;
use axum::extract::ws::WebSocket;
impl EnvironmentManager {
/// Builds a manager around a WebSocket already accepted and authenticated by its host.

View File

@@ -213,9 +213,7 @@ fn serialize_layer_stack<S>(
})
})
.collect::<Result<Vec<_>, ReadEnvironmentConfigError>>()?;
Ok(EnvironmentConfigLayerStack {
layers,
})
Ok(EnvironmentConfigLayerStack { layers })
}
#[cfg(test)]

View File

@@ -24,9 +24,7 @@ fn startup_preference_stays_below_both_managed_layers() -> anyhow::Result<()> {
})
.collect(),
},
requirements: LocalTomlLayerStack {
layers: Vec::new(),
},
requirements: LocalTomlLayerStack { layers: Vec::new() },
};
include_startup_preference(&mut layers, &cwd, Some(true));
let projected = layers.project(&[vec!["features".into(), "prefer_mxc".into()]], &[]);

View File

@@ -1,8 +1,8 @@
use std::time::Duration;
use bytes::Bytes;
use akode_http_client::HttpClientFactory;
use akode_websocket_client::WebSocketConnector;
use bytes::Bytes;
use futures::Sink;
use futures::SinkExt;
use futures::StreamExt;

View File

@@ -1,10 +1,10 @@
use std::time::Duration;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use anyhow::Context;
use anyhow::Result;
use bytes::Bytes;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use futures::SinkExt;
use futures::StreamExt;
use pretty_assertions::assert_eq;

View File

@@ -1,7 +1,7 @@
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use akode_exec_server_protocol::JSONRPCErrorError;
use akode_utils_path_uri::PathUri;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use serde::Deserialize;
use serde::Serialize;
use tokio::io;

View File

@@ -67,22 +67,6 @@ use akode_exec_server_protocol as protocol;
pub const AKODE_EXEC_SERVER_EXIT_ON_STDIN_CLOSE_ENV_VAR: &str =
"AKODE_EXEC_SERVER_EXIT_ON_STDIN_CLOSE";
pub use arg0_exec_helper::AKODE_ARG0_EXEC_HELPER_ARG1;
pub use arg0_exec_helper::main as run_arg0_exec_helper_main;
pub use capability_discovery::CapabilityDiscoveryError;
pub use capability_discovery::discover_capability_roots;
pub use capability_discovery_cache::ExecutorCapabilityDiscoveryCache;
pub use capability_discovery_v2_cache::ExecutorCapabilityDiscoveryV2Cache;
pub use client::ExecServerClient;
pub use client::ExecServerError;
pub use client::http_client::HttpResponseBodyStream;
pub use client::http_client::RouteAwareHttpClient;
pub use client_api::ExecServerClientConnectOptions;
pub use client_api::HttpClient;
pub use client_api::NoiseRendezvousConnectArgs;
pub use client_api::NoiseRendezvousConnectBundle;
pub use client_api::NoiseRendezvousConnectProvider;
pub use client_api::RemoteExecServerConnectArgs;
pub use akode_exec_server_protocol::ExecutorCapabilityDiscoverySnapshot;
pub use akode_exec_server_protocol::ProcessId;
pub use akode_file_system::CopyOptions;
@@ -111,6 +95,22 @@ pub use akode_file_system::WalkOutcome;
pub use akode_file_system::WindowsSandboxSelection;
pub use akode_file_system::WriteFileOptions;
pub use akode_protocol::shell_environment::AKODE_EXEC_SERVER_NOISE_AUTH_TOKEN_ENV_VAR;
pub use arg0_exec_helper::AKODE_ARG0_EXEC_HELPER_ARG1;
pub use arg0_exec_helper::main as run_arg0_exec_helper_main;
pub use capability_discovery::CapabilityDiscoveryError;
pub use capability_discovery::discover_capability_roots;
pub use capability_discovery_cache::ExecutorCapabilityDiscoveryCache;
pub use capability_discovery_v2_cache::ExecutorCapabilityDiscoveryV2Cache;
pub use client::ExecServerClient;
pub use client::ExecServerError;
pub use client::http_client::HttpResponseBodyStream;
pub use client::http_client::RouteAwareHttpClient;
pub use client_api::ExecServerClientConnectOptions;
pub use client_api::HttpClient;
pub use client_api::NoiseRendezvousConnectArgs;
pub use client_api::NoiseRendezvousConnectBundle;
pub use client_api::NoiseRendezvousConnectProvider;
pub use client_api::RemoteExecServerConnectArgs;
pub use environment::AKODE_EXEC_SERVER_NOISE_CHATGPT_ACCOUNT_ID_ENV_VAR;
pub use environment::AKODE_EXEC_SERVER_NOISE_ENVIRONMENT_ID_ENV_VAR;
pub use environment::AKODE_EXEC_SERVER_NOISE_REGISTRY_URL_ENV_VAR;

View File

@@ -1,4 +1,3 @@
use bytes::Bytes;
use akode_file_system::FILE_WRITE_CHUNK_SIZE;
use akode_file_system::MAX_WALK_DEPTH;
use akode_file_system::MAX_WALK_DIRECTORIES;
@@ -7,6 +6,7 @@ use akode_file_system::MAX_WALK_RESPONSE_BYTES;
use akode_file_system::WALK_RESPONSE_ITEM_OVERHEAD_BYTES;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_path_uri::PathUri;
use bytes::Bytes;
use futures::StreamExt;
use futures::stream::BoxStream;
use std::collections::HashSet;

View File

@@ -1,11 +1,11 @@
use std::time::Duration;
use anyhow::Result;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCRequest;
use akode_exec_server_protocol::JSONRPCResponse;
use akode_exec_server_protocol::RequestId;
use akode_protocol::protocol::W3cTraceContext;
use anyhow::Result;
use tokio::sync::mpsc;
use tokio::time::timeout;

View File

@@ -1,10 +1,10 @@
use std::time::Duration;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use anyhow::Context;
use anyhow::Result;
use bytes::Bytes;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use futures::SinkExt;
use futures::StreamExt;
use pretty_assertions::assert_eq;

View File

@@ -6,12 +6,12 @@ use std::task::Context as TaskContext;
use std::task::Poll;
use std::time::Duration;
use anyhow::Context;
use anyhow::Result;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCRequest;
use akode_exec_server_protocol::RequestId;
use akode_protocol::protocol::W3cTraceContext;
use anyhow::Context;
use anyhow::Result;
use futures::Sink;
use futures::SinkExt;
use futures::StreamExt;

View File

@@ -1,7 +1,7 @@
use akode_exec_server_protocol::JSONRPCMessage;
use bytes::Buf;
use bytes::Bytes;
use bytes::BytesMut;
use akode_exec_server_protocol::JSONRPCMessage;
use crate::ExecServerError;
use crate::client_inbound_request_limit::MAX_CLIENT_INBOUND_REQUEST_LEN;

View File

@@ -1,9 +1,9 @@
use std::future::Future;
use std::sync::Arc;
use bytes::Bytes;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_protocol::protocol::W3cTraceContext;
use bytes::Bytes;
use tokio::sync::mpsc;
use tokio::sync::watch;
use tokio::task::JoinHandle;

View File

@@ -1,9 +1,9 @@
use std::time::Instant;
use anyhow::Result;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCRequest;
use akode_exec_server_protocol::RequestId;
use anyhow::Result;
use pretty_assertions::assert_eq;
use super::NoiseStreamHandler;

View File

@@ -6,10 +6,10 @@ use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use std::time::Duration;
use anyhow::Result;
use akode_exec_server_protocol::JSONRPCMessage;
use akode_exec_server_protocol::JSONRPCResponse;
use akode_exec_server_protocol::RequestId;
use anyhow::Result;
use futures::SinkExt;
use futures::StreamExt;
use opentelemetry::trace::SpanId;

View File

@@ -4,13 +4,13 @@ use std::sync::atomic::Ordering;
use std::time::Duration;
use std::time::Instant;
use anyhow::Result;
use base64::Engine;
use akode_api::AuthProvider;
use akode_http_client::DestinationPolicy;
use akode_http_client::HttpClientFactory;
use akode_http_client::NetworkPolicyController;
use akode_http_client::OutboundProxyPolicy;
use anyhow::Result;
use base64::Engine;
use futures::SinkExt;
use futures::StreamExt;
use http::HeaderMap;

View File

@@ -3,12 +3,12 @@ use std::sync::Arc;
use std::sync::Mutex;
use std::time::Duration;
use anyhow::Result;
use akode_api::AuthProvider;
use akode_api::SharedAuthProvider;
use akode_http_client::HttpClientFactory;
use akode_http_client::OutboundProxyPolicy;
use akode_http_client::cache_system_proxy_route_for_test;
use anyhow::Result;
use http::HeaderMap;
use http::HeaderValue;
use tokio::io::AsyncReadExt;

View File

@@ -1,5 +1,5 @@
use bytes::Bytes;
use akode_utils_path_uri::PathUri;
use bytes::Bytes;
use tokio::io;
use uuid::Uuid;

View File

@@ -3,14 +3,14 @@ use std::sync::Arc;
use std::sync::Mutex;
use std::sync::MutexGuard;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use bytes::Bytes;
use akode_file_system::FILE_WRITE_CHUNK_SIZE;
use akode_protocol::models::ManagedFileSystemPermissions;
use akode_protocol::models::PermissionProfile;
use akode_protocol::permissions::FileSystemPath;
use akode_utils_path_uri::PathUri;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use bytes::Bytes;
use futures::StreamExt;
use futures::TryFutureExt;
use futures::stream::BoxStream;

View File

@@ -1,7 +1,7 @@
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use akode_exec_server_protocol::JSONRPCErrorError;
use akode_utils_path_uri::PathUri;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use tokio::io;
use tokio_util::io::ReaderStream;

View File

@@ -1,8 +1,8 @@
use std::io;
use akode_exec_server_protocol::JSONRPCErrorError;
use base64::Engine as _;
use base64::engine::general_purpose::STANDARD;
use akode_exec_server_protocol::JSONRPCErrorError;
use crate::CapabilityRootsDiscoverParams;
use crate::CapabilityRootsDiscoverResponse;

View File

@@ -1,6 +1,11 @@
//! Exec-server stdio and WebSocket listeners. Configured authentication gates
//! WebSocket upgrades; unauthenticated listeners remain supported for compatibility.
use akode_http_client::HttpClientFactory;
use akode_websocket_auth::WebsocketAuthPolicy;
use akode_websocket_auth::WebsocketAuthSettings;
use akode_websocket_auth::authorize_upgrade;
use akode_websocket_auth::policy_from_settings;
use axum::Router;
use axum::body::Body;
use axum::extract::ConnectInfo;
@@ -16,11 +21,6 @@ use axum::response::IntoResponse;
use axum::response::Response;
use axum::routing::any;
use axum::routing::get;
use akode_http_client::HttpClientFactory;
use akode_websocket_auth::WebsocketAuthPolicy;
use akode_websocket_auth::WebsocketAuthSettings;
use akode_websocket_auth::authorize_upgrade;
use akode_websocket_auth::policy_from_settings;
use std::io::Write as _;
use std::net::SocketAddr;
use tokio::io;

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")]