Command reference
oko defects released
Lists the open defects whose recorded repair a published release already carries, and with --tasks the tasks it finishes; closes them with --close, so a batch release that published hundreds of repairs leaves none of them, and none of the work it finished, counted as open.
Invocation#
oko defects released [--product NAME] [--close] [--tasks] [--json]Inputs and options#
- --product limits the read to one released product (as its .wisent-release.json names it); --close closes each listed defect and records each listed task's done verdict; --tasks also reads the shared database's tasks (an isolated register does not isolate them, so they are read only when asked); --json prints {carried: [{id, product, repaired_in, version, commit, closed}], tasks: [{task, session, ordinal, product, version, commit, evidence, closed}], unreadable: [...]}.
- A task is finished by a release when its contract has acceptance checks and every one is recorded met (`oko tasks check … --met`), and the commit its recorded evidence names (`oko tasks evidence … --commit <repository>@<revision>`) is contained in a published release of that repository's product; a task the report already counts done is not listed. With --close its verdict is `done`, judged by `release <product> <version>`, reason `every acceptance check is recorded met, and <product> <version>, published from <commit>, carries the evidence commit <reference>`, bound to the task as it stands like a judge's: a defect reported against the task afterwards reopens it. Nothing here asks the judge, so a judge outage does not hold back work with this mechanical proof. A task whose session has no live transcript on this machine, or whose evidence row names no message number, is listed under unreadable as `task <id>: <cause>`. Stado's delivery queue runs `--product <product> --close --tasks --json` as its record step; the scheduled `released` routine and Oko Desktop's Repairs a published release carries section read and close tasks too. Real journey: tests/defects/release/released_tasks.rs.
Output and state effect#
- Without --product, reads every product's published releases in one call, `stado release status --json` (its stderr carries one `czekam: stado release status --json` line for the whole pass, and one `oko defects released: <product>: <n> published release(s)` line per product that reading names); with --product, reads that product's with `stado release status <product> --json`. Lists each open defect whose repair revision one of the published source commits contains (git merge-base --is-ancestor in the workshop's checkout), then the count. The closes read the same answer, so a pass over hundreds of defects asks Stado once.
- With --close each one is closed by `fix` with the recorded repair as the revision, `<product> <version>, published from <commit>, carries the recorded repair <repair>` as the detail and the release check as the completeness. Without it nothing is written.
- A product Stado does not release or cannot answer for is listed once as `not read: <product>: <refusal>` and the read goes on; a product the whole-fleet reading names no release of carries nothing.
Refusals and safe exits#
- Any flag other than --product, --close and --json, and any positional word, is refused by name (exit 2). A close the register refuses (the repair changed under it) stops with that refusal.
- A repository must declare its Stado release identity in .wisent-release.json as a nonempty string product. Missing or unreadable manifests retain their path and OS cause; malformed JSON retains its parser cause; missing, non-string or blank product fields name the declaration failure. The sweep adds these failures to unreadable and continues other records without substituting the directory name. Manual closure of a repository delivered by its own CI remains a separate delivery path.
- Oko Desktop → Defects → Repairs a published release carries shows these failures as Release evidence could not be read with the full underlying cause. An unreadable release is not rendered as No open defect's repair is in a published release; that empty state appears only when the read has no failures.
- The real CLI journeys in tests/defects/released.rs and tests/defects/released_sweep.rs use isolated registers and actual fleet releases. Their Stado release reads and Git parent-resolution commands must exit successfully before stdout is consumed; a failed dependency names the operation, exit status and stderr. Parseable output from a failed process is not release evidence. They run as the defects-released and defects-released-sweep Cargo targets; release containment does not establish defect-specific behavioral replay.