Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/src/core/all_registry_tests.rs,crates/openhuman-core/src/

Steven Enamakel612f9659abe4
diff --git a/crates/openhuman-core/src/core/all_registry_tests.rs b/crates/openhuman-core/src/core/all_registry_tests.rs
index c545b2176a..8d24e9038f 100644
--- a/crates/openhuman-core/src/core/all_registry_tests.rs
+++ b/crates/openhuman-core/src/core/all_registry_tests.rs
@@ -40,7 +40,7 @@ async fn doctor_report_is_in_both_scoped_saas_dispatch_and_schema_surfaces() {
let (unscoped_methods, unscoped_schemas) = (
all_registered_controllers()
.iter()
- .map(ControllerEntry::rpc_method_name
+ .map(ControllerEntry::rpc_method_name)
.collect::<Vec<_>>(),
all_controller_schemas()
.iter()
@@ -52,7 +52,7 @@ async fn doctor_report_is_in_both_scoped_saas_dispatch_and_schema_surfaces() {
(
all_registered_controllers()
.iter()
- .map(ControllerEntry::rpc_method_name
+ .map(ControllerEntry::rpc_method_name)
.collect::<Vec<_>>(),
all_controller_schemas()
.iter()
@@ -65,7 +65,7 @@ async fn doctor_report_is_in_both_scoped_saas_dispatch_and_schema_surfaces() {
(
all_registered_controllers()
.iter()
- .map(ControllerEntry::rpc_method_name
+ .map(ControllerEntry::rpc_method_name)
.collect::<Vec<_>>(),
all_controller_schemas()
.iter()
diff --git a/crates/openhuman-core/src/doctor/checks/channels_tests.rs b/crates/openhuman-core/src/doctor/checks/channels_tests.rs
index dcfd683fa4..8925e93955 100644
--- a/crates/openhuman-core/src/doctor/checks/channels_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/channels_tests.rs
@@ -1,8 +1,8 @@
use super::*;
use crate::doctor::contract::{DoctorCtx, FindingSeverity};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use tinychannels_bus::{ChannelHealthReport, ChannelHealthState, HttpProxyPolicy};
diff --git a/crates/openhuman-core/src/doctor/checks/config_file.rs b/crates/openhuman-core/src/doctor/checks/config_file.rs
index b1e61aaa3c..d1f4a28fdf 100644
--- a/crates/openhuman-core/src/doctor/checks/config_file.rs
+++ b/crates/openhuman-core/src/doctor/checks/config_file.rs
@@ -5,8 +5,8 @@ use std::sync::Arc;
use async_trait::async_trait;
use serde_json::Value;
-use crate::config::Config;
use crate::config::schema::load::ConfigLoadFallback;
+use crate::config::Config;
use crate::doctor::contract::{DoctorCheck, DoctorCtx, DoctorTier, Finding, FindingSeverity};
const CATEGORY: &str = "configuration";
diff --git a/crates/openhuman-core/src/doctor/checks/config_file_tests.rs b/crates/openhuman-core/src/doctor/checks/config_file_tests.rs
index 7424c87bad..5ff9188ef8 100644
--- a/crates/openhuman-core/src/doctor/checks/config_file_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/config_file_tests.rs
@@ -77,11 +77,9 @@ async fn typed_parse_error_reports_field_path_and_backup_fallback_safely() {
error.message
);
assert!(!error.message.contains("837465"));
- assert!(
- !error
- .message
- .contains(&directory.path().display().to_string())
- );
+ assert!(!error
+ .message
+ .contains(&directory.path().display().to_string()));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/checks/config_provenance_tests.rs b/crates/openhuman-core/src/doctor/checks/config_provenance_tests.rs
index cfdbf2ef73..537b774b8f 100644
--- a/crates/openhuman-core/src/doctor/checks/config_provenance_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/config_provenance_tests.rs
@@ -1,5 +1,5 @@
-use crate::config::Config;
use crate::config::schema::load::{DotenvLoadProvenance, ProvenanceSource};
+use crate::config::Config;
use super::contract::{
DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity, ValueSource,
diff --git a/crates/openhuman-core/src/doctor/checks/config_semantics.rs b/crates/openhuman-core/src/doctor/checks/config_semantics.rs
index b999bea0f0..1058cc7043 100644
--- a/crates/openhuman-core/src/doctor/checks/config_semantics.rs
+++ b/crates/openhuman-core/src/doctor/checks/config_semantics.rs
@@ -6,7 +6,7 @@ use async_trait::async_trait;
use crate::config::Config;
use crate::doctor::contract::{DoctorCheck, DoctorCtx, DoctorTier, Finding, FindingSeverity};
-use crate::storage::{STORAGE_URL_VAR, StorageUrl};
+use crate::storage::{StorageUrl, STORAGE_URL_VAR};
use tinystoragedrivers::{BlobConfig, StorageConfig};
const COMPONENTS_ID: &str = "components/referenced-but-disabled";
diff --git a/crates/openhuman-core/src/doctor/checks/config_semantics_tests.rs b/crates/openhuman-core/src/doctor/checks/config_semantics_tests.rs
index c5c7658010..3c39f4b390 100644
--- a/crates/openhuman-core/src/doctor/checks/config_semantics_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/config_semantics_tests.rs
@@ -1,4 +1,4 @@
-use crate::config::{Config, test_env::EnvVarGuard};
+use crate::config::{test_env::EnvVarGuard, Config};
use crate::doctor::contract::{DoctorCtx, DoctorOptions, Finding, FindingSeverity};
use crate::doctor::runner;
@@ -84,11 +84,9 @@ async fn disabled_memory_component_ignores_an_implicit_default_engine() {
let findings = run_check(config, "components/referenced-but-disabled").await;
- assert!(
- !findings
- .iter()
- .any(|finding| finding.severity == FindingSeverity::Warn)
- );
+ assert!(!findings
+ .iter()
+ .any(|finding| finding.severity == FindingSeverity::Warn));
}
#[tokio::test]
@@ -122,11 +120,9 @@ async fn disabled_memory_component_does_not_warn_for_explicit_none_engine() {
let findings = run_check(config, "components/referenced-but-disabled").await;
- assert!(
- !findings
- .iter()
- .any(|finding| finding.severity == FindingSeverity::Warn)
- );
+ assert!(!findings
+ .iter()
+ .any(|finding| finding.severity == FindingSeverity::Warn));
}
#[tokio::test]
@@ -204,11 +200,9 @@ async fn missing_storage_driver_is_reported_without_opening_the_backend() {
assert!(!error.message.contains("db.internal"));
}
#[cfg(feature = "storage-mongodb")]
- assert!(
- findings
- .iter()
- .any(|finding| finding.severity == FindingSeverity::Pass)
- );
+ assert!(findings
+ .iter()
+ .any(|finding| finding.severity == FindingSeverity::Pass));
}
#[cfg(not(feature = "storage-sqlite"))]
@@ -220,11 +214,9 @@ async fn sqlite_is_not_reported_missing_when_only_the_core_marker_is_off() {
let findings = run_check(config, "storage/url").await;
- assert!(
- findings
- .iter()
- .any(|finding| finding.severity == FindingSeverity::Pass)
- );
+ assert!(findings
+ .iter()
+ .any(|finding| finding.severity == FindingSeverity::Pass));
}
#[tokio::test]
@@ -316,11 +308,9 @@ async fn both_master_key_environment_sources_are_reported_without_initializing_k
let error = finding(&findings, FindingSeverity::Error);
assert!(!error.message.contains("do-not-read-inline"));
- assert!(
- !error
- .message
- .contains(&supplied_key_file.display().to_string())
- );
+ assert!(!error
+ .message
+ .contains(&supplied_key_file.display().to_string()));
assert_eq!(workspace_entries(workspace.path()), entries_before);
assert!(!supplied_key_file.exists());
assert!(!workspace.path().join("keyring/master.key").exists());
@@ -339,11 +329,9 @@ async fn empty_master_key_environment_sources_are_treated_as_unset() {
let findings = run_check(Config::default(), "secrets/master-key-env").await;
- assert!(
- findings
- .iter()
- .any(|finding| finding.severity == FindingSeverity::Pass)
- );
+ assert!(findings
+ .iter()
+ .any(|finding| finding.severity == FindingSeverity::Pass));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/checks/embeddings_live.rs b/crates/openhuman-core/src/doctor/checks/embeddings_live.rs
index 351e9173e8..5c0113ea29 100644
--- a/crates/openhuman-core/src/doctor/checks/embeddings_live.rs
+++ b/crates/openhuman-core/src/doctor/checks/embeddings_live.rs
@@ -3,7 +3,7 @@
use async_trait::async_trait;
use crate::doctor::{ComponentId, DoctorCheck, DoctorCtx, DoctorTier, Finding};
-use crate::inference::embedding_host::{InspectionEmbeddingError, probe_dimensions_for_inspection};
+use crate::inference::embedding_host::{probe_dimensions_for_inspection, InspectionEmbeddingError};
pub(super) struct EmbeddingsLiveCheck;
diff --git a/crates/openhuman-core/src/doctor/checks/embeddings_live_tests.rs b/crates/openhuman-core/src/doctor/checks/embeddings_live_tests.rs
index 89b18ddf04..468e2fc79d 100644
--- a/crates/openhuman-core/src/doctor/checks/embeddings_live_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/embeddings_live_tests.rs
@@ -5,10 +5,10 @@ use crate::core::slots::Extensions;
use crate::doctor::contract::{DoctorCheck, DoctorCtx, FindingSeverity};
use crate::inference::embedding_host::create_embedding_provider_for_inspection;
use crate::inference::provider::factory::PROVIDER_OPENHUMAN;
-use axum::{Json, Router, extract::State, routing::post};
+use axum::{extract::State, routing::post, Json, Router};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use tempfile::TempDir;
@@ -107,12 +107,10 @@ async fn managed_inspection_does_not_fall_back_to_the_mutable_provider_factory()
None,
)
.expect("inspection factory returns its unavailable placeholder");
- assert!(
- model
- .embed(&["fixed doctor probe".to_owned()])
- .await
- .is_err()
- );
+ assert!(model
+ .embed(&["fixed doctor probe".to_owned()])
+ .await
+ .is_err());
})
.await;
diff --git a/crates/openhuman-core/src/doctor/checks/embeddings_tests.rs b/crates/openhuman-core/src/doctor/checks/embeddings_tests.rs
index 56926a03bf..2642cdc89e 100644
--- a/crates/openhuman-core/src/doctor/checks/embeddings_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/embeddings_tests.rs
@@ -1,4 +1,4 @@
-use super::{ConfiguredModelCheck, model_matches};
+use super::{model_matches, ConfiguredModelCheck};
use crate::config::Config;
use crate::doctor::runner;
use crate::doctor::{DoctorCheck, DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity};
@@ -63,12 +63,10 @@ async fn missing_embedding_model_and_dimensions_are_reported() {
paths.contains(&"memory.embedding_dimensions"),
"missing dimensions path in findings: {findings:#?}"
);
- assert!(
- findings
- .iter()
- .filter(|result| result.check_id == EMBEDDINGS_CONFIG)
- .all(|result| result.severity == FindingSeverity::Error)
- );
+ assert!(findings
+ .iter()
+ .filter(|result| result.check_id == EMBEDDINGS_CONFIG)
+ .all(|result| result.severity == FindingSeverity::Error));
}
#[tokio::test]
@@ -159,18 +157,14 @@ async fn configured_ollama_model_uses_each_selected_config_base_url() {
finding.check_id == "embeddings/configured-model"
&& finding.severity == FindingSeverity::Error
}));
- assert!(
- request_a
- .await
- .expect("fake Ollama A request")
- .starts_with("GET /api/tags ")
- );
- assert!(
- request_b
- .await
- .expect("fake Ollama B request")
- .starts_with("GET /api/tags ")
- );
+ assert!(request_a
+ .await
+ .expect("fake Ollama A request")
+ .starts_with("GET /api/tags "));
+ assert!(request_b
+ .await
+ .expect("fake Ollama B request")
+ .starts_with("GET /api/tags "));
}
#[tokio::test]
@@ -187,11 +181,9 @@ async fn non_ollama_embedding_provider_is_skipped_instead_of_reported_healthy()
finding.check_id == "embeddings/configured-model"
&& finding.severity == FindingSeverity::Skipped
}));
- assert!(
- findings
- .iter()
- .all(|finding| finding.severity != FindingSeverity::Pass)
- );
+ assert!(findings
+ .iter()
+ .all(|finding| finding.severity != FindingSeverity::Pass));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/checks/inference_catalog.rs b/crates/openhuman-core/src/doctor/checks/inference_catalog.rs
index 8a1ceff54b..a8c75413aa 100644
--- a/crates/openhuman-core/src/doctor/checks/inference_catalog.rs
+++ b/crates/openhuman-core/src/doctor/checks/inference_catalog.rs
@@ -8,13 +8,13 @@ use std::time::{Duration, Instant};
use async_trait::async_trait;
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
-use crate::core::{Outcome, runtime::CoreContext};
+use crate::core::{runtime::CoreContext, Outcome};
use crate::doctor::{
contract::{DoctorCheck, DoctorCtx, DoctorTier, Finding, FindingSeverity},
core::{ModelProbeEntry, ModelProbeOutcome, ModelProbeReport, ModelProbeSummary},
};
use crate::inference::registry::{
- CatalogRequest, InspectionCatalogError, PreparedInspectionCatalog, inspection_catalog,
+ inspection_catalog, CatalogRequest, InspectionCatalogError, PreparedInspectionCatalog,
};
const CACHE_TTL: Duration = Duration::from_secs(60);
diff --git a/crates/openhuman-core/src/doctor/checks/inference_live.rs b/crates/openhuman-core/src/doctor/checks/inference_live.rs
index ac5213d6cc..3c223e081a 100644
--- a/crates/openhuman-core/src/doctor/checks/inference_live.rs
+++ b/crates/openhuman-core/src/doctor/checks/inference_live.rs
@@ -13,8 +13,8 @@ use crate::config::Config;
use crate::core::runtime::DispatchCtx;
use crate::doctor::{DoctorCheck, DoctorCtx, DoctorTier, Finding, FindingSeverity};
use crate::inference::provider::factory::{
- InspectionRequestIdentity, PreparedInspectionChatModel,
- create_chat_model_with_identity_in_for_inspection,
+ create_chat_model_with_identity_in_for_inspection, InspectionRequestIdentity,
+ PreparedInspectionChatModel,
};
const CATEGORY: &str = "live inference";
diff --git a/crates/openhuman-core/src/doctor/checks/inference_live_budget_tests.rs b/crates/openhuman-core/src/doctor/checks/inference_live_budget_tests.rs
index 53018a2d05..3fc1ef3e59 100644
--- a/crates/openhuman-core/src/doctor/checks/inference_live_budget_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/inference_live_budget_tests.rs
@@ -1,12 +1,12 @@
//! Output-budget capability tests for live inference checks.
-use super::inference_live::{LiveProbeCache, probe_prepared_model};
+use super::inference_live::{probe_prepared_model, LiveProbeCache};
use crate::doctor::FindingSeverity;
use crate::inference::provider::factory::{
InspectionOutputBudgetCapability, InspectionRequestIdentity, PreparedInspectionChatModel,
};
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};
struct InvocationCounter(Arc<AtomicUsize>);
diff --git a/crates/openhuman-core/src/doctor/checks/inference_live_tests.rs b/crates/openhuman-core/src/doctor/checks/inference_live_tests.rs
index 81ee66821b..aaa618de6a 100644
--- a/crates/openhuman-core/src/doctor/checks/inference_live_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/inference_live_tests.rs
@@ -1,11 +1,11 @@
//! Behaviour tests for the opt-in live inference checks.
-use crate::config::Config;
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
-use crate::config::schema::ephemeral_route::{EphemeralRoute, apply as apply_ephemeral_route};
+use crate::config::schema::ephemeral_route::{apply as apply_ephemeral_route, EphemeralRoute};
+use crate::config::Config;
use crate::core::runtime::{CoreContext, DomainSet};
use crate::doctor::{DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity};
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use wiremock::matchers::{method, path};
use wiremock::{Mock, MockServer, ResponseTemplate};
@@ -228,11 +228,9 @@ async fn live_chat_sends_the_fixed_short_prompt_and_reports_only_safe_metadata()
let body: Value = serde_json::from_slice(&requests[0].body).expect("request is JSON");
assert_eq!(body["messages"].as_array().unwrap().len(), 1);
assert_eq!(body["messages"][0]["content"], "Reply OK");
- assert!(
- body["max_tokens"]
- .as_u64()
- .is_some_and(|value| (1..=5).contains(&value))
- );
+ assert!(body["max_tokens"]
+ .as_u64()
+ .is_some_and(|value| (1..=5).contains(&value)));
assert_eq!(
requests[0]
.headers
@@ -300,11 +298,11 @@ async fn live_probe_uses_selected_doctor_config_inside_another_ambient_context()
#[tokio::test]
async fn managed_chat_probe_uses_the_inspection_only_factory_callback() {
use crate::inference::registry::{
- ChatModelRequest, InspectionChatModelFactory, register_inspection_chat_model_in,
+ register_inspection_chat_model_in, ChatModelRequest, InspectionChatModelFactory,
};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};
@@ -319,11 +317,9 @@ async fn managed_chat_probe_uses_the_inspection_only_factory_callback() {
self.0.fetch_add(1, Ordering::SeqCst);
assert_eq!(request.messages.len(), 1);
assert_eq!(request.messages[0].text(), "Reply OK");
- assert!(
- request
- .max_tokens
- .is_some_and(|value| (1..=5).contains(&value))
- );
+ assert!(request
+ .max_tokens
+ .is_some_and(|value| (1..=5).contains(&value)));
Ok(ModelResponse::assistant("OK"))
}
}
@@ -676,13 +672,11 @@ async fn connect_tier_skips_live_chat_without_sending_a_completion() {
assert!(!report.findings.iter().any(|result| {
result.check_id == "doctor/selection" && result.severity == FindingSeverity::Error
}));
- assert!(
- server
- .received_requests()
- .await
- .expect("mock records calls")
- .is_empty()
- );
+ assert!(server
+ .received_requests()
+ .await
+ .expect("mock records calls")
+ .is_empty());
}
#[test]
diff --git a/crates/openhuman-core/src/doctor/checks/inference_tests.rs b/crates/openhuman-core/src/doctor/checks/inference_tests.rs
index 1c014abf29..e7088fc6c5 100644
--- a/crates/openhuman-core/src/doctor/checks/inference_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/inference_tests.rs
@@ -1,9 +1,9 @@
-use crate::config::Config;
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
+use crate::config::Config;
use crate::doctor::runner;
use crate::doctor::{DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity};
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};
const PROVIDER_REF: &str = "inference/provider-ref";
@@ -397,7 +397,7 @@ async fn a_fully_configured_managed_default_constructs_cleanly() {
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
use crate::config::test_env::EnvVarGuard;
use crate::inference::provider::factory::PROVIDER_OPENHUMAN;
- use crate::inference::registry::{InspectionChatModelFactory, register_inspection_chat_model};
+ use crate::inference::registry::{register_inspection_chat_model, InspectionChatModelFactory};
struct ManagedModel {
generations: Arc<AtomicUsize>,
@@ -470,11 +470,9 @@ async fn a_fully_configured_managed_default_constructs_cleanly() {
"the managed provider factory must be consulted"
);
assert_eq!(generations.load(Ordering::SeqCst), 0);
- assert!(
- findings
- .iter()
- .all(|result| !result.message.contains("doctor-test-session-token"))
- );
+ assert!(findings
+ .iter()
+ .all(|result| !result.message.contains("doctor-test-session-token")));
assert!(!temp.path().join("auth-profiles.json").exists());
assert!(!temp.path().join("auth-profiles.lock").exists());
}
@@ -521,7 +519,7 @@ impl Drop for RegisterManagedModel {
#[tokio::test]
async fn embedding_only_configuration_does_not_construct_a_chat_model_for_embeddings() {
- use crate::inference::registry::{InspectionChatModelFactory, register_inspection_chat_model};
+ use crate::inference::registry::{register_inspection_chat_model, InspectionChatModelFactory};
let _inference_guard = crate::inference::inference_test_guard_async().await;
diff --git a/crates/openhuman-core/src/doctor/checks/integrations.rs b/crates/openhuman-core/src/doctor/checks/integrations.rs
index 4d243be366..8baf86c425 100644
--- a/crates/openhuman-core/src/doctor/checks/integrations.rs
+++ b/crates/openhuman-core/src/doctor/checks/integrations.rs
@@ -4,8 +4,8 @@ use std::sync::Arc;
use async_trait::async_trait;
use tinyconnectors_bus::{
- ComposioConnectedIntegrationsMode, ComposioConnectedIntegrationsResponse,
- ComposioListConnectedIntegrationsRequest, names::methods,
+ names::methods, ComposioConnectedIntegrationsMode, ComposioConnectedIntegrationsResponse,
+ ComposioListConnectedIntegrationsRequest,
};
use crate::config::Config;
diff --git a/crates/openhuman-core/src/doctor/checks/integrations_tests.rs b/crates/openhuman-core/src/doctor/checks/integrations_tests.rs
index bb3a5e2644..a21aedcd70 100644
--- a/crates/openhuman-core/src/doctor/checks/integrations_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/integrations_tests.rs
@@ -1,8 +1,8 @@
use super::*;
use crate::doctor::contract::{DoctorCtx, FindingSeverity};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
struct ExistingList {
diff --git a/crates/openhuman-core/src/doctor/checks/memory_live.rs b/crates/openhuman-core/src/doctor/checks/memory_live.rs
index 7b703bb1aa..8bd5ad5d02 100644
--- a/crates/openhuman-core/src/doctor/checks/memory_live.rs
+++ b/crates/openhuman-core/src/doctor/checks/memory_live.rs
@@ -148,10 +148,11 @@ impl Drop for ScopedScratchCleanup {
async fn roundtrip(engine: Arc<dyn MemoryEngine>, fetch_mode: FetchMode) -> Result<(), Finding> {
let nonce = uuid::Uuid::new_v4().simple().to_string();
- let namespace = Namespace::new(vec![
- Segment::new(SegmentKind::Service, format!("openhuman-doctor-{nonce}"))
- .expect("generated service namespace is valid"),
- ])
+ let namespace = Namespace::new(vec![Segment::new(
+ SegmentKind::Service,
+ format!("openhuman-doctor-{nonce}"),
+ )
+ .expect("generated service namespace is valid")])
.expect("one service namespace segment is valid");
let item = StoreItem::document(
"OpenHuman doctor memory roundtrip probe",
diff --git a/crates/openhuman-core/src/doctor/checks/memory_live_tests.rs b/crates/openhuman-core/src/doctor/checks/memory_live_tests.rs
index 11f99ad840..c1046bacf8 100644
--- a/crates/openhuman-core/src/doctor/checks/memory_live_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/memory_live_tests.rs
@@ -1,4 +1,4 @@
-use super::{MemoryRoundtripCheck, Operation, failure_finding};
+use super::{failure_finding, MemoryRoundtripCheck, Operation};
use crate::config::Config;
use crate::core::runtime::{CoreContext, DomainSet};
use crate::core::slots::Extensions;
@@ -6,8 +6,8 @@ use crate::doctor::contract::{DoctorCheck, DoctorCtx, FindingSeverity};
use crate::memory::test_fixtures::stored;
use async_trait::async_trait;
use std::sync::{
- Arc, Mutex,
atomic::{AtomicUsize, Ordering},
+ Arc, Mutex,
};
use tempfile::TempDir;
use tinymemory_api::conformance::ReferenceEngine;
@@ -270,11 +270,9 @@ async fn fetch_failure_still_cleans_the_unique_service_scoped_item() {
let (scratch_id, namespace) = &calls.stored[0];
assert_ne!(scratch_id, &real_id);
assert_ne!(scratch_id.as_str(), "doctor:probe");
- assert!(
- namespace
- .to_string()
- .starts_with("service:openhuman-doctor-")
- );
+ assert!(namespace
+ .to_string()
+ .starts_with("service:openhuman-doctor-"));
assert!(!Reach::subtree(Namespace::ROOT).admits(namespace));
assert_eq!(calls.scoped_forgets.len(), 1);
assert_eq!(calls.scoped_forgets[0].0, vec![scratch_id.clone()]);
@@ -349,23 +347,17 @@ fn plan_required_memory_failure_has_safe_plan_guidance_and_cleanup_warning() {
);
assert_eq!(finding.severity, FindingSeverity::Error);
- assert!(
- finding
- .message
- .contains("not included in the selected account's plan")
- );
+ assert!(finding
+ .message
+ .contains("not included in the selected account's plan"));
assert!(!finding.message.contains("MEMORY_PLAN_REQUIRED"));
assert!(!finding.message.contains("private-host.example"));
- assert!(
- finding
- .fix_hint
- .contains("Upgrade to a plan that includes memory")
- );
- assert!(
- finding
- .fix_hint
- .contains("could not confirm scratch cleanup")
- );
+ assert!(finding
+ .fix_hint
+ .contains("Upgrade to a plan that includes memory"));
+ assert!(finding
+ .fix_hint
+ .contains("could not confirm scratch cleanup"));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/checks/memory_tests.rs b/crates/openhuman-core/src/doctor/checks/memory_tests.rs
index 443b9ed6f5..00c9f6954d 100644
--- a/crates/openhuman-core/src/doctor/checks/memory_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/memory_tests.rs
@@ -3,13 +3,13 @@ use crate::core::runtime::ComponentSet;
use crate::core::runtime::{CoreContext, DomainSet};
use crate::core::slots::Extensions;
use crate::doctor::contract::{DoctorConfigSource, DoctorCtx, FindingSeverity};
-use crate::memory::engine::{Binding, DISABLED_ENGINE, EngineHealth};
+use crate::memory::engine::{Binding, EngineHealth, DISABLED_ENGINE};
use crate::memory::engine_registry::{
- EngineEntry, EngineFuture, ReadOnlyHealthProbe, register_memory_engine_in,
- register_memory_health_probe_in,
+ register_memory_engine_in, register_memory_health_probe_in, EngineEntry, EngineFuture,
+ ReadOnlyHealthProbe,
};
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
fn context(engine: &str) -> DoctorCtx {
let mut config = crate::config::Config::default();
diff --git a/crates/openhuman-core/src/doctor/checks/runtime_settings_tests.rs b/crates/openhuman-core/src/doctor/checks/runtime_settings_tests.rs
index 3e8d3a9d69..69449b8d90 100644
--- a/crates/openhuman-core/src/doctor/checks/runtime_settings_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/runtime_settings_tests.rs
@@ -60,23 +60,19 @@ async fn former_runtime_settings_findings_keep_their_paths_without_exposing_valu
"missing {path} finding: {findings:#?}"
);
}
- assert!(
- findings
- .iter()
- .filter(|finding| finding.check_id == ID)
- .all(|finding| finding.severity == FindingSeverity::Warn
- && !finding.fix_hint.trim().is_empty())
- );
+ assert!(findings
+ .iter()
+ .filter(|finding| finding.check_id == ID)
+ .all(|finding| finding.severity == FindingSeverity::Warn
+ && !finding.fix_hint.trim().is_empty()));
assert!(findings.iter().all(|finding| {
!finding.message.contains("private-model-name")
&& !finding.message.contains("private-route-name")
&& !finding.message.contains("private-agent-name")
}));
- assert!(
- !findings
- .iter()
- .any(|finding| finding.check_id == "doctor/selection")
- );
+ assert!(!findings
+ .iter()
+ .any(|finding| finding.check_id == "doctor/selection"));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/checks/runtime_tests.rs b/crates/openhuman-core/src/doctor/checks/runtime_tests.rs
index 5370f21712..464d97cc62 100644
--- a/crates/openhuman-core/src/doctor/checks/runtime_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/runtime_tests.rs
@@ -42,11 +42,9 @@ fn environment_check_resolves_git_and_curl_from_path_without_running_them() {
&& finding.severity == FindingSeverity::Pass
&& finding.config_path.as_deref() == Some("PATH/curl")
}));
- assert!(
- findings
- .iter()
- .all(|finding| !finding.message.contains("/isolated/home"))
- );
+ assert!(findings
+ .iter()
+ .all(|finding| !finding.message.contains("/isolated/home")));
assert!(
!marker.exists(),
"static environment checks must not spawn tools"
diff --git a/crates/openhuman-core/src/doctor/checks/sandbox.rs b/crates/openhuman-core/src/doctor/checks/sandbox.rs
index 821ae6e6da..68fcb25894 100644
--- a/crates/openhuman-core/src/doctor/checks/sandbox.rs
+++ b/crates/openhuman-core/src/doctor/checks/sandbox.rs
@@ -44,9 +44,9 @@ impl SandboxProbe for HostSandboxProbe {
async fn landlock_status(&self) -> LandlockStatus {
#[cfg(all(target_os = "linux", feature = "modules"))]
{
- use crate::modules::runtime::{ExistingModuleCallError, call_if_ready};
- use crate::modules::tinybox::contract::JailStatus;
+ use crate::modules::runtime::{call_if_ready, ExistingModuleCallError};
use crate::modules::tinybox::contract::names::JAIL_STATUS;
+ use crate::modules::tinybox::contract::JailStatus;
return match call_if_ready::<_, JailStatus>(
crate::modules::tinybox::MODULE_ID,
diff --git a/crates/openhuman-core/src/doctor/checks/search.rs b/crates/openhuman-core/src/doctor/checks/search.rs
index 92aa5a356b..d0838fb679 100644
--- a/crates/openhuman-core/src/doctor/checks/search.rs
+++ b/crates/openhuman-core/src/doctor/checks/search.rs
@@ -165,11 +165,12 @@ fn direct_key_path(provider: &str) -> String {
/// token.
fn managed_credential_available(config: &Config) -> bool {
use crate::security::credentials::{
- APP_SESSION_PROVIDER, AuthService, api_key,
+ api_key,
session_support::{
- SessionTokenCheck, check_session_backend, classify_session_token,
- is_local_session_token,
+ check_session_backend, classify_session_token, is_local_session_token,
+ SessionTokenCheck,
},
+ AuthService, APP_SESSION_PROVIDER,
};
if api_key::get_api_key_read_only(config)
diff --git a/crates/openhuman-core/src/doctor/checks/search_tests.rs b/crates/openhuman-core/src/doctor/checks/search_tests.rs
index e960eebf9f..2a3bab5da5 100644
--- a/crates/openhuman-core/src/doctor/checks/search_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/search_tests.rs
@@ -4,8 +4,8 @@ use crate::config::{
};
use crate::doctor::contract::{DoctorCtx, FindingSeverity};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
struct FixedManagedResolver {
diff --git a/crates/openhuman-core/src/doctor/checks/skills_tests.rs b/crates/openhuman-core/src/doctor/checks/skills_tests.rs
index 764b49ac0b..765a559145 100644
--- a/crates/openhuman-core/src/doctor/checks/skills_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/skills_tests.rs
@@ -35,11 +35,9 @@ async fn github_preflight_is_not_registered_when_no_skill_requires_it() {
.await;
assert!(checks.iter().any(|check| check.id() == "skills/discovery"));
- assert!(
- checks
- .iter()
- .all(|check| check.id() != "skills/github-preflight")
- );
+ assert!(checks
+ .iter()
+ .all(|check| check.id() != "skills/github-preflight"));
}
#[derive(Default)]
@@ -94,11 +92,9 @@ async fn required_github_preflight_uses_fake_probes_and_redacts_error_details()
.await;
let required = required.expect("the workflow explicitly requires GitHub");
assert_eq!(required.path, manifest);
- assert!(
- checks
- .iter()
- .any(|check| check.id() == "skills/github-preflight")
- );
+ assert!(checks
+ .iter()
+ .any(|check| check.id() == "skills/github-preflight"));
let check = GithubPreflightCheck {
required: required.config,
@@ -111,11 +107,9 @@ async fn required_github_preflight_uses_fake_probes_and_redacts_error_details()
.remove(0);
assert_eq!(finding.severity, FindingSeverity::Error);
- assert!(
- finding
- .message
- .contains("GitHub integration is not connected")
- );
+ assert!(finding
+ .message
+ .contains("GitHub integration is not connected"));
assert!(!finding.message.contains("private"));
assert!(!finding.message.contains("example.test"));
assert_eq!(
@@ -125,8 +119,8 @@ async fn required_github_preflight_uses_fake_probes_and_redacts_error_details()
}
#[tokio::test]
-async fn production_github_preflight_skips_expired_profile_without_mutating_credentials_or_loading_connectors()
- {
+async fn production_github_preflight_skips_expired_profile_without_mutating_credentials_or_loading_connectors(
+) {
let scratch = tempfile::tempdir().expect("create isolated preflight fixture");
let config = config_in(scratch.path());
let _env = crate::config::test_env::EnvVarGuard::locked_async()
@@ -208,8 +202,8 @@ async fn production_github_preflight_skips_expired_profile_without_mutating_cred
}
#[tokio::test]
-async fn production_github_preflight_skips_malformed_profile_without_quarantining_or_loading_connectors()
- {
+async fn production_github_preflight_skips_malformed_profile_without_quarantining_or_loading_connectors(
+) {
let scratch = tempfile::tempdir().expect("create isolated preflight fixture");
let config = config_in(scratch.path());
let _env = crate::config::test_env::EnvVarGuard::locked_async()
@@ -253,14 +247,12 @@ async fn production_github_preflight_skips_malformed_profile_without_quarantinin
assert_eq!(std::fs::read(&profiles).unwrap(), malformed);
assert!(!scratch.path().join("auth-profiles.lock").exists());
- assert!(
- !scratch
- .path()
- .read_dir()
- .unwrap()
- .filter_map(Result::ok)
- .any(|entry| entry.file_name().to_string_lossy().contains("corrupt"))
- );
+ assert!(!scratch
+ .path()
+ .read_dir()
+ .unwrap()
+ .filter_map(Result::ok)
+ .any(|entry| entry.file_name().to_string_lossy().contains("corrupt")));
assert_eq!(findings.len(), 1);
assert_eq!(findings[0].severity, FindingSeverity::Skipped);
assert!(findings[0].message.contains("unavailable"));
diff --git a/crates/openhuman-core/src/doctor/checks/voice.rs b/crates/openhuman-core/src/doctor/checks/voice.rs
index f4656b439b..e7dd90ced4 100644
--- a/crates/openhuman-core/src/doctor/checks/voice.rs
+++ b/crates/openhuman-core/src/doctor/checks/voice.rs
@@ -203,7 +203,7 @@ fn is_hosted_slug(slug: &str) -> bool {
}
fn provider_credential_present_read_only(config: &Config, slug: &str) -> bool {
- use crate::security::credentials::{AuthService, profiles::AuthProfileKind};
+ use crate::security::credentials::{profiles::AuthProfileKind, AuthService};
let key = crate::inference::provider::factory::auth_key_for_slug(slug);
for provider in [key.as_str(), slug] {
diff --git a/crates/openhuman-core/src/doctor/checks/voice_tests.rs b/crates/openhuman-core/src/doctor/checks/voice_tests.rs
index 55ae7cad6d..c7001f4c3f 100644
--- a/crates/openhuman-core/src/doctor/checks/voice_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/voice_tests.rs
@@ -1,8 +1,8 @@
use super::*;
use crate::doctor::contract::{DoctorCtx, FindingSeverity};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
struct FixedVoiceStatus {
@@ -90,11 +90,9 @@ async fn voice_checks_inspect_the_selected_config_without_starting_audio_runtime
})
.await;
assert_eq!(findings.len(), 2);
- assert!(
- findings
- .iter()
- .all(|finding| finding.severity == FindingSeverity::Pass)
- );
+ assert!(findings
+ .iter()
+ .all(|finding| finding.severity == FindingSeverity::Pass));
assert_eq!(calls.load(Ordering::SeqCst), 2);
assert_eq!(
*probe.workspace.lock().unwrap(),
diff --git a/crates/openhuman-core/src/doctor/checks/wallet_tests.rs b/crates/openhuman-core/src/doctor/checks/wallet_tests.rs
index cd1a46af03..8f1824e35f 100644
--- a/crates/openhuman-core/src/doctor/checks/wallet_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/wallet_tests.rs
@@ -2,8 +2,8 @@ use super::*;
use crate::doctor::contract::{DoctorCtx, FindingSeverity};
#[cfg(feature = "web3")]
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
#[cfg(feature = "web3")]
diff --git a/crates/openhuman-core/src/doctor/checks/workspace_tests.rs b/crates/openhuman-core/src/doctor/checks/workspace_tests.rs
index 4b47f6758d..1adb3011d0 100644
--- a/crates/openhuman-core/src/doctor/checks/workspace_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/workspace_tests.rs
@@ -143,18 +143,14 @@ async fn writable_probe_succeeds_and_leaves_the_selected_workspace_unchanged() {
let report = run_only(config, "workspace/writable").await;
- assert!(
- report
- .checks_run
- .iter()
- .any(|id| id == "workspace/writable")
- );
- assert!(
- !report
- .findings
- .iter()
- .any(|finding| finding.check_id == "doctor/selection")
- );
+ assert!(report
+ .checks_run
+ .iter()
+ .any(|id| id == "workspace/writable"));
+ assert!(!report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "doctor/selection"));
assert!(report.findings.iter().any(|finding| {
finding.check_id == "workspace/writable" && finding.severity == FindingSeverity::Pass
}));
@@ -181,18 +177,14 @@ async fn read_only_workspace_is_reported_by_the_native_writable_check() {
before, after,
"the static probe must clean up its scratch file"
);
- assert!(
- report
- .checks_run
- .iter()
- .any(|id| id == "workspace/writable")
- );
- assert!(
- !report
- .findings
- .iter()
- .any(|finding| finding.check_id == "doctor/selection")
- );
+ assert!(report
+ .checks_run
+ .iter()
+ .any(|id| id == "workspace/writable"));
+ assert!(!report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "doctor/selection"));
let finding = report
.findings
.iter()
@@ -278,12 +270,10 @@ async fn workspace_layout_finding_uses_the_registered_native_id() {
let report = run_only(config, "workspace/layout").await;
assert!(report.checks_run.iter().any(|id| id == "workspace/layout"));
- assert!(
- !report
- .findings
- .iter()
- .any(|finding| finding.check_id == "doctor/selection")
- );
+ assert!(!report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "doctor/selection"));
assert!(report.findings.iter().any(|finding| {
finding.check_id == "workspace/layout" && finding.severity == FindingSeverity::Warn
}));
diff --git a/crates/openhuman-core/src/doctor/config_file_tests.rs b/crates/openhuman-core/src/doctor/config_file_tests.rs
index 7424c87bad..5ff9188ef8 100644
--- a/crates/openhuman-core/src/doctor/config_file_tests.rs
+++ b/crates/openhuman-core/src/doctor/config_file_tests.rs
@@ -77,11 +77,9 @@ async fn typed_parse_error_reports_field_path_and_backup_fallback_safely() {
error.message
);
assert!(!error.message.contains("837465"));
- assert!(
- !error
- .message
- .contains(&directory.path().display().to_string())
- );
+ assert!(!error
+ .message
+ .contains(&directory.path().display().to_string()));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/config_provenance_tests.rs b/crates/openhuman-core/src/doctor/config_provenance_tests.rs
index 06ced1d218..dc5489f59a 100644
--- a/crates/openhuman-core/src/doctor/config_provenance_tests.rs
+++ b/crates/openhuman-core/src/doctor/config_provenance_tests.rs
@@ -1,5 +1,5 @@
-use crate::config::Config;
use crate::config::schema::load::{DotenvLoadProvenance, ProvenanceSource};
+use crate::config::Config;
use super::contract::{DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity};
use super::runner;
diff --git a/crates/openhuman-core/src/doctor/config_semantics_tests.rs b/crates/openhuman-core/src/doctor/config_semantics_tests.rs
index ea8566b04e..2445d5bcb1 100644
--- a/crates/openhuman-core/src/doctor/config_semantics_tests.rs
+++ b/crates/openhuman-core/src/doctor/config_semantics_tests.rs
@@ -1,4 +1,4 @@
-use crate::config::{Config, test_env::EnvVarGuard};
+use crate::config::{test_env::EnvVarGuard, Config};
use crate::doctor::contract::{DoctorCtx, DoctorOptions, Finding, FindingSeverity};
use crate::doctor::runner;
@@ -130,11 +130,9 @@ async fn missing_storage_driver_is_reported_without_opening_the_backend() {
assert!(!error.message.contains("db.internal"));
}
#[cfg(feature = "storage-mongodb")]
- assert!(
- findings
- .iter()
- .any(|finding| finding.severity == FindingSeverity::Pass)
- );
+ assert!(findings
+ .iter()
+ .any(|finding| finding.severity == FindingSeverity::Pass));
}
#[tokio::test]
@@ -212,11 +210,9 @@ async fn both_master_key_environment_sources_are_reported_without_initializing_k
let error = finding(&findings, FindingSeverity::Error);
assert!(!error.message.contains("do-not-read-inline"));
- assert!(
- !error
- .message
- .contains(&supplied_key_file.display().to_string())
- );
+ assert!(!error
+ .message
+ .contains(&supplied_key_file.display().to_string()));
assert_eq!(workspace_entries(workspace.path()), entries_before);
assert!(!supplied_key_file.exists());
assert!(!workspace.path().join("keyring/master.key").exists());
diff --git a/crates/openhuman-core/src/doctor/connectivity_tests.rs b/crates/openhuman-core/src/doctor/connectivity_tests.rs
index 310d6b8474..00894d9557 100644
--- a/crates/openhuman-core/src/doctor/connectivity_tests.rs
+++ b/crates/openhuman-core/src/doctor/connectivity_tests.rs
@@ -4,8 +4,8 @@ use async_trait::async_trait;
use super::contract::{DoctorCtx, DoctorOptions, FindingSeverity};
use super::runner;
-use crate::config::Config;
use crate::config::schema::StorageConfig;
+use crate::config::Config;
struct DownMemoryEngine {
inner: tinymemory_api::conformance::ReferenceEngine,
diff --git a/crates/openhuman-core/src/doctor/contract.rs b/crates/openhuman-core/src/doctor/contract.rs
index fb260be98f..99a3048ba7 100644
--- a/crates/openhuman-core/src/doctor/contract.rs
+++ b/crates/openhuman-core/src/doctor/contract.rs
@@ -6,9 +6,9 @@ use std::time::Duration;
use async_trait::async_trait;
use serde::{Deserialize, Serialize};
-use crate::config::Config;
use crate::config::schema::load::ProvenanceSource;
use crate::config::schema::profile_layout::LayoutVersion;
+use crate::config::Config;
use crate::core::runtime::{ComponentSet, CoreContext};
/// The maximum cost a caller permits for a doctor run.
diff --git a/crates/openhuman-core/src/doctor/embeddings_config_tests.rs b/crates/openhuman-core/src/doctor/embeddings_config_tests.rs
index 9b87619121..11eafd5094 100644
--- a/crates/openhuman-core/src/doctor/embeddings_config_tests.rs
+++ b/crates/openhuman-core/src/doctor/embeddings_config_tests.rs
@@ -62,10 +62,8 @@ async fn missing_embedding_model_and_dimensions_are_reported() {
paths.contains(&"memory.embedding_dimensions"),
"missing dimensions path in findings: {findings:#?}"
);
- assert!(
- findings
- .iter()
- .filter(|result| result.check_id == EMBEDDINGS_CONFIG)
- .all(|result| result.severity == FindingSeverity::Error)
- );
+ assert!(findings
+ .iter()
+ .filter(|result| result.check_id == EMBEDDINGS_CONFIG)
+ .all(|result| result.severity == FindingSeverity::Error));
}
diff --git a/crates/openhuman-core/src/doctor/inference_auth_error_tests.rs b/crates/openhuman-core/src/doctor/inference_auth_error_tests.rs
index c284e82345..4996597705 100644
--- a/crates/openhuman-core/src/doctor/inference_auth_error_tests.rs
+++ b/crates/openhuman-core/src/doctor/inference_auth_error_tests.rs
@@ -1,17 +1,17 @@
-use super::{DoctorOptions, FindingSeverity, ops::doctor_report_with_options};
-use crate::config::Config;
+use super::{ops::doctor_report_with_options, DoctorOptions, FindingSeverity};
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
+use crate::config::Config;
use crate::security::credentials::{AuthService, DEFAULT_AUTH_PROFILE_NAME};
use axum::{
- Json, Router,
extract::State,
http::{HeaderMap, StatusCode},
response::{IntoResponse, Response},
routing::get,
+ Json, Router,
};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use std::time::Duration;
@@ -193,8 +193,8 @@ fn register_test_inspection_catalog(
endpoint: String,
) -> Arc<AtomicUsize> {
use crate::inference::registry::{
- InspectionCatalogError, InspectionCatalogListing, PreparedInspectionCatalog,
- register_inspection_catalog_in,
+ register_inspection_catalog_in, InspectionCatalogError, InspectionCatalogListing,
+ PreparedInspectionCatalog,
};
let requests = Arc::new(AtomicUsize::new(0));
@@ -306,37 +306,31 @@ async fn process_auth_error_is_not_attributed_across_desktop_workspaces() {
},
)
.await;
- assert!(
- report_b_without_failure
- .value
- .checks_run
- .iter()
- .any(|id| id == "inference/auth-errors")
- );
- assert!(
- report_b_without_failure
- .value
- .findings
- .iter()
- .all(|finding| {
- finding.check_id != "inference/auth-errors"
- || finding.severity != FindingSeverity::Error
- })
- );
- assert!(
- report_b_without_failure
- .value
- .findings
- .iter()
- .all(|finding| {
- !finding
+ assert!(report_b_without_failure
+ .value
+ .checks_run
+ .iter()
+ .any(|id| id == "inference/auth-errors"));
+ assert!(report_b_without_failure
+ .value
+ .findings
+ .iter()
+ .all(|finding| {
+ finding.check_id != "inference/auth-errors"
+ || finding.severity != FindingSeverity::Error
+ }));
+ assert!(report_b_without_failure
+ .value
+ .findings
+ .iter()
+ .all(|finding| {
+ !finding
+ .message
+ .contains(config_a.workspace_dir.to_string_lossy().as_ref())
+ && !finding
.message
- .contains(config_a.workspace_dir.to_string_lossy().as_ref())
- && !finding
- .message
- .contains(config_b.workspace_dir.to_string_lossy().as_ref())
- })
- );
+ .contains(config_b.workspace_dir.to_string_lossy().as_ref())
+ }));
let report_a = report_for_context(
&config_a,
@@ -381,16 +375,14 @@ async fn process_auth_error_is_not_attributed_across_desktop_workspaces() {
},
)
.await;
- assert!(
- report_a_after_b_failure
- .value
- .findings
- .iter()
- .any(|finding| {
- finding.check_id == "inference/auth-errors"
- && finding.severity == FindingSeverity::Error
- })
- );
+ assert!(report_a_after_b_failure
+ .value
+ .findings
+ .iter()
+ .any(|finding| {
+ finding.check_id == "inference/auth-errors"
+ && finding.severity == FindingSeverity::Error
+ }));
assert_eq!(
crate::inference::auth_error_registry::snapshot()
.iter()
@@ -500,32 +492,26 @@ async fn process_auth_error_is_attributed_to_the_matching_saas_profile() {
},
)
.await;
- assert!(
- report_b_without_failure
- .value
- .checks_run
- .iter()
- .any(|id| id == "inference/auth-errors")
- );
- assert!(
- report_b_without_failure
- .value
- .findings
- .iter()
- .all(|finding| {
- finding.check_id != "inference/auth-errors"
- || finding.severity != FindingSeverity::Error
- })
- );
- assert!(
- report_b_without_failure
- .value
- .findings
- .iter()
- .all(|finding| {
- !finding.message.contains("tenant-a") && !finding.message.contains("tenant-b")
- })
- );
+ assert!(report_b_without_failure
+ .value
+ .checks_run
+ .iter()
+ .any(|id| id == "inference/auth-errors"));
+ assert!(report_b_without_failure
+ .value
+ .findings
+ .iter()
+ .all(|finding| {
+ finding.check_id != "inference/auth-errors"
+ || finding.severity != FindingSeverity::Error
+ }));
+ assert!(report_b_without_failure
+ .value
+ .findings
+ .iter()
+ .all(|finding| {
+ !finding.message.contains("tenant-a") && !finding.message.contains("tenant-b")
+ }));
let report_a = report_for_profile(
&config,
@@ -567,16 +553,14 @@ async fn process_auth_error_is_attributed_to_the_matching_saas_profile() {
},
)
.await;
- assert!(
- report_a_after_b_failure
- .value
- .findings
- .iter()
- .any(|finding| {
- finding.check_id == "inference/auth-errors"
- && finding.severity == FindingSeverity::Error
- })
- );
+ assert!(report_a_after_b_failure
+ .value
+ .findings
+ .iter()
+ .any(|finding| {
+ finding.check_id == "inference/auth-errors"
+ && finding.severity == FindingSeverity::Error
+ }));
assert_eq!(
crate::inference::auth_error_registry::snapshot()
.iter()
@@ -604,13 +588,11 @@ async fn an_unscoped_legacy_auth_error_is_reported_without_blame_to_profile_b()
)
.await;
- assert!(
- report
- .value
- .checks_run
- .iter()
- .any(|id| id == "inference/auth-errors")
- );
+ assert!(report
+ .value
+ .checks_run
+ .iter()
+ .any(|id| id == "inference/auth-errors"));
assert!(report.value.findings.iter().any(|finding| {
finding.check_id == "inference/auth-errors"
&& finding.severity == FindingSeverity::Info
diff --git a/crates/openhuman-core/src/doctor/inference_catalog_test_support.rs b/crates/openhuman-core/src/doctor/inference_catalog_test_support.rs
index 961594754e..f3ea1698da 100644
--- a/crates/openhuman-core/src/doctor/inference_catalog_test_support.rs
+++ b/crates/openhuman-core/src/doctor/inference_catalog_test_support.rs
@@ -1,17 +1,17 @@
-use super::{DoctorOptions, ops::doctor_report_with_options};
-use crate::config::Config;
+use super::{ops::doctor_report_with_options, DoctorOptions};
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
+use crate::config::Config;
use crate::security::credentials::{AuthService, DEFAULT_AUTH_PROFILE_NAME};
use axum::{
- Json, Router,
extract::State,
http::{HeaderMap, StatusCode},
response::{IntoResponse, Response},
routing::get,
+ Json, Router,
};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use std::time::Duration;
@@ -200,8 +200,8 @@ pub(super) fn register_test_inspection_catalog(
endpoint: String,
) -> Arc<AtomicUsize> {
use crate::inference::registry::{
- InspectionCatalogError, InspectionCatalogListing, PreparedInspectionCatalog,
- register_inspection_catalog_in,
+ register_inspection_catalog_in, InspectionCatalogError, InspectionCatalogListing,
+ PreparedInspectionCatalog,
};
let requests = Arc::new(AtomicUsize::new(0));
diff --git a/crates/openhuman-core/src/doctor/inference_catalog_tests.rs b/crates/openhuman-core/src/doctor/inference_catalog_tests.rs
index c2647ebdba..4909d945ef 100644
--- a/crates/openhuman-core/src/doctor/inference_catalog_tests.rs
+++ b/crates/openhuman-core/src/doctor/inference_catalog_tests.rs
@@ -1,19 +1,19 @@
use super::{
- DoctorOptions, FindingSeverity, ModelProbeOutcome,
ops::{doctor_models, doctor_report_with_options},
+ DoctorOptions, FindingSeverity, ModelProbeOutcome,
};
-use crate::config::Config;
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
+use crate::config::Config;
use axum::{
- Json, Router,
extract::State,
http::{HeaderMap, StatusCode},
response::{IntoResponse, Response},
routing::get,
+ Json, Router,
};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use std::time::Duration;
@@ -217,8 +217,8 @@ fn register_test_inspection_catalog(
endpoint: String,
) -> Arc<AtomicUsize> {
use crate::inference::registry::{
- InspectionCatalogError, InspectionCatalogListing, PreparedInspectionCatalog,
- register_inspection_catalog_in,
+ register_inspection_catalog_in, InspectionCatalogError, InspectionCatalogListing,
+ PreparedInspectionCatalog,
};
let requests = Arc::new(AtomicUsize::new(0));
@@ -517,10 +517,10 @@ async fn a_slow_provider_times_out_without_blocking_the_other_catalog() {
#[tokio::test]
async fn doctor_models_uses_read_only_http_without_calling_the_mutable_catalog() {
- use crate::core::Outcome;
use crate::core::runtime::{CoreContext, DomainSet};
use crate::core::slots::Extensions;
- use crate::inference::registry::{CatalogEntry, CatalogListing, register_catalog_in};
+ use crate::core::Outcome;
+ use crate::inference::registry::{register_catalog_in, CatalogEntry, CatalogListing};
let (endpoint, server) =
spawn_catalog_server(StatusCode::OK, catalog_body(&["must-not-be-used"]), true).await;
diff --git a/crates/openhuman-core/src/doctor/inference_config_tests.rs b/crates/openhuman-core/src/doctor/inference_config_tests.rs
index 7426043f4b..f679392dde 100644
--- a/crates/openhuman-core/src/doctor/inference_config_tests.rs
+++ b/crates/openhuman-core/src/doctor/inference_config_tests.rs
@@ -1,8 +1,8 @@
use crate::config::Config;
use crate::doctor::runner;
use crate::doctor::{DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity};
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};
const PROVIDER_REF: &str = "inference/provider-ref";
@@ -138,7 +138,7 @@ async fn a_fully_configured_managed_default_constructs_cleanly() {
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
use crate::config::test_env::EnvVarGuard;
use crate::inference::provider::factory::PROVIDER_OPENHUMAN;
- use crate::inference::registry::{InspectionChatModelFactory, register_inspection_chat_model};
+ use crate::inference::registry::{register_inspection_chat_model, InspectionChatModelFactory};
struct ManagedModel {
generations: Arc<AtomicUsize>,
@@ -210,11 +210,9 @@ async fn a_fully_configured_managed_default_constructs_cleanly() {
"the managed provider factory must be consulted"
);
assert_eq!(generations.load(Ordering::SeqCst), 0);
- assert!(
- findings
- .iter()
- .all(|result| !result.message.contains("doctor-test-session-token"))
- );
+ assert!(findings
+ .iter()
+ .all(|result| !result.message.contains("doctor-test-session-token")));
assert!(!temp.path().join("auth-profiles.json").exists());
assert!(!temp.path().join("auth-profiles.lock").exists());
}
diff --git a/crates/openhuman-core/src/doctor/inference_model_catalog_tests.rs b/crates/openhuman-core/src/doctor/inference_model_catalog_tests.rs
index ac0bb9fd0e..6d9b2a7e38 100644
--- a/crates/openhuman-core/src/doctor/inference_model_catalog_tests.rs
+++ b/crates/openhuman-core/src/doctor/inference_model_catalog_tests.rs
@@ -1,21 +1,21 @@
use super::{
- DoctorOptions, FindingSeverity, ModelProbeOutcome,
ops::{doctor_models, doctor_report_with_options},
+ DoctorOptions, FindingSeverity, ModelProbeOutcome,
};
-use crate::config::Config;
-use crate::config::schema::ModelRouteConfig;
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
+use crate::config::schema::ModelRouteConfig;
+use crate::config::Config;
use crate::security::credentials::{AuthService, DEFAULT_AUTH_PROFILE_NAME};
use axum::{
- Json, Router,
extract::State,
http::{HeaderMap, StatusCode},
response::{IntoResponse, Response},
routing::get,
+ Json, Router,
};
use std::sync::{
- Arc,
atomic::{AtomicUsize, Ordering},
+ Arc,
};
use std::time::Duration;
@@ -199,8 +199,8 @@ fn register_test_inspection_catalog(
endpoint: String,
) -> Arc<AtomicUsize> {
use crate::inference::registry::{
- InspectionCatalogError, InspectionCatalogListing, PreparedInspectionCatalog,
- register_inspection_catalog_in,
+ register_inspection_catalog_in, InspectionCatalogError, InspectionCatalogListing,
+ PreparedInspectionCatalog,
};
let requests = Arc::new(AtomicUsize::new(0));
@@ -339,12 +339,10 @@ async fn doctor_models_skips_a_provider_without_a_models_route() {
assert_eq!(report.value.summary.skipped, 1);
assert_eq!(report.value.summary.errors, 0);
assert_eq!(report.value.entries[0].outcome, ModelProbeOutcome::Skipped);
- assert!(
- report.value.entries[0]
- .message
- .as_deref()
- .is_some_and(|message| message.to_ascii_lowercase().contains("models"))
- );
+ assert!(report.value.entries[0]
+ .message
+ .as_deref()
+ .is_some_and(|message| message.to_ascii_lowercase().contains("models")));
assert_eq!(server.requests.load(Ordering::SeqCst), 1);
}
@@ -378,13 +376,11 @@ async fn model_in_catalog_check_skips_a_provider_without_a_models_route() {
.await
.expect("scoped doctor report");
- assert!(
- report
- .value
- .checks_run
- .iter()
- .any(|id| id == "inference/model-in-catalog")
- );
+ assert!(report
+ .value
+ .checks_run
+ .iter()
+ .any(|id| id == "inference/model-in-catalog"));
assert!(report.value.findings.iter().any(|finding| {
finding.check_id == "inference/model-in-catalog"
&& finding.severity == FindingSeverity::Skipped
@@ -457,13 +453,11 @@ async fn missing_default_and_route_models_are_warned_by_the_inference_check() {
assert_eq!(catalog.value.entries[0].outcome, ModelProbeOutcome::Ok);
assert_eq!(report.value.profile.as_deref(), Some("doctor-profile-b"));
- assert!(
- report
- .value
- .checks_run
- .iter()
- .any(|id| id == "inference/model-in-catalog")
- );
+ assert!(report
+ .value
+ .checks_run
+ .iter()
+ .any(|id| id == "inference/model-in-catalog"));
let missing_default = report.value.findings.iter().find(|finding| {
finding.check_id == "inference/model-in-catalog"
&& finding.severity == FindingSeverity::Warn
diff --git a/crates/openhuman-core/src/doctor/mod.rs b/crates/openhuman-core/src/doctor/mod.rs
index 83a1f56426..73c67d3749 100644
--- a/crates/openhuman-core/src/doctor/mod.rs
+++ b/crates/openhuman-core/src/doctor/mod.rs
@@ -17,7 +17,7 @@ pub use contract::{
pub use core::{ModelProbeEntry, ModelProbeOutcome, ModelProbeReport, ModelProbeSummary};
pub use ops::*;
pub use registry::{
- DoctorCheckSource, register_check_source, register_check_source_in, registered_checks_for,
+ register_check_source, register_check_source_in, registered_checks_for, DoctorCheckSource,
};
pub(crate) use schemas::all_controller_entries as all_doctor_controller_entries;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/doctor/ops.rs b/crates/openhuman-core/src/doctor/ops.rs
index 6af65a68c5..eeb33304ea 100644
--- a/crates/openhuman-core/src/doctor/ops.rs
+++ b/crates/openhuman-core/src/doctor/ops.rs
@@ -8,8 +8,8 @@ use super::contract::DoctorProfileStatus;
use super::profile::DesktopProfileSelection;
use crate::config::Config;
use crate::core::{
- Outcome,
runtime::{ComponentSet, CoreContext, DispatchCtx},
+ Outcome,
};
use crate::doctor::{
DoctorConfigSource, DoctorCtx, DoctorOptions, DoctorReport, DoctorSummary, DoctorTier, Finding,
diff --git a/crates/openhuman-core/src/doctor/ops_tests.rs b/crates/openhuman-core/src/doctor/ops_tests.rs
index 52e9ca1d7d..aafc293743 100644
--- a/crates/openhuman-core/src/doctor/ops_tests.rs
+++ b/crates/openhuman-core/src/doctor/ops_tests.rs
@@ -1,14 +1,14 @@
use super::*;
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
use crate::core::runtime::{CoreContext, DomainSet};
use crate::core::slots::Extensions;
use crate::memory::engine::{Binding, EngineHealth};
use crate::memory::engine_registry::{
- EngineEntry, EngineFuture, ReadOnlyHealthProbe, register_memory_engine_in,
- register_memory_health_probe_in,
+ register_memory_engine_in, register_memory_health_probe_in, EngineEntry, EngineFuture,
+ ReadOnlyHealthProbe,
};
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/profile.rs b/crates/openhuman-core/src/doctor/profile.rs
index 2e6ebbc4b5..106596f3f6 100644
--- a/crates/openhuman-core/src/doctor/profile.rs
+++ b/crates/openhuman-core/src/doctor/profile.rs
@@ -5,9 +5,9 @@ use std::sync::Arc;
use async_trait::async_trait;
-use crate::config::Config;
use crate::config::schema::load::ConfigResolutionSource;
use crate::config::schema::profile_layout::LayoutVersion;
+use crate::config::Config;
use crate::doctor::contract::{DoctorCheck, DoctorCtx, DoctorProfileStatus, DoctorTier, Finding};
use crate::profiles::ProfileLayout;
diff --git a/crates/openhuman-core/src/doctor/profile_inspection_tests.rs b/crates/openhuman-core/src/doctor/profile_inspection_tests.rs
index 6119c6aa71..3d32d900fb 100644
--- a/crates/openhuman-core/src/doctor/profile_inspection_tests.rs
+++ b/crates/openhuman-core/src/doctor/profile_inspection_tests.rs
@@ -79,18 +79,14 @@ async fn selected_profile_reports_preserve_parent_check_sources_without_using_pa
.unwrap();
for report in [explicit_outcome.value, selection_outcome.value] {
- assert!(
- !report
- .findings
- .iter()
- .any(|finding| finding.check_id == "doctor/selection")
- );
- assert!(
- report
- .checks_run
- .iter()
- .any(|id| id == "hosted/selected-profile-context")
- );
+ assert!(!report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "doctor/selection"));
+ assert!(report
+ .checks_run
+ .iter()
+ .any(|id| id == "hosted/selected-profile-context"));
assert_eq!(report.profile.as_deref(), Some("account-b"));
}
let observations = observed.lock().unwrap();
diff --git a/crates/openhuman-core/src/doctor/profile_tests.rs b/crates/openhuman-core/src/doctor/profile_tests.rs
index 65ba9f74a0..be08888d41 100644
--- a/crates/openhuman-core/src/doctor/profile_tests.rs
+++ b/crates/openhuman-core/src/doctor/profile_tests.rs
@@ -7,7 +7,7 @@ use tempfile::TempDir;
use crate::config::Config;
use crate::doctor::profile::{
- DesktopProfileError, load_desktop_profile, resolve_desktop_profile_for_doctor,
+ load_desktop_profile, resolve_desktop_profile_for_doctor, DesktopProfileError,
};
use crate::doctor::{
DoctorCheck, DoctorCheckSource, DoctorConfigSource, DoctorCtx, DoctorOptions, DoctorTier,
@@ -15,8 +15,8 @@ use crate::doctor::{
};
use crate::profiles::ProfileLayout;
use crate::security::credentials::{
- APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME,
- session_support::get_session_token,
+ session_support::get_session_token, AuthService, APP_SESSION_PROVIDER,
+ DEFAULT_AUTH_PROFILE_NAME,
};
fn config_for(layout: &ProfileLayout) -> Config {
@@ -125,8 +125,8 @@ async fn explicit_profile_reads_its_own_session_without_switching_active_user()
}
#[tokio::test]
-async fn inspecting_selected_profile_credentials_does_not_quarantine_corrupt_auth_store()
--> Result<(), String> {
+async fn inspecting_selected_profile_credentials_does_not_quarantine_corrupt_auth_store(
+) -> Result<(), String> {
let _env_guard = crate::config::TEST_ENV_LOCK.lock().await;
let _workspace_override = WorkspaceOverrideGuard::clear();
let temp = TempDir::new().unwrap();
@@ -557,13 +557,11 @@ async fn selected_profile_applies_in_memory_legacy_migrations_without_saving_the
selected.config.inference_url.as_deref(),
Some("https://custom.example/v1/chat/completions")
);
- assert!(
- selected
- .config
- .load_diagnostics()
- .migrated_keys
- .contains(&"api_url".to_string())
- );
+ assert!(selected
+ .config
+ .load_diagnostics()
+ .migrated_keys
+ .contains(&"api_url".to_string()));
assert_eq!(
tokio::fs::read_to_string(&layout.config_path)
.await
diff --git a/crates/openhuman-core/src/doctor/runner_tests.rs b/crates/openhuman-core/src/doctor/runner_tests.rs
index 8560469124..182f879ff0 100644
--- a/crates/openhuman-core/src/doctor/runner_tests.rs
+++ b/crates/openhuman-core/src/doctor/runner_tests.rs
@@ -1,6 +1,6 @@
use std::path::Path;
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
use std::time::Duration;
use crate::config::Config;
@@ -11,7 +11,7 @@ use async_trait::async_trait;
use super::contract::{
DoctorCheck, DoctorConfigSource, DoctorCtx, DoctorOptions, DoctorTier, Finding, FindingSeverity,
};
-use super::registry::{DoctorCheckSource, register_check_source_in};
+use super::registry::{register_check_source_in, DoctorCheckSource};
use super::runner;
use super::test_support::{FakeCheck, FakeCheckSource};
@@ -124,12 +124,10 @@ async fn a_context_check_source_is_reported_with_its_check_id() {
let config_source: DoctorConfigSource = report.config_source;
assert_eq!(config_source, DoctorConfigSource::Profile);
assert!(report.checks_run.iter().any(|id| id == "hosted/ready"));
- assert!(
- report
- .findings
- .iter()
- .any(|finding| finding.check_id == "hosted/ready")
- );
+ assert!(report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "hosted/ready"));
}
#[tokio::test]
@@ -158,12 +156,10 @@ async fn hierarchical_check_ids_are_registered_and_selected_exactly() {
.expect("hierarchical id is valid and selected as one exact id");
assert_eq!(report.checks_run, vec!["inference/live/role".to_owned()]);
- assert!(
- report
- .findings
- .iter()
- .any(|finding| finding.check_id == "inference/live/role")
- );
+ assert!(report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "inference/live/role"));
}
#[tokio::test]
@@ -397,10 +393,10 @@ async fn native_checks_use_the_selected_config_and_respect_its_component_gates()
#[tokio::test]
async fn connect_tier_skips_live_embedding_without_calling_the_provider() {
- use axum::{Json, Router, extract::State, routing::post};
+ use axum::{extract::State, routing::post, Json, Router};
use std::sync::atomic::AtomicUsize;
use tempfile::TempDir;
- use tinymemory_api::{MemoryEngine, conformance::ReferenceEngine};
+ use tinymemory_api::{conformance::ReferenceEngine, MemoryEngine};
let tmp = TempDir::new().expect("temporary config and workspace");
let workspace = tmp.path().join("workspace");
@@ -475,16 +471,12 @@ async fn connect_tier_skips_live_embedding_without_calling_the_provider() {
0,
"live memory was not bound"
);
- assert!(
- report
- .checks_skipped
- .contains(&"embeddings/live".to_owned())
- );
- assert!(
- report
- .checks_skipped
- .contains(&"memory/roundtrip".to_owned())
- );
+ assert!(report
+ .checks_skipped
+ .contains(&"embeddings/live".to_owned()));
+ assert!(report
+ .checks_skipped
+ .contains(&"memory/roundtrip".to_owned()));
}
#[tokio::test]
@@ -520,13 +512,11 @@ async fn only_filters_exact_ids_and_unknown_ids_get_a_selection_finding() {
.expect("unknown selection is a report finding");
assert_eq!(report.checks_run, vec!["config/temperature".to_owned()]);
- assert!(
- report
- .findings
- .iter()
- .any(|finding| finding.check_id == "doctor/selection"
- && finding.severity == FindingSeverity::Error)
- );
+ assert!(report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "doctor/selection"
+ && finding.severity == FindingSeverity::Error));
assert_eq!(report.schema_version, 2);
assert_eq!(report.summary.pass, 1);
assert_eq!(report.summary.error, 1);
@@ -556,12 +546,10 @@ async fn module_status_checks_are_registered_with_their_native_id() {
report.findings
);
assert!(report.checks_run.iter().any(|id| id == "modules/tinymcp"));
- assert!(
- report
- .findings
- .iter()
- .any(|finding| finding.check_id == "modules/tinymcp")
- );
+ assert!(report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "modules/tinymcp"));
}
#[tokio::test]
@@ -613,18 +601,14 @@ async fn mcp_server_check_ids_come_from_the_selected_config() {
report.checks_skipped.iter().any(|id| id == "mcp/server-b")
|| report.checks_run.iter().any(|id| id == "mcp/server-b")
);
- assert!(
- report
- .findings
- .iter()
- .any(|finding| finding.check_id == "mcp/server-b")
- );
- assert!(
- !report
- .findings
- .iter()
- .any(|finding| finding.check_id == "mcp/server-a")
- );
+ assert!(report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "mcp/server-b"));
+ assert!(!report
+ .findings
+ .iter()
+ .any(|finding| finding.check_id == "mcp/server-a"));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/doctor/schemas.rs b/crates/openhuman-core/src/doctor/schemas.rs
index 7de7dff1ad..2e81ebe059 100644
--- a/crates/openhuman-core/src/doctor/schemas.rs
+++ b/crates/openhuman-core/src/doctor/schemas.rs
@@ -3,11 +3,11 @@ use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
use crate::config::Config;
-use crate::core::Outcome;
use crate::core::all::{
BoundRegisteredController, ControllerEntry, ControllerFuture, ControllerTask,
RegisteredController,
};
+use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
pub fn all_controller_schemas() -> Vec<ControllerSchema> {
diff --git a/crates/openhuman-core/src/doctor/test_support.rs b/crates/openhuman-core/src/doctor/test_support.rs
index 76123729b3..50e99aa51e 100644
--- a/crates/openhuman-core/src/doctor/test_support.rs
+++ b/crates/openhuman-core/src/doctor/test_support.rs
@@ -1,7 +1,7 @@
//! Reusable fake checks and sources for doctor framework tests.
-use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;