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: initialize isolated keyrings before credential fixtures
Steven Enamakel1ab46214d7f2
diff --git a/crates/openhuman-rpc/src/server/auth_tests.rs b/crates/openhuman-rpc/src/server/auth_tests.rsindex ec6cc26039..116619cb47 100644--- a/crates/openhuman-rpc/src/server/auth_tests.rs+++ b/crates/openhuman-rpc/src/server/auth_tests.rs@@ -73,7 +73,41 @@ fn is_external_inference_path_matches_only_v1_routes() {fn verify_external_inference_bearer_for_config_accepts_stored_key() {// Keep a session_store test from installing a storage backend mid-test.let _slot = crate::STORAGE_SLOT_TEST_LOCK.blocking_lock();+ // This headless fixture exercises the encrypted profile without the+ // operator's keychain or a caller-supplied master-key file.+ struct FixtureKey {+ key: Option<std::ffi::OsString>,+ file: Option<std::ffi::OsString>,+ workspace: Option<std::ffi::OsString>,+ backend: Option<std::ffi::OsString>,+ }+ impl Drop for FixtureKey {+ fn drop(&mut self) {+ for (name, value) in [+ ("OPENHUMAN_KEYRING_MASTER_KEY", self.key.take()),+ ("OPENHUMAN_KEYRING_MASTER_KEY_FILE", self.file.take()),+ ("OPENHUMAN_WORKSPACE", self.workspace.take()),+ ("OPENHUMAN_KEYRING_BACKEND", self.backend.take()),+ ] {+ match value {+ Some(value) => std::env::set_var(name, value),+ None => std::env::remove_var(name),+ }+ }+ }+ }let tmp = tempfile::tempdir().unwrap();+ let _key = FixtureKey {+ key: std::env::var_os("OPENHUMAN_KEYRING_MASTER_KEY"),+ file: std::env::var_os("OPENHUMAN_KEYRING_MASTER_KEY_FILE"),+ workspace: std::env::var_os("OPENHUMAN_WORKSPACE"),+ backend: std::env::var_os("OPENHUMAN_KEYRING_BACKEND"),+ };+ std::env::remove_var("OPENHUMAN_KEYRING_MASTER_KEY_FILE");+ std::env::set_var("OPENHUMAN_KEYRING_MASTER_KEY", "11".repeat(32));+ std::env::set_var("OPENHUMAN_WORKSPACE", tmp.path());+ std::env::set_var("OPENHUMAN_KEYRING_BACKEND", "encrypted_file");+ crate::embed::process::init_master_key().expect("initialize fixture master key");let config = Config {config_path: tmp.path().join("config.toml"),..Default::default()diff --git a/tests/in_process/config_auth_app_state_connectivity_e2e.rs b/tests/in_process/config_auth_app_state_connectivity_e2e.rsindex 88b9452651..43a09426ac 100644--- a/tests/in_process/config_auth_app_state_connectivity_e2e.rs+++ b/tests/in_process/config_auth_app_state_connectivity_e2e.rs@@ -1,7 +1,10 @@//! Focused JSON-RPC E2E coverage for config, auth/credentials, app_state,//! and connectivity controller surfaces.-use crate::env_guard::{env_lock, env_lock_async, EnvVarGuard};+use crate::env_guard::{+ env_lock_with_file_keyring as env_lock, env_lock_with_file_keyring_async as env_lock_async,+ EnvVarGuard,+};use crate::rpc_auth::ensure_rpc_auth;use crate::rpc_harness::{ok, payload, rpc, schema};use std::net::SocketAddr;