Oko/Docs

Command reference

oko defects probe

Declares the command that exits non-zero while a class's shape is present and runs it once for the repair's revision, keeping the run.

Invocation#

Command
oko defects probe <id> --revision REPOSITORY@COMMIT --program PROGRAM [--arg ARGUMENT]... --by SESSION [--json]

Inputs and options#

  • PROGRAM runs with the --arg words, in order, in the checkout REPOSITORY names; it reads whatever shows the shape (transcripts, registers, waits, product state) and exits zero only when the shape is gone. --revision is the repair's revision; closing needs a passing run at that same revision.
  • For example: `oko defects probe <id> --revision oko@<commit> --program oko --arg blockers --arg idiotic --by <session>`.
  • A class defect (`--class`) closes only when it names both. Until then `oko defects repaired <id> --revision R` records the repair as a claim and exits 1 with `class defect <id> cannot be closed by <R> yet:` followed by one line per missing step, each with the command that takes it; `oko defects fix` and `oko defects released --close` refuse with the same lines, and Oko Desktop's Defects → Shapes and classes shows the same refusal. A defect that is not a class is not held by this gate.

Output and state effect#

  • Writes `class_probe {program, arguments, run: {revision, status, passed, stdout, stderr, by, at}}` on the defect whether the run passed or not, and prints `class probe of <id> at <revision> exited <status>: <whether the shape is gone>`; when the shape is present it then exits 1 with `class probe of defect <id> at <revision> exited <status>, so its shape is still present: <output>`.
  • `oko defects show` prints `probed by <program> [<arguments>]; at <revision> it exited <status> (<whether the shape is gone>), run by <session> at <time>`. The native API takes `class_probe {id, revision, program, arguments, by}`; OkoKit's `probeClass` and Oko Desktop's Run the class probe call it. Desktop shows the run under Class probe run as the probe's own result — `at <revision> it exited <status>: the shape is gone`, or `…: the shape is present, so the class stays open — <stdout>` — and keeps The register refused this for an operation the register refused or a run it did not keep.

Refusals and safe exits#

  • `class probe <program> [<arguments>] in <checkout> could not run: <cause>` when the program cannot start: nothing is written and no run is taken for a pass.
  • `class probe revision <repository>@<commit>: the checkout <path> is at <HEAD>, not <commit>[ and holds uncommitted changes: <status lines>]; the probe runs only on a checkout standing exactly at the commit its run is kept for` (or `is at <HEAD> and holds uncommitted changes: …`): a kept run always names the tree the probe read, so check out that commit in a clean checkout first; a git command that cannot run or fails is named with its words.
  • When closing: `declare and run the class probe …` with none, `its class probe last ran at <revision>, not at <R>; run it at this revision: …`, and `its class probe at <R> exited <status>, so the shape is still present: <output>; repair it and run the probe again: …`.

CLI reference#