Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/openhuman/channels/providers/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ pub(crate) use ops::{event_session_id_for, key_for};
pub(crate) use progress_bridge::spawn_progress_bridge;

// Schema field helpers re-exported for tests
#[cfg(any(test, debug_assertions))]
#[allow(unused_imports)]
pub(crate) use schemas::{
json_output, optional_bool, optional_f64, optional_string, optional_u64, required_string,
};
#[cfg(any(test, debug_assertions))]
#[allow(unused_imports)]
pub(crate) use session::{
compose_system_prompt_suffix, locale_reply_directive, normalize_model_override,
provider_role_for_model_override,
};
#[cfg(any(test, debug_assertions))]
#[allow(unused_imports)]
pub(crate) use types::WebChatParams;
#[cfg(any(test, debug_assertions))]
#[allow(unused_imports)]
pub(crate) use web_errors::{
inference_budget_exceeded_user_message, is_inference_budget_exceeded_error,
};

// Test helpers (debug/test builds only)
#[cfg(any(test, debug_assertions))]
Expand Down
2 changes: 2 additions & 0 deletions src/openhuman/config/schema/load_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use super::dirs::{ACTION_DIR_ENV_VAR, MEMORY_SYNC_INTERVAL_SECS_ENV_VAR};
use super::env::EnvLookup;
use super::*;
use crate::openhuman::config::schema::{StreamMode, TelegramConfig};

Expand Down
2 changes: 2 additions & 0 deletions src/openhuman/config/schemas/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ use helpers::{
DEFAULT_ONBOARDING_FLAG_NAME,
};
#[cfg(test)]
use schema_defs::schemas;
#[cfg(test)]
use serde_json::{Map, Value};

#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::interrupted_pull_settle_window_secs;
use super::util::interrupted_pull_settle_window_secs;

#[test]
fn interrupted_pull_waits_when_bytes_were_observed() {
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/inference/provider/reliable_tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::*;
use crate::openhuman::inference::provider::traits::StreamError;
use std::sync::Arc;

struct MockProvider {
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/mcp_server/tools_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use super::specs::list_tools_result_for_config;
use super::*;

#[test]
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/memory/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ pub mod test_override {
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::config::schema::DEFAULT_CLOUD_LLM_MODEL;

#[test]
fn build_provider_returns_inference_wrapper_when_default() {
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/memory/schema_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use super::definitions::NAMESPACE;
use super::*;

#[test]
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/memory/tree_source/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ fn write_atomic(path: &Path, bytes: &[u8]) -> Result<()> {
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::memory_store::trees::types::{TreeKind, TreeStatus};
use chrono::TimeZone;
use tempfile::TempDir;

Expand Down
1 change: 1 addition & 0 deletions src/openhuman/sandbox/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ pub fn validate_docker_policy(policy: &SandboxPolicy) -> Result<(), Vec<String>>
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::sandbox::types::DockerOverrides;
use std::path::PathBuf;

fn test_policy() -> SandboxPolicy {
Expand Down
Loading