Check if all blockedBy dependencies are completed. Missing dependencies are treated as blocked.
(task_id: str)
| 97 | |
| 98 | |
| 99 | def can_start(task_id: str) -> bool: |
| 100 | """Check if all blockedBy dependencies are completed. |
| 101 | Missing dependencies are treated as blocked.""" |
| 102 | task = load_task(task_id) |
| 103 | for dep_id in task.blockedBy: |
| 104 | if not _task_path(dep_id).exists(): |
| 105 | return False |
| 106 | if load_task(dep_id).status != "completed": |
| 107 | return False |
| 108 | return True |
| 109 | |
| 110 | |
| 111 | def claim_task(task_id: str, owner: str = "agent") -> str: |
no test coverage detected