Skip to content

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

refactor(orchestration): remove parent_epoch from session creation in tests

Steven Enamakel206522c7af05
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
index 02a57a4c47..4e8237baa3 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
@@ -348,8 +348,7 @@ async fn snapshot_and_block_scope_to_parent_and_reflect_live_status() {
worker_thread_id: None,
task_id: "task-cold-1".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.expect("upsert durable session");
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 fb44af521e..5f1f932993 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
@@ -55,8 +55,7 @@ fn compatible_session_reuses_and_incompatible_shape_spawns_new() {
worker_thread_id: Some("worker-1".into()),
task_id: "sub-1".into(),
lifecycle_key: None,
- let upsert = parent_epoch: None,
-};
+ };
let session = upsert_running(&store, upsert, None).unwrap();
mark_finished(
&store,
@@ -90,8 +89,7 @@ fn stale_completion_cannot_overwrite_reused_or_closed_session() {
worker_thread_id: None,
task_id: "first-task".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -104,8 +102,7 @@ fn stale_completion_cannot_overwrite_reused_or_closed_session() {
worker_thread_id: None,
task_id: "second-task".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
Some(&first),
)
.unwrap();
@@ -167,8 +164,7 @@ fn driver_task_cancel_reports_legacy_failure_and_refuses_ambiguous_ids() {
worker_thread_id: None,
task_id: "finished-failed".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -198,8 +194,7 @@ fn driver_task_cancel_reports_legacy_failure_and_refuses_ambiguous_ids() {
thread_id: Some("thread-a".into()),
task_id: "same-public-id".into(),
}),
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -217,8 +212,7 @@ fn driver_task_cancel_reports_legacy_failure_and_refuses_ambiguous_ids() {
thread_id: Some("thread-a".into()),
task_id: "same-public-id".into(),
}),
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -276,8 +270,7 @@ fn cancellation_reason_is_written_only_for_the_observed_full_lifecycle() {
worker_thread_id: None,
task_id: key.task_id.clone(),
lifecycle_key: Some(key.clone()),
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -318,8 +311,7 @@ fn paused_driver_cancel_marks_only_the_observed_session_failed() {
worker_thread_id: None,
task_id: lifecycle_key.task_id.clone(),
lifecycle_key: Some(lifecycle_key.clone()),
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -390,8 +382,7 @@ fn stale_close_and_reuse_snapshots_cannot_change_a_newer_lifecycle() {
worker_thread_id: None,
task_id: "same-public-task".into(),
lifecycle_key: Some(first_key.clone()),
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -404,8 +395,7 @@ fn stale_close_and_reuse_snapshots_cannot_change_a_newer_lifecycle() {
worker_thread_id: None,
task_id: "same-public-task".into(),
lifecycle_key: Some(second_key.clone()),
- parent_epoch: None,
-},
+ },
Some(&first),
)
.unwrap();
@@ -435,8 +425,7 @@ fn stale_close_and_reuse_snapshots_cannot_change_a_newer_lifecycle() {
worker_thread_id: None,
task_id: "stale-task".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
Some(&first),
)
.is_err(),
@@ -458,8 +447,7 @@ fn stale_close_and_reuse_snapshots_cannot_change_a_newer_lifecycle() {
worker_thread_id: None,
task_id: "late-task".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
Some(&second),
)
.is_err(),
@@ -486,8 +474,7 @@ fn upsert_persists_the_full_lifecycle_key_without_collapsing_to_task_id() {
worker_thread_id: None,
task_id: "sub-1".into(),
lifecycle_key: Some(key.clone()),
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -532,8 +519,7 @@ fn closed_session_is_not_reusable() {
worker_thread_id: None,
task_id: "sub-1".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -555,8 +541,7 @@ fn list_for_parent_without_thread_id_does_not_filter_by_thread() {
worker_thread_id: None,
task_id: "sub-1".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
@@ -572,8 +557,7 @@ fn list_for_parent_without_thread_id_does_not_filter_by_thread() {
worker_thread_id: None,
task_id: "sub-2".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.unwrap();
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_host_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_host_impl.rs
index 370852b80b..290d6832d1 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_host_impl.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_host_impl.rs
@@ -329,8 +329,7 @@ impl SpawnAsyncSubagentTool {
parent_thread_id.clone(),
),
),
- parent_epoch: None,
-},
+ },
reusable.as_ref(),
) {
Ok(session) => session,
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
index c8e8c775f1..8186eb6882 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
@@ -67,8 +67,7 @@ async fn late_registration_refusal_aborts_the_worker_and_settles_its_durable_ses
worker_thread_id: None,
task_id: "late-refusal-task".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.unwrap()
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
index 816da662dc..0c39f4d048 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
@@ -235,8 +235,7 @@ async fn cancelling_a_paused_driver_through_rpc_settles_once_with_its_reason() {
worker_thread_id: None,
task_id: task_id.clone(),
lifecycle_key: Some(lifecycle_key),
- crate::agent::orchestration::subagent_sessions:: parent_epoch: None,
-},
+ },
None,
)
.expect("seed durable row for the actual paused job");
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
index 9a51e9c135..37cacb89b6 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
@@ -330,8 +330,7 @@ async fn continue_subagent_resumes_idle_durable_session_e2e() {
worker_thread_id: None,
task_id: "sub-earlier-task".into(),
lifecycle_key: None,
- parent_epoch: None,
-},
+ },
None,
)
.expect("seed durable session");