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
9 changes: 9 additions & 0 deletions src/openhuman/composio/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ async fn wait_for_connection_active(
mod tests {
use super::*;
use serde_json::json;
use std::sync::Mutex;

/// Cargo runs tests concurrently by default, and `TRIAGE_DISABLED_ENV`
/// is process-global. Every test that reads or writes it must hold this
/// guard for the duration of its env-var usage, otherwise interleaved
/// `set_var` / `remove_var` calls cause spurious failures.
static TRIAGE_ENV_GUARD: Mutex<()> = Mutex::new(());

#[tokio::test]
async fn ignores_non_composio_events() {
Expand All @@ -505,6 +512,7 @@ mod tests {
async fn handles_trigger_event_without_panic() {
// Disable triage so this test takes the log-only path and
// doesn't spawn a real LLM turn.
let _guard = TRIAGE_ENV_GUARD.lock().unwrap_or_else(|e| e.into_inner());
std::env::set_var(TRIAGE_DISABLED_ENV, "1");
let sub = ComposioTriggerSubscriber::new();
sub.handle(&DomainEvent::ComposioTriggerReceived {
Expand All @@ -520,6 +528,7 @@ mod tests {

#[test]
fn triage_disabled_flag_parser() {
let _guard = TRIAGE_ENV_GUARD.lock().unwrap_or_else(|e| e.into_inner());
// Truthy values disable triage.
for val in ["1", "true", "TRUE", "yes", "YES"] {
std::env::set_var(TRIAGE_DISABLED_ENV, val);
Expand Down
2 changes: 1 addition & 1 deletion src/openhuman/config/schema/accessibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn default_autocomplete_enabled() -> bool {
}

fn default_use_vision_model() -> bool {
true
false
}

impl Default for ScreenIntelligenceConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/openhuman/config/schema/dictation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct DictationConfig {
}

fn default_enabled() -> bool {
true
false
}

fn default_hotkey() -> String {
Expand Down
Loading