Skip to content

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

chore: files changed crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs,cr

Steven Enamakel1d62e408eb9a
diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs
index 50adfcf77f..0e9600dcb0 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs
@@ -271,7 +271,7 @@ fn projects_failed_subagent_from_child_run_failed() {
assert_eq!(subagent.status, SpanStatus::Error);
assert_eq!(subagent.attributes["error"], serde_json::json!(true));
assert!(
- subagent.attributes.get("error.length").is_some(),
+ subagent.attributes.contains_key("error.length"),
"failed subagent span carries redacted error metadata"
);
}
diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs
index ba1b6ee5b3..3c1212f256 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs
@@ -236,10 +236,10 @@ fn model_call_completed_emits_generation_span_with_usage_cost_and_pricing() {
a["gen_ai.pricing.input_per_mtok_usd"],
serde_json::json!(0.0886)
);
- assert!(a.get("gen_ai.pricing.output_per_mtok_usd").is_some());
+ assert!(a.contains_key("gen_ai.pricing.output_per_mtok_usd"));
// Zero reasoning / cache-write tokens are omitted on the generation.
- assert!(a.get("gen_ai.usage.reasoning_tokens").is_none());
- assert!(a.get("gen_ai.usage.cache_creation_tokens").is_none());
+ assert!(!a.contains_key("gen_ai.usage.reasoning_tokens"));
+ assert!(!a.contains_key("gen_ai.usage.cache_creation_tokens"));
}
#[test]
@@ -443,7 +443,7 @@ fn failed_tool_records_classified_cause_only_when_capture_on() {
off.record(&failed, 2);
let tool = find(off.spans(), "tool.shell");
assert_eq!(tool.status, SpanStatus::Error);
- assert!(tool.attributes.get("error.message").is_none());
+ assert!(!tool.attributes.contains_key("error.message"));
}
#[test]
@@ -465,7 +465,7 @@ fn subagent_error_text_stays_out_without_capture() {
]);
c.finish(50);
let sub = find(c.spans(), "subagent.Coder");
- assert!(sub.attributes.get("error.message").is_none());
+ assert!(!sub.attributes.contains_key("error.message"));
}
#[test]
@@ -560,7 +560,7 @@ fn subagent_model_call_nests_generation_and_stamps_model_on_subagent_span() {
// The parent turn's rollup is NOT polluted by the child call.
let turn = find(spans, "agent.turn");
- assert!(turn.attributes.get("gen_ai.request.model").is_none());
+ assert!(!turn.attributes.contains_key("gen_ai.request.model"));
}
#[test]
diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs
index f47c7c61ab..afeff15409 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs
@@ -95,7 +95,7 @@ fn full_turn_builds_correlated_span_tree() {
);
assert_eq!(turn.attributes["agent.iterations"], serde_json::json!(1));
assert_eq!(turn.status, SpanStatus::Ok);
- assert!(turn.attributes.get("gen_ai.usage.cost_usd").is_some());
+ assert!(turn.attributes.contains_key("gen_ai.usage.cost_usd"));
// Iteration parented to the turn.
let iter = find(spans, "agent.iteration#1");
@@ -301,7 +301,7 @@ fn subagent_failure_records_error_without_raw_text() {
let sub = find(c.spans(), "subagent.Coder");
assert_eq!(sub.status, SpanStatus::Error);
assert_eq!(sub.attributes["error"], serde_json::json!(true));
- assert!(sub.attributes.get("error.length").is_some());
+ assert!(sub.attributes.contains_key("error.length"));
let blob = serde_json::to_string(c.spans()).unwrap();
assert!(
@@ -455,7 +455,7 @@ fn no_user_attribution_omits_user_id() {
let mut c = SpanCollector::new(TraceContext::new("anon-1", None));
c.record(&AgentProgress::TurnStarted, 0);
let turn = find(c.spans(), "agent.turn");
- assert!(turn.attributes.get("user.id").is_none());
+ assert!(!turn.attributes.contains_key("user.id"));
assert_eq!(turn.attributes["session.id"], serde_json::json!("anon-1"));
}
diff --git a/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs
index 2185f93fcc..9cc4807611 100644
--- a/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs
+++ b/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs
@@ -393,7 +393,7 @@ async fn composio_list_available_triggers_omits_connection_when_none() {
"/agent-integrations/composio/triggers/available",
get(|Query(q): Query<HashMap<String, String>>| async move {
assert!(
- q.get("connectionId").is_none(),
+ !q.contains_key("connectionId"),
"should not forward connectionId"
);
Json(json!({"success": true, "data": {"triggers": []}}))
diff --git a/crates/openhuman-core/src/security/credentials/profiles_store_lock_tests.rs b/crates/openhuman-core/src/security/credentials/profiles_store_lock_tests.rs
index 90a3c0a1f7..2701025a75 100644
--- a/crates/openhuman-core/src/security/credentials/profiles_store_lock_tests.rs
+++ b/crates/openhuman-core/src/security/credentials/profiles_store_lock_tests.rs
@@ -359,7 +359,7 @@ fn clear_active_profile() {
store.clear_active_profile("openai").unwrap();
let data = store.load().unwrap();
- assert!(data.active_profiles.get("openai").is_none());
+ assert!(!data.active_profiles.contains_key("openai"));
}
#[test]