Oko/Docs

Command reference

oko admit

The one decision whether an action class (build, compile, test, install or release) may run now, for one product or every product, and for the purpose the run serves; no gate or routine decides admission on its own. A ruling on `<action>` or `<action>:<product>` is the operator's consent; one on `no-<action>` or `no-<action>:<product>` withdraws it until a later ruling of his consents again. A consent scoped to a purpose, `<action>[:<product>]@<defect>`, admits only runs that name that open defect as their purpose, only while the defect is in the build-first category, and ends when the defect closes, after which the withdrawal it interrupted decides again. The newest applicable standing ruling decides. Where none decides a build, compile or test a session asks for (`--session`), the operator's standing rule decides it: the session's run waits until every open item carries its pushed repair — every open defect neither repaired nor kept as a claim, and every task the newest control pass owes without a repair (`oko tasks owed`) — except the items the build itself unblocks (`oko blockers held`). A run naming no session, such as a Stado routine or a pre-push gate, is decided by rulings alone; with no ruling, nothing constrains it. Stado asks it before a product operation that compiles (`build`), before a delivery publishes a release (`release`) and before its delivery routine installs; Tama's build gate asks it with the session for every compile, refuses a forbidden build quoting the ruling, admits one a ruling consents to, and refuses one the open-work rule holds with this reason unless the operator's build-consent answer or session capability admits it; Tama's pre-push `check-rust-format` and `quality-check` ask it for the pushed checkout and, under a withdrawal, run no tool and refuse no push; Oko's own grant-dialog settlement answers a waiting consent only when it admits; `oko defects record` and `oko defects assign` ask it for every action the defect's repair declares with `--needs` (assign with the defect as its purpose).

Invocation#

Command
oko admit ACTION [--product P] [--purpose DEFECT ...] [--session S] [--json]

Inputs and options#

  • ACTION: the action class as one word.
  • --product names the product; the product's subjects and the subjects of every product are read together, so a later word on either stands.
  • --purpose, repeatable, names an open defect the run repairs; --session adds every open build-first defect that session owns. A run naming no purpose is outside every scoped consent. A scoped consent admits only a purpose in the build-first category (`oko defects category set <id> build-first --reason TEXT --ruling RULING`, which binds the operator's ruling deciding the item to `build@`, `compile@`, `test@` and `install@` it): an item that gates delivery or agent conduct is built before the rest while the standing ban decides everything else.

Output and state effect#

  • Prints the reason: `<action> of <product> is allowed by the operator's ruling <id> on <subject> (session <s> message #<n>): "<his words>"`, `… is allowed while defect <id> is open, for its repair, by …` for a scoped consent, or `no ruling of the operator constrains <action>`. With --json prints `{action, product, purposes, allowed, ruling: {id, subject, session, ordinal, said} | null, reason, waiting}`, also when the action is refused; `waiting` lists the open items a session's run waits on, `<short id> (<product>)` per defect and `<task id> (<session> #<n>)` per task, and is empty when nothing holds it. Exit status 0 when admitted. Reads only. Oko Desktop → Rulings → Constraints asks the same through the native API (`rulings` `admit {verb, product, purposes, session}`) and lists each item it waits on.

Refusals and safe exits#

  • `<action> of <product> may not run until a later ruling of the operator allows it (no open defect was named as the purpose of this run | none of his consents covers the purpose <ids>): the operator's ruling <id> on no-<subject> (session <s> message #<n>): "<his words>"` (exit 1) while a withdrawal decides; when a named purpose is open but outside build-first the same refusal adds `; <ids> is not in the build-first category, so no consent scoped to it is admitted under this ruling (oko defects category set <id> build-first --reason TEXT --ruling RULING)`; `<action> waits until every open item carries its pushed repair, and <n> open item(s) carry none, first <item>; no ruling of the operator decides it otherwise (oko tasks owed, oko defects list --open list them; the operator's consent, a ruling on <action>, admits it before)` (exit 1) for a session's build, compile or test the open-work rule holds; `the control pass recorded an owed task without its id or session: <row>` and the refusals of `oko tasks owed` when the owed tasks cannot be read; `--purpose <id> names no open defect; a purpose ends when its defect closes`; `<word> is not an action a ruling constrains: name build, compile, test, install or release` (an `oko admit` with no action is read as the action `list` and refused the same way); a flag other than --product, --purpose, --session and --json is refused by name (exit 2); the ruling register's read refusals.

CLI reference#