Skip to content

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

feat(tinyhumans): propagate client errors in local-only integrations

Steven Enamakel281088f69225
diff --git a/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs b/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs
index 3dc37181cc..6de29d19eb 100644
--- a/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs
+++ b/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs
@@ -97,6 +97,71 @@ fn backend_egress_descriptor_strips_query_and_targets_backend() {
assert!(desc.is_external);
}
+/// The OpenHuman compatibility wrapper must retain the SDK's privileged-route
+/// denylist on every public verb, including the temporary reqwest download
+/// exception. An unreachable base URL makes a transport error the failure
+/// mode if any request gets past the local gate.
+#[tokio::test]
+async fn verb_methods_never_expose_admin_or_webhook_routes() {
+ let client = client_for("http://127.0.0.1:0".into());
+ let body = json!({});
+ let assert_blocked = |verb: &str, error: anyhow::Error| {
+ let message = error.to_string();
+ assert!(
+ message.contains("route is intentionally not exposed by the SDK"),
+ "{verb}: expected SDK route denylist, got: {message}"
+ );
+ };
+
+ assert_blocked(
+ "get",
+ client
+ .get::<serde_json::Value>(&Default::default(), "/coupons/admin")
+ .await
+ .unwrap_err(),
+ );
+ assert_blocked(
+ "post",
+ client
+ .post::<serde_json::Value>(&Default::default(), "/admin/announcements", &body)
+ .await
+ .unwrap_err(),
+ );
+ assert_blocked(
+ "patch",
+ client
+ .patch::<serde_json::Value>(&Default::default(), "/webhooks/core/hook-1", &body)
+ .await
+ .unwrap_err(),
+ );
+ assert_blocked(
+ "delete",
+ client
+ .delete::<serde_json::Value>(&Default::default(), "/webhooks/core/hook-1")
+ .await
+ .unwrap_err(),
+ );
+ assert_blocked(
+ "upload_multipart",
+ client
+ .upload_multipart::<serde_json::Value>(
+ &Default::default(),
+ "/webhooks/composio",
+ reqwest::multipart::Form::new(),
+ )
+ .await
+ .unwrap_err(),
+ );
+ assert_blocked(
+ "get_bytes",
+ client
+ .get_bytes(&Default::default(), "/webhooks/core")
+ .await
+ .unwrap_err(),
+ );
+}
+
+
#[tokio::test]
async fn integration_requests_carry_the_host_attribution() {
// The SDK transport stamps the host's product identity; which identity it
diff --git a/crates/openhuman-tinyhumans/tests/integrations_local_only.rs b/crates/openhuman-tinyhumans/tests/integrations_local_only.rs
index d0b73ad9cc..93db6da621 100644
--- a/crates/openhuman-tinyhumans/tests/integrations_local_only.rs
+++ b/crates/openhuman-tinyhumans/tests/integrations_local_only.rs
@@ -131,71 +131,6 @@ async fn verb_methods_block_user_data_egress_under_local_only() {
);
}
-/// The OpenHuman compatibility wrapper must retain the SDK's privileged-route
-/// denylist on every public verb, including the temporary reqwest download
-/// exception. An unreachable base URL makes a transport error the failure
-/// mode if any request gets past the local gate.
-#[tokio::test]
-async fn verb_methods_never_expose_admin_or_webhook_routes() {
- let client = client_for("http://127.0.0.1:0".into());
- let body = json!({});
- let assert_blocked = |verb: &str, error: anyhow::Error| {
- let message = error.to_string();
- assert!(
- message.contains("route is intentionally not exposed by the SDK"),
- "{verb}: expected SDK route denylist, got: {message}"
- );
- };
-
- assert_blocked(
- "get",
- client
- .get::<serde_json::Value>(&Default::default(), "/coupons/admin")
- .await
- .unwrap_err(),
- );
- assert_blocked(
- "post",
- client
- .post::<serde_json::Value>(&Default::default(), "/admin/announcements", &body)
- .await
- .unwrap_err(),
- );
- assert_blocked(
- "patch",
- client
- .patch::<serde_json::Value>(&Default::default(), "/webhooks/core/hook-1", &body)
- .await
- .unwrap_err(),
- );
- assert_blocked(
- "delete",
- client
- .delete::<serde_json::Value>(&Default::default(), "/webhooks/core/hook-1")
- .await
- .unwrap_err(),
- );
- assert_blocked(
- "upload_multipart",
- client
- .upload_multipart::<serde_json::Value>(
- &Default::default(),
- "/webhooks/composio",
- reqwest::multipart::Form::new(),
- )
- .await
- .unwrap_err(),
- );
- assert_blocked(
- "get_bytes",
- client
- .get_bytes(&Default::default(), "/webhooks/core")
- .await
- .unwrap_err(),
- );
-}
-
-
#[tokio::test]
async fn local_only_rejects_user_data_verb_before_transport() {
// End-to-end proof (privacy epic S7, #4441) that a PUBLIC verb