Skip to content

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

chore: files changed crates/openhuman-core/src/cron/scheduler_headless_descendants_tests.rs

Steven Enamakela6928241c534
diff --git a/crates/openhuman-core/src/cron/scheduler_headless_descendants_tests.rs b/crates/openhuman-core/src/cron/scheduler_headless_descendants_tests.rs
index b4f1733dc6..9f9767615d 100644
--- a/crates/openhuman-core/src/cron/scheduler_headless_descendants_tests.rs
+++ b/crates/openhuman-core/src/cron/scheduler_headless_descendants_tests.rs
@@ -311,6 +311,34 @@ async fn scheduled_agent_timeout_cancels_its_blocked_child_before_history_settle
.as_deref()
.unwrap_or_default()
.contains("headless-cron-child-result"));
+ let owner = crate::agent::tinyagents::tool_registration::subagent_owner_key(
+ &config.workspace_dir,
+ &format!("cron:{}", job.id),
+ None,
+ );
+ let registry = crate::core::runtime::slot_for::<
+ tinyagents_harness_tools::subagents::SubAgentJobRegistry,
+ >(&inspect_dispatch);
+ let jobs = registry
+ .try_list_owned(owner.as_str())
+ .expect("inspect this Cron run's native descendants");
+ assert_eq!(jobs.len(), 1, "one native child belongs to this Cron job");
+ let child = tokio::time::timeout(
+ std::time::Duration::from_secs(2),
+ registry.wait_owned(jobs[0].id.as_str(), owner),
+ )
+ .await
+ .expect("root timeout cancellation reaches its child")
+ .expect("the child remains available until its terminal state");
+ eprintln!(
+ "CRON_TIMEOUT_SETTLEMENT_DIAGNOSTIC spawn_calls={} accepted_followups={} child_calls={} invocation_dropped={} run_status={} child_status={:?}",
+ model.spawn_calls.load(std::sync::atomic::Ordering::SeqCst),
+ model.accepted_followups.load(std::sync::atomic::Ordering::SeqCst),
+ model.child_calls.load(std::sync::atomic::Ordering::SeqCst),
+ model.child_invocation_dropped.load(std::sync::atomic::Ordering::SeqCst),
+ runs[0].status,
+ child.status,
+ );
assert_eq!(
model.spawn_calls.load(std::sync::atomic::Ordering::SeqCst),
1
@@ -332,25 +360,6 @@ async fn scheduled_agent_timeout_cancels_its_blocked_child_before_history_settle
.load(std::sync::atomic::Ordering::SeqCst),
"the root deadline dropped the child model future"
);
- let owner = crate::agent::tinyagents::tool_registration::subagent_owner_key(
- &config.workspace_dir,
- &format!("cron:{}", job.id),
- None,
- );
- let registry = crate::core::runtime::slot_for::<
- tinyagents_harness_tools::subagents::SubAgentJobRegistry,
- >(&inspect_dispatch);
- let jobs = registry
- .try_list_owned(owner.as_str())
- .expect("inspect this Cron run's native descendants");
- assert_eq!(jobs.len(), 1, "one native child belongs to this Cron job");
- let child = tokio::time::timeout(
- std::time::Duration::from_secs(2),
- registry.wait_owned(jobs[0].id.as_str(), owner),
- )
- .await
- .expect("root timeout cancellation reaches its child")
- .expect("the child remains available until its terminal state");
assert_eq!(
child.status,
tinyagents_orchestration::subagent::SubAgentJobStatus::Cancelled,