Skip to content

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

test(openhuman-embed): report runtime error variant on build failure

Steven Enamakelfb02cd900698
diff --git a/crates/openhuman-embed/tests/attached_tools.rs b/crates/openhuman-embed/tests/attached_tools.rs
index 4f7b008216..376fbd0837 100644
--- a/crates/openhuman-embed/tests/attached_tools.rs
+++ b/crates/openhuman-embed/tests/attached_tools.rs
@@ -316,9 +316,24 @@ fn attaching_before_first_turn_preserves_and_executes_native_tools() {
.and(path("/v1/chat/completions"))
.respond_with(NativeCall(std::sync::atomic::AtomicUsize::new(0)))
.mount(&provider).await;
- let runtime = Runtime::builder()
+ let runtime_result = Runtime::builder()
.config(offline_config()).workspace(Workspace::Ephemeral)
- .backend_url(backend.uri()).build().await.unwrap();
+ .backend_url(backend.uri()).build().await;
+ if let Err(error) = &runtime_result {
+ let variant = match error {
+ openhuman_embed::RuntimeError::Call(_) => "Call",
+ openhuman_embed::RuntimeError::Build(_) => "Build",
+ openhuman_embed::RuntimeError::Workspace { .. } => "Workspace",
+ openhuman_embed::RuntimeError::AlreadyRunning => "AlreadyRunning",
+ openhuman_embed::RuntimeError::Invalid(_) => "Invalid",
+ openhuman_embed::RuntimeError::BlankApiKey => "BlankApiKey",
+ openhuman_embed::RuntimeError::MissingFeature { .. } => "MissingFeature",
+ openhuman_embed::RuntimeError::MissingStorageFeature { .. } => "MissingStorageFeature",
+ openhuman_embed::RuntimeError::NoSessionStore => "NoSessionStore",
+ };
+ eprintln!("attached-tools test runtime build failed: {variant}");
+ }
+ let runtime = runtime_result.unwrap();
let agent = runtime.agent(AgentSpec::new("fresh-attached")
.provider(Provider::openai_compatible(format!("{}/v1",provider.uri()),"fixture").model("fixture"))
.definition(AgentDefinitionSpec::new().system_prompt("ORIGINAL_FRESH_HOST_PROMPT")