Skip to content

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

test(storage): assert module survives an oversized blob refusal

Steven Enamakelf80c98e5f1cc
diff --git a/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs b/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs
index d1fa713f76..6fc3484ccc 100644
--- a/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs
+++ b/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs
@@ -496,6 +496,13 @@ async fn a_blob_over_the_frame_cannot_go_inline() {
.await
.unwrap();
assert!(big.get("err").is_some(), "an oversized inline blob must fail");
+ // The refusal does not take the module's connection down with it.
+ let after: Value = rig
+ .probe
+ .call("PutBlob", ("tinyjuice_ccr/after", 2048usize))
+ .await
+ .unwrap();
+ assert!(after.get("ok").is_some(), "the module keeps working: {after}");
let handle = rig.backend.for_scope(&rig.scope("tinyjuice")).unwrap();
assert!(handle.blobs().head(key).await.unwrap().is_none());
// A blob key outside the CCR prefix is not the module's.
diff --git a/tests/fixtures/storage_probe_module/src/lib.rs b/tests/fixtures/storage_probe_module/src/lib.rs
index d6fb49989e..e7ecab6ae2 100644
--- a/tests/fixtures/storage_probe_module/src/lib.rs
+++ b/tests/fixtures/storage_probe_module/src/lib.rs
@@ -45,11 +45,16 @@ impl Interface for Probe {
} else {
serde_json::from_value(args)?
};
- let proxy = self.connection.proxy(
- STORAGE,
- format!("/ai/tinyhumans/tinystorage/{object}"),
- STORAGE,
- )?;
+ // Short, so a call the bus drops (an oversized frame) is an answer
+ // here well inside the caller's own timeout.
+ let proxy = self
+ .connection
+ .proxy(
+ STORAGE,
+ format!("/ai/tinyhumans/tinystorage/{object}"),
+ STORAGE,
+ )?
+ .with_timeout(std::time::Duration::from_secs(6));
let reply: Result<Value> = if confidential {
proxy.call_confidential(&selector, (request,)).await
} else {