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:
@@ -151,4 +151,3 @@ async fn user_reload_promotes_plugin_and_feature_requirements_without_server_cha
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ use crate::error_code::internal_error;
|
||||
use crate::error_code::invalid_request;
|
||||
use crate::fs_watch::FsWatchManager;
|
||||
use crate::outgoing_message::ConnectionId;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use akode_app_server_protocol::FsCopyParams;
|
||||
use akode_app_server_protocol::FsCopyResponse;
|
||||
use akode_app_server_protocol::FsCreateDirectoryParams;
|
||||
@@ -30,6 +28,8 @@ use akode_exec_server::EnvironmentManager;
|
||||
use akode_exec_server::ExecutorFileSystem;
|
||||
use akode_exec_server::RemoveOptions;
|
||||
use akode_utils_path_uri::PathUri;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use std::io;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
use axum::http::HeaderValue;
|
||||
use akode_login::default_client::SetOriginatorError;
|
||||
use akode_login::default_client::USER_AGENT_SUFFIX;
|
||||
use akode_login::default_client::get_codex_user_agent;
|
||||
@@ -9,6 +8,7 @@ use akode_login::default_client::set_default_client_residency_requirement;
|
||||
use akode_login::default_client::set_default_originator;
|
||||
use akode_protocol::mcp::ClientMcpExtensions;
|
||||
use akode_protocol::mcp::OPENAI_ELICITATION_EXTENSION_ID;
|
||||
use axum::http::HeaderValue;
|
||||
|
||||
use super::*;
|
||||
use crate::message_processor::ConnectionSessionState;
|
||||
|
||||
@@ -7,7 +7,6 @@ use akode_mcp::resolve_oauth_callback;
|
||||
use akode_otel::auth_storage::AuthStorageOriginator;
|
||||
use std::future::Future;
|
||||
|
||||
|
||||
const MCP_THREAD_ID_META_KEY: &str = "threadId";
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -543,15 +542,13 @@ impl McpRequestProcessor {
|
||||
request_id: ConnectionRequestId,
|
||||
result: anyhow::Result<serde_json::Value>,
|
||||
) {
|
||||
let result = result
|
||||
.map_err(mcp_operation_error)
|
||||
.and_then(|result| {
|
||||
serde_json::from_value::<McpResourceReadResponse>(result).map_err(|error| {
|
||||
internal_error(format!(
|
||||
"failed to deserialize MCP resource read response: {error}"
|
||||
))
|
||||
})
|
||||
});
|
||||
let result = result.map_err(mcp_operation_error).and_then(|result| {
|
||||
serde_json::from_value::<McpResourceReadResponse>(result).map_err(|error| {
|
||||
internal_error(format!(
|
||||
"failed to deserialize MCP resource read response: {error}"
|
||||
))
|
||||
})
|
||||
});
|
||||
outgoing.send_result(request_id, result).await;
|
||||
}
|
||||
|
||||
|
||||
@@ -828,4 +828,3 @@ impl PluginRequestProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ use std::collections::hash_map::Entry;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use akode_app_server_protocol::ClientResponsePayload;
|
||||
use akode_app_server_protocol::JSONRPCErrorError;
|
||||
use akode_app_server_protocol::ProcessExitedNotification;
|
||||
@@ -31,6 +29,8 @@ use akode_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
|
||||
use akode_utils_pty::ProcessHandle;
|
||||
use akode_utils_pty::SpawnedProcess;
|
||||
use akode_utils_pty::TerminalSize;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use tokio::sync::Mutex;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
@@ -12,8 +12,6 @@ use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::thread_sample::SampleResponseRegistry;
|
||||
use crate::thread_state::PendingNetworkApproval;
|
||||
use crate::thread_state::resolve_server_request_on_thread_listener;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use akode_app_server_protocol::ClientResponsePayload;
|
||||
use akode_app_server_protocol::RequestId;
|
||||
use akode_app_server_protocol::ThreadResumeParams;
|
||||
@@ -24,6 +22,8 @@ use akode_arg0::Arg0DispatchPaths;
|
||||
use akode_goal_extension::GoalService;
|
||||
use akode_login::AuthManager;
|
||||
use akode_thread_store::PersistContext;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use core_test_support::test_codex::test_codex;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::collections::HashSet;
|
||||
@@ -97,9 +97,7 @@ async fn listener_shutdown_releases_runtime_and_preserves_other_subscribers(
|
||||
remaining_connection_id,
|
||||
];
|
||||
for &connection_id in &connection_ids {
|
||||
processor
|
||||
.connection_initialized(connection_id)
|
||||
.await;
|
||||
processor.connection_initialized(connection_id).await;
|
||||
}
|
||||
let network_request_id = RequestId::Integer(4);
|
||||
if attach_before_shutdown {
|
||||
|
||||
@@ -148,9 +148,6 @@ mod thread_processor_behavior_tests {
|
||||
use super::super::*;
|
||||
use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use anyhow::Result;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use akode_app_server_protocol::ServerRequestPayload;
|
||||
use akode_app_server_protocol::ThreadItem;
|
||||
use akode_app_server_protocol::ThreadItemPayload;
|
||||
@@ -175,6 +172,9 @@ mod thread_processor_behavior_tests {
|
||||
use akode_thread_store::StoredThread;
|
||||
use akode_utils_absolute_path::test_support::PathBufExt;
|
||||
use akode_utils_absolute_path::test_support::test_path_buf;
|
||||
use anyhow::Result;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::Value;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use super::*;
|
||||
#[cfg(test)]
|
||||
use std::io::Error as IoError;
|
||||
use akode_protocol::config_types::MultiAgentMode;
|
||||
#[cfg(test)]
|
||||
use chrono::DateTime;
|
||||
#[cfg(test)]
|
||||
use chrono::Utc;
|
||||
use akode_protocol::config_types::MultiAgentMode;
|
||||
#[cfg(test)]
|
||||
use std::io::Error as IoError;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) async fn read_summary_from_rollout(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
use anyhow::Result;
|
||||
use akode_protocol::protocol::USER_MESSAGE_BEGIN;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use super::*;
|
||||
#[cfg(target_os = "windows")]
|
||||
use anyhow::Context as _;
|
||||
use akode_protocol::sandbox::SandboxType;
|
||||
use akode_utils_path_uri::PathUri;
|
||||
#[cfg(target_os = "windows")]
|
||||
use anyhow::Context as _;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct WindowsSandboxRequestProcessor {
|
||||
|
||||
Reference in New Issue
Block a user