Oko/Docs

Command reference

oko defects snapshot

Writes the open defects, newest first and in the shape `oko defects list --open --json` prints, to `<register>.open.json` beside the register (`defects.open.json` for `defects.json`). Every write of the register writes it too, under the register's lock, so a reader that may not start Oko — a Tama gate inside a harness hook — reads current open work from one file in milliseconds.

Invocation#

Command
oko defects snapshot [--json]

Inputs and options#

  • Takes nothing but --json; the register is the one `oko defects location` prints (OKO_DEFECT_REGISTER moves both).

Output and state effect#

  • Replaces the snapshot whole and prints `open defects written to <path>`; with --json `{snapshot: <path>}`. A register write whose snapshot then fails is refused as `the defect register <path> was written, but its open snapshot <path> was not: <cause>`, so no reader trusts an old snapshot in silence.

Refusals and safe exits#

  • `oko defects snapshot does not take <flags>; it takes --json` and `oko defects snapshot takes only flags; it was given <word>, which it would not read` (exit 2); the register's read refusal and the snapshot's write refusal with its path.

CLI reference#