glossary

Work pool

learn /definition

A work pool is a saved, typed query over work items that an autonomous loop consults to pull its next task; it is resolved live at each call and returns one item or nothing.

Pools answer the question schedulers cannot: not when to run, but what to work on. A cron expression fires blind; a pool evaluates the actual state of the work at the moment of asking: what is stale, what is unblocked, what is finished enough for the next stage.

Two design decisions make pools trustworthy. Resolution is live, never cached, because a staleness predicate goes wrong the moment the clock crosses a threshold, and the pool must never hand back a task someone already finished. And the answer is exactly one item or nothing, so the consuming workflow can branch deterministically on emptiness rather than juggling a list.

The queries earn their keep through computed fields: predicates like "stale for more than three days" or "all children complete" express what is rotting and what is ready, which is precisely what a flat filter list cannot say.