---
slug: tried-on-a-copy-before-you-say-yes
title: "Tried on a copy before you say yes"
tag: Engine
date: 2026-10-02
published: 2026-11-17
receipts:
  - https://github.com/supernovae-st/nika/commit/62692b3846dbf6a90da774e8dac91e9766231084
  - https://github.com/supernovae-st/nika/commit/8c76aaa049b48a6cf61d7bb622dbf207e41d2795
  - https://github.com/supernovae-st/nika-spec/commit/b44478c6d68b4686aa4bbbd60c16cf6ba9406813
  - https://github.com/supernovae-st/nika/commit/5660e683fd737bbd6f0abfa3b9c32cc00f189d93
description: "Nika 0.122.0 tries a proposed workflow on copies of your files and judges what it wrote against your request, before you say yes."
---

When a tool writes a workflow for you, the usual order is short: generate, accept, run, find out. You read a proposal, it looks plausible, you say yes, and the first real evidence of what it does arrives after it has touched your files.

A check does not close that gap. `nika check` reads the file before anything runs; it does not run it. It cannot show you whether the file writes the rows you asked for.

Nika v0.122.0, released on 2 October 2026, puts one more step between "generate" and "accept". Where it can, the proposal is tried first, on copies, and the result is judged against what you asked for. The release page carries no prose of its own; the changelog section is the record, and this post quotes it.

## A rehearsal, before consent

In Nika's vocabulary a *rehearsal* is a trial run of a proposed workflow on confined copies of the files it reads. *Consent* is your explicit yes to save the file, and later your separate yes to run it. The 0.122.0 changelog describes the conversational side this way:

> Session-owned model authoring checks final candidates and, when rehearsal is admitted, previews their observed results from confined copies before consent.

The *Session* is the conversation you open by typing `nika` in a terminal. You describe the work, Nika proposes a `.nika` workflow file, and you review it. With this release, a proposal can arrive with what it actually wrote when it was tried, not only with what it says it will write.

The commit that wired it states the rules in four lines: rehearse candidates against confined input copies, show observed results before consent, keep save and run consent separate "including after revision or cancel", and keep candidates that were not rehearsed "explicitly source-only".

That last rule matters. When a rehearsal is refused before anything executes, the proposal says so:

> Rehearsals refused before execution are shown explicitly as source-only.

A proposal that was not tried is labelled as such.

## Judged against the request, not against the file

A trial run only helps if something judges it. The easy judge would be the generated workflow itself: it says it writes a file, the trial wrote that file, done. That would let a file grade its own work.

The changelog entry takes the judge from the other side:

> From its reading of the request alone, never from a candidate, the compiler states which files the request wants written and what they must hold

The compiler reads your sentence and derives a *behavioural contract*: which files must exist after the run and what they must contain. The kinds it lists are filters, a sort with its tie rule, the first N rows, groups and totals, projections and duplicates. It then compares what the rehearsal read and wrote with that contract, by value:

> exact decimal numbers, `70` equal to `70.0`, rows as a multiset or in the stated order, any tied row at a cut unless file order is stated.

So `70` and `70.0` are the same number. Rows are compared as a collection unless your request stated an order. When a request asks for the first N rows and the next row ties with the last one kept, any of the tied rows is accepted at the cut, unless your request says that file order decides.

## What never counts as a pass

The most useful part of the changelog entry is the list of things that do not pass. A write the reading cannot prove unconditional, an output name it cannot trace to the request, a sample, a truncated read, an unsupported operation, or a case the request leaves open: each is "reported unverified".

Several failure shapes are named one by one:

> A failed run never passes by what it did not write, an engine failure is a defect, a stop is never counted as the requested end (an error message never stands for one), a stop never hides a wrong value already written

A rehearsal that crashed before writing anything wrong has not proven anything right. Nika keeps those two statements apart.

For one small closed form of request (read one file, keep or count the rows where a field is a value, write the result to one file), the reading is strong enough that "a right result can be certified". For a second closed form, the changelog says the engine and Session APIs "build two checked forms of the closed `copy SOURCE as is to TARGET` request and select by rehearsed output before consent". The crate design note `docs/crate-specs/nika-compile-fidelity.md`, as it stood at the v0.122.0 tag, described that selection: a door "rehearses and judges one candidate at a time", the first one certified is selected, and "no absence of defect selects". That passage is not in the file on `main` today; it is quoted here as the document of that tag.

## The spec side

The same day, the language specification gained a commit titled "define observable runtime contracts and judgments". Its message reads: "Define observable runtime contracts and reject incomplete evidence. Keep unsupported observation cases distinct from agreement." It is the spec revision the 0.122.0 engine pins as its reference.

Both sides now keep "could not tell" apart from "agreed". That is the property that makes a rehearsal worth showing: missing evidence is never rounded up to a pass.

## Why the order matters

The change is small in the interface and large in what your yes means. Before, a yes approved a text you had read. Now, where a rehearsal ran, it approves a text plus a recorded observation of what that text did to copies of your inputs, measured against the sentence you typed.

The consent model does not loosen. A rehearsal grants nothing: "Rehearsal refusals remain explicit and grant no consent." Saving and running remain two separate decisions. A revision does not inherit the old evidence either: a revised proposal enters "a fresh revision without carrying the previous rehearsal to changed bytes".

That last rule is the same discipline as the run journal described in [The run keeps its receipt](/blog/the-run-keeps-its-receipt): evidence is bound to exact bytes, and changed bytes need new evidence.

## What it does not do

The changelog section states its own scope, and those limits belong with the feature:

- **Exercised on synthetic files.** The changelog says: "This path has been exercised on synthetic files; the other operations remain library contracts." The closed request forms above are where certification is possible. Outside them, whatever the reading cannot prove is reported unverified.
- **Opt-in for hosts.** "Hosts can opt into rehearsal of final authoring candidates." Where rehearsal is not admitted, the proposal is source-only and says so.
- **No model calls.** This limit is written in a later release, not in 0.122.0: the 0.123.0 release notes, three weeks later, list among their known limits that "a rehearsal does not call models and replays only plain GETs of pages already observed". By those notes, a rehearsal does not show what a model would answer.
- **A rehearsal is not a run.** The changelog describes "observed results from confined copies", and it keeps "save and run consent" separate. Running stays its own decision.
- **One correction after the tag.** On 3 October, after the tag, a commit landed whose message reads: "Exclude explicit protection-only file mentions from observed inputs." It was in the 0.123.0-preview.1 prerelease and reached ordinary installs with v0.123.0 on 23 October.

A rehearsal does not make a workflow correct. It turns *looks right* into *was tried, and here is what it wrote*, and it says plainly when it could not tell.

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