Skip to content

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

refactor(cron): update transcript handling in origin delivery

Steven Enamakelb66554508cc2
diff --git a/crates/openhuman-core/src/cron/channel_bridge_tests.rs b/crates/openhuman-core/src/cron/channel_bridge_tests.rs
index ecb498022f..4d5f59ea80 100644
--- a/crates/openhuman-core/src/cron/channel_bridge_tests.rs
+++ b/crates/openhuman-core/src/cron/channel_bridge_tests.rs
@@ -1,6 +1,7 @@
use super::*;
use async_trait::async_trait;
use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Mutex;
use tinychannels_bus::ChannelMessage;
use tokio::sync::mpsc;
diff --git a/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs b/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs
index 4265745ffd..8bc685df7e 100644
--- a/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs
+++ b/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs
@@ -9,7 +9,7 @@
//! announced on the web channel as a `proactive_message` event addressed to
//! that thread. Re-delivering the same run lands on the same row.
//! - Channel origin: the reply is sent to the origin's reply target, then
-//! appended to that chat's history so its next turn sees it.
+//! appended to its durable agent transcript so the next turn sees it.
use super::delivery::strip_openhuman_link_markup;
use crate::config::Config;
@@ -62,7 +62,7 @@ const TRANSCRIPT_APPEND_TIMEOUT: std::time::Duration = std::time::Duration::from
/// waits for any live turn of the session (the per-session turn lock), dedupes
/// on the idempotency key and records `{kind: "cron", job_id, run_id}`
/// provenance. The session is addressed exactly as the session host does it
-/// (`SessionRef::scoped(thread_id, agent_id)`) in `transcripts`, the store
+/// (`SessionRef::scoped(session_key, agent_id)`) in `transcripts`, the store
/// the host wrote it to, which the caller resolved from the job's tenant
/// ([`origin_transcripts`]). A thread that never had an agent turn has no
/// transcript (`NoSession`) and is skipped. Must never be called from inside a