MCPcopy Create free account
hub / github.com/AI45Lab/Code / get_ready_steps

Method get_ready_steps

core/src/planning/mod.rs:248–262  ·  view source on GitHub ↗

Get steps that are ready to execute (dependencies met)

(&self)

Source from the content-addressed store, hash-verified

246
247 /// Get steps that are ready to execute (dependencies met)
248 pub fn get_ready_steps(&self) -> Vec<&Task> {
249 self.steps
250 .iter()
251 .filter(|step| {
252 step.status == TaskStatus::Pending
253 && step.dependencies.iter().all(|dep_id| {
254 self.steps
255 .iter()
256 .find(|s| &s.id == dep_id)
257 .map(|s| s.status == TaskStatus::Completed)
258 .unwrap_or(false)
259 })
260 })
261 .collect()
262 }
263
264 /// Update the status of a step by ID
265 pub fn mark_status(&mut self, step_id: &str, status: TaskStatus) {

Callers 5

has_deadlockMethod · 0.80
test_execution_planFunction · 0.80
execute_planMethod · 0.80

Calls 1

allMethod · 0.80

Tested by 3

test_execution_planFunction · 0.64