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
test(crud_queued_attachment): add test for idempotent text-only message persistence
Steven Enamakel4e16da4b654a
diff --git a/crates/openhuman-core/src/threads/ops/crud_queued_attachment_tests.rs b/crates/openhuman-core/src/threads/ops/crud_queued_attachment_tests.rsindex 43e73ac157..1ed0237c85 100644--- a/crates/openhuman-core/src/threads/ops/crud_queued_attachment_tests.rs+++ b/crates/openhuman-core/src/threads/ops/crud_queued_attachment_tests.rs@@ -95,6 +95,30 @@ async fn queued_user_append_reuses_exact_request_row_and_rejects_conflicts() {assert_eq!(rows.iter().filter(|row| row.id == first.id).count(), 1);}+#[tokio::test]+async fn queued_text_only_user_message_is_persisted_idempotently() {+ let (_temp, config) = setup().await;+ let ctx = crate::core::runtime::DispatchCtx::ambient();++ let first = persist_queued_user_message(&ctx, "uploads", "text-only", "follow-up", &[])+ .await+ .unwrap();+ let retry = persist_queued_user_message(&ctx, "uploads", "text-only", "follow-up", &[])+ .await+ .unwrap();++ assert_eq!(first.id, "user:text-only");+ assert_eq!(retry.id, first.id);+ assert_eq!(first.sender, "user");+ assert_eq!(first.content, "follow-up");+ assert!(first.attachments.is_empty());+ let rows = conversations::get_messages(&ctx, config.workspace_dir, "uploads").unwrap();+ assert_eq!(+ rows.iter().filter(|row| row.id == "user:text-only").count(),+ 1+ );+}+#[tokio::test]async fn concurrent_queued_attachment_transfer_has_one_exact_owner() {use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};