Skip to content

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

test(subagent_host): rename key binding to legacy_key in lifecycle tests

Steven Enamakel4613649d7cb3
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
index 6cc052a55a..e0d566497d 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
@@ -405,11 +405,11 @@ async fn persistence_inserts_one_terminal_and_returns_the_durable_winner() {
#[tokio::test]
async fn canonical_terminal_hides_legacy_pause_without_rewriting_legacy_files() {
let directory = tempfile::tempdir().unwrap();
- let key = key();
+ let legacy_key = key();
let legacy = OpenHumanPersistence::new(directory.path().to_path_buf());
let checkpoint = SubagentCheckpointData {
- task_key: Some(key.clone()),
- task_id: key.task_id.clone(),
+ task_key: Some(legacy_key.clone()),
+ task_id: legacy_key.task_id.clone(),
agent_id: "researcher".into(),
worker_thread_id: None,
history: Vec::new(),
@@ -426,7 +426,7 @@ async fn canonical_terminal_hides_legacy_pause_without_rewriting_legacy_files()
artifact_paths: Vec::new(),
elapsed_ms: 12,
};
- let pause_path = legacy.legacy_pause_path(&key);
+ let pause_path = legacy.legacy_pause_path(&legacy_key);
let index_path = legacy.index_path(&key.task_id);
std::fs::create_dir_all(pause_path.parent().unwrap()).unwrap();
let pause_bytes = serde_json::to_vec_pretty(&checkpoint).unwrap();
@@ -485,8 +485,8 @@ async fn legacy_pause_migration_preserves_host_checkpoint_metadata_and_bytes() {
std::fs::write(&pause_path, &pause_bytes).unwrap();
let migrated = OpenHumanPersistence::new(directory.path().to_path_buf());
- assert!(migrated.load_pause(&key).await.unwrap().is_some());
- let recovered = load_subagent_checkpoint(directory.path(), &key.task_id).unwrap();
+ assert!(migrated.load_pause(&legacy_key).await.unwrap().is_some());
+ let recovered = load_subagent_checkpoint(directory.path(), &legacy_key.task_id).unwrap();
assert_eq!(recovered.agent_id, checkpoint.agent_id);
assert_eq!(recovered.worker_thread_id, checkpoint.worker_thread_id);