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
chore(subagent_host): remove debug prints from lifecycle persistence
Steven Enamakel7f9ddb318d91
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rsindex bfc3a16469..287179aa9f 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs@@ -108,7 +108,6 @@ impl OpenHumanPersistence {) -> Result<tinyagents_orchestration::subagent::DocumentSubagentPersistence, SubagentError>{let open = || {- eprintln!("DBGS terminal={terminal} scope={:?}", crate::storage::current_scope());let legacy = if terminal {super::store::LifecycleStore::before_terminal(&self.checkpoint_dir)?} else {@@ -371,9 +370,7 @@ impl OpenHumanPersistence {&self,key: &SubagentTaskKey,) -> Result<Option<SubagentOutcome>, SubagentError> {- let r = self.store()?.terminal_outcome(key);- eprintln!("DBGR load_terminal {key:?} -> {:?}", r.as_ref().map(|o| o.is_some()));- if let Some(outcome) = r? {+ if let Some(outcome) = self.store()?.terminal_outcome(key)? {return Ok(Some(outcome));}Ok(self.read_terminal_record(key)?.map(|record| record.outcome))@@ -583,9 +580,7 @@ impl tinyagents_orchestration::subagent::SubagentPersistence for OpenHumanPersis&self,key: &SubagentTaskKey,) -> Result<Option<SubagentOutcome>, SubagentError> {- let r = self.store()?.terminal_outcome(key);- eprintln!("DBGR2 load_terminal -> {:?}", r.as_ref().map(|o| o.is_some()));- if let Some(outcome) = r? {+ if let Some(outcome) = self.store()?.terminal_outcome(key)? {return Ok(Some(outcome));}Ok(self.read_terminal_record(key)?.map(|record| record.outcome))@@ -709,16 +704,13 @@ impl tinyagents_orchestration::subagent::SubagentPersistence for OpenHumanPersisserde_json::json!(host.elapsed.as_nanos().min(u64::MAX as u128) as u64),);}- eprintln!("DBGR record_terminal {key:?}");let disposition = tinyagents_orchestration::subagent::SubagentPersistence::record_terminal(&self.open_store(true)?,key,&durable_outcome,replaces,)- .await;- eprintln!("DBGR result {disposition:?}");- let disposition = disposition?;+ .await?;let host_disposition = match disposition {SubagentTerminalPersistenceDisposition::Inserted => {tinyagents_orchestration::subagent::SubagentPersistenceDisposition::TerminalInserteddiff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_storage_adoption_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_storage_adoption_tests.rsindex e445d62e63..6e7bc4733b 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_storage_adoption_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_storage_adoption_tests.rs@@ -244,14 +244,14 @@ async fn a_detached_driver_uses_its_carried_actor_for_lifecycle_commits() {).await.unwrap();- let res = tokio::time::timeout(std::time::Duration::from_secs(10), receiver.recv())+ tokio::time::timeout(std::time::Duration::from_secs(10), receiver.recv()).await.unwrap()+ .unwrap().unwrap();- eprintln!("DBGA {res:?}");- for e in walkdir::WalkDir::new(workspace.path()) { eprintln!("DBGF {}", e.unwrap().path().display()); }- res.unwrap();- let alice_dispatch = CoreContext::scope(alice, async {+ // The persistence holds its actor weakly, so both contexts stay owned here+ // until the reads finish.+ let alice_dispatch = CoreContext::scope(alice.clone(), async {crate::core::runtime::DispatchCtx::ambient()}).await;@@ -265,11 +265,13 @@ async fn a_detached_driver_uses_its_carried_actor_for_lifecycle_commits() {.expect("detached lifecycle write committed in its carried actor scope");assert_eq!(durable.output, "detached actor result");let bob_dispatch =- CoreContext::scope(bob, async { crate::core::runtime::DispatchCtx::ambient() }).await;+ CoreContext::scope(bob.clone(), async { crate::core::runtime::DispatchCtx::ambient() })+ .await;let other = super::super::persistence::OpenHumanPersistence::new(checkpoints).with_dispatch(bob_dispatch);assert!(other.load_terminal(&key).await.unwrap().is_none());drop(bundle);+ drop((alice, bob));}async fn assert_legacy_terminal_fixture(format: &str) {