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:
@@ -131,7 +131,7 @@ fn agents_reject_inputs_that_cannot_be_applied() -> Result<()> {
|
||||
#[test]
|
||||
fn app_server_emits_json_info_events() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
let event = app_server_json_shutdown_event("codex", &["app-server"], codex_home.path())?;
|
||||
let event = app_server_json_shutdown_event("akode", &["app-server"], codex_home.path())?;
|
||||
|
||||
assert_eq!(
|
||||
event,
|
||||
|
||||
@@ -7,10 +7,10 @@ use std::process::Command;
|
||||
use std::time::Duration;
|
||||
use std::time::Instant;
|
||||
|
||||
use akode_utils_cargo_bin::copy_executable;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::ensure;
|
||||
use akode_utils_cargo_bin::copy_executable;
|
||||
use serde_json::Value;
|
||||
use tempfile::TempDir;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//! Exercises daemon installation from the Windows WinGet archive layout.
|
||||
#![cfg(windows)]
|
||||
|
||||
use akode_utils_cargo_bin::copy_executable;
|
||||
use anyhow::Result;
|
||||
use anyhow::ensure;
|
||||
use akode_utils_cargo_bin::copy_executable;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::Value;
|
||||
use sha2::Digest;
|
||||
@@ -29,8 +29,8 @@ fn winget_package_starts_and_reselects_daemon() -> Result<()> {
|
||||
for helper in [
|
||||
"akode-code-mode-host.exe",
|
||||
"akode-path/rg.exe",
|
||||
"akode-resources/codex-command-runner.exe",
|
||||
"akode-resources/codex-windows-sandbox-setup.exe",
|
||||
"akode-resources/akode-command-runner.exe",
|
||||
"akode-resources/akode-windows-sandbox-setup.exe",
|
||||
] {
|
||||
std::fs::write(package.join(helper), b"runtime fixture")?;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ async fn daemon_startup(command: &str) -> Result<()> {
|
||||
let managed = home
|
||||
.path()
|
||||
.join("packages/app-server-daemon/current/bin")
|
||||
.join(if cfg!(windows) { "akode.exe" } else { "codex" });
|
||||
.join(if cfg!(windows) { "akode.exe" } else { "akode" });
|
||||
fs::create_dir_all(home.path().join("packages/app-server-daemon/current/bin"))?;
|
||||
// Hard links change the executable's ctime and invalidate Rosetta's translation cache.
|
||||
#[cfg(unix)]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::Result;
|
||||
use akode_state::StateRuntime;
|
||||
use akode_utils_absolute_path::test_support::PathExt;
|
||||
use anyhow::Result;
|
||||
use predicates::str::contains;
|
||||
use tempfile::TempDir;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::process::Stdio;
|
||||
|
||||
use anyhow::Context as _;
|
||||
use anyhow::Result;
|
||||
use akode_state::SqliteConfig;
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use anyhow::Context as _;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use regex_lite::Regex;
|
||||
use serde_json::Value;
|
||||
|
||||
@@ -4,15 +4,15 @@ use std::ffi::OsString;
|
||||
use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
#[cfg(unix)]
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use app_test_support::TestAppServer;
|
||||
use akode_app_server_protocol::RequestId;
|
||||
use akode_config::loader::project_trust_key;
|
||||
use akode_state::SqliteConfig;
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use akode_utils_cargo_bin::copy_executable;
|
||||
#[cfg(unix)]
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use app_test_support::TestAppServer;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::Value;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -21,8 +21,6 @@ use std::time::Duration;
|
||||
#[cfg(unix)]
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use akode_exec_server::EnvironmentInfo;
|
||||
use akode_exec_server::ExecParams;
|
||||
use akode_exec_server::ExecServerClient;
|
||||
@@ -35,6 +33,8 @@ use akode_http_client::HttpClientFactory;
|
||||
use akode_http_client::OutboundProxyPolicy;
|
||||
use akode_utils_cargo_bin::copy_executable;
|
||||
use akode_utils_path_uri::PathUri;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use futures::SinkExt;
|
||||
use futures::StreamExt;
|
||||
use predicates::prelude::PredicateBooleanExt;
|
||||
|
||||
@@ -224,10 +224,10 @@ fn exec_server_websocket_auth_rejects_invalid_configuration() -> Result<()> {
|
||||
|
||||
#[tokio::test]
|
||||
async fn app_server_executor_auth_supports_tokens_and_legacy_configuration() -> Result<()> {
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::to_response;
|
||||
use akode_app_server_protocol::EnvironmentInfoResponse;
|
||||
use akode_app_server_protocol::RequestId;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::to_response;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
enum Source {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use anyhow::Result;
|
||||
use akode_config::CONFIG_TOML_FILE;
|
||||
use akode_core_plugins::installed_marketplaces::marketplace_install_root;
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use anyhow::Result;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use anyhow::Result;
|
||||
use akode_config::MarketplaceConfigUpdate;
|
||||
use akode_config::record_user_marketplace;
|
||||
use akode_core_plugins::installed_marketplaces::marketplace_install_root;
|
||||
use akode_utils_absolute_path::canonicalize_existing_preserving_symlinks;
|
||||
use anyhow::Result;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use anyhow::Result;
|
||||
use akode_core_plugins::installed_marketplaces::marketplace_install_root;
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use anyhow::Result;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::Result;
|
||||
use akode_config::types::McpServerTransportConfig;
|
||||
use akode_core::config::edit::ConfigEditsBuilder;
|
||||
use akode_core::config::load_global_mcp_servers;
|
||||
use anyhow::Result;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
|
||||
@@ -6,11 +6,11 @@ use std::path::Path;
|
||||
use std::time::Duration;
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::Result;
|
||||
use akode_config::types::McpServerTransportConfig;
|
||||
use akode_core::config::edit::ConfigEditsBuilder;
|
||||
use akode_core::config::load_global_mcp_servers;
|
||||
use akode_login::AKODE_API_KEY_ENV_VAR;
|
||||
use anyhow::Result;
|
||||
use predicates::prelude::PredicateBooleanExt;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -5,10 +5,10 @@ use std::process::Output;
|
||||
use std::process::Stdio;
|
||||
use std::time::Duration;
|
||||
|
||||
use akode_core::config::load_global_mcp_servers;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::bail;
|
||||
use akode_core::config::load_global_mcp_servers;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::Value;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#![cfg(unix)]
|
||||
|
||||
use anyhow::Result;
|
||||
use akode_state::SqliteConfig;
|
||||
use anyhow::Result;
|
||||
use predicates::prelude::PredicateBooleanExt;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use akode_config::CONFIG_TOML_FILE;
|
||||
use akode_config::MarketplaceConfigUpdate;
|
||||
use akode_config::record_user_marketplace;
|
||||
use akode_utils_absolute_path::canonicalize_existing_preserving_symlinks;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use predicates::prelude::PredicateBooleanExt;
|
||||
use predicates::str::contains;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -263,9 +263,6 @@ async fn run_remote_queue_command(response: QueueResponse) -> Result<(Output, Va
|
||||
async fn remote_session_commands_with_workload_identity_use_server_auth() -> Result<()> {
|
||||
use std::time::Duration;
|
||||
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_final_assistant_message_sse_response;
|
||||
use akode_app_server_client::AppServerEvent;
|
||||
use akode_app_server_client::DEFAULT_IN_PROCESS_CHANNEL_CAPACITY;
|
||||
use akode_app_server_client::RemoteAppServerClient;
|
||||
@@ -288,6 +285,9 @@ async fn remote_session_commands_with_workload_identity_use_server_auth() -> Res
|
||||
use akode_app_server_protocol::TurnStatus;
|
||||
use akode_protocol::shell_environment::OPENAI_FEDERATION_RULE_ID_ENV_VAR;
|
||||
use akode_protocol::shell_environment::OPENAI_IDENTITY_TOKEN_FILE_ENV_VAR;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_final_assistant_message_sse_response;
|
||||
use core_test_support::responses;
|
||||
use tokio::process::Command;
|
||||
use tokio::time::timeout;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
//! Exercise trace acceptance through the CLI app-server and its offline reducer.
|
||||
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_mock_responses_server_sequence;
|
||||
use akode_app_server_protocol::AgentMessageDeltaNotification;
|
||||
use akode_app_server_protocol::ClientRequest;
|
||||
use akode_app_server_protocol::RequestId;
|
||||
@@ -20,6 +16,10 @@ use akode_rollout_trace::ConversationRole;
|
||||
use akode_rollout_trace::ExecutionStatus;
|
||||
use akode_rollout_trace::ProducerRef;
|
||||
use akode_rollout_trace::RolloutTrace;
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_mock_responses_server_sequence;
|
||||
use core_test_support::responses;
|
||||
use core_test_support::streaming_sse::StreamingSseChunk;
|
||||
use core_test_support::streaming_sse::start_streaming_sse_server;
|
||||
|
||||
@@ -7,10 +7,10 @@ use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::Context as _;
|
||||
use akode_utils_pty::SpawnedProcess;
|
||||
use akode_utils_pty::TerminalSize;
|
||||
use akode_utils_pty::spawn_pty_process;
|
||||
use anyhow::Context as _;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Error: failed to load configuration
|
||||
|
||||
Caused by:
|
||||
0: [AKODE_HOME]/config.toml:<line>:<column>: unknown key `backslash` in keybinding `backslash`. Use a printable character (for example `a`), function keys (`f1`-`f24`), or one of: enter, tab, backspace, esc, delete, arrows, home/end, page-up/page-down, space, minus.
|
||||
See the Codex keymap documentation for supported actions and examples.
|
||||
See the aKode keymap documentation for supported actions and examples.
|
||||
1: unknown key `backslash` in keybinding `backslash`. Use a printable character (for example `a`), function keys (`f1`-`f24`), or one of: enter, tab, backspace, esc, delete, arrows, home/end, page-up/page-down, space, minus.
|
||||
See the Codex keymap documentation for supported actions and examples.
|
||||
See the aKode keymap documentation for supported actions and examples.
|
||||
in `tui.keymap.editor.insert_newline`
|
||||
|
||||
@@ -271,7 +271,7 @@ trust_level = "trusted"
|
||||
let _daemon = if backend == "daemon" {
|
||||
let bin = home.join("packages/app-server-daemon/current/bin");
|
||||
fs::create_dir_all(&bin)?;
|
||||
let managed = bin.join(if cfg!(windows) { "akode.exe" } else { "codex" });
|
||||
let managed = bin.join(if cfg!(windows) { "akode.exe" } else { "akode" });
|
||||
// Hard links change the executable's ctime and invalidate Rosetta's translation cache.
|
||||
#[cfg(unix)]
|
||||
std::os::unix::fs::symlink(program.canonicalize()?, &managed)?;
|
||||
|
||||
Reference in New Issue
Block a user