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(tests): add coverage for orphaned head resume and thread ops
Steven Enamakeld9fff0ef296e
diff --git a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rsindex fbfcab09a3..ed074b7317 100644--- a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs@@ -71,7 +71,7 @@ async fn resumed_orphaned_tool_head_is_repaired_before_the_request() {.iter().position(|row| row.role != "system").expect("turn 1 wrote a non-system row");- assert!(head_end >= 2, "fixture needs the persisted system prefix");+ assert!(head_end >= 1, "fixture needs the persisted system prefix");let failed = TranscriptMessage::tool("ra").with_id("call_orphan_a");let call = TranscriptToolCall {id: "call_kept".into(),diff --git a/crates/openhuman-core/src/threads/ops/edit_tests.rs b/crates/openhuman-core/src/threads/ops/edit_tests.rsindex bab5c28c10..55e5d2e226 100644--- a/crates/openhuman-core/src/threads/ops/edit_tests.rs+++ b/crates/openhuman-core/src/threads/ops/edit_tests.rs@@ -405,7 +405,7 @@ async fn edit_and_regenerate_use_the_threads_recorded_key_after_a_chat_agent_cha);DispatchCtx::new(CoreContext::for_test(DomainSet::full(), None).derive_with(overlay))};- let (before, after) = (ctx_with(None), ctx_with(Some("researcher")));+ let (before, after) = (ctx_with(None), ctx_with(Some("planner")));let thread_id = "thread-flipped";// The first session records its key and writes the transcript there.diff --git a/crates/openhuman-core/src/threads/ops/transcript_tests.rs b/crates/openhuman-core/src/threads/ops/transcript_tests.rsindex e99aa47e30..5e811d2e90 100644--- a/crates/openhuman-core/src/threads/ops/transcript_tests.rs+++ b/crates/openhuman-core/src/threads/ops/transcript_tests.rs@@ -206,7 +206,7 @@ async fn changing_the_chat_agent_does_not_strand_an_existing_threads_turns() {let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();let dir = tempfile::tempdir().unwrap();let before = ctx_with_chat_agent(dir.path(), None, None);- let after = ctx_with_chat_agent(dir.path(), None, Some("researcher"));+ let after = ctx_with_chat_agent(dir.path(), None, Some("planner"));// The two configs derive different keys, or this proves nothing.let rule_before = super::super::support::transcript_store(&before, THREAD)@@ -261,7 +261,7 @@ async fn changing_the_chat_agent_does_not_strand_an_existing_threads_turns() {// A thread with no recorded key falls back to the current rule.let other = tempfile::tempdir().unwrap();let unrecorded_before = ctx_with_chat_agent(other.path(), None, None);- let unrecorded_after = ctx_with_chat_agent(other.path(), None, Some("researcher"));+ let unrecorded_after = ctx_with_chat_agent(other.path(), None, Some("planner"));write_thread(&unrecorded_before).await;let page = transcript_get(&unrecorded_after, request()).await