diff --git a/CHANGELOG.md b/CHANGELOG.md index a8464fc..5c5bdd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +v3.2.3 (2026-10-12) +------------------- + +Core version reporting, lockstep with the agent family at 3.2.3 (v3.2.3) +----------------------------------------------------------------------- + +### Note + +- The crate version moves to 3.2.3 so all five agents ship the same version. + +### Changed + +- With the `guard-core` feature enabled, `GuardAgent::new` fills `guard_core_version` from `guard_core_rs::VERSION` when it is unset, so the Guard SaaS sees which core is running; a value set by the caller wins. The optional `guard-core-rs` requirement moves to 4.3.3. + v3.2.2 (2026-10-09) ------------------- diff --git a/Cargo.lock b/Cargo.lock index 394e865..26964a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -770,7 +770,7 @@ dependencies = [ [[package]] name = "guard-agent-rs" -version = "3.2.2" +version = "3.2.3" dependencies = [ "aes-gcm", "async-trait", @@ -797,7 +797,7 @@ dependencies = [ [[package]] name = "guard-core-engine" -version = "4.3.2" +version = "4.3.3" dependencies = [ "chrono", "chrono-tz", @@ -815,7 +815,7 @@ dependencies = [ [[package]] name = "guard-core-rs" -version = "4.3.2" +version = "4.3.3" dependencies = [ "chrono", "guard-core-engine", diff --git a/Cargo.toml b/Cargo.toml index bd87230..ed35377 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "3" [package] name = "guard-agent-rs" -version = "3.2.2" +version = "3.2.3" authors = ["Renzo Franceschini "] categories = ["web-programming"] description = "Telemetry and monitoring agent for the Guard ecosystem (Rust)." @@ -39,7 +39,7 @@ base64 = "0.23" rand = "0.10" chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] } flate2 = "1" -guard-core-rs = { version = "4.3.1", path = "../guard-core-rs/crates/guard-core-rs", optional = true, default-features = false } +guard-core-rs = { version = "4.3.3", path = "../guard-core-rs/crates/guard-core-rs", optional = true, default-features = false } hmac = "0.13" log = "0.4" redis = { version = "1", default-features = false, features = ["tokio-comp"], optional = true } diff --git a/README.md b/README.md index 5b4834d..55cf003 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ ___ ## Status -Released. Version 3.2.2, published to crates.io. +Released. Version 3.2.3, published to crates.io. ## Features diff --git a/src/agent.rs b/src/agent.rs index 94ab7cb..0c0a1e0 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -278,6 +278,10 @@ impl GuardAgent { pub fn new(config: AgentConfig) -> Result { let mut config = config; config.validate()?; + #[cfg(feature = "guard-core")] + if config.guard_core_version.is_none() { + config.guard_core_version = Some(guard_core_rs::VERSION.to_owned()); + } let config = Arc::new(config); let install_id = resolve_install_id(config.install_id.as_deref()); @@ -1390,6 +1394,25 @@ mod tests { GuardAgent::new(config).expect("valid config") } + #[cfg(feature = "guard-core")] + #[tokio::test] + async fn guard_core_version_defaults_to_the_linked_core_and_yields_to_a_set_value() { + let agent = agent_for_test(); + assert_eq!( + agent.shared.config.guard_core_version.as_deref(), + Some(guard_core_rs::VERSION) + ); + + let mut config = AgentConfig::new("test-api-key-1234"); + config.endpoint = "http://127.0.0.1:9".to_owned(); + config.guard_core_version = Some("0.0.1".to_owned()); + let pinned = GuardAgent::new(config).expect("valid config"); + assert_eq!( + pinned.shared.config.guard_core_version.as_deref(), + Some("0.0.1") + ); + } + #[tokio::test] async fn debug_and_install_id_expose_the_configuration_shape() { let mut config = AgentConfig::new("test-api-key-1234");