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(subagent_host): align assertions with canonical transcript and role contract
Steven Enamakel0f0237a6ea48
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rsindex 212e9e7022..a5fbe42aba 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs@@ -217,8 +217,20 @@ async fn independent_host_bundles_share_and_project_the_persisted_winner() {assert!(matches!(leader.status, SubagentRunStatus::Completed));assert!(matches!(follower.status, SubagentRunStatus::Completed));assert_eq!(leader.final_history.len(), follower.final_history.len());+ // The neutral transcript contract identifies a tool result row by its+ // call ID, even when the host's transient row left `id` unset. Compare the+ // leader through that same canonical projection before checking the full+ // durable winner history returned by the independent follower.+ let canonical_leader_history: Vec<_> = leader+ .final_history+ .iter()+ .filter_map(|row| {+ let message = crate::agent::message_convert::chat_message_to_message(row);+ tinyagents_runtime::transcript::message_to_native_transcript(&message)+ })+ .collect();assert_eq!(- serde_json::to_value(&leader.final_history).unwrap(),+ serde_json::to_value(&canonical_leader_history).unwrap(),serde_json::to_value(&follower.final_history).unwrap(),"follower receives the full winner history");diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rsindex 1aa79dd240..a0a14c0c34 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs@@ -126,13 +126,28 @@ async fn typed_mode_system_prompt_includes_subagent_role_contract() {.iter().find(|m| m.role == "system").expect("system message should be present");- assert!(system_msg.content.contains("## Sub-agent Role Contract"));assert!(system_msg.content- .contains("You are a sub-agent working for a parent OpenHuman agent"));+ .contains("You are a subagent (depth 1) working for a parent agent, not the end user."));assert!(system_msg.content- .contains("Keep your final response concise and synthesis-ready"));+ .contains("Your assignment: the actual task prompt"));+ for heading in [+ "Answer",+ "Evidence used",+ "Actions taken",+ "Open uncertainties",+ "Failed tool calls",+ "Recommended next step",+ ] {+ assert!(+ system_msg.content.contains(heading),+ "missing {heading} heading"+ );+ }+ assert!(system_msg+ .content+ .contains("Do not state unsupported facts; disclose truncated or partial tool results."));}#[tokio::test]