Skip to content

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

test: use shared classic transcript fixture in session tests

Steven Enamakel9f9c6725986c
diff --git a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
index 4cc68e2027..7580b21c6d 100644
--- a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
+++ b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
@@ -8,7 +8,7 @@
use std::path::Path;
-use tinyagents_session::transcript::{write_transcript, TranscriptMeta};
+use tinyagents_session::transcript::TranscriptMeta;
use super::{
checkin_session_agent, checkin_session_agent_if_vacant, checkout_session_agent,
@@ -74,7 +74,7 @@ fn write_thread_transcript(workspace_dir: &Path, stem: &str, thread_id: &str, ro
thread_id: Some(thread_id.to_string()),
task_id: None,
};
- write_transcript(&path, &messages, &meta, None).unwrap();
+ crate::util::classic_transcript_fixture::write_classic(&path, &messages, &meta);
}
fn prose(history: &[TranscriptEntry]) -> Vec<String> {
diff --git a/tests/storage_desktop_upgrade_e2e.rs b/tests/storage_desktop_upgrade_e2e.rs
index bc09d189d6..18836b1b09 100644
--- a/tests/storage_desktop_upgrade_e2e.rs
+++ b/tests/storage_desktop_upgrade_e2e.rs
@@ -28,11 +28,15 @@ use openhuman_core::storage::import::{self, Outcome};
use openhuman_core::storage::{rusqlite, DocumentStoreExt, Scope, ScopedStorage, StorageBackend};
use sha2::Digest;
use tinyagents_session::transcript::{
- session_stem, write_transcript, SessionRef, TranscriptMessage, TranscriptMeta,
+ session_stem, SessionRef, TranscriptMessage, TranscriptMeta,
};
use tinyagents_session::turn_state::TurnState;
use tinystoragedrivers_core::Query;
+// The classic-transcript fixture writer, shared with the core's unit tests.
+#[path = "../crates/openhuman-core/src/util/classic_transcript_fixture.rs"]
+mod classic_transcript_fixture;
+
#[macro_use]
#[path = "support/storage_drivers.rs"]
mod storage_drivers;
@@ -127,13 +131,11 @@ fn legacy_sessions(workspace: &Path) {
session_id: None,
parent_session_id: None,
};
- write_transcript(
+ classic_transcript_fixture::write_classic(
&raw.join(format!("{stem}.jsonl")),
&[TranscriptMessage::new("user", "hello from the old layout")],
&meta,
- None,
- )
- .unwrap();
+ );
let snapshot = TurnState::started("thread-1", "req-1", 4, "2026-01-01T00:00:00Z");
let thread_dir = workspace
.join("memory/conversations/turn_states")