The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(saas_mode): detect early core exit and scrub backend url env
Steven Enamakel372ef5d376ea
diff --git a/tests/saas_mode/node.rs b/tests/saas_mode/node.rsindex dec51d75b0..b04cf6b7f3 100644--- a/tests/saas_mode/node.rs+++ b/tests/saas_mode/node.rs@@ -32,9 +32,16 @@ impl Node {.iter().map(|line| {let lower = line.to_ascii_lowercase();- if ["bearer", "token", "authorization", "secret", "password", "canary"]- .iter()- .any(|k| lower.contains(k))+ if [+ "bearer",+ "token",+ "authorization",+ "secret",+ "password",+ "canary",+ ]+ .iter()+ .any(|k| lower.contains(k)){"[redacted log line]".to_string()} else {diff --git a/tests/saas_mode/support.rs b/tests/saas_mode/support.rsindex d057957ab2..c181a5e619 100644--- a/tests/saas_mode/support.rs+++ b/tests/saas_mode/support.rs@@ -26,6 +26,8 @@ pub const SCRUBBED_ENV: &[&str] = &["OPENHUMAN_MODE","OPENHUMAN_STORAGE_URL","OPENHUMAN_NODE_ID",+ "BACKEND_URL",+ "VITE_BACKEND_URL",];pub struct Deployment {@@ -148,6 +150,9 @@ pub fn start(d: &Deployment) -> (Server, String, reqwest::blocking::Client) {if let Ok(Some(status)) = server.0.try_wait() {panic!("SaaS core exited before serving: {status}");}+ if let Ok(Some(status)) = server.0.try_wait() {+ panic!("SaaS core exited before serving: {status}");+ }assert!(Instant::now() < deadline, "SaaS core never became healthy");std::thread::sleep(Duration::from_millis(250));}@@ -310,7 +315,7 @@ pub fn start_offline(d: &Deployment) -> (Server, String, reqwest::blocking::Clie.stderr(Stdio::null()).spawn().expect("spawn openhuman-core");- let server = Server(child);+ let mut server = Server(child);let base = format!("http://127.0.0.1:{port}");let client = reqwest::blocking::Client::builder().timeout(Duration::from_secs(30))@@ -322,6 +327,9 @@ pub fn start_offline(d: &Deployment) -> (Server, String, reqwest::blocking::Clie.send().is_ok_and(|r| r.status().is_success()){+ if let Ok(Some(status)) = server.0.try_wait() {+ panic!("SaaS core exited before serving: {status}");+ }assert!(Instant::now() < deadline, "SaaS core never became healthy");std::thread::sleep(Duration::from_millis(250));}