Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(dispatch): update dispatch tests and runner logic

Steven Enamakel178ee1351439
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
index b0ab8eea09..84c5a965b7 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
@@ -3,12 +3,12 @@
//! still goes to the orchestrator over the bus.
use super::*;
-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};
+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};
use crate::agent::host_agents::{self, HostAgent, HostAgentResolver};
-use crate::channels::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};
+use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};
use crate::channels::runtime::process_channel_message;
use crate::core::runtime::{CoreContext, DomainSet};
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use std::collections::HashMap;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
@@ -681,6 +681,7 @@ async fn native_host_agent_turn_enforces_the_configured_channel_deadline_inner()
)
})
.collect::<Vec<_>>();
+ println!("fixture Telegram provider requests: {provider_observations:#?}");
let timeout_notice = "past its time budget";
let late_model_reply = "this response arrives after the channel deadline";
let terminal_sends = provider_observations
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs b/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs
index 1179a953f2..7229902079 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs
@@ -7,13 +7,13 @@ use std::{
use async_trait::async_trait;
use tinyagents_harness::{
- CancellationToken,
run_queue::RunQueue,
turn_runner::{
EventSink, FailureClassification, FailureClassifier, IngressDecision, IngressPolicy,
IngressStage, QueueDisposition, ReplyStore, ScopeKey, Summarizer, TerminalEvent, TurnHost,
TurnRequest, TurnResult, TurnRunner, TurnRunnerConfig, TurnSession, TurnSignal,
},
+ CancellationToken,
};
use tokio::sync::mpsc;
@@ -595,7 +595,7 @@ pub(crate) async fn run(
},
host_authored: false,
disposition: QueueDisposition::Interrupt,
- deadline: crate::agent::session_host::turn_backstop::configured_backstop(),
+ deadline: Some(deadline),
idle_timeout: Some(crate::agent::turn_policy::configured_idle_window()),
};
let runner_result = runtime.runner.run(request).await;