Command reference
oko defects prevention
Declares where a new instance of a defect's shape is refused as it is made. Every defect the operator reported is repaired only as a class, and a class declares its prevention before its repair can be recorded.
Invocation#
oko defects prevention <id> --kind gate|record-refusal|commit-review --refuses TEXT --by SESSION [--json]Inputs and options#
- The operator reports a defect when a standing ruling of his names it (`oko rulings record --subject <id>`) or a moment of his frustration names it as the cause (`oko frustration cause <moment> --defect <id>`). Such a defect needs three things before `oko defects repaired` records its repair: its mechanism shape (`oko defects shape`), a class completion probe that lists every instance across the products (`oko defects completion <id> --class --probe-program …`), and this prevention. Its repair is verified only when that probe lists none.
- --kind names where the instance is refused: `gate` (a gate refuses the action that makes it), `record-refusal` (the recording command refuses to write it) or `commit-review` (a commit-review check refuses a commit carrying it). --refuses names that gate, refusal or check; --by is the session declaring it. A later declaration replaces the earlier one.
- For example: `oko defects prevention <id> --kind record-refusal --refuses "oko defects repaired refuses an operator report without its class probe and prevention" --by <session>`.
Output and state effect#
- Writes `prevention {kind, refuses, declaredBy, declaredAt}` on the defect and prints `defect <id> refuses a new instance by <kind>: <refuses>`; --json prints the defect. `oko defects show` prints `reported by the operator (ruling <id>, frustration <id>): repaired only as a class`, `prevents <kind> <refuses>, declared by <session> at <time>` and, for an operator report without one, the command that declares it. Oko Desktop's Shapes section lists each class with its prevention and recurrences and declares a prevention through the native API's defects `prevention` action.
- A recurrence: whenever a defect is recorded with, or given, the shape of an operator-reported class whose repair is recorded (repaired, claimed or closed), that class repair has failed. The broken verdict `oko defects record: a later defect of the operator-reported shape` goes on the repair's claim at that revision, which reopens the repair (`recurrence: defect <id> (<title>) was recorded with the shape the operator reported (<reports>) after the class repair at <revision>`) and charges the session and model the claim names; a class whose record still carries a repair the claim did not name is reopened directly. The recurrence is kept on the class as `recurrences [{defect, repair, at}]`, and `oko defects record` and `oko defects shape` print `recurrence of operator-reported class <id>: its repair at <revision> was reopened as failed`. A defect already counted against a class is not counted twice.
- While any recurrence stands since the class was last repaired or closed, the class leads `oko work next|queue`, before the build-first pool, with the reason `a recurrence of an operator-reported shape after its class repair (<ids>): the class repair failed`; the JSON row carries `recurred`.
- `oko sessions scorecard` puts every recurrence charge on the card (`recurrenceCharges`) and on the session and model rows its repair claim names; each charge lowers that row's standing by one, beside the compiler charges, and prints `recurrence <defect> disproved the repair of operator-reported class <class> at <revision> (claim <id>)`. A recurrence whose repair has no claim at that revision is listed with `unattributed`.
- The improvement loop's standing signal `operator-shape-recurrences` (measure `operator_shape_recurrences`) counts recurrences per shape at the level the operator declared, beside the recurrence register (`numeric-provenance.json`): one recurrence is a finding, recorded as a class defect and sent to an executor.
Refusals and safe exits#
- `oko defects prevention requires <id>`, `oko defects prevention requires --kind <text>`, `--refuses <text>` and `--by <text>` (exit 2); `oko defects prevention --kind takes gate, record-refusal, commit-review; got <word>`; a blank --refuses or --by names what is missing; an unknown or ambiguous id refuses as `oko defects show` does.
- `oko defects repaired` on an operator report without its class probe or prevention lists, among its missing steps, `the operator reported it (<reports>), so it is repaired as a class: declare the probe that lists every instance across the products: oko defects completion <id> --class --probe-program …` and `the operator reported it (<reports>), so it declares where a new instance is refused as it is made: oko defects prevention <id> --kind gate|record-refusal|commit-review --refuses <the gate, refusal or check> --by <session>`.
- A recurrence whose verdict, reopening or record cannot be written refuses the recording with `defect <id> was recorded, but whether it is a recurrence of an operator-reported class could not be settled: <cause>`; the defect is kept.