Skip to content

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

chore: remove debug logging and unused return values

Steven Enamakel50cb97c06c7d
diff --git a/crates/openhuman-core/src/storage/local.rs b/crates/openhuman-core/src/storage/local.rs
index 072cb4216f..b337a4d2f6 100644
--- a/crates/openhuman-core/src/storage/local.rs
+++ b/crates/openhuman-core/src/storage/local.rs
@@ -269,11 +269,10 @@ pub fn release_all() {
/// Forgets the default opened for `workspace_dir`, so the next call opens it
/// afresh; also how a test models a restart.
pub fn forget(workspace_dir: &Path) {
- let removed = WORKSPACES
+ WORKSPACES
.lock()
.unwrap_or_else(PoisonError::into_inner)
.remove(workspace_dir);
- eprintln!("storage_local_forget path={} removed={}", workspace_dir.display(), removed.is_some());
}
#[cfg(test)]
diff --git a/crates/openhuman-core/src/storage/sessions/workspace.rs b/crates/openhuman-core/src/storage/sessions/workspace.rs
index fbe118b38b..f176f82a6a 100644
--- a/crates/openhuman-core/src/storage/sessions/workspace.rs
+++ b/crates/openhuman-core/src/storage/sessions/workspace.rs
@@ -50,11 +50,10 @@ pub fn release_workspace_defaults() {
/// workspace keeps its live handles. A restart of one workspace, not of the
/// process; [`release_workspace_defaults`] is the process-wide reset.
pub fn release_workspace(workspace_dir: &Path) {
- let fallback_removed = FALLBACKS
+ FALLBACKS
.lock()
.unwrap_or_else(PoisonError::into_inner)
.remove(workspace_dir);
- eprintln!("release_workspace path={} fallback_removed={}", workspace_dir.display(), fallback_removed.is_some());
crate::storage::local::forget(workspace_dir);
}
@@ -96,7 +95,6 @@ pub(super) fn fallback_provider(workspace_dir: &Path) -> Arc<dyn SessionStorePro
return existing.provider.clone();
}
}
- eprintln!("fallback_provider new path={} backend_ptr={:p}", workspace_dir.display(), Arc::as_ptr(&backend));
match TenantSessionStores::new(Arc::clone(&backend), false) {
Ok(provider) => {
let provider = Arc::new(provider);
diff --git a/crates/openhuman-core/src/web_chat/ops/state.rs b/crates/openhuman-core/src/web_chat/ops/state.rs
index 9397dba5b1..2f3e79e51f 100644
--- a/crates/openhuman-core/src/web_chat/ops/state.rs
+++ b/crates/openhuman-core/src/web_chat/ops/state.rs
@@ -128,7 +128,7 @@ pub(crate) fn cancel_in_flight_gracefully(entry: InFlightEntry) -> String {
request_id
}
-pub async fn invalidate_thread_sessions(ctx: &DispatchCtx, thread_id: &str) -> usize {
+pub async fn invalidate_thread_sessions(ctx: &DispatchCtx, thread_id: &str) {
// Under an embedded agent or a profile only that tenant's entry goes.
// Outside both every entry for the thread in the current table goes.
let tenant = tenant_of(ctx);
@@ -158,7 +158,6 @@ pub async fn invalidate_thread_sessions(ctx: &DispatchCtx, thread_id: &str) -> u
thread_id
);
}
- keys_to_remove.len()
}
/// Invalidate only the captured tenant, unless its channel session ended.
diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rs
index a08697083d..057de34c09 100644
--- a/tests/agent_harness_e2e.rs
+++ b/tests/agent_harness_e2e.rs
@@ -1103,31 +1103,6 @@ async fn run_managed_capture_turn(
with_captured_proxy_requests(|requests| requests.clear());
let workspace_dir = home.join("workspace");
let stack = boot_stack_with_capture_endpoint(api_origin, home).await;
- let resolved_config = openhuman_core::config::ops::load_config_in(
- &openhuman_core::core::runtime::DispatchCtx::unbound(),
- )
- .await
- .expect("load managed capture workspace config");
- assert_eq!(
- resolved_config.workspace_dir, workspace_dir,
- "managed capture must use its isolated workspace"
- );
- eprintln!(
- "managed capture session store installed: {}; storage backend installed: {}",
- openhuman_core::storage::sessions::is_installed(),
- openhuman_core::storage::installed().is_some()
- );
- let transcript_locator = openhuman_core::storage::sessions::workspace_transcripts(
- "orchestrator",
- &workspace_dir,
- );
- let prior_transcript = transcript_locator.root_for_thread("managed-capture-thread");
- eprintln!(
- "managed capture prior transcript present: {} path: {:?} destination: {:?}",
- prior_transcript.is_some(),
- prior_transcript.as_ref().map(|transcript| transcript.path()),
- transcript_locator.destination_key()
- );
let mut events = spawn_sse_collector(format!(
"{}/events?client_id=managed-capture-client",
stack.rpc_base
@@ -1164,15 +1139,11 @@ async fn run_managed_capture_turn(
// The bare test router dispatches RPC with DispatchCtx::unbound(). Its
// cached web-chat agent outlives a router shutdown, so remove that session
// from the same process-default slot before the fixture resets its files.
- let invalidated = openhuman_core::web_chat::invalidate_thread_sessions(
+ openhuman_core::web_chat::invalidate_thread_sessions(
&openhuman_core::core::runtime::DispatchCtx::unbound(),
"managed-capture-thread",
)
.await;
- assert_eq!(
- invalidated, 1,
- "the completed managed turn must leave one cached session to invalidate"
- );
// Session transcript stores and their SQLite backend are also cached by
// workspace path; release them before the next repetition removes it.
openhuman_core::storage::sessions::release_workspace(&workspace_dir);
@@ -1300,26 +1271,6 @@ async fn managed_host_requests_repeat_with_the_same_capture_identity_inner() {
std::fs::remove_dir_all(&home).expect("reset only the managed capture profile");
}
std::fs::create_dir_all(&home).expect("create managed capture profile");
- let workspace_storage = home.join("workspace/storage");
- eprintln!(
- "managed capture storage path before locator read: {} exists: {}",
- workspace_storage.display(),
- workspace_storage.exists()
- );
- let reset_locator = openhuman_core::storage::sessions::workspace_transcripts(
- "orchestrator",
- &home.join("workspace"),
- );
- let reset_has_transcript = reset_locator
- .root_for_thread("managed-capture-thread")
- .is_some();
- eprintln!(
- "managed capture transcript after profile deletion: {} destination: {:?} storage_url: {} storage_exists_after_lookup: {}",
- reset_has_transcript,
- reset_locator.destination_key(),
- openhuman_core::storage::config::default_url(&home.join("workspace")),
- workspace_storage.exists()
- );
let expected_summary_count = prior_count + 2;
let metadata = run_managed_capture_turn(
proxy_origin.clone(),