---
slug: one-door-one-verdict
title: "One door, one verdict"
tag: Engine
date: 2026-09-05
published: 2026-11-17
receipts:
  - https://github.com/supernovae-st/nika/commit/5e73463f216afdde063608e74cd883350408cd45
  - https://github.com/supernovae-st/nika/commit/3a9ef087eca06820a714b74697a3ca0ce5d23049
  - https://github.com/supernovae-st/nika/commit/89ef79d4cbe6805d3deb1035475cc1236945b500
  - https://github.com/supernovae-st/nika/commit/d10f245c2cb48dc169654896965d9d563afc803e
  - https://github.com/supernovae-st/nika/commit/2dd1996cb9a37d0ff6b5b417c02e160e4d475b4c
  - https://github.com/supernovae-st/nika/commit/04195f95da56bd6b36f5940dba76d08a3250661f
description: "First released in v0.118.6, the One Door work gives every Nika run one closing record that the terminal, the server and the trace all read."
---

A Nika run can start in three ways. Someone types `nika run` in a terminal. A schedule fires it. An application sends an HTTP request to `nika serve`, the [door that opened in v0.114.0](/blog/the-server-door-opens-on-loopback). Until the work the project calls One Door, each of those surfaces told the end of the story in its own words.

The decision record behind the change, ADR-128, counts the damage. On the main branch before it, "the same run's terminal truth was folded seven times, in seven places, with two vocabularies." The runtime wrote a status word such as `completed` on the trace's last line. The command line derived `succeeded`. The exit code, the service layer and the server's job status each worked out their own version, and `nika trace outputs --json` produced a run state that included an invented `recovered`. ADR-128 records that two of these surfaces did report different words for one run.

This work is recorded in the engine changelog under 0.117.0 and 0.118.0. Neither tag produced a public release. The first complete public release that carries it is v0.118.6, published on 5 September 2026.

## One record at the end of every run

At the center is one record, the run's settlement. The runtime builds it once, at the moment the run ends, and writes it on the trace's final line. It holds:

- the state: `succeeded`, `failed`, `paused` or `cancelled`;
- the cause: `normal`, `human_gate`, `task_failed`, `output_contract`, `budget`, `operator` or `refused`;
- the elapsed time and the task tally, which now also counts tasks that never started;
- the spend, with a qualifier that says what the total covers: `priced`, `partially_priced`, `unpriced` or `unmetered`;
- the failure, named.

Every surface reads that record instead of computing its own. The exit code of `nika run` is a projection of it. So are the server's job status, the closing event a `--json` consumer reads, `trace outputs --json`, and `trace ls`, which now prints `succeeded` where it printed `completed`. Recovery stopped being a run state: it is a count on the settlement and a fact on the task's own row.

One honesty rule rides along. Unknown cost is never shown as zero: the closing card and the live meter print `unmetered` or `unpriced (N calls)` where they used to print `$0.00`.

## The check answers four questions

`nika check` now ends on a line that answers four separate questions. The engine README shows it at the end of a check that passes:

```text
 ✔ TRIFECTA no lethal trifecta over the declared permits: without a human gate
 layers · valid ✔ · access ready ✔ · capacity fit ✔ · run ready ✔
```

The README says the verdict was captured from 0.124.0; the layers line itself arrived with this work. ADR-123 defines the four layers in short formulas. In plain words: valid is the check's ladder of findings, plus model resolution and skills. Access ready means every lane known before the run is admitted by the access plan this machine resolves, judged on presence only, "never a dial". Capacity fit holds the reasoning-budget rules from [v0.115.0](/blog/not-a-workflow-yet) and new capacity laws, judged only from what the catalog positively knows. The changelog lists them: an `infer.max_tokens` above the seat's maximum output, a `schema:` on a seat without a JSON mode, an agent's total token budget above the context window, and a `vision:` input on a text-only seat. Run ready is the other three plus any known blocker. In JSON, a `verdicts` object sits beside `clean`, which keeps its old meaning.

The other half of the rule is in the changelog heading: "`check` answers four questions and `run` refuses what `check` refuses". ADR-123 gives a case behind it: the check refused a reasoning model under a 32-token output cap while the run admitted and executed the same file. The model judgments the check makes now gate the run before its first task too.

