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 Enamakel3213c1b073db
diff --git a/crates/openhuman-core/src/storage/local.rs b/crates/openhuman-core/src/storage/local.rs
index 86a6bd9155..b337a4d2f6 100644
--- a/crates/openhuman-core/src/storage/local.rs
+++ b/crates/openhuman-core/src/storage/local.rs
@@ -144,7 +144,6 @@ async fn open_default_backend(_workspace_dir: PathBuf) -> Result<Arc<dyn Storage
.get(&_workspace_dir)
.cloned();
if let Some(url) = persistent_url {
- eprintln!("test backend mode: persistent sqlite for {}", _workspace_dir.display());
super::config::prepare_default_dir(&_workspace_dir).with_context(|| {
format!(
"create the storage directory for {}",
@@ -159,7 +158,6 @@ async fn open_default_backend(_workspace_dir: PathBuf) -> Result<Arc<dyn Storage
#[cfg(test)]
{
- eprintln!("test backend mode: memory for {}", _workspace_dir.display());
let backend: Arc<dyn StorageBackend> =
Arc::new(tinystoragedrivers_testkit::MemoryBackend::new());
super::boot::prepare_and_migrate(&backend).await?;
@@ -168,7 +166,6 @@ async fn open_default_backend(_workspace_dir: PathBuf) -> Result<Arc<dyn Storage
#[cfg(not(test))]
{
- eprintln!("test backend mode: production sqlite for {}", _workspace_dir.display());
let url = super::config::default_url(&_workspace_dir);
super::config::prepare_default_dir(&_workspace_dir).with_context(|| {
format!(
diff --git a/crates/openhuman-core/src/storage/sessions/workspace.rs b/crates/openhuman-core/src/storage/sessions/workspace.rs
index 509cb4aae4..f176f82a6a 100644
--- a/crates/openhuman-core/src/storage/sessions/workspace.rs
+++ b/crates/openhuman-core/src/storage/sessions/workspace.rs
@@ -50,17 +50,11 @@ 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);
crate::storage::local::forget(workspace_dir);
- if let Some(fallback) = fallback_removed.as_ref() {
- eprintln!(
- "release_workspace backend strong refs after local forget: {}",
- Arc::strong_count(&fallback.backend)
- );
- }
}
/// The provider for `workspace_dir`: the installed one, else a
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 0f33f13c3f..d82eca90cc 100644
--- a/tests/agent_harness_e2e.rs
+++ b/tests/agent_harness_e2e.rs
@@ -1139,19 +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;
- eprintln!("managed capture invalidated sessions: {invalidated}");
- tokio::time::sleep(Duration::from_secs(1)).await;
- let late_invalidated = openhuman_core::web_chat::invalidate_thread_sessions(
- &openhuman_core::core::runtime::DispatchCtx::unbound(),
- "managed-capture-thread",
- )
- .await;
- eprintln!("managed capture late invalidated sessions: {late_invalidated}");
// 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);