Skip to content

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

test(orchestration): remove durable fallback wait outcome test

Steven Enamakel573d0932e643
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_wire_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_wire_tests.rs
index 629a86beb9..79a5455cb9 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_wire_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_wire_tests.rs
@@ -92,91 +92,6 @@ fn cancel_outcome_strings_are_literal() {
assert_eq!(FinishedOutcome::Failed.as_str(), "failed");
}
-#[tokio::test]
-async fn durable_fallback_maps_every_store_status_to_literal_wait_outcome() {
- let ws = super::test_workspace();
- let store = task_store_for_workspace(&ws);
- let parent = "wire-durable-parent";
- let timeout = Duration::from_millis(5);
- let mut seen = Vec::new();
-
- let mk = |id: &str| {
- store.insert(spec(id, parent, None)).unwrap();
- store.mark_running(&TaskId::new(id)).unwrap();
- TaskId::new(id)
- };
- let id = mk("wire-d-completed");
- store
- .complete(&id, OrchestrationTaskResult::text("final text".to_string()))
- .unwrap();
- let id = mk("wire-d-failed");
- store.fail(&id, "boom".to_string()).unwrap();
- let id = mk("wire-d-awaiting");
- store.mark_awaiting(&id).unwrap();
- let id = mk("wire-d-cancelled");
- store.request_cancel(&id).unwrap();
- store.mark_cancelled(&id).unwrap();
- mk("wire-d-running");
- // Awaiting with no recorded question / failure with no recorded error use
- // the fallback sentences.
- store.insert(spec("wire-d-pending", parent, None)).unwrap();
-
- for id in [
- "wire-d-completed",
- "wire-d-failed",
- "wire-d-awaiting",
- "wire-d-cancelled",
- "wire-d-running",
- "wire-d-pending",
- ] {
- let outcome = wait_in_workspace(
- &crate::core::runtime::DispatchCtx::ambient(),
- id,
- parent,
- &ws,
- timeout,
- )
- .await;
- seen.push(format!("{id}: {outcome:?}"));
- }
- assert_eq!(
- seen,
- vec![
- "wire-d-completed: Ok(Terminal(Completed { output: \"final text\", iterations: 0 }))",
- "wire-d-failed: Ok(Terminal(Failed { error: \"boom\" }))",
- "wire-d-awaiting: Ok(Terminal(AwaitingUser { question: \"sub-agent is awaiting user input; no clarification text was available from the durable task store\" }))",
- "wire-d-cancelled: Ok(Terminal(Failed { error: \"sub-agent was cancelled\" }))",
- "wire-d-running: Ok(TimedOut(Running))",
- "wire-d-pending: Ok(TimedOut(Running))",
- ]
- );
- // A different parent is refused, an unknown id is unknown.
- assert_eq!(
- wait_in_workspace(
- &crate::core::runtime::DispatchCtx::ambient(),
- "wire-d-failed",
- "someone-else",
- &ws,
- timeout
- )
- .await
- .unwrap_err(),
- WaitError::NotOwned
- );
- assert_eq!(
- wait_in_workspace(
- &crate::core::runtime::DispatchCtx::ambient(),
- "wire-d-nope",
- parent,
- &ws,
- timeout
- )
- .await
- .unwrap_err(),
- WaitError::Unknown
- );
-}
-
#[tokio::test]
async fn spawn_ledger_record_has_literal_persisted_shape() {
let _guard = super::test_guard_async().await;