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
style(threads): reformat crud imports and message append tests
Steven Enamakelb607c01a47c1
diff --git a/crates/openhuman-core/src/threads/ops/crud.rs b/crates/openhuman-core/src/threads/ops/crud.rsindex 023d22feb4..843ed74753 100644--- a/crates/openhuman-core/src/threads/ops/crud.rs+++ b/crates/openhuman-core/src/threads/ops/crud.rs@@ -5,11 +5,11 @@ use super::support::{counts, envelope, message_to_record, record_to_message, run_to_completion, thread_to_summary,workspace_dir,};-use crate::core::runtime::DispatchCtx;use crate::core::Outcome;+use crate::core::runtime::DispatchCtx;+use crate::threads::ThreadsError;use crate::threads::store as conversations;use crate::threads::store::{ConversationMessagePatch, CrossThreadHit};-use crate::threads::ThreadsError;use crate::threads::{ApiEnvelope, AppendConversationMessageRequest, ConversationMessageRecord,ConversationMessagesRequest, ConversationMessagesResponse, ConversationThreadSummary,diff --git a/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rs b/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rsindex 1eff122c93..964dda7317 100644--- a/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rs+++ b/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rs@@ -111,47 +111,55 @@ async fn user_append_stages_original_strips_upload_bytes_and_reuses_returned_con.await.unwrap();assert_eq!(persisted.len(), 2);- assert!(!serde_json::to_string(&persisted)- .unwrap()- .contains("base64,"));+ assert!(+ !serde_json::to_string(&persisted)+ .unwrap()+ .contains("base64,")+ );}#[tokio::test]async fn rejected_upload_never_appends_a_message() {let (_temp, mut config) = setup().await;config.multimodal_files.max_files = 0;- assert!(append_with_test_config(- request(- "disabled",- "[IMAGE:data:image/png;base64,iVBORw0KGgo=]",- "user"- ),- &config,- None,- )- .await- .is_err());+ assert!(+ append_with_test_config(+ request(+ "disabled",+ "[IMAGE:data:image/png;base64,iVBORw0KGgo=]",+ "user"+ ),+ &config,+ None,+ )+ .await+ .is_err()+ );config.multimodal_files.max_files = 3;- assert!(append_with_test_config(- request("bad", "[FILE:data:application/zip;base64,!]", "user"),- &config,- None,- )- .await- .is_err());+ assert!(+ append_with_test_config(+ request("bad", "[FILE:data:application/zip;base64,!]", "user"),+ &config,+ None,+ )+ .await+ .is_err()+ );assert!(append_with_test_config(request("missing", "image.png", "user"), &config, None).await.is_err());- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir.clone(),- "uploads".into()- )- .await- .unwrap()- .is_empty());+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir.clone(),+ "uploads".into()+ )+ .await+ .unwrap()+ .is_empty()+ );}#[tokio::test]@@ -179,14 +187,16 @@ async fn external_origin_cannot_reuse_an_existing_attachment_marker() {.await.is_err());- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir,- "uploads".into()- )- .await- .unwrap()- .is_empty());+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir,+ "uploads".into()+ )+ .await+ .unwrap()+ .is_empty()+ );}#[tokio::test]@@ -255,14 +265,16 @@ async fn append_uses_host_persistence_workspace_separate_from_rpc_config() {.await.unwrap();assert_eq!(persisted.len(), 1);- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir,- "uploads".into()- )- .await- .unwrap()- .is_empty());+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir,+ "uploads".into()+ )+ .await+ .unwrap()+ .is_empty()+ );}#[tokio::test]@@ -273,17 +285,21 @@ async fn poster_only_user_metadata_is_rejected_before_persistence() {"attachmentNames": ["video.mp4"],"attachmentPosters": ["data:image/png;base64,iVBORw0KGgo="]});- assert!(append_with_test_config(upload, &config, None)+ assert!(+ append_with_test_config(upload, &config, None)+ .await+ .is_err()+ );+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir.clone(),+ "uploads".into()+ ).await- .is_err());- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir.clone(),- "uploads".into()- )- .await- .unwrap()- .is_empty());+ .unwrap()+ .is_empty()+ );}#[tokio::test]