Skip to content

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

test(subagent_host): update lifecycle outcome test for renamed persistence variant

Steven Enamakelfa7a5bfd33dd
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome_tests.rs
index 0313235028..30c096a4b9 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome_tests.rs
@@ -2,7 +2,8 @@ use super::*;
#[test]
fn paused_outcomes_preserve_answer_choices_and_worker_resume_options() {
- let definitions = crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only();
+ let definitions =
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only();
let definition = definitions.get("orchestrator").unwrap();
let options = SubagentRunOptions {
worker_thread_id: Some("worker-thread".into()),
@@ -16,24 +17,30 @@ fn paused_outcomes_preserve_answer_choices_and_worker_resume_options() {
output: "partial work".into(),
iterations: 2,
elapsed: std::time::Duration::from_millis(25),
- mode: super::super::SubagentMode::Typed,
+ mode: crate::agent::subagent_host::SubagentMode::Typed,
status: SubagentRunStatus::AwaitingUser {
question: "Which version?".into(),
options: Some(vec!["stable".into(), "preview".into()]),
checkpoint: None,
},
final_history: Vec::new(),
- usage: super::super::SubagentUsage::default(),
+ usage: SubagentUsage::default(),
artifact_paths: vec!["report.md".into()],
persistence_disposition:
- tinyagents_orchestration::subagent::SubagentPersistenceDisposition::PauseInserted,
+ tinyagents_orchestration::subagent::SubagentPersistenceDisposition::PauseCommitted,
};
let neutral = host_outcome_to_neutral(outcome, definition, &options);
assert_eq!(neutral.worker_thread_id.as_deref(), Some("worker-thread"));
assert_eq!(neutral.model_override.as_deref(), Some("worker-model"));
- assert_eq!(neutral.extensions["options"], serde_json::json!(["stable", "preview"]));
- assert_eq!(neutral.extensions["artifact_paths"], serde_json::json!(["report.md"]));
+ assert_eq!(
+ neutral.extensions["options"],
+ serde_json::json!(["stable", "preview"])
+ );
+ assert_eq!(
+ neutral.extensions["artifact_paths"],
+ serde_json::json!(["report.md"])
+ );
assert_eq!(neutral.extensions["elapsed_ms"], 25);
let SubagentOutcomeKind::AwaitingInput(pause) = neutral.status else {
panic!("a paused host outcome must remain resumable");