The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/agent/progress_tracing/flow_export.rs,crates/openhuma
Steven Enamakeldbff6c56587d
diff --git a/crates/openhuman-core/src/agent/progress_tracing/flow_export.rs b/crates/openhuman-core/src/agent/progress_tracing/flow_export.rsindex 7bbfc2c1a2..0e69b833f8 100644--- a/crates/openhuman-core/src/agent/progress_tracing/flow_export.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/flow_export.rs@@ -1,8 +1,9 @@//! Langfuse export for durable graph runs.//!-//! The graph observations and flow trigger are serde-only bus contracts. The-//! host that owns engine observations adapts them before calling this module;-//! this exporter owns the graph trace identity, metadata, and OTLP projection.+//! This exporter consumes generic TinyAgents graph observations plus the+//! serde-only TinyFlows bus trigger value. The host that owns engine+//! observations adapts them before calling this module; this exporter owns the+//! graph trace identity, metadata, and OTLP projection.use std::time::Duration;diff --git a/crates/openhuman-core/src/agent/progress_tracing/flow_export_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/flow_export_tests.rsindex 20fe68b973..4ad970d9e1 100644--- a/crates/openhuman-core/src/agent/progress_tracing/flow_export_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/flow_export_tests.rs@@ -3,6 +3,8 @@ use tinyagents_graph::observability::GraphObservation;use tinyagents_graph::stream::GraphEvent;use tinyagents_harness::ids::{EventId, GraphId, NodeId, RunId, ThreadId};use tinyflows_bus::runs::FlowRunTrigger;+use wiremock::matchers::{body_json, header, method, path};+use wiremock::{Mock, MockServer, ResponseTemplate};fn sample_observations(thread_id: &str) -> Vec<GraphObservation> {let node = NodeId::new("fetch");@@ -263,3 +265,75 @@ async fn flow_export_skips_api_key_credentials() {"API-key credentials must not send a Langfuse export request");}++#[tokio::test]+async fn shared_otlp_transport_posts_rendered_graph_json_with_attribution() {+ let thread_id = "flow:flow-1:uuid-1";+ let requests = graph_otlp_requests(+ "Daily digest",+ "flow-1",+ thread_id,+ "completed",+ FlowRunTrigger::Rpc,+ &sample_observations(thread_id),+ )+ .expect("render graph OTLP JSON");+ let server = MockServer::start().await;+ Mock::given(method("POST"))+ .and(path("/otel/v1/traces"))+ .and(header("authorization", "Bearer session-token"))+ .and(header(+ crate::backend::transport::plain::TEST_PRODUCT_HEADER,+ crate::backend::transport::plain::TEST_PRODUCT_IDENTITY,+ ))+ .and(body_json(requests[0].clone()))+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({})))+ .expect(1)+ .mount(&server)+ .await;++ let url = format!("{}/otel/v1/traces", server.uri());+ super::super::otlp::push_otlp_json_requests(&url, "session-token", &requests)+ .await+ .expect("send graph request through shared authenticated transport");+}++#[tokio::test]+async fn shared_otlp_transport_reports_http_and_partial_rejections() {+ let thread_id = "flow:flow-1:uuid-1";+ let requests = graph_otlp_requests(+ "Daily digest",+ "flow-1",+ thread_id,+ "completed",+ FlowRunTrigger::Rpc,+ &sample_observations(thread_id),+ )+ .expect("render graph OTLP JSON");++ let server = MockServer::start().await;+ Mock::given(method("POST"))+ .and(path("/otel/v1/traces"))+ .respond_with(ResponseTemplate::new(503))+ .mount(&server)+ .await;+ let url = format!("{}/otel/v1/traces", server.uri());+ let error = super::super::otlp::push_otlp_json_requests(&url, "token", &requests)+ .await+ .expect_err("HTTP failure must be reported");+ assert!(error.contains("503"), "{error}");++ let server = MockServer::start().await;+ Mock::given(method("POST"))+ .and(path("/otel/v1/traces"))+ .respond_with(ResponseTemplate::new(200).set_body_json(json!({+ "partialSuccess": { "rejectedSpans": 1, "errorMessage": "invalid span" }+ })))+ .mount(&server)+ .await;+ let url = format!("{}/otel/v1/traces", server.uri());+ let error = super::super::otlp::push_otlp_json_requests(&url, "token", &requests)+ .await+ .expect_err("partial rejection must be reported");+ assert!(error.contains("partially rejected"), "{error}");+}