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(json_rpc_e2e): reorder team message test to verify stopped member rejection
Steven Enamakelc80586498fa9
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex a20ab1a4a1..181738a706 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -3541,7 +3541,6 @@ async fn json_rpc_workflow_run_definitions_and_runs_roundtrip() {}#[tokio::test]-#[ignore = "TODO(#6380): agent_team_message_member answers `unknown member: member-...` for ids returned by agent_team_create; run: cargo test -p openhuman-cli --features <product> --test json_rpc_e2e json_rpc_agent_team_coordination_roundtrip -- --ignored"]async fn json_rpc_agent_team_coordination_roundtrip() {let _env_lock = json_rpc_e2e_env_lock();let tmp = tempdir().expect("tempdir");@@ -3774,6 +3773,38 @@ async fn json_rpc_agent_team_coordination_roundtrip() {Some("completed"));+ // Message bob from alice (still live), then list messages. The shutdown+ // below must come after: a stopped member cannot send or receive.+ let message = post_json_rpc(+ &rpc_base,+ 9347,+ "openhuman.agent_team_message_member",+ json!({+ "teamId": team_id,+ "fromMemberId": alice_id,+ "toMemberId": bob_id,+ "content": "task A done, you are unblocked"+ }),+ )+ .await;+ assert_no_jsonrpc_error(&message, "agent_team_message_member");++ let messages = post_json_rpc(+ &rpc_base,+ 9348,+ "openhuman.agent_team_list_messages",+ json!({ "teamId": team_id }),+ )+ .await;+ let messages_outer = assert_no_jsonrpc_error(&messages, "agent_team_list_messages");+ assert_eq!(+ messages_outer+ .get("messages")+ .and_then(serde_json::Value::as_array)+ .map(|m| m.len()),+ Some(1)+ );+// Shut alice down → member stopped (her task A is already done, so nothing// is released back to the queue).let shutdown_alice = post_json_rpc(@@ -3802,35 +3833,27 @@ async fn json_rpc_agent_team_coordination_roundtrip() {Some(0));- // Message bob from alice, then list messages.- let message = post_json_rpc(+ // A stopped member is no longer part of the live roster, so it can neither+ // send nor receive team messages (`TeamService::ensure_member`).+ let message_from_stopped = post_json_rpc(&rpc_base,- 9347,+ 9363,"openhuman.agent_team_message_member",json!({"teamId": team_id,"fromMemberId": alice_id,"toMemberId": bob_id,- "content": "task A done, you are unblocked"+ "content": "sent after shutdown"}),).await;- assert_no_jsonrpc_error(&message, "agent_team_message_member");-- let messages = post_json_rpc(- &rpc_base,- 9348,- "openhuman.agent_team_list_messages",- json!({ "teamId": team_id }),- )- .await;- let messages_outer = assert_no_jsonrpc_error(&messages, "agent_team_list_messages");- assert_eq!(- messages_outer- .get("messages")- .and_then(serde_json::Value::as_array)- .map(|m| m.len()),- Some(1)+ let stopped_err = assert_jsonrpc_error(+ &message_from_stopped,+ "agent_team_message_member from stopped member",+ );+ assert!(+ stopped_err.to_string().contains("unknown member"),+ "stopped member must be rejected: {stopped_err}");// Get the team — 2 members, 2 tasks.