Command reference
oko defects done
States what holds one term of a repair done well. A repair that exists is not done: its author also says how it holds for every input, what it costs where it runs often, which error codes and messages its failures give, and which capabilities the defect showed missing it built or recorded. `oko defects repaired` refuses while any declared term has no evidence.
Invocation#
oko defects done <id> --term every-input|optimized|errors|features --evidence TEXT --by SESSION [--json]Inputs and options#
- The terms are declared in rust/src/defects/done/terms.json, each with what its evidence must say: `every-input` (which inputs, cases and callers of the changed code were read or exercised, not only the reported one), `optimized` (where the code runs often or long, what was measured, or why it does not), `errors` (the declared error codes and the messages naming the failed operation and cause), `features` (the missing capabilities built, or recorded as their own items with their ids, or why none is missing). Keeping the shape from returning is the prevention, declared with `oko defects prevention`.
- --evidence is what holds the term, in the author's words; --by is the session stating it. A later statement of the same term replaces the earlier one. A defect with an owner has its terms stated by its owner alone: --by must name the owner, and a session may not state the terms of a defect a working executor holds, as it may not record its repair.
- For example: `oko defects done <id> --term errors --evidence "the refusal names the failed write and the register's cause, exit 1" --by <session>`.
Output and state effect#
- Keeps `done [{term, evidence, declaredBy, declaredAt, provenBy}]` on the defect, `provenBy` being the agent session the process tree shows ran the command (absent when none did, as from a person's terminal or the native API), and prints `defect <id> states every term of a done repair` or `defect <id> still states no evidence for <terms>`; --json prints the defect. `oko defects show` prints `done <term>: <evidence> (stated by <session>[, run in session <proven>] at <time>)` for each, then `done no evidence yet for <terms>; oko defects done <id> --term <term> --evidence <what holds it> --by <session>` while any is missing. The native API answers the same as the defects `done` action ({id, term, evidence, by}).
Refusals and safe exits#
- `oko defects done --term takes every-input, optimized, errors, features; got <word>`; `a done statement needs <what the term asks>` for a blank --evidence and `a done statement needs the session that states it` for a blank --by; `oko defects done requires <id>`, `--term`, `--evidence` and `--by` (exit 2).
- `defect <id> is owned by <owner>, so its owner states what holds its repair; --by names <by>` when the defect has an owner and --by names another, and `defect <id> is owned by executor <owner>, which is working on it; session <asking> may not state the done terms of it` when another session runs the command; nothing is written.
- `oko defects repaired` (and every path that records a repair claim) lists, among its missing steps, `a repair is done when it is done well, not when it exists: state what holds each of <term> (<what it asks>); …: oko defects done <id> --term <term> --evidence <what holds it> --by <session>`.
- A declaration that does not read refuses every statement and repair with `the declared terms of a done repair (defects/done/terms.json) do not read: <cause>`.