Skip to content

A no has to stop the next step

From 0.120.1, nika check refuses a workflow where a step skipped after a human no still feeds a later write, when that skip is certain.

A workflow can stop and ask a person before it acts. In Nika the question is a step of its own: a task that calls the nika:prompt tool, waits for the answer and records it in the run's trace. The steps that should happen only on "yes" read that answer and gate on it.

The language specification says what a "no" is. A refused confirmation is not a failed task. It "settles the task success with value false". That design keeps the decision in the record, but it has a consequence: a step that never reads the answer is not stopped by it. The specification says "a gate that nothing consumes is a rubber stamp". Its affirmative-consent law requires every route from a confirmation to a step with an effect (a command, a network call or a file write, among others) to be closed, and names a violation NIKA-SEC-014, judged at check time.

Before v0.120.1, one shape slipped past that check while looking correct.

The shape that walked around the no #

The specification repository keeps this case as a file of its evaluation set, under eval/hot/complex/workflows/x13/, added on 19 September, the day after the release. Here it is, unchanged:

refused-certain-skip-core.nikaOpen in the playground
# SPDX-License-Identifier: Apache-2.0
# yaml-language-server: $schema=https://nika.sh/spec/v1/workflow.schema.json
#
# X13 · REFUSED · the write only READS the stage the refusal certainly skips.
# It looks closed: the staging task is gated on the answer. A skipped task hands
# null across a `with:` edge, nothing else feeds the write, so it reaches its
# verb on no. Every step before the verb is total, so this is PROVEN, not
# suspected: NIKA-SEC-014, and a run is refused before any task starts.
# This is a repaired sub-case of KG01. It is not the original golden.
nika: x13-refused-certain-skip-core
model: mock/echo

const:
  note: "Release 2.4.1 is ready."

permits:
  tools: ["nika:jq", "nika:prompt", "nika:write"]
  fs:
    write: ["./out/report.md"]

tasks:
  human:
    invoke:
      tool: "nika:prompt"
      args:
        message: "Publish this note to ./out/report.md? ${{ const.note }}"

  stage:
    with:
      go: ${{ tasks.human.output }}
      note: ${{ const.note }}
    when: ${{ with.go == true }}
    invoke:
      tool: "nika:jq"
      args:
        input: ${{ with.note }}
        expression: "."

  publish:
    with:
      staged: ${{ tasks.stage.output }}
    invoke:
      tool: "nika:write"
      args:
        path: "./out/report.md"
        content: "Release note: ${{ with.staged }}"

outputs:
  published: ${{ tasks.publish.status }}

Read it the way a reviewer would. human asks the question. stage binds the answer under with:, the block where a task names the values it reads, and runs only when its when: line is true, that is, on "yes". publish writes the file, and it reads only stage. The gate seems to sit in front of the write.

It does not. On "no", stage is skipped. A skipped task still hands a value across a with: binding, and that value is null. Nothing else feeds publish, so publish runs and writes the file. The 0.120.1 notes describe the defect exactly: "a task that only read the stage's output still reached its verb on « no » under a clean nika check."

v0.120.1, published on 18 September 2026, states the new rule in its notes: "A value read of a stage that CERTAINLY skips on « no » is a NIKA-SEC-014 refusal." The consent walk "now continues past a closed gate over the value-carrying edges". The file's own header comment marks it REFUSED with NIKA-SEC-014, "PROVEN, not suspected". That label is the spec's evaluation file speaking; this post did not run the file.

Two ways to close it #

The first way is to make the step that acts read the answer too. This is the publish task of reference.nika, the reference answer in the same evaluation folder:

reference.nika
  publish:
    with:
      go: ${{ tasks.human.output }}
      staged: ${{ tasks.stage.output }}
    when: ${{ with.go == true }}
    invoke:
      tool: "nika:write"
      args:
        path: "./out/report.md"
        content: "Release note: ${{ with.staged }}"

On "no", with.go is false, the when: line is false, and publish is skipped like stage. It is the pattern the engine README teaches today for its own example: a nika:prompt "whose answer the fetch, the read and the post each require".

The second way is an ordering edge. If publish declares after: { stage: success }, it waits for stage to succeed. A skipped step is not a success, so a refusal cancels the write. The 0.120.1 notes name this case: "a same-producer after: { stage: success } cancels the reader".

The check refuses only what it can prove #

A refusal blocks a file that may be correct, so the check is careful about when it gives one. The notes say the refusal "requires the stage to skip FOR SURE". In practice:

  • the skipped step's bindings are plain reads, such as ${{ tasks.human.output }};
  • its when: line is false on a "no", with no step able to fail before it decides;
  • the step that acts reads the skipped step's value directly.

This holds with or without a for_each loop on the skipped step, because "the gate runs before the fan-out expands".

Everything else gets an advisory hint instead of the code. The specification gives the reason: an unproven defect "is the advisory hint's ground, never a refusal". The spec calls that rule "sound" and sums it up as "no false red". In other words, the check would rather leave a case to a hint than refuse a correct file.

Why it matters #

A confirmation that can be walked around is decoration. The person who answered "no" believes nothing happened, the trace records the "no", and the file is written anyway. The defect is also quiet by nature: in every test where someone answers "yes", the workflow behaves as intended.

0.120.1 is one step in a longer line of work on human answers. In v0.115.0, a resumed run stopped accepting a new --answer for a question the trace had already settled. Its notes: "A recorded NO cannot be flipped into a shipment." In v0.118.6, a resume under --resume-unverified began to ask every recorded decision again (One door, one verdict). These changes serve the same rule: a "no" has to reach every step that could act on it.

What this change does not do #

The 0.120.1 notes list the shapes that still get only a hint, and they say so plainly: "That gap is reported, not closed."

  • A step in between. If the skipped value passes through one ordinary step before the write, the check cannot prove that step succeeds on null. The same fixture folder holds this case, and its comment says the file is valid and "On no it still writes."
  • An independent prerequisite. An after: { x: success } on some other task does not prove the write is stopped.
  • A when: that may error before it decides.
  • A gated step whose own bindings navigate or compute, such as a read of tasks.merge.output.report.

A few more limits apply. The notes say "no verb is ever assumed to succeed", so the check does not guess what a step does with null. The rule covers yes-or-no confirmations: the specification puts a prompt in mode: choice, whose answer is a string, out of its scope.

The refusal is a check-time refusal. The evaluation file's comment adds that "a run is refused before any task starts", but the known limits of 0.124 say plainly: "The run's re-check of a check report re-derives the permits fit and the trifecta, not the consent law (NIKA-SEC-014)." The sources say no more than that, so this post does not claim that nika run on its own refuses this file. And the engine README today says its checks judge flow, not intent: "a person who answers yes approves what follows."

Read the v0.120.1 release, the affirmative-consent law in the specification, and the fixtures behind this post. For the gate itself, continue with The run that waits for you.