Skip to content

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

test(subagent_sessions): remove duplicated parent epoch reuse test

Steven Enamakel5715972cf0ff
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
index 8d7ba147c7..ff2cbe4ee6 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
@@ -232,85 +232,6 @@ fn reused_session_replaces_parent_epoch_for_each_current_task() {
assert_eq!(reopened.parent_epoch, None);
}
-#[test]
-fn reused_session_replaces_parent_epoch_for_each_current_task() {
- let dir = tempfile::tempdir().unwrap();
- let store = SubagentSessionStore::new(dir.path().to_path_buf());
- let first = upsert_running(
- &store,
- SubagentSessionUpsert {
- selector: selector("epoch-reuse"),
- display_name: None,
- task_title: "First run".into(),
- worker_thread_id: None,
- task_id: "epoch-task-1".into(),
- lifecycle_key: None,
- parent_epoch: Some(7),
- },
- None,
- )
- .unwrap();
- assert_eq!(first.parent_epoch, Some(7));
- mark_finished(
- &store,
- &first.subagent_session_id,
- "epoch-task-1",
- &SubagentRunStatus::Completed,
- Vec::new(),
- )
- .unwrap();
-
- let second = upsert_running(
- &store,
- SubagentSessionUpsert {
- selector: selector("epoch-reuse"),
- display_name: None,
- task_title: "Second run".into(),
- worker_thread_id: None,
- task_id: "epoch-task-2".into(),
- lifecycle_key: None,
- parent_epoch: Some(8),
- },
- Some(&first),
- )
- .unwrap();
- assert_eq!(second.subagent_session_id, first.subagent_session_id);
- assert_eq!(second.parent_epoch, Some(8));
- mark_finished(
- &store,
- &second.subagent_session_id,
- "epoch-task-2",
- &SubagentRunStatus::Completed,
- Vec::new(),
- )
- .unwrap();
-
- let legacy = upsert_running(
- &store,
- SubagentSessionUpsert {
- selector: selector("epoch-reuse"),
- display_name: None,
- task_title: "Legacy run".into(),
- worker_thread_id: None,
- task_id: "epoch-task-3".into(),
- lifecycle_key: None,
- parent_epoch: None,
- },
- Some(&second),
- )
- .unwrap();
- assert_eq!(legacy.subagent_session_id, first.subagent_session_id);
- assert_eq!(legacy.parent_epoch, None);
- let reopened = store
- .load()
- .unwrap()
- .into_iter()
- .find(|session| session.subagent_session_id == first.subagent_session_id)
- .unwrap();
- assert_eq!(reopened.current_task_id.as_deref(), Some("epoch-task-3"));
- assert_eq!(reopened.parent_epoch, None);
-}
-
#[test]
fn driver_task_cancel_reports_legacy_failure_and_refuses_ambiguous_ids() {
let dir = tempfile::tempdir().unwrap();