Expand description
Dependency inventory for blocked tasks.
[crate::daemon::resolve_blockers] frees a task when its dependency is
done (or its question answered) and quarantines it when the dependency no
longer exists. It has nothing to say about a dependency that is alive but
stuck: a held task never becomes done on its own, so everything
waiting on it waits forever, and nothing shows why. Inventory answers
that from one snapshot of the queue and the questions:
Inventory::waits_on- what a blocked task waits on and each dependency’s state, following a chain of blocked dependencies (4135 (blocked → 9db7 held)), formagi task listand the web UI.Inventory::stuck_roots- the tasks nothing in the loop will ever run that a blocked task is frozen behind.crate::triageasks about each such root once, naming everything it freezes.
A blocked task is stuck when it has at least one unresolved dependency
and every one of them is either held or itself a stuck blocked task.
Anything that can still make progress - a queued, running or failed
(retried) task, an open question, a dependency that no longer exists (which
resolve_blockers quarantines) - makes it not stuck. A dependency cycle
terminates: its members are stuck, and the smallest id in the cycle is its
root.
Structs§
- Inventory
- One snapshot of the tasks and questions a
blocked_byid can name.