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(threads): align RPC and transcript fixtures with persisted contracts
Steven Enamakel2493917a32e0
diff --git a/crates/openhuman-core/src/threads/ops/live_state_tests.rs b/crates/openhuman-core/src/threads/ops/live_state_tests.rsindex 9f70e8c86c..2e4da23a97 100644--- a/crates/openhuman-core/src/threads/ops/live_state_tests.rs+++ b/crates/openhuman-core/src/threads/ops/live_state_tests.rs@@ -57,7 +57,7 @@ async fn goal_get_reads_back_a_stored_goal() {.await.unwrap();let empty_json = empty.into_cli_compatible_json().unwrap();- assert!(empty_json["result"]["goal"].is_null(), "{empty_json}");+ assert!(empty_json["result"]["data"]["goal"].is_null(), "{empty_json}");let dir = crate::config::Config::load_or_init().await@@ -73,7 +73,7 @@ async fn goal_get_reads_back_a_stored_goal() {.await.unwrap();let filled_json = filled.into_cli_compatible_json().unwrap();- let goal = &filled_json["result"]["goal"];+ let goal = &filled_json["result"]["data"]["goal"];assert_eq!(goal["objective"], "ship it");assert_eq!(goal["status"], "active");}@@ -94,7 +94,7 @@ async fn todos_get_reads_back_what_the_todo_tool_wrote() {.await.unwrap();let empty_json = empty.into_cli_compatible_json().unwrap();- assert!(empty_json["result"]["todos"].as_array().unwrap().is_empty());+ assert!(empty_json["result"]["data"]["todos"].as_array().unwrap().is_empty());let scope = crate::agent::todos::ops::TodoScope::Session {id: "thread-todos-live".to_string(),@@ -113,7 +113,7 @@ async fn todos_get_reads_back_what_the_todo_tool_wrote() {.await.unwrap();let filled_json = filled.into_cli_compatible_json().unwrap();- let todos = filled_json["result"]["todos"].as_array().unwrap();+ let todos = filled_json["result"]["data"]["todos"].as_array().unwrap();assert_eq!(todos.len(), 1);assert_eq!(todos[0]["content"], "write tests");}diff --git a/crates/openhuman-core/src/threads/schemas_tests.rs b/crates/openhuman-core/src/threads/schemas_tests.rsindex 871548689e..fa9871ecf1 100644--- a/crates/openhuman-core/src/threads/schemas_tests.rs+++ b/crates/openhuman-core/src/threads/schemas_tests.rs@@ -22,6 +22,8 @@ const ALL_FUNCTIONS: &[&str] = &["transcript_get","goal_get","todos_get",+ "edit_message",+ "regenerate",];#[test]diff --git a/crates/openhuman-core/src/threads/transcript_view/transcript_subagent_anchor_tests.rs b/crates/openhuman-core/src/threads/transcript_view/transcript_subagent_anchor_tests.rsindex cbcf64d9ce..a62e3a16ae 100644--- a/crates/openhuman-core/src/threads/transcript_view/transcript_subagent_anchor_tests.rs+++ b/crates/openhuman-core/src/threads/transcript_view/transcript_subagent_anchor_tests.rs@@ -28,13 +28,13 @@ fn subagent_anchors_to_parent_turn_by_spawn_timestamp() {write_raw(dir.path(), root_stem, thread_id, &root_refs);write_raw(dir.path(),- &format!("{root_stem}__1000050_coder"),+ &format!("{root_stem}__999950_coder"),thread_id,&[r#"{"role":"assistant","content":"coder work"}"#],);write_raw(dir.path(),- &format!("{root_stem}__2000050_planner"),+ &format!("{root_stem}__1999950_planner"),thread_id,&[r#"{"role":"assistant","content":"planner work"}"#],);diff --git a/crates/openhuman-core/src/threads/transcript_view/transcript_view_subagent_tests.rs b/crates/openhuman-core/src/threads/transcript_view/transcript_view_subagent_tests.rsindex 41541fd6dc..3cb2494b46 100644--- a/crates/openhuman-core/src/threads/transcript_view/transcript_view_subagent_tests.rs+++ b/crates/openhuman-core/src/threads/transcript_view/transcript_view_subagent_tests.rs@@ -79,7 +79,7 @@ fn subagent_correlates_by_ledger_parent_call_id_over_the_heuristic() {let root_body = vec![r#"{"role":"user","content":"do research","request_id":"req-1"}"#.to_string(),format!(- r#"{{"role":"assistant","content":"","tool_calls":[{{"id":"call-decoy","name":"spawn_async_subagent","arguments":"{{}}"}},{{"id":"call-real","name":"spawn_async_subagent","arguments":"{{}}"}}],"iteration":1,"request_id":"req-1","ts":"{commit_ts}"}}"#+ r#"{{"role":"assistant","content":"","provider":"test","model":"test","usage":{{"input":1,"output":1,"cached_input":0,"cost_usd":0.0}},"tool_calls":[{{"id":"call-decoy","name":"spawn_async_subagent","arguments":"{{}}"}},{{"id":"call-real","name":"spawn_async_subagent","arguments":"{{}}"}}],"iteration":1,"request_id":"req-1","ts":"{commit_ts}"}}"#),];let root_refs: Vec<&str> = root_body.iter().map(String::as_str).collect();diff --git a/crates/openhuman-core/src/threads/transcript_view/transcript_view_tests.rs b/crates/openhuman-core/src/threads/transcript_view/transcript_view_tests.rsindex 45b7a59d3a..d618c43978 100644--- a/crates/openhuman-core/src/threads/transcript_view/transcript_view_tests.rs+++ b/crates/openhuman-core/src/threads/transcript_view/transcript_view_tests.rs@@ -159,10 +159,10 @@ fn reuses_synthetic_tool_call_ids_in_a_later_turn() {"thr_synthetic",&[r#"{"role":"user","content":"one","request_id":"req-1"}"#,- r#"{"role":"assistant","content":"","tool_calls":[{"id":"call_0","name":"first","arguments":"{}"}],"request_id":"req-1"}"#,+ r#"{"role":"assistant","content":"","provider":"test","model":"test","usage":{"input":1,"output":1,"cached_input":0,"cost_usd":0.0},"ts":"2026-07-21T00:00:01Z","tool_calls":[{"id":"call_0","name":"first","arguments":"{}"}],"request_id":"req-1"}"#,r#"{"role":"tool","content":"first result","id":"call_0","request_id":"req-1"}"#,r#"{"role":"user","content":"two","request_id":"req-2"}"#,- r#"{"role":"assistant","content":"","tool_calls":[{"id":"call_0","name":"second","arguments":"{}"}],"request_id":"req-2"}"#,+ r#"{"role":"assistant","content":"","provider":"test","model":"test","usage":{"input":1,"output":1,"cached_input":0,"cost_usd":0.0},"ts":"2026-07-21T00:00:02Z","tool_calls":[{"id":"call_0","name":"second","arguments":"{}"}],"request_id":"req-2"}"#,r#"{"role":"tool","content":"second result","id":"call_0","request_id":"req-2"}"#,],);