Skip to content

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

chore(web_chat): remove unused guardrail error helpers

Steven Enamakelb770d660ac47
diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
index 55f09d053d..c64483a1d2 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
@@ -23,8 +23,6 @@ mod journal_export;
pub(crate) use environment::{environment_for_base, ingestion_url, skip_push};
pub(crate) use journal_export::journal_push_ready;
-#[cfg(test)]
-pub(crate) use journal_export::push_observations;
#[cfg(test)]
use tinyagents_harness::observability::trace_export::TraceContext;
diff --git a/crates/openhuman-core/src/web_chat/ops.rs b/crates/openhuman-core/src/web_chat/ops.rs
index c20d3eac77..cbf2eaa8e7 100644
--- a/crates/openhuman-core/src/web_chat/ops.rs
+++ b/crates/openhuman-core/src/web_chat/ops.rs
@@ -23,13 +23,7 @@ pub use channel_ops::{
channel_web_queue_remove, channel_web_queue_status,
};
-// `is_guardrail_error_message` / `GUARDRAIL_ERROR_PREFIX` are for a future
-// RPC-layer classifier (mirrors `is_backend_unavailable_message`) — nothing
-// in-crate consumes them yet, hence the allow.
-#[allow(unused_imports)]
-pub use start_chat::{
- is_guardrail_error_message, start_chat, StartChatError, GUARDRAIL_ERROR_PREFIX,
-};
+pub use start_chat::{start_chat, StartChatError, GUARDRAIL_ERROR_PREFIX};
pub use system_turn::{run_system_turn_on_thread, SESSION_CHECKOUT_FAILURE, SYSTEM_CLIENT_ID};
#[cfg(test)]
diff --git a/crates/openhuman-core/src/web_chat/ops/start_chat.rs b/crates/openhuman-core/src/web_chat/ops/start_chat.rs
index 2eed06f33b..ed484ed95d 100644
--- a/crates/openhuman-core/src/web_chat/ops/start_chat.rs
+++ b/crates/openhuman-core/src/web_chat/ops/start_chat.rs
@@ -119,12 +119,6 @@ impl From<StartChatError> for String {
}
}
-/// Whether `msg` is the [`GUARDRAIL_ERROR_PREFIX`] sentinel — mirrors
-/// [`crate::core::observability::is_backend_unavailable_message`].
-pub fn is_guardrail_error_message(msg: &str) -> bool {
- msg.starts_with(GUARDRAIL_ERROR_PREFIX)
-}
-
fn prompt_guard_user_message(action: PromptEnforcementAction) -> &'static str {
match action {
PromptEnforcementAction::Allow => "Message accepted.",