---
slug: a-recovered-run-is-not-a-green-tick
title: "A recovered run is not a green tick"
tag: Engine
date: 2026-08-23
published: 2026-11-17
receipts:
  - https://github.com/supernovae-st/nika/commit/84c61383e71dc2ca16dc4adff1b541b255c472db
  - https://github.com/supernovae-st/nika/commit/cf27bac5e8ce3bde172255d77cdf8a63452e4b3c
  - https://github.com/supernovae-st/nika/commit/38fd34962d89b86e978c26959934549c3bfcc98f
  - https://github.com/supernovae-st/nika/commit/dfcc8e7a6b8bb4a86ff2b250537345d77c6270be
  - https://github.com/supernovae-st/nika/commit/f043ae9a2e8b21ccefeee4ba7f753bfcd9b42311
description: "Nika v0.114.0 stopped painting repaired runs with a plain green tick and moved two failures from the run into the check, where they cost nothing."
---

A workflow run ends with a short verdict. In a terminal it is a headline and a card. In a script it is an exit code. In a team chat it is the card someone pasted. Often that line is all anyone reads.

Nika v0.114.0, released on 23 August 2026, carried a batch of small fixes with one idea in common: the short verdict must never look better than what happened. Some change what a run prints. Others move a failure out of the run and into `nika check`, the command that audits a workflow file before anything runs. None of them is large. Together they close a gap between the summary and the facts.

## A repaired run wore the same tick as a clean one

A task can declare what happens when it fails. One option is `on_error: recover:`, which supplies a stand-in value. The spec is precise about the consequence: downstream tasks see `status: success`, and the output is the recover value.

Here is the pattern as one task taken from an example in the spec repository today, `examples/24-recover-optional-file.nika`. The task reads an optional file. If the file is missing, and only in that case, it recovers to a constant:

```text 24-recover-optional-file.nika
  read:
    invoke:
      tool: nika:read
      args:
        path: ./optional.txt
    timeout: 5s
    retry:
      max_attempts: 2
      backoff_strategy: exponential
      jitter: false
    on_error:
      on_codes:
      - NIKA-BUILTIN-READ-001
      recover: ${{ const.fallback }}
```

Recovery is a deliberate design, and a run that used it did succeed. It is still not the same run as one where nothing went wrong. Before 0.114.0, `nika run --quiet` and the shareable card put a green tick on a run that had repaired a task. A reader of the one-line output could not tell the two apart.

The 0.114.0 notes describe the fix and its limit together. "Exit 0 is still correct", they say, because "recovered is a success cause. The headline and the card title now carry the warn mark". The exit code still says the run succeeded, because it did. The words a person reads now say it needed help on the way. The longer storyboard view already counted the recovered tasks; the headline now agrees with it.

A sister fix in the same release covered files. The changelog does not describe it; its commit message does. The card prefixed `wrote` to a `nika:write` row "even when the recover arm supplied the value. the card said wrote, rc was 0, and the disk was empty." The message gives the rule in one line, "a recovered row is a substitute, not a materialized path", and the card no longer counts it among what the run produced.

## A constant that could never be a list

`for_each` runs one task once for each element of a collection. `const:` holds values fixed in the file. The 0.114.0 notes give the case that slipped through: "`const: { items: "x" }` with `for_each: ${{ const.items }}` audited clean, then died at the run with `NIKA-VAR-006`".

The commit message says why that was wrong: the value "is a literal in the file, so the checker had everything it needed." It passed because of a rule meant for a different case. The check already refused a value declared with a type that was not a list, but it let every untyped value through, on the reasoning that a `--var` flag might supply a list at run time.

The notes explain why that reasoning fails for constants. `--var` sets `inputs:` values only and refuses unknown keys, and the spec says a constant is "immutable across the run and never caller-supplied". An untyped constant's literal is its value at run time. A string there can never become a list.

Since 0.114.0 the check refuses it. The notes call the old behaviour "a linter's answer, not a verifier's": a linter comments on a file, a verifier says whether it can do what it claims. They also record the guard against overreach. Arrays and typed declarations are untouched, and in 0.114.0 "all 59 shipped templates and examples still audit clean."

## The check says where

Two smaller fixes in the same release make a refusal easier to act on.

A parse refusal now names its line. Before, a finding such as a duplicate key printed its code and left the author to find the place. The notes explain why that hurt most for duplicates: "the message says `"a" appears twice`, so grepping `a:` returns both, and neither is wrong on its own." The parser held the position all along and dropped it. It now prints the file, line and column with a caret under the spot, the same frame other findings already used.

`nika explain`, which teaches what a code means, now also answers the short name a hint prints in brackets, such as `jq-as-map`. Before, typing the token the check had just shown returned `unknown code`.

## A suggested repair that granted too much

`nika check --infer-permits` prints a `permits:` block, the list of what a workflow may touch, inferred from what the workflow does. For a `nika:read` of `/etc/passwd` in a file with no `permits:` block, it printed `fs.read: ["/etc/passwd"]`. The notes state the result plainly: "applying that block greened check and run".

A repair printed by the tool carries authority: it is there to be pasted. Since 0.114.0, a path that escapes the project (an absolute path, a home path, a path that climbs with `..`) stays a note, and the printed repair grants only the tool, not the file on the host.

## Why the summary has to be the strictest line

Every one of these fixes is about a reader in a hurry: a person scanning a terminal, a teammate looking at a pasted card, a CI job reading an exit code, an agent copying a suggested block. Each reads the shortest form of the verdict and acts on it. If that form is kinder than the full record, the reader acts on the kinder version.

The fixes go in two directions. Where the run was right but the words were too kind, the words change and the exit code stays. Where the check was too kind, the refusal moves earlier, to the moment before a model is called or a file is written.

## What this does not do

- The exit code of a recovered run is still 0, by design. A script that needs to know about recovery has to read more than the exit code.
- In 0.114.0, `nika trace ls` still listed a recovered run as `completed`; the notes say no new trace state was added in that cut. The trace vocabulary changed later, in the work first released publicly in v0.118.6, where recovery became a count on the run's final record instead of a run state. [One door, one verdict](/blog/one-door-one-verdict) tells that part.
- The refusal is about constants. The notes say the old exemption's reasoning "is inputs-only": a `--var` flag can set an `inputs:` value at run time, never a constant.
- The `--infer-permits` fix stops the tool from suggesting a host-file grant. Its commit message is explicit that "a hand-written host-file grant is still a later runtime floor, not this cut."
- The notes write the fan-out in a short inline form. The spec that 0.114.0 embedded already wrote it as a block with an `items:` key and said "There is no bare `for_each: <expr>` form". Read the quote as the notes' shorthand, not as a file to copy.

Read the [v0.114.0 release](https://github.com/supernovae-st/nika/releases/tag/v0.114.0), or continue with [Clean is not ready to spend](/blog/clean-is-not-ready-to-spend).
