Skip to content

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

chore: reformat multi-line function calls and add conditional import

Steven Enamakelb82ba4876651
diff --git a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs
index 47335e3a03..15f773c206 100644
--- a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs
+++ b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs
@@ -17,10 +17,7 @@ async fn threshold_persists_outside_the_project_and_reads_back() {
let project = tmp.path().join("project");
std::fs::create_dir_all(&workspace).unwrap();
std::fs::create_dir_all(&project).unwrap();
- let store = new_tool_result_store(
- workspace.join("artifacts"),
- "session/one",
- );
+ let store = new_tool_result_store(workspace.join("artifacts"), "session/one");
let raw = format!(
"{} {}",
"x".repeat(4096),
diff --git a/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs b/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs
index 67a98a6a78..f2136ca474 100644
--- a/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs
+++ b/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs
@@ -9,6 +9,8 @@ use std::path::{Path, PathBuf};
use crate::agent::harness::tool_result_artifacts::{
legacy_action_dir_store, new_tool_result_store,
};
+#[cfg(test)]
+use crate::security::policy::tool_result_artifacts_dir;
use tinyagents_harness::artifacts::tool_results::ToolResultArtifactStore;
/// How long another session's tool-result artifacts survive before a later
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_output_artifact_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_output_artifact_tests.rs
index 6a25ec4ada..fdfd2d3a8e 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_output_artifact_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_output_artifact_tests.rs
@@ -132,9 +132,8 @@ async fn an_oversized_result_is_stored_as_the_tool_returned_it_not_as_rewritten(
"an over-budget result is persisted: {}",
result_text(&result)
);
- let stored =
- std::fs::read_to_string(tmp.path().join("tool-results/session/echo/c1.txt"))
- .expect("artifact written");
+ let stored = std::fs::read_to_string(tmp.path().join("tool-results/session/echo/c1.txt"))
+ .expect("artifact written");
assert_eq!(
stored, raw,
"the artifact must hold the tool's own output, not the rewritten copy"
@@ -159,9 +158,8 @@ async fn a_raw_result_file_read_cannot_open_is_stored_as_the_processed_copy() {
.0
.unwrap();
- let stored =
- std::fs::read_to_string(tmp.path().join("tool-results/session/echo/c1.txt"))
- .expect("artifact written");
+ let stored = std::fs::read_to_string(tmp.path().join("tool-results/session/echo/c1.txt"))
+ .expect("artifact written");
assert_eq!(
stored, summary,
"a raw body over file_read's limit would be unreadable, so the processed copy is stored"