Skip to content

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

refactor(attachments): gate injected tests behind cfg(test)

Steven Enamakelfb7a30dbf331
diff --git a/crates/openhuman-core/src/agent/goals/runtime.rs b/crates/openhuman-core/src/agent/goals/runtime.rs
index 4d14a523f4..f2a2e2ce69 100644
--- a/crates/openhuman-core/src/agent/goals/runtime.rs
+++ b/crates/openhuman-core/src/agent/goals/runtime.rs
@@ -6,15 +6,8 @@
//! - [`account_turn_against_goal`] folds a completed turn's token + time usage
//! into the active goal, flipping it to `budget_limited` when the cap is
//! crossed.
-//! - [`GoalBudgetStopHook`] votes to stop an in-flight turn as soon as an
-//! *active* goal's running usage would exceed its budget. #4469 item 1: the
-//! stop is a graceful *pause*, not an instantaneous abort — the vote fires in
-//! the stop-hook middleware's `after_model`, and the harness drains the pause
-//! at the **top of the next iteration**, so the tool round for the model call
-//! that tripped the budget still runs and the turn's wrap-up summary may spend
-//! one more model call before the partial transcript is returned. It bounds
-//! an autonomous run to a small, deterministic overshoot past the ceiling
-//! rather than a hard cut at the exact accounting point.
+//! - Goal budget policy is supplied by `tinyagents-hooks`; this module keeps
+//! persistence and completed-turn accounting.
use std::path::Path;
diff --git a/crates/openhuman-core/src/attachments/provider.rs b/crates/openhuman-core/src/attachments/provider.rs
index 21cbcfecf7..b1636f575d 100644
--- a/crates/openhuman-core/src/attachments/provider.rs
+++ b/crates/openhuman-core/src/attachments/provider.rs
@@ -446,6 +446,7 @@ impl ChatModel<()> for AttachmentModel {
mod cache;
#[path = "provider_fallback.rs"]
mod fallback;
+#[cfg(test)]
#[path = "provider_injected_tests.rs"]
mod injected_tests;
#[path = "provider_source.rs"]
diff --git a/crates/openhuman-core/src/attachments/provider_injected_tests.rs b/crates/openhuman-core/src/attachments/provider_injected_tests.rs
index cdf69c2bb6..1f201ca0d5 100644
--- a/crates/openhuman-core/src/attachments/provider_injected_tests.rs
+++ b/crates/openhuman-core/src/attachments/provider_injected_tests.rs
@@ -1,5 +1,5 @@
-use super::tests::Probe;
use super::*;
+use super::tests::Probe;
#[tokio::test]
async fn injected_turn_source_uses_bound_workspace_and_explicit_model_facts() {