Oko/Docs

Command reference

oko blockers graph

Reads what waits on what across three registers at once and names the loops no single repair breaks, the critical path and how many items each node unblocks, so a chain of blockers is read instead of rediscovered.

Invocation#

Command
oko blockers graph [--from ID] [--json]

Inputs and options#

  • Edges come from: the shared database's waiting relations (`oko tasks relate A blocked-by B`, `follows`: every kind relations.json declares as waiting), between tasks and open defects; release state — an open defect whose repair is recorded (`oko defects repaired`) but not closed waits on the node release-<repository>, which says how many repairs wait there and how many are not on origin/main of that checkout yet; and recorded refusals — every open blocker stands between the item it blocks and, with --waits-on, the item whose repair it waits on.
  • --from cuts the graph through one node: what it waits on and what waits on it, transitively. It takes a node id as the graph prints it, a defect id whole or short, or a blocker id.

Output and state effect#

  • Prints each node something waits on as `<id> unblocks <n> <kind> <label>`, the most unblocking first; every edge as `<from> waits on <to> (<source>): <detail>`, the source being relation:<kind>, release or refusal; each loop as `cycle: <ids>; nothing in it moves until one of its waits is broken`; and `critical path: <ids>`, the longest chain of waits from the item that waits first, a loop on it listed whole. With nothing waiting it prints `nothing waits on anything in the registers read`.
  • --json prints {from, nodes: [{id, kind, label, unblocks}], edges: [{from, to, source, detail}], cycles, criticalPath}; the native API's blockers domain answers the same to graph {from?}, and Oko Desktop's Blockers screen shows it under What waits on what, with a field that cuts it through one node.
  • A checkout git cannot read for a release node does not stop the graph: the node and the edge say `whether it is pushed could not be read: <cause>`.

Refusals and safe exits#

  • `oko blockers graph does not take <flag>` for anything but --from and --json, and a --from without its value (exit 2).
  • `no node of the blocker graph is named <id>: name a defect, an open blocker, or a node as oko blockers graph prints it`; `defect <id> is defect-<short>, which waits on nothing and nothing waits on`.
  • The shared database or a register that cannot be read refuses with its cause; `a stored task relation has no <field>: <row>`; `defect <id> records its repair as <revision>, not <repository>@<revision>`.

CLI reference#