Skip to content

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

chore: files changed crates/openhuman-core/src/web3/seams_tests.rs,crates/openhuman-core/src/web3/wa

Steven Enamakel05d9854c84fa
diff --git a/crates/openhuman-core/src/web3/seams_tests.rs b/crates/openhuman-core/src/web3/seams_tests.rs
index 8cbe0fb66c..ac014e24f4 100644
--- a/crates/openhuman-core/src/web3/seams_tests.rs
+++ b/crates/openhuman-core/src/web3/seams_tests.rs
@@ -126,7 +126,7 @@ fn the_registered_agent_tools_run_over_the_process_service() {
#[tokio::test]
async fn the_accounts_seam_reports_the_stored_wallet() {
- let _guard = TEST_LOCK.lock();
+ let _guard = TEST_LOCK.lock().await;
let temp = TempDir::new().unwrap();
let _workspace_guard = setup_wallet_in(&temp).await.unwrap();
@@ -165,7 +165,7 @@ async fn the_accounts_seam_reports_the_stored_wallet() {
#[tokio::test]
async fn the_backend_seam_needs_a_signed_in_session() {
- let _guard = TEST_LOCK.lock();
+ let _guard = TEST_LOCK.lock().await;
let temp = TempDir::new().unwrap();
let _workspace_guard = setup_wallet_in(&temp).await.unwrap();
let err = HostBackend.routes().await.unwrap_err();
@@ -178,7 +178,7 @@ async fn the_backend_seam_needs_a_signed_in_session() {
/// the whole host stack: task-local scope, engine, quote store.
#[tokio::test]
async fn a_prepared_quote_is_bound_to_the_chat_thread_that_prepared_it() {
- let _guard = TEST_LOCK.lock();
+ let _guard = TEST_LOCK.lock().await;
let temp = TempDir::new().unwrap();
let _workspace_guard = setup_wallet_in(&temp).await.unwrap();
diff --git a/crates/openhuman-core/src/web3/wallet/ops_tests.rs b/crates/openhuman-core/src/web3/wallet/ops_tests.rs
index 9645ad980f..18665d7488 100644
--- a/crates/openhuman-core/src/web3/wallet/ops_tests.rs
+++ b/crates/openhuman-core/src/web3/wallet/ops_tests.rs
@@ -214,7 +214,7 @@ fn setup_allows_fresh_without_force() {
#[tokio::test]
async fn reveal_recovery_phrase_returns_error_when_no_wallet() {
let temp = tempfile::tempdir().expect("temp dir");
- let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock();
+ let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock().await;
let _workspace_guard = crate::web3::wallet::test_support::set_workspace_env_for_test(&temp).await;
let result = reveal_recovery_phrase().await;
let err = result.expect_err("should error when no wallet configured");
@@ -227,7 +227,7 @@ async fn reveal_recovery_phrase_returns_error_when_no_wallet() {
#[tokio::test]
async fn reveal_recovery_phrase_returns_phrase_for_existing_wallet() {
let temp = tempfile::tempdir().expect("temp dir");
- let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock();
+ let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock().await;
let _workspace_guard = crate::web3::wallet::test_support::setup_wallet_in(&temp)
.await
.expect("setup wallet");
diff --git a/crates/openhuman-core/src/web3/wallet/test_support.rs b/crates/openhuman-core/src/web3/wallet/test_support.rs
index d90dbdeffc..7af115019e 100644
--- a/crates/openhuman-core/src/web3/wallet/test_support.rs
+++ b/crates/openhuman-core/src/web3/wallet/test_support.rs
@@ -17,7 +17,7 @@ use super::ops::{setup, WalletAccount, WalletChain, WalletSetupParams, WalletSet
use crate::config::rpc as config_rpc;
use crate::config::test_env::EnvVarGuard;
-pub(crate) static TEST_LOCK: Lazy<Mutex<()>> = Lazy::new(|| Mutex::new(()));
+pub(crate) static TEST_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());
/// Standard BIP-39 test mnemonic — produces deterministic accounts per chain.
pub(crate) const TEST_MNEMONIC: &str =
diff --git a/crates/openhuman-core/src/web3/x402/records_tests.rs b/crates/openhuman-core/src/web3/x402/records_tests.rs
index 2ea6df038b..419a051044 100644
--- a/crates/openhuman-core/src/web3/x402/records_tests.rs
+++ b/crates/openhuman-core/src/web3/x402/records_tests.rs
@@ -35,7 +35,7 @@ fn init(temp: &tempfile::TempDir) {
/// payment counts toward `session_total` once it settles, and the chat thread.
#[tokio::test]
async fn a_fallback_payment_counts_in_the_session_total_and_names_its_thread() {
- let _lock = TEST_LOCK.lock();
+ let _lock = TEST_LOCK.lock().await;
let temp = tempfile::tempdir().unwrap();
init(&temp);
let payment = payment();
@@ -61,7 +61,7 @@ async fn a_fallback_payment_counts_in_the_session_total_and_names_its_thread() {
#[tokio::test]
async fn a_payment_outside_a_chat_turn_has_no_thread_but_the_same_session() {
- let _lock = TEST_LOCK.lock();
+ let _lock = TEST_LOCK.lock().await;
let temp = tempfile::tempdir().unwrap();
init(&temp);
@@ -73,7 +73,7 @@ async fn a_payment_outside_a_chat_turn_has_no_thread_but_the_same_session() {
#[tokio::test]
async fn every_payment_gets_its_own_record_id() {
- let _lock = TEST_LOCK.lock();
+ let _lock = TEST_LOCK.lock().await;
let temp = tempfile::tempdir().unwrap();
init(&temp);
diff --git a/crates/openhuman-core/src/web3/x402/seams_tests.rs b/crates/openhuman-core/src/web3/x402/seams_tests.rs
index 540134cf34..5ace6a11d7 100644
--- a/crates/openhuman-core/src/web3/x402/seams_tests.rs
+++ b/crates/openhuman-core/src/web3/x402/seams_tests.rs
@@ -133,7 +133,7 @@ fn solana_challenge_headers() -> HeaderMap {
/// as it did before the flow moved into the crate.
#[tokio::test]
async fn a_payment_reaches_the_host_wallet_through_the_crate() {
- let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock();
+ let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock().await;
let temp = tempfile::tempdir().unwrap();
let _workspace = crate::web3::wallet::test_support::set_workspace_env_for_test(&temp).await;
super::super::init_ledger(temp.path(), "seam-test");
@@ -157,7 +157,7 @@ async fn a_payment_reaches_the_host_wallet_through_the_crate() {
#[tokio::test]
async fn the_signer_reports_a_missing_wallet_for_either_chain() {
- let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock();
+ let _wallet_lock = crate::web3::wallet::test_support::TEST_LOCK.lock().await;
let temp = tempfile::tempdir().unwrap();
let _workspace = crate::web3::wallet::test_support::set_workspace_env_for_test(&temp).await;