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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -213,9 +213,7 @@ fn serialize_layer_stack<S>(
|
||||
})
|
||||
})
|
||||
.collect::<Result<Vec<_>, ReadEnvironmentConfigError>>()?;
|
||||
Ok(EnvironmentConfigLayerStack {
|
||||
layers,
|
||||
})
|
||||
Ok(EnvironmentConfigLayerStack { layers })
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -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()]], &[]);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use bytes::Bytes;
|
||||
use akode_utils_path_uri::PathUri;
|
||||
use bytes::Bytes;
|
||||
use tokio::io;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user