Skip to content

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

refactor(web_chat): adjust test hook visibility

Steven Enamakel27215349d770
diff --git a/crates/openhuman-core/src/channels/bus/subscriber_tests.rs b/crates/openhuman-core/src/channels/bus/subscriber_tests.rs
index 82bbd39e15..f4d4f6b986 100644
--- a/crates/openhuman-core/src/channels/bus/subscriber_tests.rs
+++ b/crates/openhuman-core/src/channels/bus/subscriber_tests.rs
@@ -39,7 +39,7 @@ async fn backend_channel_wait_does_not_cut_off_a_live_turn_after_180_seconds() {
succeed_in: Some(workspace.path().to_path_buf()),
};
crate::web_chat::set_test_run_chat_task_block(Some(block.clone())).await;
- crate::web_chat::ops::set_last_run_chat_task_error_for_test(None).await;
+ crate::web_chat::set_last_run_chat_task_error_for_test(None).await;
let ctx = DispatchCtx::ambient();
let client_id = "channel-timeout-client";
diff --git a/crates/openhuman-core/src/web_chat/mod.rs b/crates/openhuman-core/src/web_chat/mod.rs
index b521f2ca9b..83b0fb2287 100644
--- a/crates/openhuman-core/src/web_chat/mod.rs
+++ b/crates/openhuman-core/src/web_chat/mod.rs
@@ -86,8 +86,6 @@ pub(crate) use ops::lock_thread_sessions_for_test;
#[cfg(any(test, debug_assertions))]
pub use ops::parallel_in_flight_entries_for_test;
#[cfg(test)]
-pub(crate) use ops::last_run_chat_task_error_for_test;
-#[cfg(test)]
pub(crate) use ops::track_parallel_turn_for_test;
pub use ops::{
cancel_all_turns, cancel_chat_scoped, cancel_should_target, channel_web_cancel,
@@ -95,6 +93,8 @@ pub use ops::{
in_flight_entries_for_test, invalidate_thread_sessions, run_system_turn_on_thread, start_chat,
StartChatError, SESSION_CHECKOUT_FAILURE, SYSTEM_CLIENT_ID,
};
+#[cfg(test)]
+pub(crate) use ops::{last_run_chat_task_error_for_test, set_last_run_chat_task_error_for_test};
pub use types::ChatRequestMetadata;
// Public API — schemas / controllers
diff --git a/crates/openhuman-core/src/web_chat/ops.rs b/crates/openhuman-core/src/web_chat/ops.rs
index 633a997161..2fc9887bcd 100644
--- a/crates/openhuman-core/src/web_chat/ops.rs
+++ b/crates/openhuman-core/src/web_chat/ops.rs
@@ -46,11 +46,11 @@ pub use test_hooks::set_test_forced_run_chat_task_error;
pub(crate) use test_hooks::track_parallel_turn_for_test;
#[cfg(any(test, debug_assertions))]
pub use test_hooks::RUN_CHAT_TASK_TEST_LOCK;
-#[cfg(any(test, debug_assertions))]
-pub(super) use test_hooks::{run_test_hooks, test_hooks_active, TEST_PARK_AFTER_RUN};
-#[cfg(any(test, debug_assertions))]
-pub use test_hooks::{set_test_park_after_run, set_test_run_chat_task_block, TestRunChatTaskBlock};
#[cfg(test)]
pub(crate) use test_hooks::{
last_run_chat_task_error_for_test, set_last_run_chat_task_error_for_test,
};
+#[cfg(any(test, debug_assertions))]
+pub(super) use test_hooks::{run_test_hooks, test_hooks_active, TEST_PARK_AFTER_RUN};
+#[cfg(any(test, debug_assertions))]
+pub use test_hooks::{set_test_park_after_run, set_test_run_chat_task_block, TestRunChatTaskBlock};