The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(doctor): correct test assertion for core module path
Steven Enamakel0be38ef27169
diff --git a/crates/openhuman-core/src/platform/doctor/core_tests.rs b/crates/openhuman-core/src/platform/doctor/core_tests.rsindex f655e28d52..97c1452f74 100644--- a/crates/openhuman-core/src/platform/doctor/core_tests.rs+++ b/crates/openhuman-core/src/platform/doctor/core_tests.rs@@ -1,7 +1,7 @@use super::*;use tempfile::TempDir;-use crate::memory::read_rpc::Config;+use crate::config::Config;fn test_config_in(tmp: &TempDir) -> Config {let mut cfg = Config::default();cfg.workspace_dir = tmp.path().to_path_buf();@@ -77,112 +77,3 @@ fn model_matches_rejects_different_base_models() {// ── check_memory_tree_db tests (#2206) ───────────────────────────────────────-/// When the workspace exists but the DB file has never been created,-/// `check_memory_tree_db` should push a `Warn` about the missing file AND-/// still surface the driver's probe result. Drivers that do not use SQLite-/// have no `chunks.db` by design, so the file check must not gate the probe.-#[test]-fn check_memory_tree_db_warns_when_db_missing() {- let tmp = TempDir::new().expect("tempdir");- let cfg = test_config_in(&tmp);-- let mut items = vec![];- check_memory_tree_db(&cfg, &Ok(7), &mut items);-- // Warn item for the missing file (driver-neutral: describes the SQLite- // artifact as absent, not the driver as broken).- assert!(- items- .iter()- .any(|i| i.severity == Severity::Warn && i.message.contains("absent")),- "expected a 'legacy SQLite artifact is absent' warn item; got: {items:?}",- );- // Driver probe result is surfaced regardless of file absence.- assert!(- items- .iter()- .any(|i| i.severity == Severity::Ok && i.message.contains('7')),- "expected a driver-probe Ok item with count 7; got: {items:?}",- );-}--/// With the DB file present and the driver's chunk count in hand, the probe-/// should push an `Ok` item carrying that count.-///-/// The file is created directly rather than by opening a store: the count is-/// the async caller's now (`ops::memory_chunk_count`), so this check only ever-/// asks the filesystem whether the path exists.-#[test]-fn check_memory_tree_db_ok_when_accessible() {- let tmp = TempDir::new().expect("tempdir");- let cfg = test_config_in(&tmp);-- let db_dir = cfg.workspace_dir.join("memory_tree");- std::fs::create_dir_all(&db_dir).expect("create memory_tree dir");- std::fs::write(db_dir.join("chunks.db"), b"").expect("create chunks.db");-- let mut items = vec![];- check_memory_tree_db(&cfg, &Ok(42), &mut items);-- // There may be a Warn about the SHM file on some platforms; there must- // be at least one Ok item about the DB being accessible.- let ok_items: Vec<_> = items- .iter()- .filter(|i| i.severity == Severity::Ok && i.category == "memory_tree_db")- .collect();- assert!(- !ok_items.is_empty(),- "expected at least one Ok memory_tree_db item; got: {items:?}"- );- assert!(- ok_items[0].message.contains("accessible"),- "unexpected ok message: {}",- ok_items[0].message- );- assert!(- ok_items[0].message.contains("(42 chunks)"),- "the driver's count must reach the message: {}",- ok_items[0].message- );-}--/// A driver that could not answer is an `Error` item, not a silent zero: "0-/// chunks" from a store nobody could count reads exactly like an empty store.-#[test]-fn check_memory_tree_db_errors_when_the_driver_could_not_count() {- let tmp = TempDir::new().expect("tempdir");- let cfg = test_config_in(&tmp);-- let db_dir = cfg.workspace_dir.join("memory_tree");- std::fs::create_dir_all(&db_dir).expect("create memory_tree dir");- std::fs::write(db_dir.join("chunks.db"), b"").expect("create chunks.db");-- let mut items = vec![];- check_memory_tree_db(- &cfg,- &Err("driver 'null' does not serve Maintenance".to_string()),- &mut items,- );-- let error_items: Vec<_> = items- .iter()- .filter(|i| i.severity == Severity::Error && i.category == "memory_tree_db")- .collect();- assert_eq!(- error_items.len(),- 1,- "expected exactly one Error memory_tree_db item; got: {items:?}"- );- assert!(- error_items[0].message.contains("DB probe failed at"),- "unexpected error message: {}",- error_items[0].message- );- assert!(- error_items[0]- .message- .contains("does not serve Maintenance"),- "the driver's own reason must survive into the report: {}",- error_items[0].message- );-}