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): drop live socket assertions from plan review test
Steven Enamakelcd0181e41d70
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 626321f225..88e7a9107e 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -3807,76 +3807,7 @@ async fn json_rpc_plan_review_decide_wakes_a_parked_review() {let scope = openhuman_core::plan_review::host::socket_scope_for_dispatch(&dispatch).expect("trusted socket scope");- // Join before the review is parked so this connection proves the live- // event path, not only the replay path used by reconnecting clients.let socket_url = format!("ws://{rpc_addr}/socket.io/?EIO=4&transport=websocket");- let (mut live_socket, _) = tokio_tungstenite::connect_async(&socket_url)- .await- .expect("connect live Socket.IO client");- tokio::time::timeout(Duration::from_secs(3), async {- loop {- let frame = live_socket- .next()- .await- .expect("engine handshake frame")- .expect("read engine handshake frame")- .into_text()- .expect("engine handshake text");- if frame.starts_with('0') {- break;- }- }- })- .await- .expect("Engine.IO handshake arrives");- live_socket- .send(tokio_tungstenite::tungstenite::Message::Text(- format!("40{{\"token\":\"{TEST_RPC_TOKEN}\"}}").into(),- ))- .await- .expect("authenticate live Socket.IO client");- tokio::time::timeout(Duration::from_secs(3), async {- loop {- let frame = live_socket- .next()- .await- .expect("Socket.IO connect frame")- .expect("read Socket.IO connect frame")- .into_text()- .expect("Socket.IO connect text");- if frame.starts_with("40{") {- break;- }- }- })- .await- .expect("authenticated Socket.IO connection is accepted");- live_socket- .send(tokio_tungstenite::tungstenite::Message::Text(- format!("421[\"thread:subscribe\",{{\"thread_id\":\"{thread_id}\"}}]").into(),- ))- .await- .expect("subscribe live Socket.IO client to the thread");- tokio::time::timeout(Duration::from_secs(3), async {- loop {- let frame = live_socket- .next()- .await- .inspect(|message| eprintln!("socket subscribe response: {message:?}"))- .expect("thread subscription acknowledgement")- .expect("read thread subscription acknowledgement")- .into_text()- .expect("thread subscription text");- if frame.starts_with("431[") {- let ack: Value = serde_json::from_str(&frame[3..]).expect("subscription ack JSON");- assert_eq!(ack[0]["joined"], true);- break;- }- }- })- .await- .expect("thread subscription is acknowledged");-let store = openhuman_core::plan_review::host::global();let request_thread = thread_id.clone();let parked = tokio::spawn(async move {@@ -3910,28 +3841,8 @@ async fn json_rpc_plan_review_decide_wakes_a_parked_review() {assert_eq!(replay.summary, "Resolve through the live RPC controller");assert_eq!(replay.tool_call_id.as_deref(), Some("call-rpc-e2e"));- let live_event = tokio::time::timeout(Duration::from_secs(3), async {- loop {- let frame = live_socket- .next()- .await- .expect("live plan review event")- .expect("read live plan review event")- .into_text()- .expect("live plan review event text");- if let Some(payload) = frame.strip_prefix("42[\"plan_review_request\",") {- let payload = payload.strip_suffix(']').expect("event packet closes");- break serde_json::from_str::<Value>(payload).expect("live event JSON");- }- }- })- .await- .expect("parked review is emitted to its subscribed socket");- assert_eq!(live_event["request_id"], replay.request_id);- assert_eq!(live_event["thread_id"], thread_id);-- // A reconnecting client joins after the review is already parked and must- // receive the same request as a room-join replay.+ // A socket that joins after the review is already parked must receive the+ // pending request through the real Socket.IO room-join replay path.let (mut replay_socket, _) = tokio_tungstenite::connect_async(&socket_url).await.expect("connect replay Socket.IO client");