Skip to content

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

chore(storage): remove temporary backend refcount logging

Steven Enamakeld79f8c3f83d2
diff --git a/crates/openhuman-core/src/storage/local.rs b/crates/openhuman-core/src/storage/local.rs
index c8b44fb0e1..b337a4d2f6 100644
--- a/crates/openhuman-core/src/storage/local.rs
+++ b/crates/openhuman-core/src/storage/local.rs
@@ -200,7 +200,6 @@ async fn initialized_backend(
///
/// In SaaS mode with no backend installed, or when the default cannot be
/// opened.
-#[track_caller]
pub fn backend_for(workspace_dir: &Path) -> Result<Arc<dyn StorageBackend>> {
if let Some(backend) = installed() {
return Ok(backend);
@@ -210,15 +209,7 @@ pub fn backend_for(workspace_dir: &Path) -> Result<Arc<dyn StorageBackend>> {
let cell = workspace_backend(workspace_dir);
if let Some(backend) = cell.get() {
- let backend = Arc::clone(backend);
- if Arc::strong_count(&backend) >= 4 {
- eprintln!(
- "workspace backend clone refs={} caller={}",
- Arc::strong_count(&backend),
- std::panic::Location::caller()
- );
- }
- return Ok(backend);
+ return Ok(Arc::clone(backend));
}
let workspace_dir = workspace_dir.to_path_buf();
super::block_on_anyhow(async move { initialized_backend(cell, workspace_dir).await })
diff --git a/crates/openhuman-core/src/storage/sessions/workspace.rs b/crates/openhuman-core/src/storage/sessions/workspace.rs
index ff38653edf..f176f82a6a 100644
--- a/crates/openhuman-core/src/storage/sessions/workspace.rs
+++ b/crates/openhuman-core/src/storage/sessions/workspace.rs
@@ -50,18 +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 refs after local forget: backend={} provider={}",
- Arc::strong_count(&fallback.backend),
- Arc::strong_count(&fallback.provider)
- );
- }
}
/// The provider for `workspace_dir`: the installed one, else a