()
| 621 | |
| 622 | #[test] |
| 623 | fn test_get_ready_steps_wave() { |
| 624 | // s1 and s2 are independent; s3 depends on both |
| 625 | let mut plan = ExecutionPlan::new("Test", Complexity::Medium); |
| 626 | plan.add_step(Task::new("s1", "Step 1")); |
| 627 | plan.add_step(Task::new("s2", "Step 2")); |
| 628 | plan.add_step( |
| 629 | Task::new("s3", "Step 3").with_dependencies(vec!["s1".to_string(), "s2".to_string()]), |
| 630 | ); |
| 631 | |
| 632 | // Wave 1: s1 and s2 |
| 633 | let ready = plan.get_ready_steps(); |
| 634 | assert_eq!(ready.len(), 2); |
| 635 | let ids: Vec<&str> = ready.iter().map(|s| s.id.as_str()).collect(); |
| 636 | assert!(ids.contains(&"s1")); |
| 637 | assert!(ids.contains(&"s2")); |
| 638 | |
| 639 | // Complete wave 1 |
| 640 | plan.mark_status("s1", TaskStatus::Completed); |
| 641 | plan.mark_status("s2", TaskStatus::Completed); |
| 642 | |
| 643 | // Wave 2: s3 |
| 644 | let ready = plan.get_ready_steps(); |
| 645 | assert_eq!(ready.len(), 1); |
| 646 | assert_eq!(ready[0].id, "s3"); |
| 647 | } |
| 648 | |
| 649 | // ======================================================================== |
| 650 | // AgentGoal tests |
nothing calls this directly
no test coverage detected