Command reference
oko defects variant
Tries a new variant of a class's cause: a probe of its own that reaches the same cause through an input none of the class's recorded instances used, so a repair that special-cases those instances cannot close the class. Without a probe, lists every trial kept for the class.
Invocation#
oko defects variant <id> [--revision <repository>@<commit> --probe-program PROGRAM [--probe-arg ARG]… --probe-scope PRODUCTS --probe-format lines|json [--probe-pointer POINTER] --by SESSION] [--json]Inputs and options#
- The probe is declared as a completion probe is (`oko defects completion`): the program, its arguments, the products it reads and how its output lists instances; `{revision}` and the other placeholders are filled at each run. --revision is the repair revision; --by the session running it.
Output and state effect#
- Runs the probe at exactly the revision the class was found in and at exactly --revision, and keeps the trial, holding or not, in variants.json beside the defect register: `{probe, atFound, atRepair, by, at, holds}`, each observation with its revision, the instances listed, the command, status and any refusal. It holds when it lists at least one instance where the class was found, none at the repair, and neither run refused. Prints the trial; with no probe, prints every trial, oldest first.
- `oko defects fix` refuses a class whose repair revision has no holding variant: the newest trial at that revision decides, so a variant that stopped holding after a later change is not covered by an older one. A defect that is no class needs none. Oko Desktop's Shapes section lists a class's trials and runs one through the native API's defects `variant` action ({id, revision, probe, by}, or {id} to list).
Refusals and safe exits#
- `defect <id> is not a class; a variant shows a class's cause handled for an input its instances did not use`.
- The discrimination refusals of a completion probe: a probe naming the repair commit itself, one that cannot be replayed where the class was found, and one finding no instance there: it measures nothing and is not kept.
- From fix: `defect <id>: no variant of its cause was tried at <revision>; a class closes only when one is shown handled: oko defects variant …` and `defect <id>: the newest variant at <revision> does not hold (at <found>: <n> instance(s)[, refused: <cause>]; at <revision>: <n> instance(s)[, refused: <cause>]); …`.
- `a variant trial needs the repair revision it is run at (--revision) and the session that runs it (--by)` and `--revision and --by belong to a variant trial, which needs its probe (--probe-program …)`; a revision that is not a commit is refused before anything runs.