Skip to content

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

fix(modules): gate x402 on import success, open CCR originals no-follow

Steven Enamakel0983234f2afc
diff --git a/crates/openhuman-core/src/modules/mod.rs b/crates/openhuman-core/src/modules/mod.rs
index 9d92f25e3b..4974f44dc5 100644
--- a/crates/openhuman-core/src/modules/mod.rs
+++ b/crates/openhuman-core/src/modules/mod.rs
@@ -190,9 +190,8 @@ settled_outcome!(storage_import_tinywallet);
/// on every call. The async lock is held across an import, so a concurrent
/// first caller waits for the migration instead of racing it.
#[cfg(feature = "modules")]
-type ImportedSet = tokio::sync::Mutex<
- std::collections::HashSet<(&'static str, String, std::path::PathBuf)>,
->;
+type ImportedSet =
+ tokio::sync::Mutex<std::collections::HashSet<(&'static str, String, std::path::PathBuf)>>;
#[cfg(feature = "modules")]
fn imported_once() -> &'static ImportedSet {
diff --git a/crates/openhuman-core/src/modules/storage_import_tinyjuice.rs b/crates/openhuman-core/src/modules/storage_import_tinyjuice.rs
index e24dd85848..b5c1a0e1be 100644
--- a/crates/openhuman-core/src/modules/storage_import_tinyjuice.rs
+++ b/crates/openhuman-core/src/modules/storage_import_tinyjuice.rs
@@ -159,7 +159,8 @@ fn read_regular(path: &Path) -> Result<Option<(SystemTime, Vec<u8>)>> {
#[cfg(unix)]
{
use std::os::unix::fs::OpenOptionsExt;
- options.custom_flags(libc::O_NOFOLLOW);
+ // O_NONBLOCK keeps a FIFO planted in the directory from hanging the open.
+ options.custom_flags(libc::O_NOFOLLOW | libc::O_NONBLOCK);
}
let mut file = match options.open(path) {
Ok(file) => file,