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
test: align startup migration assertion with current behavior
Steven Enamakelcf9ad17075b6
diff --git a/crates/openhuman-core/src/platform/startup/ops_tests.rs b/crates/openhuman-core/src/platform/startup/ops_tests.rsindex f050afbdaa..8caa543502 100644--- a/crates/openhuman-core/src/platform/startup/ops_tests.rs+++ b/crates/openhuman-core/src/platform/startup/ops_tests.rs@@ -3,33 +3,38 @@ use std::fs;use tempfile::TempDir;#[test]-fn workspace_startup_migrates_transcripts_once() {+fn workspace_startup_runs_welcome_migration_once() {let tempdir = TempDir::new().unwrap();let workspace = tempdir.path();- let legacy = workspace- .join("session_raw")- .join("01052026")- .join("1714000000_main.jsonl");+ let legacy = workspace.join("session_raw/1715000000_welcome_thread-abc.jsonl");fs::create_dir_all(legacy.parent().unwrap()).unwrap();- fs::write(&legacy, "legacy transcript").unwrap();+ fs::write(+ &legacy,+ "{\"_meta\":{\"agent\":\"welcome_thread-abc\",\"thread_id\":\"thread-abc\"}}\n{\"role\":\"user\",\"content\":\"hi\"}\n",+ )+ .unwrap();run_workspace_migrations(&crate::core::runtime::DispatchCtx::ambient(), workspace);- let canonical = workspace.join("session_raw/1714000000_main.jsonl");- let marker = workspace.join("state/migrations/session_layout_v1.done");- assert_eq!(fs::read_to_string(&canonical).unwrap(), "legacy transcript");+ let canonical = workspace.join("session_raw/1715000000_orchestrator_thread-abc.jsonl");+ let marker = workspace.join("state/migrations/welcome_to_orchestrator_v1.done");+ let rewritten = fs::read_to_string(&canonical).unwrap();+ assert!(rewritten.contains("\"agent\":\"orchestrator_thread-abc\""));let first_marker = fs::read_to_string(&marker).unwrap();- // A newly-arrived legacy artifact proves startup observes the marker rather- // than re-running the migration on every process launch.- fs::create_dir_all(legacy.parent().unwrap()).unwrap();- fs::write(&legacy, "must remain legacy after marker").unwrap();+ // A late welcome transcript proves startup observes the marker rather than+ // re-running the welcome-agent migration on every process launch.+ let late_legacy = workspace.join("session_raw/1715000001_welcome_thread-late.jsonl");+ fs::write(+ &late_legacy,+ "{\"_meta\":{\"agent\":\"welcome_thread-late\",\"thread_id\":\"thread-late\"}}\n",+ )+ .unwrap();run_workspace_migrations(&crate::core::runtime::DispatchCtx::ambient(), workspace);- assert_eq!(fs::read_to_string(&canonical).unwrap(), "legacy transcript");assert_eq!(- fs::read_to_string(&legacy).unwrap(),- "must remain legacy after marker"+ fs::read_to_string(&late_legacy).unwrap(),+ "{\"_meta\":{\"agent\":\"welcome_thread-late\",\"thread_id\":\"thread-late\"}}\n");assert_eq!(fs::read_to_string(marker).unwrap(), first_marker);}