## One access plan, decided once

Before this work, the path a run announced and the path it took could differ. The changelog gives the case on v0.116.2: "the announce could name a seat the run never rode and the run could dial the API with a dead key while the seat was ready."

Now `nika run` resolves an access plan once per attempt (the models, this machine's providers and signed-in applications, any `--access` pin) and executes exactly that plan. The announcement, the dry-run preview and the check's JSON rows are views of the same plan. A model with no ready path refuses before the first task with `NIKA-1800`, instead of failing inside a task with a provider error. The wording stops overclaiming too: « key present » now reads « key present · not validated ».

A resume follows the same plan. If the path a task used last time has moved, the resume refuses instead of switching silently, and names both paths and the two `--access` flags that would make the change explicit.

## Ctrl-C ends the story too

Before this work, a run did not listen for signals at all. The changelog describes what that meant: "from a terminal the process died without a terminal frame, from a script it ignored the signal and completed."

Now the first Ctrl-C, or a `SIGTERM`, cancels at the next wave boundary. Work already in flight completes and is counted, tasks that had not started settle as cancelled by the operator, the run ends with one `workflow_cancelled` line, and the trace seals. The card says `cancelled`, and "the exit code is 130 (the cancelled class, documented in `run --help`)". A second Ctrl-C aborts mid-flight and says the trace is incomplete.

## A dead writer is not a failed run

A trace with no final line can mean two things: the run is still going, or the process writing it died. Before this work, `trace ls` said `running` forever for a killed run, and `trace verify` printed INCOMPLETE but exited 0. A monitor watching the exit code would mark a dead run green.

ADR-129 keeps the run's state apart from the state of its evidence. The process that writes a trace now holds a small lock file beside it, which the operating system releases when the process ends, however it ends. `trace ls` asks that lock and prints `dead` for a running trace whose writer is gone. `trace verify` exits 5, a new INCOMPLETE class, for a journal that never reached its final line. No surface invents the missing ending: "A dead process proves incomplete evidence, never a failed run."

The same work binds a trace to the project that wrote it. A resume from another project refuses with « a trace is not a bearer artifact: resume it from the project that wrote it ». Under `--resume-unverified`, every recorded `nika:prompt` decision is asked again instead of replayed.

## Eight tags before a release

The One Door work was tagged as 0.117.0, 0.117.1 and 0.118.0 to 0.118.5, and none of those tags produced a complete public release. The changelog explains each one. Among the causes: a permission the provenance job declared, a fresh draft that a lookup could not see, a container image check, a draft orphaned by a metadata update. It records the rule it kept, "existing tags and registry bytes are never rewritten", and says that "0.118.2 and 0.118.3 did publish their WASM npm packages before failing." v0.118.6 is the first of the series that completed.

## What this does not do

- The changelog limits the claim itself: "One Door is not a claim of unlimited evidence or fully durable sessions". Large fan-out evidence and durable session state are named as follow-ups.
- On the server, the changelog gives a cancelled run "a five-second grace to reach that boundary before it drops it mid-flight"; the operations guide today says such a job then settles `interrupted`. The fix for queued replays "does not claim exactly-once external effects".
- `run ready` reporting false does not change the default exit code of `nika check`; ADR-123 makes that an outcome of `--profile operational`, which folds an unready lane into exit 2.
- Exit 5 also applies to a run that is still in progress, whose trace is honestly not complete yet. A trace copied to another machine cannot judge its writer and reads `unknown`.
- The access plan says how far a path's identity is proven, and no further. The same changelog section says "nothing yet hashes, pins or sandboxes the seat's binary".

Read the [v0.118.6 release](https://github.com/supernovae-st/nika/releases/tag/v0.118.6), [ADR-128](https://github.com/supernovae-st/nika/blob/main/docs/adr/adr-128-one-run-settlement.md) and [ADR-129](https://github.com/supernovae-st/nika/blob/main/docs/adr/adr-129-run-state-is-not-evidence-state.md), or continue with [The run keeps its receipt](/blog/the-run-keeps-its-receipt).
