Skip to content

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

chore(rpc): suppress clippy warnings for intentional large result and held lock

Steven Enamakelee3501a77eec
diff --git a/crates/openhuman-rpc/src/http_host/auth.rs b/crates/openhuman-rpc/src/http_host/auth.rs
index ea65c7e130..46fbbc0de8 100644
--- a/crates/openhuman-rpc/src/http_host/auth.rs
+++ b/crates/openhuman-rpc/src/http_host/auth.rs
@@ -8,6 +8,9 @@ use crate::http_host::LOG_PREFIX;
use openhuman_core::config;
use openhuman_core::security::credentials::session_support;
+// The `Err` is the ready-to-send 401 `Response`; the core crate allows this
+// lint crate-wide, and boxing it would only add an allocation per rejection.
+#[allow(clippy::result_large_err)]
pub(crate) fn ensure_authorized(headers: &HeaderMap, auth: &HostedDirAuth) -> Result<(), Response> {
if !auth.enabled {
return Ok(());
diff --git a/crates/openhuman-rpc/src/http_host/http_host_tests.rs b/crates/openhuman-rpc/src/http_host/http_host_tests.rs
index 0f795257d1..243fecb607 100644
--- a/crates/openhuman-rpc/src/http_host/http_host_tests.rs
+++ b/crates/openhuman-rpc/src/http_host/http_host_tests.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::await_holding_lock)]
+
use std::io::Write as _;
use std::sync::Mutex;
@@ -13,6 +15,8 @@ use crate::http_host::ops::{
use crate::http_host::path_utils::resolve_request_path;
use crate::http_host::types::StartHostedDirParams;
+// Serializes tests that share the process-global server registry; the guard is
+// deliberately held across the awaits of each test.
static TEST_MUTEX: Mutex<()> = Mutex::new(());
#[test]