Oko/Docs

Command reference

oko failures designed

Declares the command paths whose unsuccessful exit is their answer — a check that exits non-zero when what it checks does not hold — so their failures are kept and become no defect.

Invocation#

Command
oko failures designed [list] [--json]; oko failures designed add --command PATH --reason TEXT --by SESSION [--json]; oko failures designed remove --command PATH --reason TEXT [--json]

Inputs and options#

  • add names the command path as the failures carry it (`oko failures summary` prints it), why its exit is its answer and the session declaring it; the failures of that path no defect holds yet are marked with the declaration. remove takes a declaration back with why it was wrong; those failures are owed again and the next pass records them.
  • The register is OKO_CALL_FAILURES_REGISTER, else call-failures.json beside the defect register (`<defects>.call-failures.json` when OKO_DEFECT_REGISTER moves it); each call's whole output is kept, owner only, in the call-failures directory beside it (`oko failures location`).

Output and state effect#

  • add prints `declared `<path>`: its failures are kept and become no defect`; remove prints `` `<path>` is no longer declared; the next pass records its failures as defects ``; list prints `<path> <reason> (<by> at <time>)` per declaration, or `no command path is declared to exit unsuccessfully as its answer`.

Refusals and safe exits#

  • “`<path>` is already declared; `oko failures designed list` shows why”; “`<path>` is not declared; `oko failures designed list` shows what is”; an empty path, reason or session refused by name; a missing --command, --reason or --by (exit 2).
  • “oko failures designed takes list, add or remove, got <word>” (exit 2).

CLI reference#