Skip to content

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

test(session_host): cover latest-agent replay of retired podcast tool

Steven Enamakel132d712ee843
diff --git a/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs b/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs
index 6c156c0115..04ec0bfea1 100644
--- a/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs
@@ -599,7 +599,18 @@ fn regenerate_session_compat() {
#[cfg(feature = "voice")]
#[test]
fn resumed_thread_with_retired_podcast_tool_remains_usable() {
- run_async(async {
+ assert_retired_tool_replay(true);
+}
+
+#[cfg(feature = "voice")]
+#[test]
+fn latest_agent_session_with_retired_podcast_tool_remains_usable() {
+ assert_retired_tool_replay(false);
+}
+
+#[cfg(feature = "voice")]
+fn assert_retired_tool_replay(identity_bound: bool) {
+ run_async(async move {
const RETIRED: &str = "audio_generate_podcast";
struct ArchivedAudioTool;
#[async_trait::async_trait]
@@ -662,10 +673,15 @@ fn resumed_thread_with_retired_podcast_tool_remains_usable() {
true,
);
let mut resumed = build_host(root.path(), next.clone(), true, "retired-audio-thread");
- assert!(resumed
- .resume_bound_session()
- .await
- .expect("resume archive"));
+ if identity_bound {
+ assert!(resumed
+ .resume_bound_session()
+ .await
+ .expect("resume archive"));
+ } else {
+ resumed.set_thread_id(None::<&str>);
+ assert!(matches!(resumed.turn_resume_mode(), tinyagents_runtime::ResumeMode::LatestForAgent));
+ }
// An explicit host tool belt is authoritative, while archived declarations
// remain intact in the durable transcript.
assert_eq!(