Skip to content

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

test: update thread id field and drop legacy ccr migration test

Steven Enamakelaf6e4338e02d
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index 336f4c4989..edb96d3745 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -729,7 +729,7 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {
assert!(sent_text(&sent[2]).contains("→ `Telegram"));
assert!(sent
.iter()
- .all(|message| message.thread_ts.as_deref() == Some("42")));
+ .all(|message| message.thread_id.as_deref() == Some("42")));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/storage/schema_tests.rs b/crates/openhuman-core/src/storage/schema_tests.rs
index 27e607fd4a..047c7ebc02 100644
--- a/crates/openhuman-core/src/storage/schema_tests.rs
+++ b/crates/openhuman-core/src/storage/schema_tests.rs
@@ -50,65 +50,3 @@ fn module_collections_are_limited_to_the_named_owner() {
fn tinyjuice_ccr_blobs_stay_inside_the_juice_owner_namespace() {
assert_eq!(module_items("juice").blobs, ["juice/ccr/"]);
}
-
-#[cfg(feature = "modules")]
-#[tokio::test]
-async fn tinyjuice_legacy_ccr_blobs_migrate_with_the_owner_contract() {
- use tinystoragedrivers::schema::{MigrateOptions, Registry};
- use tinystoragedrivers::{MemoryStorage, Scope, StorageBackend};
-
- let backend = MemoryStorage::new();
- let scoped = backend.for_scope(&Scope::local()).unwrap();
- let blobs = scoped.blobs();
- blobs
- .put(
- "tinyjuice_ccr/0123456789abcdef",
- b"original text".to_vec(),
- Some("text/plain; charset=utf-8"),
- )
- .await
- .unwrap();
- blobs
- .put("tinyjuice_ccr/fedcba9876543210", b"two".to_vec(), None)
- .await
- .unwrap();
- blobs
- .put("other/keep", b"keep".to_vec(), None)
- .await
- .unwrap();
-
- let registry = Registry::compose([tinyjuice_storage_schema()]).unwrap();
- let report = registry
- .migrate(&scoped, &MigrateOptions::new())
- .await
- .unwrap();
- assert_eq!(report.ran[0].written, 2);
- assert!(blobs
- .list(tinyjuice_bus::storage::LEGACY_CCR_PREFIX)
- .await
- .unwrap()
- .is_empty());
- let moved = blobs
- .get("juice/ccr/0123456789abcdef")
- .await
- .unwrap()
- .unwrap();
- assert_eq!(moved.bytes, b"original text");
- assert_eq!(
- moved.meta.content_type.as_deref(),
- Some("text/plain; charset=utf-8")
- );
- let moved = blobs
- .get("juice/ccr/fedcba9876543210")
- .await
- .unwrap()
- .unwrap();
- assert_eq!(moved.meta.content_type, None);
- assert!(blobs.get("other/keep").await.unwrap().is_some());
-
- let again = registry
- .migrate(&scoped, &MigrateOptions::new())
- .await
- .unwrap();
- assert!(again.ran.is_empty());
-}
diff --git a/crates/openhuman-core/src/threads/store/bus_tests.rs b/crates/openhuman-core/src/threads/store/bus_tests.rs
index 2656565107..3f4ccc0e72 100644
--- a/crates/openhuman-core/src/threads/store/bus_tests.rs
+++ b/crates/openhuman-core/src/threads/store/bus_tests.rs
@@ -19,8 +19,8 @@ fn subscriber_reads_rebound_workspace_from_shared_handle() {
async fn persists_inbound_and_processed_turns_into_workspace_thread() {
let temp = TempDir::new().expect("tempdir");
let subscriber = ConversationPersistenceSubscriber::new(temp.path().to_path_buf());
- let mut inbound_envelope =
- tinychannels_runtime::channel::inbound_envelope_from_legacy_message(&tinychannels_bus::ChannelMessage {
+ let mut inbound_envelope = tinychannels_runtime::channel::inbound_envelope_from_legacy_message(
+ &tinychannels_bus::ChannelMessage {
channel: "slack".into(),
id: "m1".into(),
sender: "alice".into(),
@@ -31,7 +31,8 @@ async fn persists_inbound_and_processed_turns_into_workspace_thread() {
sender_name: None,
reply_to_id: None,
topic_id: None,
- });
+ },
+ );
inbound_envelope.conversation.kind = tinychannels_bus::channel::ConversationKind::Channel;
inbound_envelope.conversation.scope_id = Some("T123".into());