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
chore: files changed crates/openhuman-core/src/memory/backfill.rs,crates/openhuman-core/src/memory/b
Steven Enamakel8dd582b647f9
diff --git a/crates/openhuman-core/src/memory/backfill.rs b/crates/openhuman-core/src/memory/backfill.rsindex ccefa29014..ed4b20d1db 100644--- a/crates/openhuman-core/src/memory/backfill.rs+++ b/crates/openhuman-core/src/memory/backfill.rs@@ -21,8 +21,8 @@ use tinymemory_tools::backfill::{use tinymemory_tools::layout::identity::Identity;pub use tinymemory_tools::backfill::{- BACKFILL_TAG, BackfillPhase, BackfillState, BackfillView, MAIN_AGENT, PastTurn, pending_range,- turns_of,+ pending_range, turns_of, BackfillPhase, BackfillState, BackfillView, PastTurn, BACKFILL_TAG,+ MAIN_AGENT,};/// `memory_conversations_backfill_start` params.diff --git a/crates/openhuman-core/src/memory/brain.rs b/crates/openhuman-core/src/memory/brain.rsindex d6ba64d3fb..caee994556 100644--- a/crates/openhuman-core/src/memory/brain.rs+++ b/crates/openhuman-core/src/memory/brain.rs@@ -17,8 +17,8 @@ use tinymemory_integrations::documents::RawDocument;use tinymemory_tools::layout::placement::{brain_node_with, files_source};use tinymemory_tools::{Brain, BrainSource, BrainSourcesView, MemoryLayout};-use crate::config::Config;use crate::config::schema::MemorySourceKind;+use crate::config::Config;use super::engine;use super::lifecycle::jobs;diff --git a/crates/openhuman-core/src/memory/brain_tests.rs b/crates/openhuman-core/src/memory/brain_tests.rsindex d65760fecb..a6571a7683 100644--- a/crates/openhuman-core/src/memory/brain_tests.rs+++ b/crates/openhuman-core/src/memory/brain_tests.rs@@ -207,19 +207,17 @@ async fn ingest_refuses_bad_input() {Err(Error::InvalidRequest(_))));}- assert!(- search(- &config,- &tinymemory_tools::layout::identity::Identity::root(),- BrainSearchParams {- query: " ".into(),- source: None,- limit: None- }- )- .await- .is_err()- );+ assert!(search(+ &config,+ &tinymemory_tools::layout::identity::Identity::root(),+ BrainSearchParams {+ query: " ".into(),+ source: None,+ limit: None+ }+ )+ .await+ .is_err());}#[tokio::test]@@ -296,8 +294,8 @@ async fn a_file_is_converted_and_filed_under_files() {#[tokio::test]async fn an_ingest_queues_a_belief_build_only_for_an_engine_that_waits_for_one() {use std::sync::Arc;- use tinymemory_api::Consolidation;use tinymemory_api::conformance::ReferenceEngine;+ use tinymemory_api::Consolidation;for (consolidation, queued) in [(Consolidation::OnDemand, 1), (Consolidation::Automatic, 0)] {let tmp = tempfile::tempdir().unwrap();diff --git a/crates/openhuman-core/src/memory/bus_tests.rs b/crates/openhuman-core/src/memory/bus_tests.rsindex e44c385b3b..b066b757cc 100644--- a/crates/openhuman-core/src/memory/bus_tests.rs+++ b/crates/openhuman-core/src/memory/bus_tests.rs@@ -61,7 +61,7 @@ fn the_deletions_subscriber_listens_on_auth() {#[tokio::test]async fn a_sign_in_drains_the_deletions_queued_while_signed_out() {- use crate::memory::deletion::{PendingDeletion, enqueue, pending};+ use crate::memory::deletion::{enqueue, pending, PendingDeletion};let tmp = tempfile::tempdir().unwrap();let config = config_in(&tmp);@@ -86,7 +86,7 @@ async fn a_sign_in_drains_the_deletions_queued_while_signed_out() {#[tokio::test]async fn the_background_job_retries_pending_deletions() {- use crate::memory::deletion::{PendingDeletion, enqueue, pending};+ use crate::memory::deletion::{enqueue, pending, PendingDeletion};let tmp = tempfile::tempdir().unwrap();let config = config_in(&tmp);diff --git a/crates/openhuman-core/src/memory/confinement_tests.rs b/crates/openhuman-core/src/memory/confinement_tests.rsindex f216ed1c38..bf98d178da 100644--- a/crates/openhuman-core/src/memory/confinement_tests.rs+++ b/crates/openhuman-core/src/memory/confinement_tests.rs@@ -131,12 +131,10 @@ async fn rpc_list_fetch_and_recall_never_read_another_root() {).await.unwrap();- assert!(- answer- .citations- .iter()- .all(|citation| citation.id.0 != theirs)- );+ assert!(answer+ .citations+ .iter()+ .all(|citation| citation.id.0 != theirs));}#[tokio::test]diff --git a/crates/openhuman-core/src/memory/deletion_tests.rs b/crates/openhuman-core/src/memory/deletion_tests.rsindex 043011d0b6..a865cb7feb 100644--- a/crates/openhuman-core/src/memory/deletion_tests.rs+++ b/crates/openhuman-core/src/memory/deletion_tests.rs@@ -24,7 +24,7 @@ fn thread(id: &str) -> PendingDeletion {#[tokio::test]async fn offline_conversation_purge_queues_exact_thread_ids_in_its_workspace() {- use crate::threads::store::{CreateConversationThread, ensure_thread, purge_threads};+ use crate::threads::store::{ensure_thread, purge_threads, CreateConversationThread};let tmp = tempfile::tempdir().unwrap();let config = config_in(&tmp);@@ -102,15 +102,12 @@ async fn offline_conversation_purge_queues_exact_thread_ids_in_its_workspace() {let left = stored(&engine, MetaFilter::default()).await;assert_eq!(left.len(), 3);- assert!(- left.iter()- .any(|item| { item.kind == ItemKind::Learning && item.text == "durable preference" })- );- assert!(- left.iter().any(|item| {- item.kind == ItemKind::Document && item.text == "durable brain document"- })- );+ assert!(left+ .iter()+ .any(|item| { item.kind == ItemKind::Learning && item.text == "durable preference" }));+ assert!(left+ .iter()+ .any(|item| { item.kind == ItemKind::Document && item.text == "durable brain document" }));assert!(left.iter().any(|item| {item.kind == ItemKind::Conversation&& item.meta.thread_id.as_deref() == Some("unrelated-thread")diff --git a/crates/openhuman-core/src/memory/engine.rs b/crates/openhuman-core/src/memory/engine.rsindex 15a413a5fe..9d04e1ea92 100644--- a/crates/openhuman-core/src/memory/engine.rs+++ b/crates/openhuman-core/src/memory/engine.rs@@ -46,8 +46,8 @@ pub use tinymemory_api::Error as MemoryError;pub use tinymemory_integrations::cortex::CallbackBearerSource;pub use tinymemory_integrations::{BearerSource, Binding, BoundEngine, EngineBinder};-use crate::config::Config;use crate::config::schema::MEMORY_CORTEXDB_KEY_NAME;+use crate::config::Config;use crate::security::credentials::session_support::resolve_backend_credential;use crate::security::credentials::{AuthService, DEFAULT_AUTH_PROFILE_NAME};diff --git a/crates/openhuman-core/src/memory/engine_tests.rs b/crates/openhuman-core/src/memory/engine_tests.rsindex ee9d2d2201..7977ef934f 100644--- a/crates/openhuman-core/src/memory/engine_tests.rs+++ b/crates/openhuman-core/src/memory/engine_tests.rs@@ -2,7 +2,7 @@ use super::*;use crate::memory::test_fixtures::config_in;use crate::security::credentials::api_key::store_api_key;-use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME};+use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};struct ClearInstalledHostEngine;diff --git a/crates/openhuman-core/src/memory/explore.rs b/crates/openhuman-core/src/memory/explore.rsindex edb012ed1c..cb8bb4f4fe 100644--- a/crates/openhuman-core/src/memory/explore.rs+++ b/crates/openhuman-core/src/memory/explore.rs@@ -19,7 +19,7 @@ use tinymemory_tools::ops::ExploreOptions;use crate::config::Config;use super::engine;-pub use tinymemory_tools::ops::{DEFAULT_BUCKETS, MAX_PATH_STEPS, PathStep, narrowed};+pub use tinymemory_tools::ops::{narrowed, PathStep, DEFAULT_BUCKETS, MAX_PATH_STEPS};/// `memory_explore` params.#[derive(Debug, Clone, Deserialize)]diff --git a/crates/openhuman-core/src/memory/guard_tests.rs b/crates/openhuman-core/src/memory/guard_tests.rsindex f53a2e488d..8589826f70 100644--- a/crates/openhuman-core/src/memory/guard_tests.rs+++ b/crates/openhuman-core/src/memory/guard_tests.rs@@ -1,8 +1,8 @@use std::sync::Arc;use tinymemory_api::{MemoryEngine, StoreItem};+use tinymemory_integrations::safety::{scrub_item_with, Policy};use tinymemory_integrations::EngineBinder;-use tinymemory_integrations::safety::{Policy, scrub_item_with};fn wrap(engine: Arc<dyn MemoryEngine>) -> Arc<dyn MemoryEngine> {EngineBinder::default()diff --git a/crates/openhuman-core/src/memory/import_tests.rs b/crates/openhuman-core/src/memory/import_tests.rsindex 2f36409d38..dcdc93f54c 100644--- a/crates/openhuman-core/src/memory/import_tests.rs+++ b/crates/openhuman-core/src/memory/import_tests.rs@@ -129,7 +129,7 @@ async fn a_paused_scheduler_leaves_an_interrupted_import_for_later() {#[tokio::test]async fn a_live_import_blocks_migration_and_does_not_make_a_stale_migration_look_live() {- use crate::memory::layout_migration::{self, Phase, Trigger, state, test_host::FakeHost};+ use crate::memory::layout_migration::{self, state, test_host::FakeHost, Phase, Trigger};let tmp = tempfile::tempdir().unwrap();let config = config_in(&tmp);@@ -199,14 +199,12 @@ async fn a_credit_paused_import_waits_for_billing_and_records_a_resume_failure());let stopped = read_file(&config.workspace_dir);assert_eq!(stopped.state.phase, ImportPhase::Error);- assert!(- stopped- .state- .error- .as_deref()- .unwrap()- .contains("could not resume")- );+ assert!(stopped+ .state+ .error+ .as_deref()+ .unwrap()+ .contains("could not resume"));assert!(!stopped.paused_for_credits);assert!(!is_running(&config.workspace_dir));}diff --git a/crates/openhuman-core/src/memory/layout_migration/app_host_tests.rs b/crates/openhuman-core/src/memory/layout_migration/app_host_tests.rsindex 97504afa6b..36724271af 100644--- a/crates/openhuman-core/src/memory/layout_migration/app_host_tests.rs+++ b/crates/openhuman-core/src/memory/layout_migration/app_host_tests.rs@@ -1,7 +1,7 @@use std::sync::Arc;-use tinymemory_api::MemoryEngine;use tinymemory_api::conformance::ReferenceEngine;+use tinymemory_api::MemoryEngine;use super::*;use crate::memory::engine::install_test_engine_for_root;diff --git a/crates/openhuman-core/src/memory/layout_migration/mod.rs b/crates/openhuman-core/src/memory/layout_migration/mod.rsindex 9e4315ad7a..6e4ad78f08 100644--- a/crates/openhuman-core/src/memory/layout_migration/mod.rs+++ b/crates/openhuman-core/src/memory/layout_migration/mod.rs@@ -11,7 +11,7 @@ pub mod state;pub(crate) mod test_host;pub use app_host::AppHost;-pub use ops::{StartParams, retry, scan, start, status, tick};+pub use ops::{retry, scan, start, status, tick, StartParams};pub use state::FileStateStore;pub use tinymemory_tools::layout_migration::{LayoutHost, MigrationState, MigrationStateStore, MigrationStatus, Outcome, Phase, ScanView,diff --git a/crates/openhuman-core/src/memory/layout_migration/ops.rs b/crates/openhuman-core/src/memory/layout_migration/ops.rsindex d1621ca43d..d2766fd525 100644--- a/crates/openhuman-core/src/memory/layout_migration/ops.rs+++ b/crates/openhuman-core/src/memory/layout_migration/ops.rs@@ -10,7 +10,7 @@ use std::sync::Arc;use tinymemory_tools::layout_migration as lm;use tinymemory_tools::run_slots::{MigrationSpawner, MigrationTask};-use super::app_host::{AppHost, from_module};+use super::app_host::{from_module, AppHost};use super::{LayoutHost, MigrationState, MigrationStatus, ScanView, Trigger};use crate::config::Config;use crate::core::runtime::DispatchCtx;diff --git a/crates/openhuman-core/src/memory/layout_migration/ops_tests.rs b/crates/openhuman-core/src/memory/layout_migration/ops_tests.rsindex 0d6de974c7..4ad50224e1 100644--- a/crates/openhuman-core/src/memory/layout_migration/ops_tests.rs+++ b/crates/openhuman-core/src/memory/layout_migration/ops_tests.rs@@ -1,11 +1,11 @@-use std::sync::Arc;use std::sync::atomic::Ordering;+use std::sync::Arc;use tinymemory_api::MemoryEngine;use super::*;-use crate::memory::layout_migration::test_host::{FakeHost, count, fact};-use crate::memory::layout_migration::{Phase, state};+use crate::memory::layout_migration::test_host::{count, fact, FakeHost};+use crate::memory::layout_migration::{state, Phase};fn never() -> Arc<dyn Fn() -> bool + Send + Sync> {Arc::new(|| false)diff --git a/crates/openhuman-core/src/memory/layout_migration/test_host.rs b/crates/openhuman-core/src/memory/layout_migration/test_host.rsindex 1172967e65..763c2e9b4f 100644--- a/crates/openhuman-core/src/memory/layout_migration/test_host.rs+++ b/crates/openhuman-core/src/memory/layout_migration/test_host.rs@@ -7,11 +7,11 @@ use tinymemory_api::conformance::ReferenceEngine;use tinymemory_api::{LearningKind, ListRequest, MemoryEngine, MemoryMeta, MetaFilter, Namespace, StoreItem,};-use tinymemory_tools::MemoryLayout;use tinymemory_tools::layout_migration::{Engines, FlowPlacement, FsLegacyClaim, LayoutHost, LegacyClaim, MigrationStateStore, Placement,Result,};+use tinymemory_tools::MemoryLayout;use super::state::FileStateStore;use crate::config::Config;diff --git a/crates/openhuman-core/src/memory/lifecycle/adapter_tests.rs b/crates/openhuman-core/src/memory/lifecycle/adapter_tests.rsindex 40121b6824..d246119df1 100644--- a/crates/openhuman-core/src/memory/lifecycle/adapter_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/adapter_tests.rs@@ -52,22 +52,20 @@ async fn background_prefetch_records_citations_only_when_returning_the_pack() {.resolve(&crate::memory::scope::identity_pins(&config));let ctx = crate::core::runtime::DispatchCtx::ambient();- assert!(- super::super::super::prefetch::pre_turn(- &ctx,- config.clone(),- identity.clone(),- "citation-thread".into(),- 0,- "what colour is preferred?".into(),- 0,- Utc::now(),- false,- None,- None,- )- .is_none()- );+ assert!(super::super::super::prefetch::pre_turn(+ &ctx,+ config.clone(),+ identity.clone(),+ "citation-thread".into(),+ 0,+ "what colour is preferred?".into(),+ 0,+ Utc::now(),+ false,+ None,+ None,+ )+ .is_none());assert!(crate::web_chat::citations::take_turn_citations(&ctx, "citation-thread").is_empty());super::super::super::prefetch::settle_for_test(diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks.rs b/crates/openhuman-core/src/memory/lifecycle/hooks.rsindex 26d383e825..d901874a38 100644--- a/crates/openhuman-core/src/memory/lifecycle/hooks.rs+++ b/crates/openhuman-core/src/memory/lifecycle/hooks.rs@@ -19,7 +19,7 @@ use crate::config::Config;use crate::core::runtime::{CoreContext, DispatchCtx};use crate::memory::engine;-pub use native_turn::{CLOSE_TAG, MAX_TOOL_LINE_CHARS, OPEN_TAG, user_turn_index};+pub use native_turn::{user_turn_index, CLOSE_TAG, MAX_TOOL_LINE_CHARS, OPEN_TAG};/// A native turn pack with the citation view used by OpenHuman's chat UI.#[derive(Debug, Clone, PartialEq, Serialize)]diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rsindex 2fa57e628b..ccc320b2d2 100644--- a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs@@ -181,16 +181,14 @@ async fn recall_off_still_logs_and_logging_off_still_recalls() {config.memory.recall.enabled = false;let quiet = tinymemory_tools::layout::identity::Identity::agent("a").resolve(&crate::memory::scope::identity_pins(&config));- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &quiet,- input("t", 0, "when do deploys happen?")- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &quiet,+ input("t", 0, "when do deploys happen?")+ )+ .await+ .is_none());assert_eq!(stored(&engine, MetaFilter::kinds([ItemKind::Conversation])).await@@ -221,16 +219,14 @@ async fn recall_off_still_logs_and_logging_off_still_recalls() {config.memory.recall.enabled = false;let none = tinymemory_tools::layout::identity::Identity::agent("a").resolve(&crate::memory::scope::identity_pins(&config));- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &none,- input("t", 4, "hi")- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &none,+ input("t", 4, "hi")+ )+ .await+ .is_none());}#[tokio::test]@@ -239,16 +235,14 @@ async fn pre_turn_without_an_engine_runs_the_turn_without_a_pack() {let config = config_in(&tmp);let identity = tinymemory_tools::layout::identity::Identity::agent("a").resolve(&crate::memory::scope::identity_pins(&config));- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &identity,- input("t", 0, "hello")- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &identity,+ input("t", 0, "hello")+ )+ .await+ .is_none());run_post_turn(&config, &identity, reply("t", 1, "hi")).await;}@@ -319,17 +313,15 @@ async fn compaction_recalls_from_the_dropped_turns() {).await;assert!(pack.expect("a pack").markdown.contains("Heron"));- assert!(- compaction_work(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &identity,- "t",- Vec::new()- )- .await- .is_none()- );+ assert!(compaction_work(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &identity,+ "t",+ Vec::new()+ )+ .await+ .is_none());}#[tokio::test]@@ -399,16 +391,14 @@ async fn an_engine_fault_that_is_not_account_wide_injects_nothing() {let identity = tinymemory_tools::layout::identity::Identity::agent("orchestrator").resolve(&crate::memory::scope::identity_pins(&config));- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &identity,- input("t", 0, "hello")- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &identity,+ input("t", 0, "hello")+ )+ .await+ .is_none());}// ── the pack's token budget against a large store (#6718, #7023) ────────────@@ -606,16 +596,14 @@ async fn a_blank_turn_is_refused_without_a_pack_with_or_without_logging() {let engine = bind_reference(&config);let identity = tinymemory_tools::layout::identity::Identity::agent("orchestrator").resolve(&crate::memory::scope::identity_pins(&config));- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &identity,- input("t-blank", 0, " ")- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &identity,+ input("t-blank", 0, " ")+ )+ .await+ .is_none());assert!(stored(&engine, MetaFilter::kinds([ItemKind::Conversation])).await@@ -626,28 +614,24 @@ async fn a_blank_turn_is_refused_without_a_pack_with_or_without_logging() {config.memory.conversations.enabled = false;let reader = tinymemory_tools::layout::identity::Identity::agent("orchestrator").resolve(&crate::memory::scope::identity_pins(&config));- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &reader,- input("t-blank", 2, " ")- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &reader,+ input("t-blank", 2, " ")+ )+ .await+ .is_none());let mut resumed = input(" ", 4, "where were we?");resumed.5 = true;- assert!(- run_pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &reader,- resumed- )- .await- .is_none()- );+ assert!(run_pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &reader,+ resumed+ )+ .await+ .is_none());}/// With `date_hint` on, the turn's text goes to the chat model with the datediff --git a/crates/openhuman-core/src/memory/lifecycle/jobs.rs b/crates/openhuman-core/src/memory/lifecycle/jobs.rsindex 6719329443..6cf8f903a2 100644--- a/crates/openhuman-core/src/memory/lifecycle/jobs.rs+++ b/crates/openhuman-core/src/memory/lifecycle/jobs.rs@@ -22,8 +22,8 @@ use std::path::{Path, PathBuf};use std::sync::{Arc, LazyLock, Mutex, Weak};use tinymemory_api::Namespace;-use tinymemory_tools::BackgroundJob;use tinymemory_tools::queue::{JobQueue as Queue, QueueError, QueueState, QueueStore};+use tinymemory_tools::BackgroundJob;use tinymemory_tools::queue::{JobRun, Selection};diff --git a/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rs b/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rsindex 51cff36801..749431e52a 100644--- a/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rs@@ -1,6 +1,6 @@use super::*;-use tinymemory_tools::queue::MAX_ATTEMPTS;use tinymemory_tools::queue::QueueState;+use tinymemory_tools::queue::MAX_ATTEMPTS;use tinymemory_api::{ConsolidateRequest, ItemKind, Reach};@@ -23,11 +23,9 @@ fn workspace_queues_are_released_after_the_last_holder_drops() {drop(queue_of(&sentinel));let queues = QUEUES.lock().unwrap();- assert!(- workspaces- .iter()- .all(|workspace| !queues.contains_key(workspace))- );+ assert!(workspaces+ .iter()+ .all(|workspace| !queues.contains_key(workspace)));}fn build(agent: &str) -> BackgroundJob {diff --git a/crates/openhuman-core/src/memory/lifecycle/mod.rs b/crates/openhuman-core/src/memory/lifecycle/mod.rsindex 09d996729f..ea89630045 100644--- a/crates/openhuman-core/src/memory/lifecycle/mod.rs+++ b/crates/openhuman-core/src/memory/lifecycle/mod.rs@@ -27,8 +27,8 @@ use std::sync::Arc;use tinymemory_api::MemoryEngine;use tinymemory_tools::{AgentMemory, RecallPolicy};-use crate::config::Config;use crate::config::schema::RecallSettings;+use crate::config::Config;use super::engine;use tinymemory_api::{Error, Result};diff --git a/crates/openhuman-core/src/memory/lifecycle/prefetch.rs b/crates/openhuman-core/src/memory/lifecycle/prefetch.rsindex 0b8ee7546d..bf30cf4f08 100644--- a/crates/openhuman-core/src/memory/lifecycle/prefetch.rs+++ b/crates/openhuman-core/src/memory/lifecycle/prefetch.rs@@ -13,7 +13,7 @@ use tinymemory_tools::prefetch::{};use crate::config::Config;-use crate::core::runtime::{DispatchCtx, slot_for};+use crate::core::runtime::{slot_for, DispatchCtx};use tinymemory_tools::layout::identity::ResolvedIdentity;use super::hooks::{self, TurnPack};diff --git a/crates/openhuman-core/src/memory/lifecycle/prefetch_tests.rs b/crates/openhuman-core/src/memory/lifecycle/prefetch_tests.rsindex ec56f462be..a79d9e0da3 100644--- a/crates/openhuman-core/src/memory/lifecycle/prefetch_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/prefetch_tests.rs@@ -123,22 +123,20 @@ async fn pre_turn_logs_channel_metadata_without_writing_legacy_thread_map() {let key = Key::new(&config, &identity, thread_id, false);let cache = cache(&crate::core::runtime::DispatchCtx::ambient());- assert!(- pre_turn(- &crate::core::runtime::DispatchCtx::ambient(),- config.clone(),- identity,- thread_id.into(),- 0,- "hello from telegram".into(),- 0,- chrono::Utc::now(),- false,- None,- Some("telegram".into()),- )- .is_none()- );+ assert!(pre_turn(+ &crate::core::runtime::DispatchCtx::ambient(),+ config.clone(),+ identity,+ thread_id.into(),+ 0,+ "hello from telegram".into(),+ 0,+ chrono::Utc::now(),+ false,+ None,+ Some("telegram".into()),+ )+ .is_none());drain(&cache, &key).await;let turns = stored(diff --git a/crates/openhuman-core/src/memory/lifecycle/views_tests.rs b/crates/openhuman-core/src/memory/lifecycle/views_tests.rsindex e788f4e227..4a065cb193 100644--- a/crates/openhuman-core/src/memory/lifecycle/views_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/views_tests.rs@@ -251,22 +251,18 @@ async fn jobs_run_needs_an_engine_and_names_an_unknown_job() {let config = config_in(&tmp);assert!(jobs_run(&config, JobsRunParams::default()).await.is_err());bind_reference(&config);- assert!(- jobs_run(&config, JobsRunParams::default())- .await- .unwrap()- .runs- .is_empty()- );- assert!(- jobs_run(- &config,- JobsRunParams {- id: Some("x".into())- }- )+ assert!(jobs_run(&config, JobsRunParams::default()).await- .is_err()- );+ .unwrap()+ .runs+ .is_empty());+ assert!(jobs_run(+ &config,+ JobsRunParams {+ id: Some("x".into())+ }+ )+ .await+ .is_err());assert!(jobs_list(&config).await.pending.is_empty());}diff --git a/crates/openhuman-core/src/memory/mod.rs b/crates/openhuman-core/src/memory/mod.rsindex 633f2aa20f..d387b25db7 100644--- a/crates/openhuman-core/src/memory/mod.rs+++ b/crates/openhuman-core/src/memory/mod.rs@@ -57,4 +57,4 @@ pub use schemas::{all_controller_schemas as all_memory_controller_schemas,all_registered_controllers as all_memory_registered_controllers,};-pub use tools::{MEMORY_TOOL_NAME, MemoryTool};+pub use tools::{MemoryTool, MEMORY_TOOL_NAME};diff --git a/crates/openhuman-core/src/memory/ops_compat_tests.rs b/crates/openhuman-core/src/memory/ops_compat_tests.rsindex 1245e43504..722092347f 100644--- a/crates/openhuman-core/src/memory/ops_compat_tests.rs+++ b/crates/openhuman-core/src/memory/ops_compat_tests.rs@@ -83,12 +83,10 @@ async fn single_user_reads_writes_and_forgets_ancestor_and_service_memory() {).await.unwrap();- assert!(- service_reader- .items- .iter()- .any(|item| item.id.0 == service_id)- );+ assert!(service_reader+ .items+ .iter()+ .any(|item| item.id.0 == service_id));let service_item = stored(&engine,MetaFilter {@@ -112,16 +110,14 @@ async fn single_user_reads_writes_and_forgets_ancestor_and_service_memory() {.await.unwrap();assert_eq!(forgotten.forgotten, 1);- assert!(- stored(- &engine,- MetaFilter {- reach: Some(tinymemory_api::Reach::exact(service_item.meta.namespace)),- ..MetaFilter::default()- },- )- .await- .iter()- .all(|item| item.id.0 != service_id)- );+ assert!(stored(+ &engine,+ MetaFilter {+ reach: Some(tinymemory_api::Reach::exact(service_item.meta.namespace)),+ ..MetaFilter::default()+ },+ )+ .await+ .iter()+ .all(|item| item.id.0 != service_id));}diff --git a/crates/openhuman-core/src/memory/ops_saas_tests.rs b/crates/openhuman-core/src/memory/ops_saas_tests.rsindex 3a2739cc53..ec938c90e8 100644--- a/crates/openhuman-core/src/memory/ops_saas_tests.rs+++ b/crates/openhuman-core/src/memory/ops_saas_tests.rs@@ -1,8 +1,8 @@use super::*;use crate::memory::test_fixtures::{bind_reference, config_in};use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};use tinymemory_api::conformance::ReferenceEngine;use tinymemory_api::{@@ -277,12 +277,10 @@ fn valid_saas_identity_clamps_memory_operations_in_an_isolated_process() {).await.unwrap();- assert!(- recalled- .citations- .iter()- .all(|citation| citation.id.0 != foreign)- );+ assert!(recalled+ .citations+ .iter()+ .all(|citation| citation.id.0 != foreign));let learned = learn(&config,diff --git a/crates/openhuman-core/src/memory/ops_tests.rs b/crates/openhuman-core/src/memory/ops_tests.rsindex 18d3a1f46e..d822099571 100644--- a/crates/openhuman-core/src/memory/ops_tests.rs+++ b/crates/openhuman-core/src/memory/ops_tests.rs@@ -369,11 +369,9 @@ async fn stores_are_scrubbed_of_secrets() {.unwrap();let items = stored(&engine, MetaFilter::default()).await;assert_eq!(items.len(), 1);- assert!(- !items[0]- .text- .contains("abcdefghijklmnopqrstuvwxyz0123456789")- );+ assert!(!items[0]+ .text+ .contains("abcdefghijklmnopqrstuvwxyz0123456789"));}#[test]diff --git a/crates/openhuman-core/src/memory/schemas.rs b/crates/openhuman-core/src/memory/schemas.rsindex c2cbe7a778..5996f1c821 100644--- a/crates/openhuman-core/src/memory/schemas.rs+++ b/crates/openhuman-core/src/memory/schemas.rs@@ -3,10 +3,10 @@mod defs;mod handlers;-use crate::core::ControllerSchema;use crate::core::all::RegisteredController;+use crate::core::ControllerSchema;-pub use defs::{FUNCTIONS, schema};+pub use defs::{schema, FUNCTIONS};/// Every memory function paired with the handler it dispatches to.const HANDLERS: &[(&str, crate::core::all::ControllerHandler)] = &[diff --git a/crates/openhuman-core/src/memory/schemas/handlers.rs b/crates/openhuman-core/src/memory/schemas/handlers.rsindex 6fb09fdc95..1338a725c2 100644--- a/crates/openhuman-core/src/memory/schemas/handlers.rs+++ b/crates/openhuman-core/src/memory/schemas/handlers.rs@@ -17,9 +17,9 @@ use crate::memory::types::{SourcesSyncView,};use crate::memory::{backfill, brain, engine, import, layout_migration, ops, sources};-use serde::Serialize;use serde::de::DeserializeOwned;-use serde_json::{Map, Value, json};+use serde::Serialize;+use serde_json::{json, Map, Value};use tinymemory_api::{Error, Reach, Result};use tinymemory_tools::confine::{Confinement, Policy};use tinymemory_tools::layout::identity::Identity;diff --git a/crates/openhuman-core/src/memory/schemas_tests.rs b/crates/openhuman-core/src/memory/schemas_tests.rsindex cd85d9d51d..3cdcf0d509 100644--- a/crates/openhuman-core/src/memory/schemas_tests.rs+++ b/crates/openhuman-core/src/memory/schemas_tests.rs@@ -1,10 +1,10 @@use super::*;use crate::config::Config;+use crate::core::runtime::context::CoreContext;use crate::core::runtime::DispatchCtx;use crate::core::runtime::DomainSet;-use crate::core::runtime::context::CoreContext;use crate::memory::test_fixtures::{bind_reference, config_in};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use tinymemory_api::MemoryEngine;/// Every method of the spec's RPC table (`docs/specs/memory-v2.md`), exactly.@@ -470,12 +470,10 @@ async fn lifecycle_handlers_answer_over_a_bound_engine() {.unwrap();let preview = preview.get("result").unwrap_or(&preview);assert_eq!(preview["mode"], "turn");- assert!(- preview["pack"]["markdown"]- .as_str()- .unwrap()- .contains("9:30")- );+ assert!(preview["pack"]["markdown"]+ .as_str()+ .unwrap()+ .contains("9:30"));let ran = call(&config, "jobs_run", json!({})).await.unwrap();assert_eq!(@@ -557,22 +555,20 @@ async fn rpc_learn_invalidates_a_cached_prefetch_pack() {let config = Arc::new(config.clone());let (thread_id, turn_index, user_text, in_prompt_from, at, resumed, observed_actor) =input();- assert!(- crate::memory::lifecycle::prefetch::pre_turn(- &dispatch,- config.clone(),- identity.clone(),- thread_id,- turn_index,- user_text,- in_prompt_from,- at,- resumed,- observed_actor,- None,- )- .is_none()- );+ assert!(crate::memory::lifecycle::prefetch::pre_turn(+ &dispatch,+ config.clone(),+ identity.clone(),+ thread_id,+ turn_index,+ user_text,+ in_prompt_from,+ at,+ resumed,+ observed_actor,+ None,+ )+ .is_none());crate::memory::lifecycle::prefetch::settle_for_test(&dispatch, &config, &identity, thread, false,)diff --git a/crates/openhuman-core/src/memory/scope_tests.rs b/crates/openhuman-core/src/memory/scope_tests.rsindex c309839735..7931494e94 100644--- a/crates/openhuman-core/src/memory/scope_tests.rs+++ b/crates/openhuman-core/src/memory/scope_tests.rs@@ -4,8 +4,8 @@ use crate::config::schema::MemoryAgentConfig;use tinymemory_api::{MetaFilter, Namespace, Reach};use tinymemory_tools::confine::{Confinement, Policy};use tinymemory_tools::layout::identity::{- DEFAULT_AGENT_ID, Identity, ResolvedIdentity, account_root, actor_of_root, chat_node,- validate_root,+ account_root, actor_of_root, chat_node, validate_root, Identity, ResolvedIdentity,+ DEFAULT_AGENT_ID,};fn ns(value: &str) -> Namespace {@@ -73,13 +73,12 @@ fn upstream_identity_and_confinement_keep_embedded_root_and_rpc_policy() {.reach,Some(Reach::exact(narrow)));- assert!(- rpc.filter(Some(MetaFilter {+ assert!(rpc+ .filter(Some(MetaFilter {reach: Some(Reach::subtree(ns("project:embed/team:other"))),..MetaFilter::default()}))- .is_err()- );+ .is_err());let saas = Confinement {allowed,diff --git a/crates/openhuman-core/src/memory/sources/mod.rs b/crates/openhuman-core/src/memory/sources/mod.rsindex 027a04bca0..f55910daa0 100644--- a/crates/openhuman-core/src/memory/sources/mod.rs+++ b/crates/openhuman-core/src/memory/sources/mod.rs@@ -14,8 +14,8 @@ use tinymemory_integrations::sources::SourceState;use tinymemory_integrations::sources::{Error as SourceError, SourceSpec};use tinymemory_tools::ops::MemoryOps;-use crate::config::Config;use crate::config::schema::{MemorySourceConfig, MemorySourceKind};+use crate::config::Config;use super::engine;use super::types::{SourceView, SourcesAddParams};diff --git a/crates/openhuman-core/src/memory/sources/sync.rs b/crates/openhuman-core/src/memory/sources/sync.rsindex 6951112ad3..2fbbf07246 100644--- a/crates/openhuman-core/src/memory/sources/sync.rs+++ b/crates/openhuman-core/src/memory/sources/sync.rs@@ -11,15 +11,15 @@ use std::path::PathBuf;use std::sync::{Arc, LazyLock, Mutex, PoisonError};use chrono::{DateTime, Utc};-use tinymemory_integrations::sources::SourceKind;-use tinymemory_integrations::sources::SourceStatus;use tinymemory_integrations::sources::sync::{self as module, RegisteredSource, SourceRegistry, SyncError, SyncState, SyncStatus, SyncUpdate,Syncer,};+use tinymemory_integrations::sources::SourceKind;+use tinymemory_integrations::sources::SourceStatus;-use crate::config::Config;use crate::config::schema::{MemorySourceConfig, MemorySourceKind};+use crate::config::Config;use crate::memory::engine;use tinymemory_api::{Error, Result};diff --git a/crates/openhuman-core/src/memory/sources/sync_tests.rs b/crates/openhuman-core/src/memory/sources/sync_tests.rsindex 129e75be63..eed0b49518 100644--- a/crates/openhuman-core/src/memory/sources/sync_tests.rs+++ b/crates/openhuman-core/src/memory/sources/sync_tests.rs@@ -102,11 +102,9 @@ async fn sync_one_reports_memory_off_and_unreadable_sources() {bind_reference(&config);let missing = config.action_dir.join("does-not-exist");- assert!(- sync_one(&config, &folder_source("s", &missing, None))- .await- .is_err()- );+ assert!(sync_one(&config, &folder_source("s", &missing, None))+ .await+ .is_err());}#[tokio::test]@@ -199,15 +197,13 @@ async fn a_source_already_syncing_is_not_started_twice() {// Hold a claim as a running sync would: a second request starts nothing.let held = syncer_for(&config).start(Some("src-once")).unwrap();assert_eq!(held.len(), 1);- assert!(- start_sync(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- Some("src-once")- )- .unwrap()- .is_empty()- );+ assert!(start_sync(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some("src-once")+ )+ .unwrap()+ .is_empty());drop(held);assert_eq!(start_sync(@@ -270,14 +266,12 @@ fn sync_due_with_memory_off_starts_nothing() {.memory.sources.push(folder_source("s", tmp.path(), Some(15)));- assert!(- sync_due(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- Utc::now()- )- .is_empty()- );+ assert!(sync_due(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Utc::now()+ )+ .is_empty());}#[test]@@ -302,8 +296,8 @@ fn reset_interrupted_marks_syncing_sources_idle() {#[tokio::test]async fn a_sync_queues_a_belief_build_only_for_an_engine_that_waits_for_one() {use std::sync::Arc;- use tinymemory_api::Consolidation;use tinymemory_api::conformance::ReferenceEngine;+ use tinymemory_api::Consolidation;let note = || {tinymemory_api::StoreItem::document(diff --git a/crates/openhuman-core/src/memory/tool_budget_tests.rs b/crates/openhuman-core/src/memory/tool_budget_tests.rsindex 612385d1b8..626e7d36eb 100644--- a/crates/openhuman-core/src/memory/tool_budget_tests.rs+++ b/crates/openhuman-core/src/memory/tool_budget_tests.rs@@ -148,12 +148,10 @@ async fn parallel_memory_reads_reserve_from_the_same_time_budget() {async fn completed_run_tracking_is_bounded() {let budget = budget();for i in 0..200 {- assert!(- budget- .run(Some(&format!("turn-{i}")), async { "ok" })- .await- .is_ok()- );+ assert!(budget+ .run(Some(&format!("turn-{i}")), async { "ok" })+ .await+ .is_ok());}// The first idle record was evicted, so it receives a fresh call allowance.for _ in 0..8 {@@ -172,12 +170,10 @@ async fn an_outstanding_memory_call_survives_other_runs_and_keeps_its_timeout_citokio::pin!(call);assert!(futures::poll!(call.as_mut()).is_pending());for i in 0..128 {- assert!(- budget- .run(Some(&format!("other-{i}")), async { "ok" })- .await- .is_ok()- );+ assert!(budget+ .run(Some(&format!("other-{i}")), async { "ok" })+ .await+ .is_ok());}assert_eq!(call.await, Err(Refusal::TimedOut));assert_eq!(diff --git a/crates/openhuman-core/src/memory/tool_writes.rs b/crates/openhuman-core/src/memory/tool_writes.rsindex 0af42b76a7..cef6a0011d 100644--- a/crates/openhuman-core/src/memory/tool_writes.rs+++ b/crates/openhuman-core/src/memory/tool_writes.rs@@ -20,14 +20,14 @@ use async_trait::async_trait;use serde::Deserialize;use sha2::{Digest, Sha256};use tinymemory_api::{Namespace, Reach, StoreItem, WriteOptions};-use tinymemory_tools::ToolScope;-use tinymemory_tools::WriteSink;use tinymemory_tools::confine::Policy;use tinymemory_tools::list_store::{ListStore, StoreError};use tinymemory_tools::pending::{Ack, Binding, Entry, Epoch, FenceToken, Limits, PendingError, PendingWrites, WriteExecutor,WriteGate, WriteOperation,};+use tinymemory_tools::ToolScope;+use tinymemory_tools::WriteSink;use super::types::ForgetParams;use crate::config::Config;diff --git a/crates/openhuman-core/src/memory/tool_writes_tests.rs b/crates/openhuman-core/src/memory/tool_writes_tests.rsindex 82852c6b63..2d94c5a51d 100644--- a/crates/openhuman-core/src/memory/tool_writes_tests.rs+++ b/crates/openhuman-core/src/memory/tool_writes_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::memory::test_fixtures::{RefusingEngine, bind_reference, config_in, stored};+use crate::memory::test_fixtures::{bind_reference, config_in, stored, RefusingEngine};use crate::memory::tools::CallFacts;use serde_json::json;use tinymemory_api::{MetaFilter, Namespace, Reach};@@ -230,14 +230,12 @@ fn private_outbox_is_scrubbed_before_persistence_and_has_a_size_limit() {);}let huge = "x".repeat(MAX_BYTES);- assert!(- enqueue(- &config,- &json!({"action":"learn","text":huge}),- &facts(&config)- )- .is_err()- );+ assert!(enqueue(+ &config,+ &json!({"action":"learn","text":huge}),+ &facts(&config)+ )+ .is_err());assert_eq!(read(&config.workspace_dir).unwrap().len(), 1);}@@ -348,14 +346,12 @@ fn corrupt_existing_outbox_is_preserved_and_refuses_new_writes() {let config = config_in(&tmp);let file = path(&config.workspace_dir);super::super::files::write_private(&file, b"corrupt existing state").unwrap();- assert!(- enqueue(- &config,- &json!({"action":"learn","text":"Prefers tea"}),- &facts(&config)- )- .is_err()- );+ assert!(enqueue(+ &config,+ &json!({"action":"learn","text":"Prefers tea"}),+ &facts(&config)+ )+ .is_err());assert_eq!(std::fs::read(&file).unwrap(), b"corrupt existing state");}@@ -424,14 +420,12 @@ fn a_full_outbox_keeps_existing_writes_and_refuses_a_new_one() {let mut entries = read(&config.workspace_dir).unwrap();entries.resize(MAX_PENDING, entries[0].clone());write(&config.workspace_dir, &entries).unwrap();- assert!(- enqueue(- &config,- &json!({"action":"learn","text":"new"}),- &facts(&config)- )- .is_err()- );+ assert!(enqueue(+ &config,+ &json!({"action":"learn","text":"new"}),+ &facts(&config)+ )+ .is_err());assert_eq!(read(&config.workspace_dir).unwrap().len(), MAX_PENDING);}@@ -660,16 +654,12 @@ async fn erasing_one_owner_fences_pending_writes_from_every_team_root() {let fence = fence_and_clear(&crate::core::runtime::DispatchCtx::ambient(), &first).await.unwrap();- assert!(- read_at(&queue_path(&first, &facts(&first).reach.at))- .unwrap()- .is_empty()- );- assert!(- read_at(&queue_path(&second, &facts(&second).reach.at))- .unwrap()- .is_empty()- );+ assert!(read_at(&queue_path(&first, &facts(&first).reach.at))+ .unwrap()+ .is_empty());+ assert!(read_at(&queue_path(&second, &facts(&second).reach.at))+ .unwrap()+ .is_empty());drop(fence);let engine = bind_reference(&first);assert_eq!(drain(&first).await, 0);diff --git a/crates/openhuman-core/src/memory/tools.rs b/crates/openhuman-core/src/memory/tools.rsindex 5febe686da..585a6d675b 100644--- a/crates/openhuman-core/src/memory/tools.rs+++ b/crates/openhuman-core/src/memory/tools.rs@@ -6,11 +6,11 @@ use std::sync::Arc;use std::time::Duration;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinymemory_api::{Namespace, Reach, ThreadWindow, ToolCallRef};use tinymemory_tools::{- CallContext, ConcurrencyClass, MemoryTools, PermissionClass, Refusal, RunBudget, SingleTool,- ToolScope, concurrency_for, is_write_action, permission_for,+ concurrency_for, is_write_action, permission_for, CallContext, ConcurrencyClass, MemoryTools,+ PermissionClass, Refusal, RunBudget, SingleTool, ToolScope,};use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolResult, ToolRunContext};@@ -201,9 +201,11 @@ impl MemoryTool {{Ok(result) => result,Err(_) => {- return ToolResult::error(render_error(tinymemory_api::Error::Unavailable(- "memory write queue unavailable".into(),- )));+ return ToolResult::error(render_error(+ tinymemory_api::Error::Unavailable(+ "memory write queue unavailable".into(),+ ),+ ));}}} else {diff --git a/crates/openhuman-core/src/memory/tools_offline_tests.rs b/crates/openhuman-core/src/memory/tools_offline_tests.rsindex f9c6e89283..85d2a98125 100644--- a/crates/openhuman-core/src/memory/tools_offline_tests.rs+++ b/crates/openhuman-core/src/memory/tools_offline_tests.rs@@ -40,11 +40,9 @@ async fn queued_writes_work_without_an_available_engine_but_not_when_explicitly_&pending[1].operation,tinymemory_tools::pending::WriteOperation::Forget { .. }));- assert!(- pending- .iter()- .all(|entry| entry.scope_root == facts.reach.at)- );+ assert!(pending+ .iter()+ .all(|entry| entry.scope_root == facts.reach.at));let mut disabled = config.clone();disabled.components.memory = false;diff --git a/crates/openhuman-core/src/memory/tools_saas_tests.rs b/crates/openhuman-core/src/memory/tools_saas_tests.rsindex 39c1f5e382..1a4e76739e 100644--- a/crates/openhuman-core/src/memory/tools_saas_tests.rs+++ b/crates/openhuman-core/src/memory/tools_saas_tests.rs@@ -2,8 +2,8 @@ use super::*;use crate::config::schema::MemoryAgentConfig;use crate::memory::test_fixtures::config_in;use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};use tinymemory_api::conformance::ReferenceEngine;use tinymemory_api::{@@ -225,18 +225,14 @@ fn valid_saas_root_keeps_tool_reads_inside_the_authenticated_namespace() {.unwrap();assert!(!recall.is_error, "{}", recall.text());let evidence: Value = serde_json::from_str(&recall.text()).unwrap();- assert!(- evidence["evidence"]- .as_str()- .unwrap()- .contains("acme boundary marker")- );- assert!(- !evidence["evidence"]- .as_str()- .unwrap()- .contains("foreign boundary marker")- );+ assert!(evidence["evidence"]+ .as_str()+ .unwrap()+ .contains("acme boundary marker"));+ assert!(!evidence["evidence"]+ .as_str()+ .unwrap()+ .contains("foreign boundary marker"));let fetch = tool.execute_with_context(@@ -248,18 +244,14 @@ fn valid_saas_root_keeps_tool_reads_inside_the_authenticated_namespace() {.unwrap();assert!(!fetch.is_error, "{}", fetch.text());let page: Value = serde_json::from_str(&fetch.text()).unwrap();- assert!(- page["matches"]- .as_str()- .unwrap()- .contains("acme boundary marker")- );- assert!(- !page["matches"]- .as_str()- .unwrap()- .contains("foreign boundary marker")- );+ assert!(page["matches"]+ .as_str()+ .unwrap()+ .contains("acme boundary marker"));+ assert!(!page["matches"]+ .as_str()+ .unwrap()+ .contains("foreign boundary marker"));assert_eq!(reads.load(Ordering::SeqCst), 2);});println!("SAAS_MEMORY_TOOL_VALID_ROOT_CHILD_PASSED");diff --git a/crates/openhuman-core/src/memory/tools_test_support.rs b/crates/openhuman-core/src/memory/tools_test_support.rsindex 63b0a93362..1ca289bf2a 100644--- a/crates/openhuman-core/src/memory/tools_test_support.rs+++ b/crates/openhuman-core/src/memory/tools_test_support.rs@@ -1,6 +1,6 @@//! Shared test adapters for the memory tool's native facade.-use super::{CallFacts, MemoryTool, is_write_action};+use super::{is_write_action, CallFacts, MemoryTool};use crate::config::Config;use crate::core::runtime::DispatchCtx;use serde_json::Value;diff --git a/crates/openhuman-core/src/memory/tools_tests.rs b/crates/openhuman-core/src/memory/tools_tests.rsindex 568dc97f0b..4006bfce81 100644--- a/crates/openhuman-core/src/memory/tools_tests.rs+++ b/crates/openhuman-core/src/memory/tools_tests.rs@@ -456,11 +456,9 @@ async fn learnings_are_shared_under_a_root_and_a_team_root_is_kept_apart() {);assert!(after_forget.iter().any(|hit| hit.id == main_item.id));assert!(after_forget.iter().any(|hit| hit.text.contains("arxiv")));- assert!(- after_forget- .iter()- .any(|hit| hit.text.contains("british english"))- );+ assert!(after_forget+ .iter()+ .any(|hit| hit.text.contains("british english")));}/// The reference engine, recording how far each single store waited.