Skip to content

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

fix(progress_tracing): correct serialization in langfuse progress tracing

Steven Enamakel0af8a92894f3
diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
index d3778afb63..501a3288db 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse.rs
@@ -27,10 +27,10 @@ mod journal_export;
mod span_export;
pub(crate) use environment::{environment_for_base, ingestion_url, skip_push};
+pub(crate) use journal_export::journal_push_ready;
#[cfg(test)]
pub(crate) use journal_export::push_observations;
pub(crate) use journal_export::root_subagent_observations;
-pub(crate) use journal_export::journal_push_ready;
#[cfg(test)]
pub(crate) use span_export::push_spans;
diff --git a/crates/openhuman-core/src/agent/progress_tracing/serialize.rs b/crates/openhuman-core/src/agent/progress_tracing/serialize.rs
index 5e266c5c8c..adecb827d3 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/serialize.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/serialize.rs
@@ -38,7 +38,10 @@ pub(super) fn capture_model_content(value: &serde_json::Value) -> serde_json::Va
*content = serde_json::Value::String(format!(
"{}…[message content truncated]",
truncate_chars(
- &content.as_str().map(str::to_owned).unwrap_or_else(|| content.to_string()),
+ &content
+ .as_str()
+ .map(str::to_owned)
+ .unwrap_or_else(|| content.to_string()),
MAX_MODEL_CONTENT_CHARS / 2
)
));
@@ -68,7 +71,10 @@ pub(super) fn capture_model_content(value: &serde_json::Value) -> serde_json::Va
let mut kept = fields.clone();
if let Some(content) = kept.get_mut("content") {
*content = serde_json::Value::String(truncate_chars(
- &content.as_str().map(str::to_owned).unwrap_or_else(|| content.to_string()),
+ &content
+ .as_str()
+ .map(str::to_owned)
+ .unwrap_or_else(|| content.to_string()),
MAX_MODEL_CONTENT_CHARS / 2,
));
if serde_json::Value::Object(kept.clone())