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

@@ -1,16 +1,16 @@
use std::path::PathBuf;
use std::time::Duration;
use anyhow::Context;
use chrono::DateTime;
use clap::Parser;
use clap::ValueEnum;
use akode_core::config::ConfigBuilder;
use akode_state::LogQuery;
use akode_state::LogRow;
use akode_state::SqliteConfig;
use akode_state::StateRuntime;
use akode_utils_absolute_path::AbsolutePathBuf;
use anyhow::Context;
use chrono::DateTime;
use clap::Parser;
use clap::ValueEnum;
use owo_colors::OwoColorize;
#[derive(Debug, Parser)]

View File

@@ -1,9 +1,9 @@
//! Preserve config overrides across command boundaries without changing typed child arguments.
use crate::MultitoolCli;
use akode_utils_cli::collect_config_overrides;
use clap::CommandFactory;
use clap::FromArgMatches;
use akode_utils_cli::collect_config_overrides;
use std::ffi::OsString;
pub(super) fn try_parse_from(

View File

@@ -2,8 +2,8 @@
use std::io::IsTerminal;
use anyhow::Result;
use akode_app_server_daemon::InstallRequest;
use anyhow::Result;
pub(crate) fn confirm_install(request: &InstallRequest, yes: bool) -> Result<bool> {
eprintln!("{}", describe_install(request));

View File

@@ -6,7 +6,6 @@ mod seatbelt;
use std::path::PathBuf;
use std::process::Stdio;
use anyhow::Context as _;
use akode_config::LoaderOverrides;
use akode_core::config::Config;
use akode_core::config::ConfigBuilder;
@@ -31,6 +30,7 @@ use akode_sandboxing::seatbelt::create_seatbelt_command_args;
use akode_sandboxing::with_managed_mitm_ca_readable_root;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context as _;
use tokio::process::Child;
use tokio::process::Command as TokioCommand;
use toml::Value as TomlValue;

View File

@@ -26,8 +26,6 @@ use std::sync::Arc;
use std::time::Duration;
use std::time::Instant;
use anyhow::Context;
use clap::Parser;
use akode_api::ApiError;
use akode_api::ResponsesWebsocketClient;
use akode_api::TransportError;
@@ -51,9 +49,9 @@ use akode_install_context::CodexPackageLayout;
use akode_install_context::InstallContext;
use akode_install_context::InstallMethod;
use akode_install_context::StandalonePlatform;
use akode_login::AKODE_API_KEY_ENV_VAR;
use akode_login::AuthDotJson;
use akode_login::AuthManager;
use akode_login::AKODE_API_KEY_ENV_VAR;
use akode_login::CodexAuth;
use akode_login::OPENAI_API_KEY_ENV_VAR;
use akode_login::default_client::create_client_without_request_logging;
@@ -68,6 +66,8 @@ use akode_terminal_detection::TerminalName;
use akode_terminal_detection::terminal_info;
use akode_tui::Cli as TuiCli;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context;
use clap::Parser;
use http::HeaderMap;
use http::HeaderValue;
use http::Method;
@@ -3111,8 +3111,8 @@ mod tests {
use std::net::TcpListener;
use std::sync::Mutex;
use clap::Parser;
use akode_protocol::config_types::SandboxMode;
use clap::Parser;
use pretty_assertions::assert_eq;
use super::*;

View File

@@ -2,9 +2,9 @@
source: cli/src/doctor/output.rs
expression: "rendered.replace('\\u{1b}', \"<ESC>\")"
---
<ESC>[38;5;10m✓<ESC>[39m state <ESC>[2m<ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117mcodex doctor<ESC>[39m<ESC>[0m
<ESC>[38;5;10m✓<ESC>[39m state <ESC>[2m<ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117makode doctor<ESC>[39m<ESC>[0m
<ESC>[38;5;240mlocations <ESC>[39m see <ESC>[38;5;117m./logs<ESC>[39m, <ESC>[38;5;117m../goals<ESC>[39m. C:\logs, D:/goals. c:\logs, \\server\share\logs, \\?\C:\logs, \\?\UNC\server\share\logs, \\.\pipe\codex, \??\C:\logs, \DosDevices\C:\logs, \rooted. <ESC>[38;5;117mhttp://localhost:8080<ESC>[39m: <ESC>[38;5;117mhttps://example.com<ESC>[39m; <ESC>[38;5;117mwss://example.com<ESC>[39m) and <ESC>[38;5;117m/tmp/my data/logs_2.sqlite<ESC>[39m
<ESC>[38;5;214m⚠<ESC>[39m state <ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117mcodex doctor<ESC>[39m
<ESC>[38;5;214m⚠<ESC>[39m state <ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117makode doctor<ESC>[39m
<ESC>[38;5;240mlocations <ESC>[39m see <ESC>[38;5;117m./logs<ESC>[39m, <ESC>[38;5;117m../goals<ESC>[39m. C:\logs, D:/goals. c:\logs, \\server\share\logs, \\?\C:\logs, \\?\UNC\server\share\logs, \\.\pipe\codex, \??\C:\logs, \DosDevices\C:\logs, \rooted. <ESC>[38;5;117mhttp://localhost:8080<ESC>[39m: <ESC>[38;5;117mhttps://example.com<ESC>[39m; <ESC>[38;5;117mwss://example.com<ESC>[39m) and <ESC>[38;5;117m/tmp/my data/logs_2.sqlite<ESC>[39m
<ESC>[38;5;196m✗<ESC>[39m state <ESC>[38;5;196m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;196m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117mcodex doctor<ESC>[39m
<ESC>[38;5;196m✗<ESC>[39m state <ESC>[38;5;196m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;196m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117makode doctor<ESC>[39m
<ESC>[38;5;240mlocations <ESC>[39m see <ESC>[38;5;196m./logs<ESC>[39m, <ESC>[38;5;196m../goals<ESC>[39m. C:\logs, D:/goals. c:\logs, \\server\share\logs, \\?\C:\logs, \\?\UNC\server\share\logs, \\.\pipe\codex, \??\C:\logs, \DosDevices\C:\logs, \rooted. <ESC>[38;5;196mhttp://localhost:8080<ESC>[39m: <ESC>[38;5;196mhttps://example.com<ESC>[39m; <ESC>[38;5;196mwss://example.com<ESC>[39m) and <ESC>[38;5;196m/tmp/my data/logs_2.sqlite<ESC>[39m

View File

@@ -3,11 +3,11 @@ mod exit_status;
pub mod local_config;
pub(crate) mod login;
use clap::Args;
use clap::Parser;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_cli::CliConfigOverrides;
use akode_utils_cli::ProfileV2Name;
use clap::Args;
use clap::Parser;
use std::path::PathBuf;
pub use debug_sandbox::run_command_under_landlock;

View File

@@ -1,5 +1,3 @@
use anyhow::Context;
use anyhow::Result;
use akode_app_server::in_process::EmbeddedNetworkPolicy;
use akode_core::config::Config;
use akode_core::config::ConfigBuilder;
@@ -8,6 +6,8 @@ use akode_core::config::LoaderOverrides;
use akode_core::config::find_codex_home;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context;
use anyhow::Result;
pub async fn load_config(
config_overrides: &CliConfigOverrides,

View File

@@ -1,8 +1,3 @@
use clap::Args;
use clap::CommandFactory;
use clap::Parser;
use clap_complete::Shell;
use clap_complete::generate;
use akode_app_server_daemon::BootstrapOptions as AppServerBootstrapOptions;
use akode_app_server_daemon::LifecycleCommand as AppServerLifecycleCommand;
use akode_arg0::Arg0DispatchPaths;
@@ -29,6 +24,11 @@ use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_cli::CliConfigOverrides;
use akode_utils_cli::ProfileV2Name;
use akode_utils_cli::SharedCliOptions;
use clap::Args;
use clap::CommandFactory;
use clap::Parser;
use clap_complete::Shell;
use clap_complete::generate;
use std::collections::HashSet;
use std::io::IsTerminal;
use std::io::Write;
@@ -2599,9 +2599,9 @@ fn print_completion(cmd: CompletionCommand) {
#[cfg(test)]
mod tests {
use super::*;
use assert_matches::assert_matches;
use akode_protocol::ThreadId;
use akode_tui::TokenUsage;
use assert_matches::assert_matches;
use pretty_assertions::assert_eq;
#[test]
@@ -3745,7 +3745,7 @@ enabled = true
vec![
"Token usage: total=2 input=0 output=2",
"To continue this session, run:",
" \u{1b}[36mcodex resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
" \u{1b}[36makode resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
]
);
}
@@ -3777,8 +3777,8 @@ enabled = true
vec![
"Token usage: total=2 input=0 output=2",
"To continue this session, run:",
" \u{1b}[36mcodex resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
"Or run \u{1b}[36mcodex resume\u{1b}[39m and select \u{1b}[36mmy-thread\u{1b}[39m.",
" \u{1b}[36makode resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
"Or run \u{1b}[36makode resume\u{1b}[39m and select \u{1b}[36mmy-thread\u{1b}[39m.",
]
);
}

View File

@@ -1,7 +1,3 @@
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use clap::Parser;
use akode_core::config::Config;
use akode_core::config::ConfigOverrides;
use akode_core::config::LoaderOverrides;
@@ -18,6 +14,10 @@ use akode_core_plugins::marketplace_remove::MarketplaceRemoveOutcome;
use akode_core_plugins::marketplace_remove::MarketplaceRemoveRequest;
use akode_core_plugins::marketplace_remove::remove_marketplace;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use clap::Parser;
use serde::Serialize;
use std::collections::HashMap;
use std::collections::HashSet;

View File

@@ -1,12 +1,6 @@
use std::collections::HashMap;
use std::sync::Arc;
use anyhow::Context;
use anyhow::Result;
use anyhow::anyhow;
use anyhow::bail;
use clap::ArgGroup;
use clap::builder::TypedValueParser;
use akode_config::types::AppToolApproval;
use akode_config::types::McpServerAuth;
use akode_config::types::McpServerConfig;
@@ -42,6 +36,12 @@ use akode_rmcp_client::resolve_mcp_oauth_callback_url;
use akode_utils_cli::CliConfigOverrides;
use akode_utils_cli::format_env_display;
use akode_utils_redacted_string::RedactedString;
use anyhow::Context;
use anyhow::Result;
use anyhow::anyhow;
use anyhow::bail;
use clap::ArgGroup;
use clap::builder::TypedValueParser;
use crate::local_config;
use crate::mcp_login::McpLoginMode;

View File

@@ -1,9 +1,9 @@
//! Verifies MCP argument handling and managed networking in standalone commands.
use clap::Parser;
use akode_http_client::ClientRouteClass;
use akode_http_client::HttpError;
use akode_http_client::NetworkPolicyDenied;
use clap::Parser;
use pretty_assertions::assert_eq;
use std::path::PathBuf;
use std::time::Duration;

View File

@@ -11,9 +11,6 @@ use std::io::IsTerminal;
use std::io::Write;
use std::sync::Arc;
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use akode_config::McpServerOAuthConfig;
use akode_config::types::AuthKeyringBackendKind;
use akode_config::types::OAuthCredentialsStoreMode;
@@ -23,6 +20,9 @@ use akode_mcp::should_retry_without_scopes;
use akode_rmcp_client::McpOAuthClientRegistration;
use akode_rmcp_client::perform_oauth_login;
use akode_rmcp_client::perform_oauth_login_with_callback_input;
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use crossterm::event::Event;
use crossterm::event::EventStream;
use crossterm::event::KeyCode;

View File

@@ -2,14 +2,14 @@
//! Other SQLite clients must remain stopped during replacement, and NFS must enforce
//! cross-client POSIX locks.
use anyhow::Context;
use anyhow::ensure;
use clap::Parser;
use akode_config::LoaderOverrides;
use akode_core::config::ConfigBuilder;
use akode_state::NfsDbMigration;
use akode_state::NfsDbMigrationOutcome;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context;
use anyhow::ensure;
use clap::Parser;
use owo_colors::OwoColorize;
use std::path::PathBuf;

View File

@@ -5,8 +5,6 @@ use std::path::Path;
use std::time::Duration;
use std::time::Instant;
use anyhow::Context;
use clap::Parser;
use akode_core::config::ConfigBuilder;
use akode_protocol::ThreadId;
use akode_thread_store::LocalThreadStore;
@@ -17,6 +15,8 @@ use akode_thread_store::RolloutMigrationProgress;
use akode_thread_store::RolloutMigrationReport;
use akode_thread_store::RolloutMigrationStatus;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context;
use clap::Parser;
#[derive(Debug, Parser)]
pub(crate) struct MigrateRolloutsCommand {

View File

@@ -1,7 +1,3 @@
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use clap::Parser;
use akode_core::config::Config;
use akode_core::config::find_codex_home;
use akode_core::plugins_manager_for_config;
@@ -24,6 +20,10 @@ use akode_plugin::PluginId;
use akode_plugin::validate_plugin_segment;
use akode_utils_absolute_path::AbsolutePathBuf;
use akode_utils_cli::CliConfigOverrides;
use anyhow::Context;
use anyhow::Result;
use anyhow::bail;
use clap::Parser;
use serde::Serialize;
use std::collections::HashMap;
use std::io;

View File

@@ -1,3 +1,6 @@
use akode_arg0::Arg0DispatchPaths;
use akode_tui::Cli as TuiCli;
use akode_utils_cli::CliConfigOverrides;
use clap::Arg;
use clap::ArgMatches;
use clap::Command;
@@ -6,9 +9,6 @@ use clap::Parser;
use clap::builder::NonEmptyStringValueParser;
use clap::error::ErrorKind;
use clap::parser::ValueSource;
use akode_arg0::Arg0DispatchPaths;
use akode_tui::Cli as TuiCli;
use akode_utils_cli::CliConfigOverrides;
use crate::InteractiveRemoteOptions;
use crate::SessionArchiveConfigOverrides;

View File

@@ -1,13 +1,13 @@
use std::path::PathBuf;
use anyhow::Context;
use clap::ArgAction;
use clap::ArgGroup;
use clap::Parser;
use akode_core::config::ConfigBuilder;
use akode_core::config::edit::ConfigEditsBuilder;
use akode_core::config::find_codex_home;
use akode_utils_cli::ProfileV2Name;
use anyhow::Context;
use clap::ArgAction;
use clap::ArgGroup;
use clap::Parser;
use toml::Value as TomlValue;
#[derive(Debug, Parser)]

View File

@@ -26,7 +26,7 @@ Options:
--strict-config
Error out when config.toml contains fields that are not recognized by
this version of Codex
this version of aKode
--disable <FEATURE>
Disable a feature (repeatable). Equivalent to `-c

View File

@@ -1,6 +1,5 @@
---
source: cli/src/main.rs
assertion_line: 3324
expression: "errors.join(\"\\n\")"
---
akode --worktree login: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
@@ -9,5 +8,5 @@ akode fork --worktree --last: `akode fork --worktree` requires an explicit sessi
akode exec resume --worktree session: `--worktree` cannot resume an existing session; use `akode exec fork --worktree`
akode exec review --worktree: `--worktree` is not supported for code review
akode resume --worktree session: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
codex archive session --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
codex queue --thread session --message hi --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
akode archive session --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
akode queue --thread session --message hi --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`