From 4fceba0740b42221842bf4f2558bcc309b04c340 Mon Sep 17 00:00:00 2001 From: argenis de la rosa Date: Fri, 13 Feb 2026 17:09:22 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20failures=20=E2=80=94=20update=20den?= =?UTF-8?q?y.toml=20for=20cargo-deny=20v2,=20fix=20clippy=20derivable=5Fim?= =?UTF-8?q?pls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - deny.toml: remove deprecated fields (vulnerability, notice, unlicensed, copyleft) that were removed in cargo-deny v2. Add CDLA-Permissive-2.0 for webpki-roots. - security/policy.rs: replace manual Default impl for AutonomyLevel with #[derive(Default)] + #[default] attribute (clippy::derivable_impls on Rust 1.93) 657 tests passing, 0 clippy warnings (Rust 1.93.1), cargo-deny clean --- deny.toml | 11 +++++------ src/security/policy.rs | 9 ++------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/deny.toml b/deny.toml index e167dc1..93bd114 100644 --- a/deny.toml +++ b/deny.toml @@ -1,14 +1,12 @@ -# cargo-deny configuration +# cargo-deny configuration — v2 schema # https://embarkstudios.github.io/cargo-deny/ [advisories] -vulnerability = "deny" -unmaintained = "warn" +unmaintained = "workspace" yanked = "warn" -notice = "warn" [licenses] -unlicensed = "deny" +# All licenses are denied unless explicitly allowed allow = [ "MIT", "Apache-2.0", @@ -20,8 +18,9 @@ allow = [ "OpenSSL", "Zlib", "MPL-2.0", + "CDLA-Permissive-2.0", ] -copyleft = "deny" +unused-allowed-license = "allow" [bans] multiple-versions = "warn" diff --git a/src/security/policy.rs b/src/security/policy.rs index 5d88e9c..bff7139 100644 --- a/src/security/policy.rs +++ b/src/security/policy.rs @@ -4,23 +4,18 @@ use std::sync::Mutex; use std::time::Instant; /// How much autonomy the agent has -#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum AutonomyLevel { /// Read-only: can observe but not act ReadOnly, /// Supervised: acts but requires approval for risky operations + #[default] Supervised, /// Full: autonomous execution within policy bounds Full, } -impl Default for AutonomyLevel { - fn default() -> Self { - Self::Supervised - } -} - /// Sliding-window action tracker for rate limiting. #[derive(Debug)] pub struct ActionTracker {