nukadoko 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +291 -0
- data/README.ja.md +58 -5
- data/README.md +15 -3
- data/exe/nuka +8 -0
- data/lib/nukadoko/aria_snapshot.rb +1008 -0
- data/lib/nukadoko/aria_tree.rb +150 -0
- data/lib/nukadoko/base.rb +274 -0
- data/lib/nukadoko/check.rb +669 -22
- data/lib/nukadoko/claim_check.rb +177 -0
- data/lib/nukadoko/claim_check_run.rb +293 -0
- data/lib/nukadoko/claim_line.rb +381 -0
- data/lib/nukadoko/claim_rules.rb +519 -0
- data/lib/nukadoko/claims.rb +407 -30
- data/lib/nukadoko/cli.rb +802 -19
- data/lib/nukadoko/codes.json +942 -0
- data/lib/nukadoko/codes.rb +19 -0
- data/lib/nukadoko/command.rb +214 -12
- data/lib/nukadoko/criteria.rb +172 -0
- data/lib/nukadoko/definition.rb +33 -41
- data/lib/nukadoko/env_check.rb +90 -0
- data/lib/nukadoko/features.rb +80 -10
- data/lib/nukadoko/fixtures.rb +296 -10
- data/lib/nukadoko/http_recording.rb +68 -0
- data/lib/nukadoko/init.rb +130 -0
- data/lib/nukadoko/judge.rb +221 -0
- data/lib/nukadoko/judgment_file.rb +78 -0
- data/lib/nukadoko/judgments.rb +256 -0
- data/lib/nukadoko/literal.rb +129 -0
- data/lib/nukadoko/measured.rb +105 -0
- data/lib/nukadoko/order.rb +84 -0
- data/lib/nukadoko/parts.rb +42 -21
- data/lib/nukadoko/pattern.rb +11 -1
- data/lib/nukadoko/poll.rb +17 -6
- data/lib/nukadoko/program.rb +105 -17
- data/lib/nukadoko/project_fixtures.rb +17 -2
- data/lib/nukadoko/report_allure.rb +751 -0
- data/lib/nukadoko/report_messages.rb +167 -0
- data/lib/nukadoko/report_run.rb +169 -0
- data/lib/nukadoko/run.rb +865 -88
- data/lib/nukadoko/run_record.rb +532 -0
- data/lib/nukadoko/scaffold.rb +1015 -0
- data/lib/nukadoko/schema.rb +61 -4
- data/lib/nukadoko/secrets.rb +359 -0
- data/lib/nukadoko/selection.rb +163 -0
- data/lib/nukadoko/signature.rb +4 -1
- data/lib/nukadoko/skill.rb +36 -0
- data/lib/nukadoko/step.rb +62 -21
- data/lib/nukadoko/summary.rb +662 -0
- data/lib/nukadoko/table.rb +34 -2
- data/lib/nukadoko/text_fit.rb +179 -0
- data/lib/nukadoko/trace.rb +244 -0
- data/lib/nukadoko/trace_actions.rb +116 -0
- data/lib/nukadoko/tree_passes.rb +119 -0
- data/lib/nukadoko/verdict.rb +128 -0
- data/lib/nukadoko/version.rb +2 -1
- data/lib/nukadoko/vocabulary.rb +6 -0
- data/lib/nukadoko/walk.rb +305 -0
- data/lib/nukadoko/walk_files.rb +473 -0
- data/lib/nukadoko/walk_step.rb +149 -0
- data/lib/nukadoko.rb +36 -0
- data/llms.txt +296 -0
- data/sig/generated/nukadoko/aria_snapshot.rbs +331 -0
- data/sig/generated/nukadoko/aria_tree.rbs +142 -0
- data/sig/generated/nukadoko/base.rbs +136 -0
- data/sig/generated/nukadoko/check.rbs +255 -0
- data/sig/generated/nukadoko/claim_check.rbs +118 -0
- data/sig/generated/nukadoko/claim_check_run.rbs +88 -0
- data/sig/generated/nukadoko/claim_line.rbs +158 -0
- data/sig/generated/nukadoko/claim_rules.rbs +172 -0
- data/sig/generated/nukadoko/claims.rbs +165 -0
- data/sig/generated/nukadoko/cli.rbs +182 -0
- data/sig/generated/nukadoko/codes.rbs +16 -0
- data/sig/generated/nukadoko/command.rbs +109 -0
- data/sig/generated/nukadoko/criteria.rbs +83 -0
- data/sig/generated/nukadoko/definition.rbs +30 -0
- data/sig/generated/nukadoko/env_check.rbs +38 -0
- data/sig/generated/nukadoko/features.rbs +101 -0
- data/sig/generated/nukadoko/fixtures.rbs +152 -0
- data/sig/generated/nukadoko/http_recording.rbs +29 -0
- data/sig/generated/nukadoko/init.rbs +66 -0
- data/sig/generated/nukadoko/judge.rbs +64 -0
- data/sig/generated/nukadoko/judgment_file.rbs +39 -0
- data/sig/generated/nukadoko/judgments.rbs +120 -0
- data/sig/generated/nukadoko/literal.rbs +71 -0
- data/sig/generated/nukadoko/measured.rbs +42 -0
- data/sig/generated/nukadoko/order.rbs +54 -0
- data/sig/generated/nukadoko/parts.rbs +35 -0
- data/sig/generated/nukadoko/pattern.rbs +28 -0
- data/sig/generated/nukadoko/poll.rbs +40 -0
- data/sig/generated/nukadoko/program.rbs +101 -0
- data/sig/generated/nukadoko/project_fixtures.rbs +57 -0
- data/sig/generated/nukadoko/report_allure.rbs +268 -0
- data/sig/generated/nukadoko/report_messages.rbs +68 -0
- data/sig/generated/nukadoko/report_run.rbs +102 -0
- data/sig/generated/nukadoko/run.rbs +257 -0
- data/sig/generated/nukadoko/run_record.rbs +174 -0
- data/sig/generated/nukadoko/scaffold.rbs +328 -0
- data/sig/generated/nukadoko/schema.rbs +137 -0
- data/sig/generated/nukadoko/secrets.rbs +157 -0
- data/sig/generated/nukadoko/selection.rbs +73 -0
- data/sig/generated/nukadoko/signature.rbs +17 -0
- data/sig/generated/nukadoko/skill.rbs +20 -0
- data/sig/generated/nukadoko/step.rbs +115 -0
- data/sig/generated/nukadoko/summary.rbs +204 -0
- data/sig/generated/nukadoko/table.rbs +43 -0
- data/sig/generated/nukadoko/text_fit.rbs +70 -0
- data/sig/generated/nukadoko/trace.rbs +127 -0
- data/sig/generated/nukadoko/trace_actions.rbs +40 -0
- data/sig/generated/nukadoko/tree_passes.rbs +48 -0
- data/sig/generated/nukadoko/verdict.rbs +56 -0
- data/sig/generated/nukadoko/version.rbs +5 -0
- data/sig/generated/nukadoko/vocabulary.rbs +25 -0
- data/sig/generated/nukadoko/walk.rbs +139 -0
- data/sig/generated/nukadoko/walk_files.rbs +189 -0
- data/sig/generated/nukadoko/walk_step.rbs +50 -0
- data/sig/generated/nukadoko.rbs +15 -0
- data/sig/nukadoko.rbs +5 -48
- data/skills/nukadoko/SKILL.md +120 -0
- data/skills/nukadoko/references/checking-steps.md +200 -0
- data/skills/nukadoko/references/diagnosing.md +200 -0
- data/skills/nukadoko/references/done.md +99 -0
- data/skills/nukadoko/references/evidence.md +124 -0
- data/skills/nukadoko/references/examples/cli.md +230 -0
- data/skills/nukadoko/references/examples/http-api.md +339 -0
- data/skills/nukadoko/references/examples/workflow.md +173 -0
- data/skills/nukadoko/references/exploring.md +184 -0
- data/skills/nukadoko/references/fixtures.md +198 -0
- data/skills/nukadoko/references/from-prose.md +51 -0
- data/skills/nukadoko/references/judgments.md +95 -0
- data/skills/nukadoko/references/maintenance.md +97 -0
- data/skills/nukadoko/references/merge-risk.md +74 -0
- data/skills/nukadoko/references/parts.md +152 -0
- data/skills/nukadoko/references/perturbed-worlds.md +107 -0
- data/skills/nukadoko/references/program.md +200 -0
- data/skills/nukadoko/references/reviewing.md +200 -0
- data/skills/nukadoko/references/running.md +200 -0
- data/skills/nukadoko/references/scenario-rules.md +188 -0
- data/skills/nukadoko/references/states.md +66 -0
- data/skills/nukadoko/references/step-files.md +200 -0
- data/skills/nukadoko/references/verdicts.md +200 -0
- data/skills/nukadoko/references/writing-steps.md +200 -0
- data/skills/nukadoko/references/writing-the-feature.md +165 -0
- data/skills/nukadoko/scripts/claude-code-verdict-hook.mjs +99 -0
- data/skills/nukadoko/scripts/merge-risk.jq +56 -0
- data/skills/nukadoko-verification/SKILL.md +263 -0
- metadata +121 -1
data/llms.txt
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# nukadoko
|
|
2
|
+
|
|
3
|
+
> Typed step contracts for Gherkin. `nuka check` tells a scenario wrong before it runs. `nuka run` executes it and writes step records the tool measured, not ones an agent reported, plus a Markdown run summary: the run is the evidence for its criteria, at its commit, under its conditions, and, with `--base <ref>`, of what each criterion came to against the base: new or changed ones shown to fail without the change, and unchanged ones shown to hold under the steps they were approved with. Where a person records approval stays outside nukadoko.
|
|
4
|
+
|
|
5
|
+
It is not an untyped free-form agent runner, and it approves nothing: a person reads the `.feature` and the run summary, and the team records the approval where it records approvals.
|
|
6
|
+
|
|
7
|
+
Declaration is separate from observation. A step declares `mutates`, its `args` and `returns` schemas, what it chains `from`, and the states it `requires`, `gives`, and `ends` (`"book-open"`, or `["signed-in", "person"]` for a state each person holds on their own); the record holds what the tool saw. `nuka check` reports `state-missing` at a line whose step requires a state no earlier line can have left holding, and its fix names the line to put first.
|
|
8
|
+
|
|
9
|
+
A step either runs (`run`) or claims (`claims`). Only a Then claims, and a Then never runs: it declares which value it reads, how it compares that value, and where the expected value comes from (a key the sentence fills, an earlier step's result, a literal the sentence states, or a second reading), or names a count of what the program did inside an earlier step, which nukadoko reads from the program's execution events, or the files an earlier step's `runCommand` processes added, changed, or removed, which nukadoko reads from that step's record and leaves unjudged when it measured none, and nukadoko compares and records each claim, with where each value came from, as `held`, `broken`, `unjudged` (nukadoko could not judge it, so nothing is known about the criterion), or `unobserved` (`observe` threw, so nothing was read). Each side is judged as one plain JSON snapshot taken where the value comes from (a value that is not plain JSON, a Proxy, or one nested deeper than 256 levels leaves the claim unjudged), an args schema must not rewrite a value a claim reads (a claim reads the line's text as JSON with `expected_view: "json"`), and a literal must be exactly the sentence's own words. A typed Then does not call `expect`. For what a page shows, `observe` returns the page or a locator and a `fits-aria-snapshot` claim judges the ARIA snapshot nukadoko takes of it against a docstring that states part of the tree by role and name; what the docstring leaves out is not asked. A polled Then can name in `poll.settled` a state a reading cannot leave once it reaches it, as comparisons of what `observe` returns with literals the step writes: two consecutive readings in that state with a claim broken stop the poll before its timeout, the broken line and the record's `settled.stop` say so, and a settled reading never makes a claim hold. A Then whose `observe` reaches a page records, for each open page and each reading, the latest response the page finished receiving before the reading and the requests to the world in flight during it, with the step each was sent during (`pages`, indexes into `page_requests`, each with the `trace_id` and `span_id` of the `traceparent` it went out with, so the span id finds the page's http.jsonl line and the program's request line when pages share one step's trace), and its run summary line names a request in flight: an order, never what the page drew, and it changes no outcome. docs/spec.md "Claims" has the rules.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
- `npm install -D nukadoko` installs the `nuka` CLI. It installs no browser. Playwright is an optional peer, needed only by a step whose fixtures build `page`, `context`, `pageAs`, or `request`; `nuka check` reports `playwright-missing` for such a step when Playwright does not resolve. README.md "Install" names the Node and Playwright versions.
|
|
14
|
+
- `npx nuka init` writes `nukadoko.config.ts` (`nukadoko.config.mts` in a project whose `package.json` has no `"type": "module"`, and step files are then `.mts` too, which it says on stderr), creates `features/steps/`, adds a `test:scenarios` script, adds `.nukadoko/`, `.env`, `.env.*`, and `!.env.example` to `.gitignore`, and, when `tsconfig.json` exists, adds the steps and the config to its `include` and `rewriteRelativeImportExtensions` to its `compilerOptions`. stdout lists each path it wrote; a failed self-check exits 1. `nuka init --allure` writes `allurerc.mjs` and creates `.nukadoko/export/allure-results/` for `nuka report --format allure`. Set another `featuresDir` in the config afterwards when the features live elsewhere. `nuka init` writes no program file; `--server` and `--server-url` are removed and name `nukadoko.program.ts`.
|
|
15
|
+
- Run `nuka` from the directory that holds the config. Elsewhere every command says on stderr that no config was found, names one in a parent directory if there is one, and runs on the defaults; `nuka scaffold` refuses there.
|
|
16
|
+
- `nukadoko.program.ts`, beside the config, describes the program under test: `export default defineProgram({ build, prepare, serve: { command, port, ready, timeout_ms }, url, env, setup, lists, environments })`, with `defineProgram` imported from `nukadoko`. `build` commands run once per run in the tree's root; `prepare` runs once per world with the world's env; `serve` starts the program on a free port (`port: "auto"`, the default) and waits until `ready` (default `/`) answers 2xx within `timeout_ms` (default 60000; every `timeout_ms` is a whole number of milliseconds from 1 to 2147483647, the longest delay a Node.js timer keeps); `url`, a string or a function of `{ name, root, dir, signal }`, names a program nukadoko does not start, and is exclusive with `serve`; `setup(world)` runs after `ready`, before the first scenario. `lists: { routes, flags, tables }` names one command per kind of place the program has, each printing one JSON object per line in the words the execution events use: `{ method, route, handler? }` (the method uppercase, the route's template, and what it runs in the program's own words) or `{ name, sides }`, or `{ table, holds? }`, what the table holds in the program's own declaration (`state`, the default, `bookkeeping`, such as telemetry or an audit trail, or `infrastructure`, such as applied migrations, a job queue, or a cache), plus keys of the program's own that start `x_`; an entry printed twice is one, and a table printed with two holdings is refused. In a world nukadoko serves with `{events}`, of the tree the run started in (the `tables` command of every tree, and of `nuka do`'s world when its step counts execution events), each runs once after `setup`, in the root with the world's env and placeholders, within 60000 ms (`{ command, timeout_ms }`), its stderr in `program.log`; a world at a `url` and one with no events file read none, the base and old worlds and `nuka do` read no `routes` or `flags`, and an environment's `lists` replaces the top level's whole. A list is read whole or not at all: a command that cannot start, exits non-zero, passes its limit, prints more than 16 MiB, or prints one line that is not one entry of its kind (a key that is neither the kind's nor `x_`, a lowercase method) leaves that list unread, fails no world and no row, and raises the `program-list-unread` warning naming the command and the line (a base or old world's names its tree, and `nuka do` raises it for its tables list). What the work of `setup` or a `url` function prints goes to stderr and `program.log`, redacted; one past its `timeout_ms` is abandoned, and the `signal` in its argument is aborted then and when a signal stops the start, so it stops only if it honours that signal. A command is an argv array or a string split on whitespace, never through a shell. `env` values and command words fill `{port}` (the port `serve` got, or the `url`'s, as written or the scheme's), `{url}`, `{dir}` (the world's directory, `.nukadoko/runs/<run_id>/worlds/<env>/`), `{root}`, `{world}`, `{token}` (random per world, redacted as `{{secret.WORLD_TOKEN}}`), `{events}` (in a world nukadoko serves, the absolute path of an empty file for the program's execution events, made with mode 0600 in a 0700 directory of its own outside the run directory and removed when the world stops), and `{condition.<name>}` (the value the world's environment declares under `conditions`, as text); a placeholder with no value in that world (`{port}` or `{url}` with neither `serve` nor `url`, `{events}` without `serve`, a `{condition.<name>}` its environment does not declare, anything but `{root}` in `build`) is refused by name, by `nuka check` for the worlds a `nuka run` with the same `--env` flags would start and by `nuka run` and `nuka do` for the worlds they start. The program's processes and the steps' process both get `env`, except that a variable whose value names `{events}` reaches only the program, so no step's code and no process a step starts can append to the events file. `nuka run` starts one world per environment before its BeforeAll hooks and stops it after the scenarios; the world's URL is the base URL of `page`, `context`, `pageAs`, `request`, and the `baseURL` fixture. `nuka do` starts one for its execution. `program.log` in the world's directory holds what every command printed, redacted. run.json's `worlds` lists each world (`name`, `tree`, `url`, `commands`, `timings`, `log`, `error`, `program_log: { stamped, lines, late, tagged }`, counted when the world stops, `null` for a world at a `url`, and `events: { file, lines, owned, late, unowned, unreadable, undefined_kinds }` when the program file names `{events}`, `null` for a world at a `url`, and `lists: { <kind>: { entries, error } }` for each list it read, `entries` counting its places once and `null` with the `error` that says why it was not read, absent when it read none; a `lists` command is a `commands` entry with `phase: "lists"`, timed in `lists_ms`), and each step record names its world in `world_name`. Every request a step sends to the world's origin (through `fetch`, `node:http`, `node:https`, a Playwright request context, or a Chromium page's documents, fetches, XHRs, and EventSources; for a `localhost` world, a name below `localhost` at its port too) carries a W3C `traceparent` with one trace id per step or hook (a Before, AfterStep, or After hook's requests carry the hook's own, recorded in the scenario's directory; a BeforeAll or AfterAll hook's, and the `fetch`, `node:http`, and `node:https` requests of a fixture's setup or teardown, go without one), all of a world's starting with the same eight hexadecimal characters, and a span id per request; a request that sets its own, or whose request context's `extraHTTPHeaders` set one, keeps it, and a `node:http` request is stamped as its headers are sent, so one the step sets after creating it is kept. A redirect to another origin takes no header: `fetch` is stamped on each hop to the world as undici sends it (the `undici:request:create` channel), with the step's arguments untouched; the exception is a Playwright request context, which sends a call's headers on with a redirect. An http.jsonl line names the `traceparent` the request went out with, nukadoko's or the step's own (a page's line, as the browser sent it), and then always `traceparent_sent_to`, the origins that received it (a request context's first hop and final response; an origin between them is not known); a step's `stamped` counts only the requests that went out with nukadoko's value. When nukadoko serves the program, a line of `program.log` belongs to the step whose trace id it carries (the first place in the line where the world's eight characters begin 32 hexadecimal ones), wherever and whenever it appears, and redaction never changes a trace id of the world or a `traceparent` value holding one; each step record gets its lines so far in `program-log.txt` beside it, redacted, and `observed.program_log: { trace_id, lines, file, stamped, truncated? }` (`file` is `null` when `lines` is 0); a step that stamped a request waits up to 300 ms for its lines, until none carrying its trace id has arrived for 30 ms after the step ended. A line that arrives later goes to the step's `program-log-late.txt` when the world stops, run.json's step gets `program_log_late: { lines, file, truncated? }`, the run summary names it on the step's line, and `nuka do` prints a `program-log-late` note; the record is not rewritten. The program must write the id into its lines: for Rails, `config.log_tags = [ ->(request) { request.headers["traceparent"] } ]` with the test log sent to stdout. The run summary says once per world, decided from the whole log, when no line carries a trace id of the world, how many lines arrived after their step ended (and only when none came in time, that output buffered on a pipe looks like that: `STDOUT.sync = true` in Ruby, `PYTHONUNBUFFERED=1` for Python), and when it was not read because the world runs at a `url`; there `observed.program_log` is `null`. A program that names `{events}` (`env: { EXECUTION_EVENTS: "{events}" }`) can append one JSON line per operation it ends to that file, in the format of docs/execution-events.md (`request`, `db`, `tx`, `job`, `http`, `flag`, `error`, and a writer's own `x_` kinds), each carrying the request's `traceparent` or, for a job, the one that enqueued it, at most 4095 bytes in one write call; a line belongs to the step whose trace id its parsed `trace` field holds, a line that does not read belongs to none and counts in `unreadable` for the step whose trace id its text carries, and each step record gets its lines, parsed, redacted (trace ids kept), and written again as JSON, in `events.jsonl` beside it, with `observed.events: { trace_id, lines, file, kinds, stamped, stamped_spans, unreadable, unowned, process_spans, process_requests, whole, open }`, with `mcp_spans` when the step sent an MCP call (`stamped_spans` are the span ids of the stamped requests, at most 1000; `process_requests` counts the request lines that carry a span a `runCommand` process got in its TRACEPARENT; `mcp_spans` are the spans of the step's MCP calls, below), read with the same wait as the program's log. `whole` is `true` when every request the step stamped has its `request` line (by span id), every job enqueued in the trace performed, every `runCommand` process it ran closed with no process of its group left, and every MCP call it sent went out in a stamped request; otherwise `open` names why, one gap word each in this order: `no-requests` (no stamped request, no `runCommand` process, and no MCP call), `processes-unbounded` (a `runCommand` process may still send: it still ran when the record was built, left a process of its group running, or ran on Windows; one that leaves its group, as a daemon does with `setsid`, is not seen), `mcp-unbounded` (`calls`: MCP calls that reached their server over stdio or another origin, whose end no line reports), `no-lines`, `request-unreported` (`requests`), `jobs-pending` (`job_ids`), `unreadable` (`lines`), `truncated`, `file-replaced`. A line that arrives later goes to the step's `events-late.jsonl`, run.json's step gets `events_late: { lines, file, truncated? }`, and `nuka do` prints an `events-late` note; the world's stop also gives each step of a world with an events file `path: { requests, entries, maybe, open }`, its trace counted by what each line did over every line, late ones included: `requests` each `request` line's `method`, `route`, `status` in the order the step sent them, `entries` with `count` by kind in this order, `error` (`class`, `handled`), `db` writes (`table`, `op`, and `holds` on a table the tables list marks as `bookkeeping` or `infrastructure`, whose writes stay in the path; reads are left out for now, as are `tx` lines, ids, and actors), `http` (`method`, `origin`, `path`, `status`), `job` (`name`, `phase`), `flag` (`name`, `side`, with `gates`), `maybe` the lines that may be any line, and `open` the gap words over every line; the world's redacted copy is `worlds/<env>/events.jsonl`, and the run summary gives the world one line when the file was not read, got no line, or holds lines no step record holds. A world at a `url` refuses `{events}`, and its steps' `observed.events` is `null`. A claim step's `events: { <key>: { of, count } }` counts lines of an earlier step's trace: `of` is that step or a list of candidates of which one ran earlier (the latest run of it counts; none leaves the claim `unjudged` with `producer-not-run`, two leave it `unjudged`), and `count` is `{ kind, ...fields }` with the format's kinds and fields, each field one value or a list, a value `{ sentence: "<capture>" }` taken from the line (the capture then counts as read), a `db` selection whose `op` may be a write stating `committed`, a `db` selection that names no `table` leaving out each line on a table the tables list says holds `bookkeeping` or `infrastructure` (one that names a table counts it whatever it holds), and a writer's own `x_` kind, an undefined kind or field, or a bad value refused at import. A claim names the key alone as its `actual` (no `view`, `at`, `count`, `each`, or path), compares with `equal`, `not-equal`, `greater-than`, `at-least`, `less-than`, or `at-most` against a number the line states (a `{n:int}` capture, digits, a number word, `once`, `twice`, or `never`, `no`, `none`, `nothing` as 0 under `equal`), and an events key shares no name with a `from` or args key and is read by a claim. When the claims are judged, the step reads the trace's lines from where that step's slice began and waits while its events may still become whole (`no-lines`, `request-unreported`, `jobs-pending`), up to its `timeout`, else 10 s, or a shorter `stepTimeout`, never until a claim holds. The count is a range, `[yes, yes + maybe]` when whole and unbounded above when not (`maybe`: lines that did not read, of an undefined kind or version, missing a field the selection reads, `holds_unknown`, a `db` line on a table the count may leave out because the tables list was not read or the writer named its table `unknown` while the list marks one, a write of unknown commit state, or owned by no step), and the claim holds or breaks only when every count in it agrees, else it is `unjudged` with the gap word in its reason (`kind-unreported` while the world has reported no line of the kind; `world-unread` at a `url`; `inlet-unnamed` without `{events}`). The record holds the count as `actual` when it is one number, else `actual_range`, then `counted`, `actual_from` `events:<step>@<line> count <selection>`, `measured` `{ step_record_id: <own>, channel: "events_read.<key>" }`, and the step's `events_read.<key>`, `{ of, trace_id, count, range, counted, whole, open, maybe, lines, unreadable, unowned, file, waited_ms }`, with the lines it counted in `events-read.jsonl`; run.json's step carries `events_read` too. `counted` groups the lines the count counted, most first, as `{ kind, fields, lines }` by the kind's fields (`request` method, route, status; `db` op, table; `tx` phase; `job` name, phase; `http` method, origin, status; `flag` name, side; `error` class, handled), every group listed, and the claim's line names the first three under every outcome (`...; counted 1 line: db insert into events`, `counted 3 lines: 2 db insert into scores, 1 db update rankings`, then `and 4 more lines in 2 groups`); `left_out`, present when the count left a line out, groups those lines the same way with each group's `holds`, on the claim and in `events_read`, and the line adds `; left out 1 line: db insert into events (bookkeeping)` after what it counted. When the world stops, each reading is counted again over every line of the trace, and a claim the whole count judges otherwise gets `after_world_stop: { lines, range, outcome, reason }` in run.json, the reason naming the lines the whole count counted that the claim's did not (`and the stop counted 1 more line: db insert into scores`), and its cell is `broke` (`a claim at line <n> was judged before every execution event it counts had arrived`). `nuka run` also raises the note `undeclared-write` for a head step that declares `mutates: false` whose trace holds a write the program committed to a table that holds state (late lines included; not a write that rolled back, one of unknown commit state, or any when the tables list was not read), once per step line of a scenario and environment, naming the step, the table, and the op: `the step at line 6, get, declares mutates: false, and its trace holds writes the program committed to tables that hold state, 1 line: db insert into scores`; it changes no status and no exit code, and never reads a request's method as a write. A world that does not start is `program-start-failed`, with the end of `program.log`; no scenario runs in it. `environments` entries override any of those fields (`env` merges by key) and add `policy: "read-only"`, `envFiles` (after the config's), a `version` probe, and `conditions`, the switches of the program that environment runs, each `true`, `false`, or a string with no whitespace and no `@` (`{ banner: true, locale: "ja" }`; the strings `"true"` and `"false"` are refused, since a string reads as on), which a scenario's `@with:` and `@without:` tags read (see `nuka run`); they set nothing, which `env` and the env files do, and nukadoko trusts them without checking the program, so derive the switch from them (`env: { BANNER: "{condition.banner}" }`). The top-level `defaultEnvironments: [<names>]` names the environments a run without `--env` starts, each an environment of the file or `default`. A tree with no program file starts no world, which suits a command-line tool. `baseURL` and `environments` in the config are refused, naming this file.
|
|
17
|
+
- Commit `features/`, the config, and the program file. `.nukadoko/` is the state directory and stays out of git: `runs/<run_id>/` holds everything one `nuka run` measured (`run.json`, `summary.md`, `steps/<id>/` step records, `scenarios/<id>/` scenario evidence), and `do/<id>/` holds `nuka do` step records. Never edit a record by hand, and never delete one to get a cleaner run.
|
|
18
|
+
- A step is a file under `features/steps/` that starts with `import { defineStep, z } from "nukadoko"`. An existing cucumber-js suite comes in through `nukadoko/compat`.
|
|
19
|
+
- `returns` can be left out, and `run` then returns nothing: a step whose `returns` is `z.object({})` may drop it and its final `return {}`, but an early `return {}` inside an `if` becomes `return;`, or the step falls through.
|
|
20
|
+
- `scratch` is a builtin fixture: `scratch.dir(prefix)` and `scratch.copy(source)` give temporary directories removed when the scenario ends. A `scratch` entry in `config.fixtures` replaces it.
|
|
21
|
+
- `await runCommand(command, args, { cwd, env, input, timeout, redact, files })`, imported from `nukadoko`, runs a program and records it in the step record's `observed.processes`, with the files it `added`, `changed`, and `removed` under its working directory (`files`), and `stdout` and `stderr`, the files in the step record's directory (`process-<n>.stdout.txt`, `process-<n>.stderr.txt`) that hold what it printed, redacted, `stdin`, the file that holds the `input` it was given, and `env`, its environment as a difference from the runner's, or `{ "inherited": true }`, with every name and a value only when it is an absolute path that exists when the process ends, a decimal integer, or `true` or `false` (any other value is `{ "hidden_bytes": <n> }`, its UTF-8 length), `group` inside a step on POSIX (`ended` when no process of its group still ran as it closed, `running` when one did), and `traceparent`, the `TRACEPARENT` (OpenTelemetry's environment carrier) nukadoko put in its environment when the run has a world: the step's trace id and a span id of the process's own, set unless the step's `env` holds a TRACEPARENT other than the runner's own, so a tool that copies it into the `traceparent` header of its requests makes the program's lines for them the step's; the result carries the same `files` (outside a step only with `files: true`), and a Then that claims what the command wrote reads it through a claim step's `files: { <key>: { of: <step>, change?, under? } }`, never through a list the step returns. `redact: { NAME: value }` writes a secret the step holds as `{{secret.NAME}}` in the recorded command. On Windows it finds a bare name such as `npm` through `PATH` and `PATHEXT` and runs a `.cmd` file through `cmd.exe`. Inside a step on POSIX the process runs in a process group and a session of its own, with no controlling terminal: the process that runs the steps passes each SIGINT, SIGTERM, or SIGHUP on to every such group still running, and `timeout` sends SIGTERM to the whole group. It returns a Promise, and its `exitCode` is `number | null` (`null` after a signal).
|
|
22
|
+
- `measureMcp(transport)`, imported from `nukadoko`, wraps an MCP client's transport (any object with `start`, `send`, `close`, `onmessage`, `onclose`: the SDK's `StdioClientTransport` or `StreamableHTTPClientTransport`; nukadoko imports no SDK) and returns it with every other member its own: `await client.connect(measureMcp(new StreamableHTTPClientTransport(new URL("/mcp", baseURL))))`, usually in a scenario fixture. Like `runCommand` it is an import, not a `ctx` member: each `send` finds the step that runs then, and a message sent outside every step (the client's `initialize`) passes untouched and is recorded nowhere. Each request and notification a step sends is a line of the step record's `mcp.jsonl` (`evidence.mcp`; `observed.mcp` counts them): `method`, `id` (or `notification: true`), the `tool`, `prompt`, or `uri` it names, `params` and `result` as JSON text redacted and cut at 16 KiB like a body, `traceparent`, `header_sent_to`, `duration_ms`, `is_error: true` for a result with `isError` (the tool ran and reported an error), `error: { code, message }` for a JSON-RPC error, `unanswered` (`step`, `run`, or `closed`), or `send_error`. Each call carries the step's trace context in `params._meta.traceparent` (a caller's own is kept); over HTTP to the world's origin the transport's request carries the same value as its header, so it counts as a stamped request and the program's `request` line closes the call, and a count claim on its work can be exact. Over stdio, or to another origin, the value is in `_meta` only: the server's work is the step's when it sends the world a request with that value as its header, the step's events stay open with `mcp-unbounded`, and an exact count is `unjudged` while `at-least` can hold. A stdio server gets no `{events}` path, so it writes no events itself. `measureMcp` decides no verdict: an error answer is a result the step reads. A call started after the record goes to that step's `mcp.jsonl` with `after_step_end: true`, counted in run.json's `after_step_end.mcp`. Server-to-client requests and notifications are not recorded. `nuka check` notes `mcp-transport-unmeasured` for `client.connect(new XClientTransport(...))`, where nothing can wrap the transport.
|
|
23
|
+
- A step record's `observed` keeps one key per channel nukadoko measures: `processes` (through `runCommand`), `mcp` (the MCP calls sent through `measureMcp`, above; absent when none), `websocket` (the opens, closes, and frames of each socket made with the global `WebSocket`, each a line of the step record's `websocket.jsonl` with `event`, `socket` (a number per socket), `url`, `at`, and a text frame's `data` redacted and cut at 16 KiB like a body; a frame sent belongs to the step that sent it, and the rest to the step running when it arrived; absent when none),`http` (a count of the requests the step's process sent through `fetch`, `node:http`, `node:https`, or a Playwright request context; each is a line in the step record's `http.jsonl` with its `request_body` and `response_body`, redacted and cut at 16 KiB, and never its headers, except `traceparent` when nukadoko added one, with `traceparent_sent_to` when a request context's redirect took it to another origin), `program_log` (when the run has a world URL: the step's slice of the program's log, above), `events` (when the program file names `{events}`, or `null` for a world at a `url`: the step's execution events, above), `files` (the paths changed in a scratch directory or written through `node:fs` by the step's process, each with up to 8 KiB of its content; a file the step asked Playwright to write, such as `page.screenshot({ path })`, is listed, and what Playwright's server writes on its own, such as trace chunks, a HAR, or a video, is not, whoever launched the browser), and `unmeasured` (each action nukadoko saw but cannot measure, as `{ kind, detail }`: a process started without `runCommand`, however it ended, named by its program and argument count and never its arguments or a `NAME=value` word, a `Worker`, a connection the step opened or wrote to that carries no recorded request, what a `node:http` upgrade (a WebSocket from the `ws` package) or a CONNECT tunnel carried after its handshake, a UDP datagram sent through `node:dgram` (once per address), a Chromium page's request to the world that went without a `traceparent` because the page's DevTools session failed (`page_request`, once per reason), or a path the step wrote whose identity nukadoko could not read). A channel the step never reached is `null`, not `0`, and `unmeasured` is `[]` when nukadoko saw nothing it could not measure; a child process's own traffic, a Worker's, and a native addon's are never seen. A body nukadoko stopped reading has `bytes_read` instead of `bytes` (with `incomplete: true` when it stopped waiting at the step's or the run's end), a body that failed on its own (an abort, a destroy) has `bytes_read` and an `error`, a `node:http` response the step never read has `response_body: { unread }`, a stream or FormData body a step passes to `fetch` in its `init` is `request_body: { unread }`, since `fetch` gets exactly the step's arguments, and a request with no response by the step's end has `status: 0` and an `error` that says how long it had. A request or a `runCommand` process a step starts after its record was written is written beside that record with `after_step_end: true`, run.json's step names `after_step_end: { requests, processes, http, mcp }`, the run summary names it and its file, and a request still open when the run ends gets its line then. A page's own requests (`page`, `context`, `pageAs`) are lines in `http.jsonl` too, without bodies. The run summary gives each step with an unmeasured action, or an action started after it ended, one line. `args_origin` names where each `args` key came from: `capture`, `docstring`, `table`, `{ from: { step_record_id, step, key } }`, `command_line`, or `schema`. nukadoko never infers a write from an HTTP method.
|
|
24
|
+
- Skills, for any Agent Skills host: `gh skill install meganemura/nukadoko --all`. The copy that matches the installed version is in `node_modules/nukadoko/skills/`, and `nuka skill path` prints that directory. This file is `node_modules/nukadoko/llms.txt`, and in the Ruby gem it sits beside the `skills/` directory `nuka skill path` prints.
|
|
25
|
+
|
|
26
|
+
## Ruby
|
|
27
|
+
|
|
28
|
+
The `nukadoko` gem is a second engine that reads the same feature files and judges them the same way. The loop, the commands, the records, and the findings below hold for it. What differs is how a step and the project files are written. [ruby/README.md](https://github.com/meganemura/nukadoko/blob/main/ruby/README.md) is the full Ruby surface.
|
|
29
|
+
|
|
30
|
+
- `gem "nukadoko", group: :test` in the Gemfile, then `bundle exec nuka init`: it writes `nukadoko.config.rb`, `features/steps/`, the `.gitignore` entries, and a `scenarios` task in the Rakefile. Run every command as `bundle exec nuka`. It needs Ruby 3.4 or later.
|
|
31
|
+
- A step is a class in `features/steps/<name>.rb` (`add_todo.rb` is `add-todo`): `class AddTodo < Nukadoko::Step` with `pattern`, `description`, `mutates`, `args { string :title, "what it is" }`, `returns { ... }`, `from title: [CreateTodo, :title]`, `parts [...]`, and `def run(request:, args:)`. Field kinds are `string`, `integer`, `number`, `boolean`, `enum`, `strings`, `table`, `object { ... }`, `unknown`, and `field :key, OtherStep.returns[:key]`; `null: true` allows nil.
|
|
32
|
+
- A Then step has `claims [{ actual: "body", compare: "equal", expected: { from: "created" } }]` and `def observe(...)` in place of `run`, with `poll timeout_ms: 3000` when it waits.
|
|
33
|
+
- The keyword arguments of `run` or `observe` name the fixtures, with `args:` only when the body reads them: `request`, `page`, `scratch` (`dir` and `copy`), `call`, and each `Nukadoko.fixture(:name) { |use| use.(value) }` in `nukadoko.config.rb`.
|
|
34
|
+
- `Nukadoko.run_command(command, args, cwd:, env:, input:, timeout:, redact:)` runs a program and returns `{ exitCode:, signal:, stdout:, stderr: }`, kept in the step record. Its `env` is added to the runner's environment, and `timeout` is in seconds.
|
|
35
|
+
- `nukadoko.program.rb` holds `Nukadoko.program(serve: { command: "... {port}", ready: "/up" }, environments: { ... })`, an environment's own env files under `envFiles:`.
|
|
36
|
+
- `Nukadoko.config(envFiles: [".env"], secrets: { public: [...], redact: [...] })` loads env files and classifies their secrets as above.
|
|
37
|
+
- The gem has one command the npm package does not, `sig`: it writes `sig/nukadoko/steps.rbs`, the RBS of each step's args and returns, so Steep checks the step bodies.
|
|
38
|
+
- Not in the gem yet: `requires`, `gives`, and `ends`, `measureMcp`, the `nukadoko/compat` door, and `nuka init --allure`.
|
|
39
|
+
|
|
40
|
+
## The loop
|
|
41
|
+
|
|
42
|
+
Run them in this order. Exit 0 is the only pass.
|
|
43
|
+
|
|
44
|
+
- `nuka steps [--json]`: the whole vocabulary, typed and compat: name, patterns, description, `mutates`, a claim step's claims and `poll`, and the states each step `requires` (each with `given_by`, the steps with a pattern that give it), `gives`, and `ends`.
|
|
45
|
+
- `nuka describe <name>`: one step's full contract, schemas as JSON Schema.
|
|
46
|
+
- Both exit 1 when a step file did not import (`step-file-import-failed`) or when part of a step's contract could not be read: its `needs`, a `from` entry, or (for `describe`) an args or returns schema JSON Schema cannot represent. Each such part is a `contract-unreadable` finding naming the step in the `--json` envelope; the rest is printed either way.
|
|
47
|
+
- `nuka scaffold <name> --pattern <text> [--then | --command [<entry point>] [--cwd <key>] [--argv <key>] | --request "<METHOD> <path>" [--body <key>]] [--from <step>.<key>] [--description <text>] [--replace]`: a step file that fails until implemented. `--then` writes a claim step: `claims` in place of `run`, and no `returns` or `mutates`. With one value the line states (a capture, the docstring, or the table) and one `--from`, its claim compares the two with `equal`, and a chained `stdout` or `stderr` against a stated string gets `view: "text"`, which trims the newline a program prints last. When the two are of two different JSON types (a `{string}` capture against a `z.number()`), `--then` refuses: a claim across them never holds, and a claim on a word of the line instead would leave the stated value read by nothing, which a step with no `observe` may not do. With any other mix of stated values and `--from`, it writes an `observe` stub that throws `not implemented: <name>` and one claim on what `observe` returns against the first stated value. A line that states its value with a word alone (`no`, `none`, `nothing`, `neither`, `never`, `empty`) needs exactly one `--from` whose `returns` schema is a bare `z.string()`, `z.number()`, or `z.array()`: its claim compares that value with the word's literal of the same JSON type (`""`, `0`, or `[]`), with `equal`, or with `not-equal` right after the word `not`, `neither`, or `nor`. A number word from `zero` to `twelve`, `once`, or `twice` works the same way with a `z.number()` `--from`, and its claim is written with `equal`, which a number word lets the step change to the compare the line says. Without such a `--from`, and for a line that states no value, `--then` refuses. When every feature line the pattern matches carries a docstring, `args` gets `docstring: z.string()`, and for a table `table: z.array(z.array(z.string()))`; a Then claims it like a capture. `--command` writes a When step that runs a program and returns `exitCode`, `stdout`, and `stderr`; its value must be an existing file that plain `node` can start, and without one the step throws `fill in the entry point: <file>:<line>` until that line is filled in. It runs the program in an empty `scratch.dir()` with the pattern's captures as argv, one capture per element; `--argv <key>` splits that string capture into elements on whitespace only, with no quoting rule, so one line such as `When I run greet with "Ada --shout"` carries every argument and flag. `--cwd <key>` runs it in the directory that args key holds instead, such as the `dir` a Given returned. The step writes `mutates: true`, the default, under a comment that says to set it to false when the program changes nothing outside a scratch directory. A `--from` key is never argv: until it is placed (an environment variable, a flag, or `--cwd`), the step throws `pass <keys> where the program reads them: <file>:<line>`. `--request "<METHOD> <path>"` writes a When step that sends one request through Playwright's own `request` (`request.fetch(path, { method })`, resolved against the world's URL) and returns `status` and `body` (the response text); each `{key}` in the path is that args key's value, put in as it is, `--body <key>` sends an args key (a capture, a `--from` key, or the line's `docstring`) as `data`, and any other value throws `pass <keys> where the request reads them: <file>:<line>` until it is placed. It writes `mutates: true`, because the method is only a proxy for write semantics. `--request` is refused with `--then` or `--command`, and so is `--body` without `--request`. `--from` chains a key of an earlier step's `returns` into `args`, and repeats; the same key given for two steps lists both as candidate producers, which must declare the same schema for it. Without `--description`, `--command` and `--request` write a description of the step they generate, and any other form writes `TODO: describe <name>`, which `nuka check` reports as the note `step-description-todo`.
|
|
48
|
+
- `nuka scaffold --feature <path>`: one stub for each line `nuka check <path>` reports as `undefined-step`, the pattern read from the line (`{value:string}`, `{value:int}`, `{value:float}`) and a claim step for a Then line; a Then line that states no value, or states it with a word alone, gets a `note:` line on stderr and no stub. A line with a docstring gets a `docstring` key, and a line with a table a `table` key. A line that reads more than one way keeps its text as the pattern, with no capture, and gets a `note:` line on stderr. The stubs declare no `returns` and no `from`: for a When that runs a program and the Thens that read its result, use single `nuka scaffold` calls with `--command` and `--then --from <step>.<key>`. After the written paths, stderr gives a `next:` line and, for each stub, the single `nuka scaffold <name> --pattern <pattern> [--then] --replace` that writes it again byte for byte (left out for a stub whose single scaffold would write it differently), to add `--command`, `--from`, or `--description` to. A step file that already exists is refused; while it is still, byte for byte, what scaffold writes under some set of options (a `--feature` stub, or a `--command`, `--from`, or `--description` step nobody edited), the refusal's `do:` line is the same command with `--replace`, which overwrites that file and refuses any other.
|
|
49
|
+
- `nuka check [feature..] [--json] [--fail-on <code>] [--env <name>]...`: static checks for the files `nuka run` would select (a file, several, a directory, or every feature with no target), and the program file's placeholders for the worlds a `nuka run` with the same `--env` flags would start. Findings are errors, warnings, and notes; a note is rot rather than breakage (an unbound pattern, an unused `from` or fixture, a field with no `.describe()`), and only a check with no target reports notes, because they are facts about every feature the project scans. Exit 1 on any error, or on a code `--fail-on` names (one value per flag, repeatable, or comma-separated; the finding keeps its severity, and `--json` lists the hits in `fail_on_hits`; a note code with targets, which compute no notes, is refused with `fail-on-note-with-targets`); warnings and notes alone exit 0. `nuka check --codes` prints every code `check`, `run`, and a refusal can carry; the table under "Findings" is that list. Condition tags are read against the environments `--env` names, as `nuka run --env` does, or without it the ones a run without `--env` selects: `condition-tag-malformed`, `condition-unknown` (a condition no environment declares), and `condition-unmet` (a scenario no selected environment meets) are errors.
|
|
50
|
+
- `nuka run [feature..] [--no-check] [--env <name>]... [--tag <expression>]... [--concurrency <n>] [--repeat <n>] [--order file|shuffled[:<seed>]] [--proof-runs <n>] [--base <git ref>] [--step] [--records] [--json]`: runs `check` first for the selected scenarios and refuses on an error (`--no-check` runs anyway). `<file>:<line>` runs one scenario. Progress, failures, and the paths it wrote go to stderr (none of them under `--json`); each step's line says `passed`, `failed`, or `skipped`, the word its step record uses. stdout stays empty unless asked: `--records` writes each scenario's `run.json` entry there as one JSON line when it finishes (a step's `program_log_late` is only in `run.json`, written when the world stops), and `--json` prints `run.json` itself, which is the envelope: `run_dir` (the run directory, relative to the project root, the argument `nuka report` takes), `commit` (`sha`, `dirty`, and `working_tree`, the working tree as one git tree id: tracked files as on disk and untracked files `.gitignore` does not leave out, the state directory left out; absent when git gives none), `environments` (each `name`, `target_version`, `base_url`, its world's URL or `null`, and `conditions` when it declares them), `worlds` (each world the run started, with `name`, `tree`, `url`, `commands`, `timings`, `log`, and `error`; empty with no program file), `selection` (`partial` when a `:line` target left out a scenario of its file), `order` (`{ kind: "file" }`, or `{ kind: "shuffled", seed }` under `--order shuffled`), `counts` (`scenarios`, `passed`, `failed`, and `stopped` (a walk stopped them, `--step`) of the executions of required cells, `not_run` required cells, `controls` of the executions of controls, and `controls_not_run` control cells), `table` (the verdict table: `base` (`{ ref, commit }` under `--base`, else `null`), `mapping_changed` and `mapping_changes` (`files`, `config`, `conditions`, `default_environments`, `unseen`; `null` without `--base`), `worlds`, its columns `{ world, environment }` with `world` of `head`, `base`, or `old`, `left_out`, the selected criteria `--env` left out, `proof_runs`, the `--proof-runs` a control's `runs` is measured against, and `rows`, one per selected criterion and then one per removed one, with `feature`, `line`, `name`, `change` (`null`, or under `--base` `unchanged`, `changed`, `new`, or `removed`), `renamed_from` (`{ feature, name }` at the base), `retagged` (`true` for an unchanged row whose tags differ from the base's), `conditions` (its condition tags and `@held`), `cells` (each `world`, `environment`, `role` of `required` or `control`, `conditions` (each condition its row's tags name, with the value its environment declares, `null` where none), `outcome` of `pass`, `fail`, `broke`, `stopped`, `flaky`, or `not-run`, the `line` of every one but `pass` and `not-run`, `runs`, for `fail` the `claim` every run broke and `actuals`, each run's actual value, and a `reason` for `not-run`, for a `broke` a hook caused, and for a control `broke` whose proof round could not finish), `verdict` of `held`, `proven`, `removed`, `failed`, `unproven`, or `moved`, `reason`, one sentence, and for a removed row `lines`, its sentences at the base), `flags` (only when a head step's execution events name a flag or a head world's `lists.flags` list declares one: one row per `name` and `side`, a declared side no criterion evaluated included with no `criteria`, each with `listed_in` (each environment whose list declares the side, empty for one no list declares) whenever a flags list was read, and `only_side_evaluated: true` on a flag's one side when the criteria evaluated no other, the side as its lines name it and never as an environment's conditions declare it, with `criteria`, each criterion that evaluated it there with its row's `verdict` and its `cells` on that side (`environment`, `role`, `outcome`, `line`, and `gates`, each gate its lines named or `null`), and `counts` by verdict, where a criterion seen on the side only in controls counts as `controls`; evidence to join with the program's own record of the flag by `name` and `side`, not a verdict on the flag; the summary gives each row one line under "Flags"), `routes` (only when a head world read a `lists.routes` list: one entry per `method` and `route` a list or a head step's `request` line names, `null` for the requests the program matched to no route, ordered by route and then method, with `handlers`, `listed_in` (each environment whose list holds it; empty for a route no list names), `requests` (every `request` line of a head step naming it, a late one included, each line in exactly one entry; 0 for one no step requested), `statuses`, and `criteria` and `counts` by the rules of `flags`, each cell with its `requests` and `statuses`; a request counts the same in a Given as in a Then and says the program matched the route, never that a claim read its answer; the summary's "Routes" names the listed routes no step requested, apart from those whose handler a request reached through another route (PUT and PATCH of one resource), the requests no list names, and each world whose list was not read), `paths` (only when a pair of sides read execution events: under `--base` each environment's base world against its head world, `between: { kind: "base" }`, base pairs first, for the rows the base ran there, which, when both program files name `{events}`, is every row whose head cell there is required and ran (head's `{events}` alone builds the base world for this even when no criterion is new or changed, so a refactor is compared), and two environments whose `conditions` differ in exactly one, `between: { kind: "condition", name, a, b }`; one entry per pair, with the sides `a` and `b` (`world`, `environment`), side `a` being the base world, or the environment where the condition is `false` or not declared, `unread` naming why nothing was compared or `null`, `counts` of `changed`, `open`, `same_so_far` (open, with every open count one range on both sides under the same gap words), `marked_only` (the only differences are on tables marked as bookkeeping or infrastructure; a criterion's `result` reads every other difference), `same`, and `not_compared`, `criteria` with each criterion's `result`, under a base pair `explained_by` on a `changed` one (`criterion_change` when it is new or changed, `null` when it is unchanged and nothing in the feature files asked for the difference), its side executions `a` and `b` (`scenario_record_id`, the cell's `outcome` and `line`), and `steps`, the steps with a difference aligned by line: `ran: "both"` with `changed` and `open` entries, each carrying the range of its count on side `a` and side `b`, and `holds` on a marked table, and `gaps`, or `ran: "a"` or `"b"` for a step only that side ran; a count a side's missing lines could still reach is `open`, never `changed`, a flag's side is the premise of a pair of environments and never compared there, while against the base a flag whose side changed is a difference, and `not_compared` names each criterion left out with a `reason`, such as `did not run at the base`; `unread` says when the base's program file names no `{events}`; evidence, not a verdict; the summary lists up to 20 criteria per heading under "Changed paths", every base pair under one `base → head` heading that lists a criterion with the same lines in several environments once, counts the unchanged criteria compared (`Each of the 2 unchanged criteria compared did the same at the base and at head.` when each did), and lists the unchanged criteria that changed first, then the new or changed ones, then those that may differ, each group under a line of its own, and then, under `Bookkeeping and infrastructure writes that differ, which no sentence is about, though another reader of those tables may be:`, the differences with `holds`, which never rank a criterion), `limits` (what the run does not show, computed from the other fields of run.json: `left-out`, `check-skipped`, `control-not-proving` for a held row where no control failed at a Then, `no-claim`, `unmeasured`, `after-record`, `unrecorded-log`, and `unrecorded-events`, each with a `detail` and, where one exists, a `do` or `fix`; the summary renders it under `What this run does not show` right after the table, and stderr ends with one line of counts by kind, `limits: <n> <kind>, ... (run.json limits)`), and per scenario execution its `environment`, `role`, under `--base` the `world` and `row` of a base or old execution, and `for_paths` (`outcome`, and `line` when it did not pass) on a base execution run for `paths` alone, which is no cell, gets no proof runs, never changes the table, and whose stderr line ends `(for paths)`, and steps (each with `line`, `text`, `step`, `status`, `step_record_id`, `record`, `record_unreadable` with a `step-record-unreadable` warning when its step record could not be read back, a claim step's `claims`, `observation`, and `attempts`, and for a failure `error` with `kind` and `message` and the `used` results it read, a result over 4096 bytes of JSON cut to a preview with `truncated` and `result_bytes`), a failed scenario's `do` (a control has none), and every finding the run raised. `run.json` is written to `.nukadoko/runs/<run_id>/run.json` either way, and every path inside it (`record`, `evidence.dir`) is relative to that run directory; there is no scenario record file. The Markdown run summary, rendered from `run.json` alone, is always written beside it and appended to `$GITHUB_STEP_SUMMARY` when that is set; the run writes no Allure results or messages stream. Each failed scenario is a `scenario-failed` finding on stderr whose ` do:` line is the `nuka run <file>:<line>` that reruns it (under `--order shuffled`, which runs the feature files and then each file's scenarios in the order a seed names, with the seed on stderr before the first scenario, in `order`, and in the summary, the line names the scenarios that ran before it in its pass, then it, with `--order shuffled:<seed>`, or is the run itself under `--repeat` or `--concurrency` above 1), and a scenario a walk stopped is a `walk-stopped` one. `--step` walks one scenario with a person: see `nuka step` below. `--env` repeats: `--env a --env b` is one run with one `run_id` that runs every selected scenario in `a`, then in `b`; each environment gets its own env files, secrets, version probe, world, BeforeAll and AfterAll, and process-scope fixtures. A run without `--env` runs the environments the program file's `defaultEnvironments` names, or else every environment that declares `conditions`, in the order the file lists them, and `default` when none does; any other, such as a deployment target, runs when `--env` names it. Under `--env`, a scenario no named environment meets is not run: its row is left out of the table, counted in `table.left_out`, in one line on stderr (`<n> criteria not run: their conditions hold in no selected environment`), and as the `left-out` entry of `limits`, and `nuka check` reports `condition-unmet` for the default selection only. `--env default` names the top-level environment (as run.json names it), whether or not `nukadoko.program.ts` defines it, so it combines with named ones. The tags `@with:<condition>`, `@with:<condition>=<value>` (exact text; `=true` and `=false` are malformed, write `@with:` or `@without:`), and `@without:<condition>` (off: `false` or not declared) on a Feature, Rule, Scenario, or Examples line make a scenario's cell `required` in an environment that meets them all and a `control` elsewhere; a scenario with none is required everywhere, and `@held` says the base already has the behaviour. `@expects:status=<500-599>`, `@expects:page-error=<name>`, and `@expects:error=<class>` on the same lines accept one failure underneath the scenario: a passed execution whose step got a 5xx response, whose page threw an error nothing caught, or whose trace holds an `error` with `handled: false`, is `broke@<that step's line>` unless a tag names that failure (`unexpected-failure` names it and spells the tag; `expects-unseen` notes a tag that matched nothing); only a pass moves, and like condition tags they are content under `--base`. A cell is `pass`, `fail@<line>` (each execution broke a claim at that line in Then position), `broke@<line>` (each stopped there before a claim was judged: a Given or When error, an undefined line, an unjudged claim; or, at the scenario's line, a hook, which the cell's `reason` names with when it ran), `flaky@<line>` (its executions disagree), `stopped@<line>` (a walk was stopped after the step at that line with `nuka step stop`), or `·` (none ran, with the `reason`). A required cell runs once, or `--repeat` times; a control that failed at a Then line runs again in the same world until it has broken the same claim there `--proof-runs` times (default 2) or a run disagrees (runs agree on the claim, by its position in the step, not on its value, which may differ), each a `proof run <k>/<n>` line on stderr; under `--concurrency` a proof round runs in a worker of its own, which runs BeforeAll and AfterAll again, and a hook that fails there, or a worker that records nothing, makes the round's control cells `broke` with the reason and a `proof-run-incomplete` warning, and the row reads as one no control proves (under `--base`, the base world runs for a new or changed row). A row is `failed` when a required cell is not `pass` or it has no required cell (only under `--no-check` without `--env`, with a `criterion-without-required-cell` finding whose `do:` runs the scenario where it is met, or `nuka check` on its file), `proven` when every required cell passed and a control failed in `--proof-runs` runs, and `held` otherwise. The exit code is 1 when a row is `failed`, `unproven`, or `moved`, or when the run failed outside every scenario: a BeforeAll or AfterAll of a pass failed (at any `--concurrency`), a head world did not start (`program-start-failed`), or a `--concurrency` worker exited before each of its scenarios had a record (`run-incomplete`); a control never makes it red. A `held` row whose control passed says the Then does not see what the switch changes, or the switch does not reach it: read it before calling the criterion covered. The stderr count line counts required cells alone, and a run with a control adds a `<n> control runs, <k> not run` line and a `criteria: <held> held, <proven> proven, <failed> failed` line under it, which every run under `--base` has, with `<unproven> unproven, <moved> moved, <removed> removed` after them. The summary opens with the table, one row per criterion and one `head <environment>` column per environment, headed with the conditions it declares (and `base <environment>` and `old <environment>` under `--base`), then one line per red row with its reason and where it stopped; a failure's `do:` names its environment. Naming one environment twice is refused. `--base <git ref>` compares each criterion with the commit the ref names: its identity is its feature file and name, and its content its steps with their effective keyword, docstrings, and tables, its Examples row, and its condition tags and `@held`, so a rename, a move, or another tag leaves it `unchanged` (with `renamed_from` when its name or file differs, and `retagged` when its tags differ) and an edit makes it `changed`; the rest are `new` or `removed`. The mapping (files under the features directory other than `.feature` files, the whole config but `stateDir` and `retention`, by its value and by the config file's own bytes, so a constant a config function closes over counts and an edit to those two fields alone does too, and each environment's `conditions` and `defaultEnvironments`) is compared as one unit. A `new` or `changed` row that passed at head also runs in the `base` world (the base's code under head's criteria and mapping, built from the base's program file in `trees/base` under the run directory), where a base cell proves like a control after `--proof-runs` failures at one Then line; it is `proven` then, `unproven` (red) when nothing proves it (a compat Then never can, and the reason says so), and a row tagged `@held` is `held` when the base passes it. An `unchanged` row that passed at head runs in the `old` world (head's code under the base's feature files and mapping, in `trees/old`) when the mapping changed or the row is retagged or renamed, and is `moved` (red) when it does not pass there, or else `proven` when a control proves it, as without `--base`, and `held` when none does. Each `unproven` or `moved` row is a `criterion-unproven` or `criterion-moved` finding whose `do:` is `nuka run <file>:<line> --base <commit>`, naming the full hash the ref resolved to, which judges it again against the same commit after the ref moves. `--base` does not support yet a symbolic link at, above, or under the features directory or at the config file, a feature file outside the features directory, a submodule or a nested repository, or, for the base world alone, a workspace package linked into `node_modules` from inside the repository: the world such a shape reaches is not built, its cells are `·` with the reason, and a red row's finding has a `do:` that runs the row without `--base` and a `fix:` when an edit lets `--base` build the world; a shape that hides part of the mapping is named in `mapping_changes.unseen` and makes `mapping_changed` true. A criterion only the base holds is a `removed` row, quoted under the summary's "Removed criteria". The trees install nothing and resolve packages from head's project; a `url` function receives `tree` (`"base"` or `"head"`) and may return nothing for the base, and one that returns head's URL for the base leaves the base world not run, so it has to branch on `tree`. A tree whose cells do not run says why on stderr, `<world> <environment> not run: <reason>`. The summary opens with a line naming the base and what changed. A project outside git is refused with `base-outside-git`, a ref that names no commit with `base-ref-unknown`, a shallow clone without it with `base-shallow` (its `do` is the `git fetch`), a git failure with `base-git-failed`, and a `featuresDir` at the project root with `base-features-at-root`; `--since` is refused with `removed-flag`.
|
|
51
|
+
- `nuka report [<run dir>] --format markdown|allure|messages [--out <path>] [--json]`: renders one finished run from its run directory alone, so a run directory copied off a CI machine renders too: `markdown` reads `run.json` alone, and `allure` and `messages` read `run.json`, the step records, and `sources.json`, the feature text the run parsed. With no run dir it renders the newest run. `markdown` is the run summary, on stdout or to `--out` (the file a CI step posts as a pull request comment); `allure` writes Allure 2 format results to `.nukadoko/export/allure-results/` or the directory `--out` names; `messages` is a cucumber-messages NDJSON stream on stdout or to `--out`, where a run over several environments gives each environment its own pickle, named `<scenario> (<environment>)`, and every execution of a control is left out, so a JUnit report of a green run is green; Allure keeps each control with the status it ran to, named `<scenario> (control)` with a `role` label, so a control that failed is a failed result there by design, and a CI gates on `nuka run`'s exit code. A file written under `.nukadoko/export/` is noted in the run's exports manifest, so retention removes it with the run, and rendering the same run there again replaces it; a file written anywhere else is not noted, and stays unless it sits inside a run directory that is removed. `--json` prints the envelope with `run_id`, `format`, and `written`, and needs `--out` for `markdown` and `messages`. A directory with no `run.json` is refused with `run-not-found`, and one whose `run.json` this release does not read with `run-invalid`; for `allure` and `messages`, one with no `sources.json` (a run from an earlier release) is refused with `run-sources-missing`, and one whose `sources.json` is corrupt or of another version with `run-sources-invalid`. A missing directory on the way to `--out` is created; anything else in the way (a directory where a file goes, a file where the Allure directory goes, a FIFO, a dangling symbolic link, a path under a regular file, or `allure-history.jsonl` in the export directory in any letter case) is refused with `report-out-invalid` before the run is read, and so is a markdown or messages file the file system refuses to write, with its error code; an Allure directory the file system refuses to write into ends as `report-incomplete`. A render that left out part of the run (a scenario, a step record, or an attachment it could not read) writes the rest and exits 1 with `report-incomplete`; a step whose step record is gone is never shown passed.
|
|
52
|
+
- `nuka verdict [--json]`: before you say a change is done. It reads the newest run that ended and never starts one, and exits 1 when no run ended (`run-missing`), the newest run judged another working tree (`run-stale`: a file git counts changed after it started), it ran part of its files or was a walk (`run-partial`), or it left something red (its own failed findings, relayed as it printed them). A pass says that run judged exactly this tree and left nothing red; it does not say the change has a criterion of its own. Notes: `run-without-base`, `criteria-unchanged` (under `--base`, no criterion is new or changed), `working-tree-unknown` (outside git or before the first commit, where the verdict is the run's own). `--json` adds `judged` (`missing`, `stale`, `judged`, `unknown`), `working_tree`, `run_id`, `run_dir`, `run_working_tree`, and `base`. `skills/nukadoko/scripts/claude-code-verdict-hook.mjs` is an opt-in Claude Code hook that asks for it at the end of a turn that changed the tree.
|
|
53
|
+
- `nuka judge <feature:line> [--run <run-id>] [--meets|--misses --by <name> --because <sentence>] [--json]`: when a run leaves a judgment `pending` or `stale`. A Then with a `judged-as` claim asks for a judgment no compare can give (whether a text reads as friendly); the run reads the value and judges nothing. Without a verdict flag it shows each value, the quality the sentence names, its digest, its step record, and the judged view. With `--meets` or `--misses`, `--by`, and `--because` it records one judgment per value in `judgments/<feature path>.json`, which you commit. The judge is not the agent that wrote the change. A row whose judgment is not `judged` fails the run (`judgment-pending`, `judgment-stale`, `judgment-misses`, `judgment-uncitable`); the verdict column is never changed by a judgment.
|
|
54
|
+
|
|
55
|
+
Exploring one step at a time, when the path is not known yet:
|
|
56
|
+
|
|
57
|
+
- `nuka do <name> --args <json> [--use <step record id>] [--env <name>]`: one typed step under its contract; the step record goes to stdout with its id. `--use` fills the step's `from` keys from an earlier record and repeats; `--args` may be left out only when `--use` supplies every key. Each call builds a fresh browser and starts clean, and with `nukadoko.program.ts` starts the environment's world for this one execution and stops it after; a step that needs login state gets it from a fixture.
|
|
58
|
+
- `nuka run <file>:<line> --step [--env <name>]`, started in the background, then `nuka step wait [--walk <n>]`, `nuka step next <pause> --walk <n>`, and `nuka step stop <pause> --walk <n>`, each `[--timeout <s>] [--json]`: a walk of one scenario with a person. The run pauses after each step with the world, the browser, and the fixtures still open, writes a screenshot (`page.png`) and an ARIA snapshot (`page.aria.yml`) of each open page under `runs/<run_id>/pauses/<n>/` (`page-2.*` for a second page, `page.<name>.*` for a `pageAs` context; the URL, the title, and the snapshot, which holds field values, passwords included, are redacted with the loaded secrets, and the screenshot covers each element, in every frame, whose text or field value holds one, as the final screenshot does; a capture that takes longer than the page's 5 seconds is `null`, the title too), and waits until `nuka step` answers that pause; what a page sends while it waits goes to `pauses/<n>/http.jsonl`, not to the step's own files. `wait` prints where the walk stands: the step and its line, its status, its record, the views, the world's URL, and `do` with the answers; at a pause it answers nothing. `next <n>` runs the next step and prints the next pause or the end. `stop <n>` skips the steps after it (After hooks, which see `SKIPPED`, and teardown still run): the scenario is `stopped` with `stopped: { after_step, line }`, its steps after the stop `skipped`, its cell `stopped@<line>`, its row failed, and its finding `walk-stopped`. The pause number is the step number, and an answer names its walk with `--walk` (required for `next` and `stop`, the number each pause prints), so an answer moves only the pause the person saw: one for a walk that is not the walk in the project is refused with `walk-not-current`, which names that walk, the same answer again prints what followed it and writes nothing, another answer to that pause is refused with `pause-answered`, and a pause the walk is not at, or that an ended walk never reached, with `pause-not-current`; each refusal's `do` is `nuka step wait --walk <n>`, which reports that walk, its end included. After the last step or a failed one nothing is left to stop, and `do` names only `next`. `--timeout` (default 90 seconds) bounds the wait; on expiry `nuka step` prints the walk as `starting` (its run has not begun the scenario) or `running`, with the same command as `do`, safe to repeat. Without `--walk`, a wait reports the newest walk until a `nuka step` call has printed how it ended (kept as `walks-reported/<n>` in the state directory), so a walk that ended before the wait started is still reported once; after that it waits for the next walk, and is refused with `walk-not-found`, naming the last walk and how it ended, when none starts. `wait --walk <n>` reports walk n whatever was reported. The run refuses more than one scenario, environment, or execution, and `--base` (`step-needs-one-scenario`), and a second walk in the project (`walk-in-progress`). A signal ends the walk as `interrupted`; a run that was killed leaves it gone, which `nuka step` reports as `walk-gone`. Without `--json` the run writes each pause's lines on stderr (the step, a `failure:` line where the scenario failed, and `do`); with it, nothing. `run.json`'s `walk` lists each pause with its step record, its answer, and its views, and the run summary says the run was walked, so it is not the run a reviewer approves. A pause where the scenario failed (a failed step, or an AfterStep hook that failed after a step that passed) carries `failure` (`by`: `step` or `hook`, and `message`) and prints as `walk-failed`. `nuka step` exits 0 for a walk paused, starting, running, or ended green, 1 for one paused where its scenario failed, ended red, interrupted, or gone, and 2 for a refusal.
|
|
59
|
+
- A browser app whose state cannot be repeated (an account that opens once, an order that must not be placed twice) is explored through the host's Playwright MCP server, not `nuka do`. It is connected when its `browser_*` tools are listed; a Claude Code host adds it with `claude mcp add playwright npx @playwright/mcp@latest`. Then write what was found as a scenario and run `nuka check` on it.
|
|
60
|
+
|
|
61
|
+
## Other commands
|
|
62
|
+
|
|
63
|
+
- `nuka clean [--dry-run] [--json]`: delete every run directory, every `nuka do` record, under `.nukadoko/export/` only the files a run's exports manifest names and the contents of `allure-results/` (an Allure history file or a generated report stays), and the `cache/` and `records/` directories an earlier release left (`legacy` in the `--json` plan), all together; a report written with `--out` elsewhere is left alone, and so is the run directory of a walk that is live (`walk-run-kept`, `kept` in the plan; while a walk is starting, every run directory with no `run.json`), and `walk.json`, `walk.lock/`, and `walks-reported/`. Retention removes old run directories whole at the end of every `nuka run`: the newest `retention.runs` runs stay, and a `nuka do` record or an unfinished run leaves after `retention.adHocDays` days.
|
|
64
|
+
- `nuka skill path`: the skills directory, one absolute path.
|
|
65
|
+
|
|
66
|
+
Every JSON document nukadoko writes or prints (records, `--json` output, `nuka describe`) starts with `schema_version`, one integer per kind of document; test it before trusting the shape. Step records and `run.json` also carry `nukadoko`, the version that wrote them; `run.json` is the `nuka run --json` envelope, so its `schema_version` is the envelope's.
|
|
67
|
+
|
|
68
|
+
Under `--json`, stdout is exactly one JSON document, pretty-printed, and nukadoko writes nothing to stderr: progress, paths, and counts are left out, and every warning is a finding in the document. Two things outside nukadoko can still reach stderr: Node's own process warnings, such as `MODULE_TYPELESS_PACKAGE_JSON` in a package with no `"type"` (`nuka check` notes the cause as `package-type-missing`) or "Failed to load the ES module" under `"type": "commonjs"` (the `step-file-import-failed` finding, or `config-invalid` for the config), and what a step, hook, or fixture writes there itself. No output depends on whether a stream is a terminal.
|
|
69
|
+
|
|
70
|
+
A command that stops before it has anything to report (a bad flag, a missing target, an invalid config) refuses with exit 2 and one finding of severity `refused` and a code, in the grammar under "Findings"; under `--json` that finding is in the envelope's `findings`.
|
|
71
|
+
|
|
72
|
+
## Documentation
|
|
73
|
+
|
|
74
|
+
- [skills/nukadoko/SKILL.md](skills/nukadoko/SKILL.md): a requirement to a scenario and the run that is its evidence, for a person to review. `references/` beside it holds the rules a scenario follows (`scenario-rules.md`) and each procedure: writing steps, step files, steps that check something, parts, writing the feature, running, reading the verdict table (`verdicts.md`), worlds that differ in time zone or clock (`perturbed-worlds.md`), what `nuka verdict` says before a change is called done (`done.md`), a reviewer's merge-risk questions answered from a run (`merge-risk.md`), criteria a reader judges (`judgments.md`), diagnosing, exploring, walking a person through a run one step at a time, fixtures, evidence, maintenance, and starting from prose. `references/examples/` holds three finished projects (a CLI, an HTTP API, a stateful workflow) with the output of real runs.
|
|
75
|
+
- [docs/migration.md](docs/migration.md): moving a cucumber-js suite across, in two stages, with the working rules for whoever does it (there is no migration skill: a migration happens once). A Playwright Test suite starts at [docs/migration-playwright-test.md](docs/migration-playwright-test.md).
|
|
76
|
+
- [skills/nukadoko-verification/SKILL.md](skills/nukadoko-verification/SKILL.md): scenarios as the proof layer under a project's verification skill (a control CLI and a feature map): linking the map to scenarios, sharing one library between the CLI and the steps, reproducing a report red before the fix, and keeping evidence after cleanup.
|
|
77
|
+
- [docs/spec.md](docs/spec.md): the design. "Typed steps" for `defineStep`; "Running" for scenarios and single steps; "Records" for every file a run writes; "Environments and secrets"; "Review" for what a person reads; "Checks and notes"; "CLI summary" for every command and flag; "Out of scope (honest limits)".
|
|
78
|
+
- [docs/ci.md](docs/ci.md): the GitHub Actions job and the pull request comment.
|
|
79
|
+
- [docs/upgrading.md](docs/upgrading.md): what a project changes between releases.
|
|
80
|
+
- [docs/migration.md](docs/migration.md) and [docs/migration-playwright-test.md](docs/migration-playwright-test.md): the two migration doors in full.
|
|
81
|
+
- [CHANGELOG.md](CHANGELOG.md): what changed in each release.
|
|
82
|
+
|
|
83
|
+
Prefer `check` before `run`. Do not treat agent narrative as the step record. Stop after three failed repair attempts and report where things stand.
|
|
84
|
+
|
|
85
|
+
## Findings
|
|
86
|
+
|
|
87
|
+
Every command prints findings, refusals, and failed scenarios in one grammar. A finding is a line `<severity>\t<code>\t<where>\t<message>`, where `<where>` is `<file>:<line>`, `<file>`, a step name, or `-`. The severity is `error`, `warning`, or `note` (`check`, the warnings of any command, and the note `run` reports), `refused` (a command that stopped before it ran), or `failed` (a failed scenario or hook). Indented lines may follow: the files a grouped finding covers, then at most one ` fix:` line and at most one ` do:` line. `fix:` is an edit, in words. `do:` is always a command a shell runs as written, with the known values filled in (`nuka scaffold --feature features/greet.feature` for an `undefined-step`); a next step that needs a value nukadoko cannot fill is a `fix:`, never a `do:`.
|
|
88
|
+
|
|
89
|
+
With `--json`, every command prints one envelope: `{ "schema_version": 4, "nukadoko", "command", "verdict", "findings", ... }`. `verdict` is `passed`, `failed`, or `refused`, for exit 0, 1, and 2. Each finding has `severity`, `code`, `message`, `file`, `line`, and `step` when they are known (`fixture` on a note about a fixture), and `fix` and `do`. The command's own fields sit beside `findings`: `steps` for `steps`, the contract for `describe`, `fail_on_hits` for `check`, the `run.json` fields for `run`, `codes` for `--codes`. Switch on `severity` and `code`, run `do`, and make the edit `fix` names.
|
|
90
|
+
|
|
91
|
+
Every code a finding can carry. `nuka check --codes` prints the same list as findings with each code's general `fix`, and `--json` prints them as the envelope's `codes`.
|
|
92
|
+
|
|
93
|
+
### `nuka check`
|
|
94
|
+
|
|
95
|
+
<!-- generated: nuka check --codes --json -->
|
|
96
|
+
| Code | Severity | Meaning | Fix |
|
|
97
|
+
| --- | --- | --- | --- |
|
|
98
|
+
| `additional-feature-dir-missing` | error | An entry in additionalFeatureDirs does not exist on disk. | Create the directory, or remove the entry from additionalFeatureDirs in the config file. |
|
|
99
|
+
| `alias-key-mismatch` | error | A step has more than one pattern, and the patterns bind different sets of keys. | Edit the step's patterns so that each one captures the same set of keys. |
|
|
100
|
+
| `ambiguous-step` | error | A line in a feature file matches more than one step definition. | Reword the feature line, or edit one of the matching patterns, so that exactly one step matches. nuka steps lists each pattern. |
|
|
101
|
+
| `args-not-object` | error | A step has a pattern, but its args schema is not a z.object, so there is no key to check that pattern's captures against. | Declare the step's args as a z.object whose keys the pattern captures fill. |
|
|
102
|
+
| `base-feature-unparsed` | warning | Under nuka run --base, the base's copy of a feature file does not parse, so its criteria were not compared with head's and each counts as new. | Nothing needs changing at head. Each criterion of the file is judged as new, so its base cell has to show a Then failing; to compare them with the base, name a base whose copy of the file parses. |
|
|
103
|
+
| `base-features-at-root` | refused | nuka run --base needs the scenarios and their steps in a directory of their own, and featuresDir is the project root, where the program's code is too. | Move the feature files and the step files into a directory of their own, such as features/, and set featuresDir to it. |
|
|
104
|
+
| `base-git-failed` | refused | nuka run --base could not ask git what it needs, or could not check the base out into the run's directory: git is missing, or a git command failed. | Run the git command the message names to see its error, or install git. |
|
|
105
|
+
| `base-outside-git` | refused | nuka run --base compares with a git commit, and the project is not inside a git repository. | Run nuka run --base inside the git repository that holds the project, or run without --base. |
|
|
106
|
+
| `base-ref-unknown` | refused | nuka run --base names a ref that is no commit in the project's repository. | Name a branch, tag, or commit the repository holds, such as the pull request's base. |
|
|
107
|
+
| `base-shallow` | refused | nuka run --base names a ref that this shallow clone does not hold, because it holds only part of the history. | Fetch the base first with the command the refusal names, or fetch-depth: 0 on actions/checkout. |
|
|
108
|
+
| `capture-type-mismatch` | error | A pattern captures a key with a built-in type whose JS value is a number, string, or bigint, but the args schema declares that key as a different primitive (number, string, boolean, or bigint) and does not coerce the captured value. | Make the capture type and the args field type agree: change the {key:type} in the pattern, or declare the field with z.coerce. |
|
|
109
|
+
| `check-errors` | refused | nuka run did not start, because nuka check reports errors for the selected scenarios. | Correct each error the findings name, or pass --no-check to run anyway. |
|
|
110
|
+
| `claim-args-dropped` | error | A claim reads a path into a value an earlier step returned, that step's returns schema may hold the path, and the claim step's own args schema declares the value through an object schema that does not declare a key on the path and keeps no key it does not declare: a z.object drops the key when it parses the args, and a z.strictObject refuses it. The run leaves a claim unjudged when its args schema changed the value it reads, and breaks one whose value is undefined, so the claim never holds, whatever the behaviour is. Also reported for a lacks-field claim, or a where claim that selects by one, whose field the args object drops: that claim never breaks, and that where never leaves an item out. Only a key under the from key is checked; an args schema that may keep the key (z.looseObject, a catchall, a union, a transform, or a default or a catch on the path) is taken to keep it. | Declare the value in the claim step's args with the producing step's own schema (such as user: signUp.returns.shape.user), or with z.looseObject, so args keeps the key the claim reads. |
|
|
111
|
+
| `claim-aria-snapshot-names-nothing` | error | A fits-aria-snapshot claim's expected value is a sentence key the line fills, through its docstring or a {word}, {string}, or anonymous capture, with an ARIA snapshot that names no node: only comments, an empty text, a /children line, or nothing at all. Every page holds such a tree, so it states nothing, and nuka run breaks the claim on every page, --no-check included. | State in the expected ARIA snapshot (the docstring or the capture) at least one node the page must show: a role with its name in double quotes, a text, or a /url, as the browser's ARIA snapshot prints it. |
|
|
112
|
+
| `claim-aria-snapshot-unreadable` | error | A fits-aria-snapshot claim's expected value is a sentence key the line fills, through its docstring or a {word}, {string}, or anonymous capture, with a text that does not read as an ARIA snapshot, or that states what nukadoko does not judge: a name or a text between slashes, the [active] state, a prop that would describe no node, or a plain text that YAML reads as a number, a boolean, or null. The claim would break whatever the page shows, so the finding names the line of the expected snapshot and how to write it. | Write the line of the expected ARIA snapshot the finding names as the browser's ARIA snapshot prints it: a YAML list, each item starting with "- ", a name in double quotes, and a text that YAML reads as something else in quotes. |
|
|
113
|
+
| `claim-compares-itself` | error | A claim's actual value and its expected value resolve to the same place: the same path of the same earlier line's result, or the same observe path, with a view and an at counted as steps of the path. Such a claim holds whatever the behaviour is. Also reported for a claim step whose observe receives a from value that an expected from reads, or one that holds it or that it holds, so observe could return the expected value as the actual one, and for one whose observe receives another from key that holds, or sits inside, the from value an actual reads when that claim's expected value is { observe }, so observe could return the actual value as the expected one. observe never receives the expected key itself, nor the actual from key of a claim whose expected value is { observe }. nuka run and nuka do break such a claim at run time too, so --no-check does not let it hold. | Take the expected value from the sentence (a capture, the docstring, or the table), or from another step's result, so the two sides can differ. For observe, take the key the finding names out of from, so observe does not receive it, or fill it from another step's result. |
|
|
114
|
+
| `claim-expected-transformed` | error | A claim step names an args key as its expected value, and a pattern fills that key with a parameter type that config.parameterTypes or a compat defineParameterType registered with a transformer. The transformer rewrites the line's text before the claim reads it, so code would decide what the claim compares while the record labels the value as the sentence's. Under --no-check, nuka run leaves a claim that compares with such a key unjudged, so the run agrees with the check. | Capture the key with a type that has no transformer, such as {key:string}, and declare expected_view (text, lines, json, or comma-list) on the claim if the text needs one. |
|
|
115
|
+
| `claim-field-stripped` | error | A lacks-field claim reads a value an earlier step returned, and that step's returns schema declares the value as an object that does not declare the field and keeps no key it does not declare: a z.object, which drops such a key when it parses the result, or a z.strictObject, which refuses it. The field is never there, so the claim never breaks, whatever the behaviour is. Also reported for a where claim that selects the items lacking such a field, which then never leaves an item out. Only a field the claim names as a literal, or that the line fills through a {word}, {string}, or anonymous capture, is checked; a schema that may keep the key (z.looseObject, a catchall, a union, a transform, or a default or a catch anywhere on the path, whose own value skips the schema at every depth below it) is taken to keep it. Under --no-check, nuka run and nuka do judge such a claim on what the step returned, as the producing step's record names the keys its returns dropped (returns_dropped): unjudged when the step returned the field, and held when it did not. Through a z.strictObject, the producing step fails when its result holds the field. | Declare the field in the producing step's returns as optional (such as password: z.unknown().optional()), so a result that holds it keeps it and one without it still parses, or declare that object with z.looseObject, which keeps the keys it does not declare. |
|
|
116
|
+
| `claim-judged-early` | failed | A claim on a count of execution events was judged before every line it counts had arrived: the world's stop counted every line of the producer's trace, and the whole count judges the claim otherwise, so its cell is broke and proves nothing. | Have the program write a request's line after the work inside it, and run work that outlives the request as a job, which a reading waits for (docs/execution-events.md "Inside first"). |
|
|
117
|
+
| `claim-kind-unknown` | error | An is-a claim's expected value is a plain string args key, read as it is or with expected_view text, and the line fills it through a {word}, {string}, or anonymous capture with a name that is none of the kinds is-a names, so the claim always breaks on that line. defineStep refuses a literal that names no kind; only the line says what a capture holds, so this half is the check's. | Write one of the kinds is-a names in the line (string, text, number, integer, boolean, list, array, object, null, uuid, date, timestamp, or url), or compare with another claim if the line states something else. |
|
|
118
|
+
| `claim-not-an-array` | error | A claim counts the items of a value an earlier step returned, or an each claim reads each of its items, and that step's returns schema parses the value as something that is never an array: a string, a number, a boolean, an object, or a union, literal, or enum of only such values. count and each read an array alone, so the claim never holds, whatever the behaviour is. Only a value read with no view is checked, through the parsing wrappers (optional, nullable, readonly); a schema that may parse to an array (z.unknown, a transform, a default or a catch, whose own value skips the schema) is taken to be one. | Read the value through a view that makes an array (lines, comma-list, or json), point the claim at the array the step returns, or return the value as an array from the producing step. |
|
|
119
|
+
| `claim-path-unknown` | error | A claim reads a path into a value an earlier step returned, and that step's returns schema has nothing at the path, so the value is undefined and the claim always breaks. | Correct the path to one the producing step's returns declares, or add the key to that step's returns. |
|
|
120
|
+
| `claim-poll-unstated` | error | A claim step's observe reaches a browser page and the step does not state poll. A page between two renders can show any state for one frame, so the step has to say whether it reads once or until the claims hold. | Add poll: { timeout_ms } to read until every claim holds on two consecutive readings, or poll: false to read once. |
|
|
121
|
+
| `claim-sentence-unread` | error | A claim step with no observe is bound to a line whose docstring or table fills an args key, and no claim reads that key (as an actual, an expected value, or in where), so nothing checks the value the line states. defineStep refuses a pattern capture no claim reads; only the line says whether a docstring or a table fills a key, so this half is the check's, and nuka run breaks the step's claims for it too. | Compare a claim with the key (expected: "<key>"), or take the docstring or table off the line. |
|
|
122
|
+
| `claims-outside-then` | error | A claim step is bound in Given or When position, or on a * line, which Gherkin gives no position. Only a Then judges, so a broken claim there would read as a setup that broke instead of a criterion that failed. | Move the line to Then position, or bind a step that runs (defineStep with run) at this line. |
|
|
123
|
+
| `compat-step-not-runnable` | refused | nuka do names a compat step, which has no typed contract to run alone. | Promote the step to defineStep to run it with nuka do. |
|
|
124
|
+
| `condition-tag-malformed` | error | A tag starts with @with: or @without: but does not read as @with:<condition>, @with:<condition>=<value>, or @without:<condition>, so it names no condition. @with:<condition>=true and =false are malformed too: a value written as text is not the boolean the program file declares. | Rewrite the tag as @with:<condition>, @with:<condition>=<value>, or @without:<condition>; a condition name holds letters, digits, "_", ".", or "-", a value holds no whitespace and no "@", and a boolean is @with:<condition> or @without:<condition>. |
|
|
125
|
+
| `condition-unknown` | error | A condition tag names a condition that no environment in nukadoko.program.ts declares under conditions, so no environment sets it up. | Declare the condition under the conditions of the environments that set it up in nukadoko.program.ts, or remove the tag. |
|
|
126
|
+
| `condition-unmet` | error | No environment the run selects meets every condition a scenario's tags name, so the scenario has no required cell and nothing shows that it holds. | Add an environment whose conditions meet the scenario's tags, name one with --env, or correct the tags. |
|
|
127
|
+
| `config-exists` | refused | nuka init found a config file, and writes nothing over it. | Edit the config file that exists, or delete it to start again. |
|
|
128
|
+
| `config-in-parent` | refused | There is no config file here, and one exists in a parent directory, so a file written here is not one that config reads. | Run the command from the directory that holds the config file. |
|
|
129
|
+
| `config-invalid` | refused | The config file did not load: it does not import, it has no default export, or a field is wrong. | Correct the config file as the message says. |
|
|
130
|
+
| `config-key-removed` | refused | The config file sets a key that an earlier release removed. | Remove the key from the config file, and do what the message names in its place. |
|
|
131
|
+
| `config-missing` | warning | There is no config file in the directory nuka runs in, so the defaults apply. | Run nuka from the directory that holds the config file, or run nuka init to write one. |
|
|
132
|
+
| `contract-unreadable` | failed | nuka steps --json or nuka describe could not read part of a step's contract: its needs, a from entry, or an args or returns schema that JSON Schema cannot represent. The rest is printed, and the command exits 1. | Correct what the message names in the step file; a schema JSON Schema cannot represent, such as z.date(), still runs, and only its published contract is missing. |
|
|
133
|
+
| `criteria-unchanged` | note | nuka verdict found that, under --base, no criterion of the newest run is new or changed: the run shows the criteria that were there still hold, and says nothing of what the change was for. | No change is necessary for a change that needs no criterion of its own, such as a refactor. A change of behaviour gets a scenario that says what it does. |
|
|
134
|
+
| `criterion-moved` | failed | Under nuka run --base, an unchanged criterion passes at head, its mapping or its tags changed since the base, and the old world, head's code under the base's feature files and mapping, did not pass it or could not run it: the approved sentence no longer holds under the steps it was approved with. | Restore what the changed step, helper, or tag did, so the base's steps still pass on head's code, or correct what kept the old world from running, which the message names; a sentence that should now mean something else is edited, which makes it a changed criterion to prove. |
|
|
135
|
+
| `criterion-unproven` | failed | Under nuka run --base, a new or changed criterion passes at head, and nothing shows a Then failing where its behaviour is absent: its base cells passed, broke, were flaky, failed in fewer than --proof-runs runs, or did not run, and no control proves it. | Make a Then claim what the change added, so that it fails on the base's code; tag the scenario @held when the base already has the behaviour; or correct what kept its base cell from running, which the message names. |
|
|
136
|
+
| `criterion-without-required-cell` | failed | A row of the verdict table has no required cell: no environment the run started meets every condition its scenario's tags name, so the row is failed and nothing ran that shows it holds. Only a run under --no-check reaches it; nuka check reports the scenario as condition-unmet. | Add an environment whose conditions meet the scenario's tags, run one that does with --env, or correct the tags. |
|
|
137
|
+
| `done-callback-arity` | error | A compat hook or a matched compat step declares more parameters than nukadoko passes, which cucumber-js reads as a done() callback. | Remove the done callback parameter, and return a promise from the function instead. |
|
|
138
|
+
| `duplicate-capture-key` | error | A pattern captures the same key more than once. One args field holds one value, so the pattern is refused instead of dropping a value. | Rename one of the captures, so that each key occurs once in the pattern. |
|
|
139
|
+
| `duplicate-pattern` | error | Two or more patterns, once capture names are stripped, normalize to the same text, so one step text could match more than one step. | Reword one of the patterns, so that the two texts differ when the capture names are removed. |
|
|
140
|
+
| `duplicate-step` | refused | Two step files register the same typed step name, or two registrations have the same compat pattern. | Rename or remove one of the two definitions the message names. |
|
|
141
|
+
| `duplicate-world` | refused | defineWorld is called more than once in the step files. | Keep one defineWorld call, and remove the others. |
|
|
142
|
+
| `env-file-missing` | warning | A configured envFile does not exist on disk, so nothing in it is ever loaded. | Create the file, or remove it from envFiles in the config file. |
|
|
143
|
+
| `env-file-skipped-line` | warning | A line in a configured envFile is not a blank line, a comment, or a binding, so nothing on it was loaded. | Rewrite the line as KEY=value, or start it with # to make it a comment. |
|
|
144
|
+
| `env-file-unreadable` | refused | A configured envFiles path is on disk and could not be read: a directory, or a file without read permission. The run stops before any step runs. | Make the file readable, replace the directory with a file, or remove the path from envFiles. |
|
|
145
|
+
| `environment-env-file-missing` | warning | An entry in one environment's own envFiles does not exist on disk. | Create the file, or remove it from that environment's envFiles in nukadoko.program.ts. |
|
|
146
|
+
| `events-inlet-missing` | error | A step's events counts execution events, and a world the run would serve names no {events} in its program file, so the program has no file to write them to and each claim on the count is unjudged there (inlet-unnamed). | Set the variable the program reads to {events} under env in the program file, such as EXECUTION_EVENTS: "{events}", and have the program append its execution events to that file. |
|
|
147
|
+
| `events-late` | note | nuka do found lines of the program's execution events that carry the step's trace id and arrived after the step ended, when the world stopped. They are in events-late.jsonl beside the step record, and are not in its observed.events. | No change is necessary. A job the step enqueued that performed after the step ended writes its lines then; observed.events.open names a job that had not performed. |
|
|
148
|
+
| `events-producer-ambiguous` | error | A step's events names more than one candidate step in of, and more than one of them runs earlier in the scenario, so the run cannot choose whose execution events to count and each claim on the count is unjudged. | Remove or move lines so that exactly one of the candidate steps runs before the line that counts their events. |
|
|
149
|
+
| `events-producer-missing` | error | A step's events counts the execution events of a step that no earlier line in the scenario runs, so each claim on the count is unjudged (producer-not-run). | Put a line that runs the step earlier in the scenario, or list the step an earlier line runs in that key's of. |
|
|
150
|
+
| `events-unread` | warning | A step's events counts execution events, and a world the run would start is one nukadoko does not serve (a url, or a project with no program file), so it reads no execution events there and each claim on the count is unjudged (world-unread). | Run those scenarios in a world nukadoko serves, with {events} in env, or select one with --env. |
|
|
151
|
+
| `expects-tag-malformed` | error | A tag starts with @expects: but does not read as @expects:status=<500-599>, @expects:error=<class>, or @expects:page-error=<name>: an unknown kind, no value, a status outside 500 to 599, or a value with whitespace or "@". It accepts nothing, so under nuka run --no-check the failure it meant stays unexpected and its cell is broke. | Rewrite the tag as @expects:status=<500-599>, @expects:error=<class>, or @expects:page-error=<name>, one status, class, or name per tag; the unexpected-failure finding of a run spells the tag for what it saw. |
|
|
152
|
+
| `expects-unread` | warning | An @expects:error= tag accepts an unhandled error the program reports in its execution events, and no world the run would start reads them (the program file names no {events}, the world runs at a url, or there is no program file), so the tag can never match. | Name {events} in env of nukadoko.program.ts for a world the run starts, such as env: { EXECUTION_EVENTS: "{events}" }, and have the program append its execution events there, or remove the tag. |
|
|
153
|
+
| `expects-unseen` | note | A scenario whose every execution passed carries an @expects: tag that matched nothing: the run saw every response, page error, or execution event of that kind in each execution, and none was the failure the tag accepts. A tag left in place accepts that failure in every later run. | Remove the tag when the failure it accepts no longer happens. When the failure is meant to happen, make the scenario cause it, so the tag names what the scenario does. |
|
|
154
|
+
| `fail-on-note-with-targets` | refused | nuka check with targets was given a --fail-on note code, and a check with targets computes no notes, so the gate could never fire. | Run nuka check without targets to gate on a note, or leave the note out of --fail-on. |
|
|
155
|
+
| `fail-on-unknown-code` | refused | --fail-on names a code that a nuka check report never contains. | Name an error, warning, or note code that nuka check --codes lists. |
|
|
156
|
+
| `feature-parse-error` | error | A .feature file could not be parsed, so nothing in it was checked. | Correct the Gherkin at the line that the message names, then run nuka check on the file again. |
|
|
157
|
+
| `features-dir-missing` | error | The configured featuresDir does not exist on disk, so no feature or step file under it can load. | Create the featuresDir directory, or correct featuresDir in the config file. |
|
|
158
|
+
| `file-edited` | refused | The file nuka scaffold would replace is not what scaffold wrote, so --replace leaves it. | Edit the file by hand, or delete it and run nuka scaffold again. |
|
|
159
|
+
| `file-exists` | refused | The file nuka scaffold would write exists. | Pass --replace if scaffold wrote the file and nobody edited it, or delete the file. |
|
|
160
|
+
| `files-producer-ambiguous` | error | A step's files names more than one candidate step in of, and more than one of them runs earlier in the scenario, so the run cannot choose whose files to read and each claim on the list is unjudged. | Remove or move lines so that exactly one of the candidate steps runs before the line that reads their files. |
|
|
161
|
+
| `files-producer-missing` | error | A step's files reads the files the commands of a step changed, and no earlier line in the scenario runs that step, so each claim on the list is unjudged. | Put a line that runs the step earlier in the scenario, or list the step an earlier line runs in that key's of. |
|
|
162
|
+
| `fixture-cycle` | error | config.fixtures definitions depend on each other in a cycle, so none of them can ever resolve. | Remove one dependency from the cycle in config.fixtures. |
|
|
163
|
+
| `fixture-scope-violation` | error | A config.fixtures definition scoped to run once per process depends on one scoped to run once per scenario. | Scope the dependent fixture per scenario, or scope the fixture that it depends on per process. |
|
|
164
|
+
| `fixture-structural-violation` | error | A step's run(), or a config.fixtures definition's own function, is not a plain object-destructuring parameter, or destructures a fixture name nukadoko does not know. A fixture that destructures call is the same finding: call is only available inside a step's run(). | Give the function one object-destructuring parameter that names only known fixtures. The message names the name that is not known. |
|
|
165
|
+
| `fixture-teardown-failed` | warning | A fixture's teardown threw after its scenario or the run finished. | Correct the teardown code of the fixture the message names. |
|
|
166
|
+
| `fixture-unused` | note | No typed step requires a config.fixtures definition, directly or through another fixture. | Remove the fixture from config.fixtures, or keep it for nuka do. |
|
|
167
|
+
| `from-order-check-suppressed` | warning | A step's from names a producer that no earlier line runs, but a line before it matches no step and may be meant to run that producer, so the from-order-violation findings that line could explain are held back until it matches a step. | Reword the undefined line to match the producer's pattern if it is meant to run that producer. Otherwise fix the undefined-step finding first, then run nuka check again. |
|
|
168
|
+
| `from-order-violation` | error | A step declares from for a key, and the step or steps it names have not run earlier in the same scenario, or (when the key names more than one candidate) more than one candidate has. | Put a line that runs one producer step earlier in the scenario, or list the step an earlier line runs as another candidate for the key in from. When more than one candidate ran earlier, keep only one. |
|
|
169
|
+
| `from-structural-violation` | error | A step's from names a value that is not a registered step, or is otherwise structurally malformed. | Make each from entry name a step that a step file registers, and a key that step's returns declares. |
|
|
170
|
+
| `from-unused` | note | A step's from declaration never supplies a value, because every feature line that binds the step fills that key with a pattern capture. | Remove the from entry for the key, or keep it for nuka do --use. |
|
|
171
|
+
| `hook-failed` | failed | A BeforeAll or AfterAll hook threw, so the run is red. | Correct the hook the message names. |
|
|
172
|
+
| `intent-not-happening` | failed | Under nuka run --base, a row of the change's INTENT.md aimed at a compared criterion, by its target, and that criterion did not do what the row says: a count did not go from before to after, a value did not, or what the row says does not change did. docs/intent.md is the format. | Make the change do what the row says there, or narrow the row's target if the row means less. |
|
|
173
|
+
| `intent-unintended` | failed | Under nuka run --base, the change declares its intent in INTENT.md, and an unchanged criterion did something at head that it did not do at the base, which no row of the intent declares. The summary's "base → head" lists the difference. | Declare the difference with a row in INTENT.md if the change means it, or change the code back if it does not. |
|
|
174
|
+
| `intent-unread` | failed | Under nuka run --base, the change's INTENT.md holds a row, or a table, that cannot be read as an intent, or git did not answer what the run asked of the file. A row that cannot be read declares nothing, so the run fails rather than judge less than the file says. | Write the row as docs/intent.md describes, so each difference the change means is declared. |
|
|
175
|
+
| `invalid-arguments` | refused | The command line names an unknown command or flag, or leaves out a required one. | Correct the command line; the command's --help lists its flags. |
|
|
176
|
+
| `invalid-capture-key` | error | A pattern capture's name is not a valid identifier: a capture key must start with a letter or underscore and contain only letters, digits, and underscores. | Rename the capture: a letter or an underscore first, then only letters, digits, and underscores. |
|
|
177
|
+
| `invalid-step-definition` | refused | A step file calls defineStep with a definition nukadoko cannot register. | Correct the defineStep call the message names. |
|
|
178
|
+
| `invalid-value` | refused | A flag has a value the command cannot use. | Correct the flag's value as the message says. |
|
|
179
|
+
| `judgment-misses` | failed | A criterion's Then asks for a judgment, and the committed judgment that cites the value this run read says the value does not meet the sentence. The criterion fails until the value changes, and the judgment of the new value says it meets. | Change the program until the value meets the sentence, run the criterion again, and have a judge who did not write the change judge the new value with nuka judge. |
|
|
180
|
+
| `judgment-pending` | failed | A criterion's Then asks for a judgment (a judged-as claim), the run read the value, and no committed judgment cites that claim yet. nukadoko compares nothing for such a claim, so nothing shows the criterion holds until a reader judges the value. | Have a judge who did not write the change read the value with nuka judge <file>:<line> --run <run>, then record it with --meets or --misses, --by, and --because, commit the judgment file, and run again. |
|
|
181
|
+
| `judgment-refused` | refused | nuka judge cannot record the judgment: the target names no criterion of the run, the criterion did not pass or asks for no judgment, a value is in no recorded channel, the step record and run.json disagree about a value, or the flags do not say meets or misses, by whom, and why. | Run the criterion, read what nuka judge <file>:<line> prints, and record with exactly one of --meets and --misses, and with --by and --because. |
|
|
182
|
+
| `judgment-stale` | failed | A criterion's Then asks for a judgment, and the committed judgments of its claim cite other values than the one this run read: the value changed since it was judged, so no judgment covers what ran. | Have a judge who did not write the change read the new value with nuka judge <file>:<line> --run <run> and record a judgment of it; a value that changes on every run (a time, an id) means the claim reads too much, so narrow it with at. |
|
|
183
|
+
| `judgment-uncitable` | failed | A criterion's Then asks for a judgment of a value that no channel nukadoko recorded holds (measured: none): a value step code wrote or worked out. A judgment cites only a value the tool measured, so none can cite this one. | Read the value whole from a channel the step record holds (a response body, a process's output, a file) and narrow it with view and at, or return the locator or page from observe so nukadoko takes its ARIA snapshot. |
|
|
184
|
+
| `judgments-not-compared` | warning | Under nuka run --base, git did not answer when the run compared the judgment files with the base, so the summary lists no changed judgment. | Run the git command the message names to see its error; the verdicts and the judgments themselves are not affected. |
|
|
185
|
+
| `judgments-unread` | failed | A judgment file under judgments/ does not parse or lacks a field, so the criteria of its feature file read as judged by nothing. | Repair the file the message names by hand, or remove it and judge its criteria again with nuka judge. |
|
|
186
|
+
| `line-not-supported` | refused | A target has a :line suffix, and the command reads whole files: nuka check analyzes every scenario in a file. | Remove the :line suffix from the target. |
|
|
187
|
+
| `line-on-directory` | refused | A target names a directory with a :line suffix, and a line selects a scenario in one file only. | Remove the :line suffix from the directory, or name a feature file. |
|
|
188
|
+
| `markdown-target` | refused | A target names a Markdown file: Markdown oaths were removed, and scenarios live in .feature files only. | Write the scenarios of the file as Gherkin in a .feature file, and name that file. |
|
|
189
|
+
| `mcp-transport-unmeasured` | note | A config fixture or a typed step connects an MCP client to a transport it builds inside the connect call, so measureMcp never wraps it and the client's calls reach no step record. | Pass the transport through measureMcp (from nukadoko): client.connect(measureMcp(new StdioClientTransport(...))). |
|
|
190
|
+
| `no-feature-files` | refused | A target directory holds no feature file, so nothing can run. | Add a feature file under the directory, or name another target. |
|
|
191
|
+
| `no-scenario-at-line` | refused | A target's :line is not the line a scenario or an Examples row starts on. | Name the line that a scenario or an Examples row starts on. |
|
|
192
|
+
| `no-step-files-found` | error | featuresDir exists, but no .ts/.mts/.js/.mjs step file was found while scanning it, so no step can ever be registered. | Add a step file under featuresDir. nuka scaffold writes one. |
|
|
193
|
+
| `nothing-selected` | failed | nuka run selected no scenario: its targets hold none, or --env leaves out every one they hold, so nothing ran and nothing was checked. The run writes no run directory. | Name a target that holds a scenario, or run in an environment that meets the scenarios' tags. |
|
|
194
|
+
| `outline-does-not-run` | error | A scenario outline has no Examples row that will run, so the boundary the feature names is absent from the run. | Add an Examples row for each case that must run, or remove the empty Examples table. |
|
|
195
|
+
| `outline-rows-share-name` | warning | A scenario outline has more than one Examples row, and its name holds no <column> of its Examples, so every row is reported under the same name. | Add an Examples column to the outline's name, such as <column>, so that each row has its own name. |
|
|
196
|
+
| `package-type-missing` | note | A package.json with no "type" field governs a .ts or .js file nukadoko loads, so Node parses the file twice and prints a MODULE_TYPELESS_PACKAGE_JSON warning on every load. | Add "type": "module" to the package.json, or rename the files to .mts if the project's own .js files are CommonJS. |
|
|
197
|
+
| `page-override-unowned` | error | A config.fixtures definition overrides page, but owns none of page, context, and pageAs. | Make the fixture that overrides page own page, context, or pageAs, or remove the override. |
|
|
198
|
+
| `parameter-type-collision` | refused | A parameter type has the name of a built-in type or of another registered type. | Rename the parameter type, or remove one of the two registrations. |
|
|
199
|
+
| `parameter-type-invalid` | error | A custom parameter type takes the name of a built-in type, two parameter types share the same name (from config.parameterTypes or a compat defineParameterType call), or a type sets preferForRegexpMatch on a regexp that another type, built-in or custom, already prefers. | Rename the parameter type, or remove the second registration or the second preferForRegexpMatch. |
|
|
200
|
+
| `parameter-type-unused` | note | No typed or compat pattern names a config.parameterTypes entry. | Remove the entry from config.parameterTypes, or use it in a pattern. |
|
|
201
|
+
| `part-cycle` | error | A step's parts form a cycle: the step reaches itself, directly or through other steps' own parts. | Remove one part from the chain, so that no step reaches itself. |
|
|
202
|
+
| `part-mutates-contradiction` | error | A step declares mutates: false, but declares a part that declares mutates: true. | Declare mutates: true on the step, or remove the part that declares mutates: true. |
|
|
203
|
+
| `part-structural-violation` | error | A step's parts names a value that is not a registered step, or is otherwise structurally malformed. | Make each parts entry a step that a step file registers. |
|
|
204
|
+
| `pattern-error` | error | A step's pattern could not be parsed, for a reason other than an unnamed, invalid, or unterminated capture. | Correct the pattern at the position that the message names. |
|
|
205
|
+
| `pattern-syntax-error` | error | A pattern failed to build into a cucumber expression, for a reason cucumber-expressions itself reports (not an unknown parameter type). | Correct the pattern at the position that the message names. Escape a literal ( ) or / as \\( \\) or \\/. |
|
|
206
|
+
| `pattern-unbound` | note | A typed step has a pattern, and no feature line resolves to that step alone. | Write a feature line that matches the pattern, or remove the pattern if only nuka do runs the step. |
|
|
207
|
+
| `pause-answered` | refused | nuka step names a pause that was already answered the other way, so this answer changes nothing. | Run nuka step wait --walk <n> to see where the walk stands, and answer the pause it shows. |
|
|
208
|
+
| `pause-not-current` | refused | nuka step answers a pause that is not the one the walk waits at: the walk has not reached it yet, has moved past it without that answer, or ended without reaching it. | Run nuka step wait --walk <n> to see the pause the walk waits at, and answer that pause. |
|
|
209
|
+
| `playwright-missing` | error | A feature line binds a step whose fixtures build page, context, pageAs, or request, and playwright does not resolve from the installed nukadoko, so the step would fail when it runs; or a step file imports playwright, playwright-core, or @playwright/test, itself or through another project file that the message names, which the project has not installed, so the file does not import. A step is reported once, at the first line that binds it. | Install the package that the message names in the project, at the version that the message names. |
|
|
210
|
+
| `program-exited` | warning | The program a world served exited while the scenarios still ran, so the requests after that found nothing listening. | Read the world's program.log, which the message names, for why the program exited. |
|
|
211
|
+
| `program-list-unread` | warning | A command under lists in nukadoko.program.ts failed, passed its limit, or printed a line that is not one entry of its list, so that world's list was not read and nothing of it counts. | Correct the command the message names, or what it prints: one JSON object per line, in the shape docs/spec.md "Lists" gives for its kind. Its stderr is in the world's program.log. |
|
|
212
|
+
| `program-log-late` | note | nuka do found lines of the program's log that carry the step's trace id and arrived after the step ended, when the world stopped. They are in program-log-late.txt beside the step record, and are not in its observed.program_log. | No change is necessary. When it happens on every call, the program may buffer its output on a pipe; if so, set STDOUT.sync = true in Ruby, or PYTHONUNBUFFERED=1 for Python. |
|
|
213
|
+
| `program-placeholder-unfilled` | error | A command or an env value in nukadoko.program.ts names a placeholder a world that nuka run with the same --env flags would start has no value for: {port} or {url} in a world with neither serve nor url, {condition.<name>} in one whose environment does not declare that condition, or anything but {root} in a build command. | Remove the placeholder from the field the message names, or give the world what fills it: serve or url for {port} or {url}, the condition under its environment's conditions for {condition.<name>}; in a build command, write only {root}, or move the command to prepare. |
|
|
214
|
+
| `program-start-failed` | failed | The program in nukadoko.program.ts did not start for a world: a build or prepare command failed or did not finish within its timeout_ms, the server did not answer its ready path in time, or setup or the url function threw or did not finish within its timeout_ms. The world's scenarios did not run. | Correct what the message names; the end of the world's program.log is in the message, and the whole file is in the world's directory. |
|
|
215
|
+
| `proof-run-incomplete` | warning | Under --concurrency, a proof round could not record a control's run: a BeforeAll or AfterAll hook failed in the worker the round started, or the worker exited without a record. Each control cell the round was given reads broke with the reason and proves nothing, so its row reads as one no control proves: held without --base, and under --base the base world runs for it. | Correct what the message names, such as the hook; the control proves on the next run. |
|
|
216
|
+
| `read-only-environment` | refused | A step that declares mutates: true targets an environment whose policy is read-only. | Run the step against an environment that allows writes, or declare mutates: false if it only reads. |
|
|
217
|
+
| `record-unmatched` | warning | A worker reported a record that matches no selected scenario, so nuka report cannot render it. | Run again without changing feature files while the run is in progress. |
|
|
218
|
+
| `removed-command` | refused | The command line names a command that an earlier release removed. | Use what the message names in its place. |
|
|
219
|
+
| `removed-flag` | refused | The command line names a flag that an earlier release removed. | Use what the message names in its place. |
|
|
220
|
+
| `repeated-scenario-prefix` | note | Scenarios in this run open with the same steps, before the first When, with the same docstrings and tables. The note reports the measured repetition, and names a process-scope fixture only when every shared step declares mutates: false. | No change is necessary. A Background can hold the shared steps. A process-scope fixture fits only an opening whose steps all declare mutates: false. |
|
|
221
|
+
| `report-incomplete` | failed | nuka report left out part of the run it renders: a scenario, a step record, or an attachment it could not read or map. The rest is written, and the report exits 1. | Correct what the message names, such as a step record removed from the run directory, and run nuka report again. |
|
|
222
|
+
| `report-out-invalid` | refused | nuka report --out names a place the render cannot write: a directory where a file goes, a file where a directory goes, a FIFO or another special file, a dangling symbolic link, a path under a regular file, the Allure history file, or a markdown or messages file the file system refuses to write. | Name a regular file for markdown and messages, or a directory for allure, under a directory that exists or can be created. |
|
|
223
|
+
| `retention-failed` | warning | The run finished, and removing old run directories under retention failed. | Correct what the message names, such as a directory's permissions; the next run tries again. |
|
|
224
|
+
| `run-failed` | failed | nuka verdict found that the newest run failed, and its run.json holds no failed finding that says why. | Read the run summary that the do line renders for why the run failed. |
|
|
225
|
+
| `run-incomplete` | failed | A signal or a worker that exited early stopped the run before every scenario had a record. | Run the scenarios again; the message names what stopped the run. |
|
|
226
|
+
| `run-invalid` | refused | The run directory's run.json does not parse, has another schema version, or lacks a field nuka report reads. | Render a run directory that nuka run of this release wrote, unedited; the message names what is wrong. |
|
|
227
|
+
| `run-missing` | failed | nuka verdict found no run that ended in this project, so nothing judged the working tree. | Run the criteria the change touches with nuka run, under --base with the commit the change started from, and read the verdict table before nuka verdict. |
|
|
228
|
+
| `run-not-found` | refused | nuka report found no run to render: the directory it names holds no run.json, or the state directory holds no run that ended. | Name a run directory that holds a run.json, or run nuka run first. |
|
|
229
|
+
| `run-partial` | failed | nuka verdict found that the newest run left out scenarios of the files it named, with a :line target or --tag, or was a walk (nuka run --step), whose world was open to anything between steps. Such a run is for debugging or exploring, and does not judge the criteria. | Run the feature files again without :line, --tag, or --step. |
|
|
230
|
+
| `run-result-not-written` | failed | The run finished, and run.json could not be written, so the run fails: it has no record for a later command to read. | Correct what the message names, such as the state directory's permissions. |
|
|
231
|
+
| `run-sources-invalid` | refused | The run directory's sources.json does not parse, lacks a field, or has another schema version. | Render a run directory that nuka run of this release wrote, unedited; the message names what is wrong. |
|
|
232
|
+
| `run-sources-missing` | refused | The run directory holds no sources.json, the feature text nuka report --format allure and messages parse the run's scenarios from. A run an earlier release wrote has none. | Run the scenarios again with this release, and render that run. |
|
|
233
|
+
| `run-sources-not-written` | failed | The run finished, and sources.json, the feature text nuka report renders the run from, could not be written, so the run fails. | Correct what the message names, such as the state directory's permissions, and run again. |
|
|
234
|
+
| `run-stale` | failed | nuka verdict found that the newest run judged another working tree than the one there is now: a tracked file, or an untracked file .gitignore does not leave out, changed after it started, or it recorded no working tree id. Its verdicts say nothing about the change since. | Run the criteria again on the tree as it is. When every run leaves the tree changed, a step or the program writes a file git counts: add that file to .gitignore. |
|
|
235
|
+
| `run-without-base` | note | nuka verdict found that the newest run had no --base, so no row of its table says which criteria are new or changed, and a new criterion that passes without the change was not caught as unproven. | No change is necessary. Run with --base and the commit the change started from to have new and changed criteria proven against it. |
|
|
236
|
+
| `scenario-failed` | failed | A scenario ran and failed; its step lines and its record say which step and why. | Correct the step or the code under test that the error names. |
|
|
237
|
+
| `scenario-without-then` | warning | A scenario judges no claim, so it passes whenever its steps run without an error: it has steps of its own and no Then step, in it or in its Background (a scenario of only * lines included, since a * line has no position), or each of its Then lines binds a step that is not a claim step, such as a compat step. | Add a Then line that binds a claim step (defineStep with claims) and checks the outcome the scenario is for. |
|
|
238
|
+
| `schema-field-undescribed` | note | A field of a typed step's args or returns schema has no .describe(), so an agent choosing a step cannot read what it means. | Add a .describe() that says what the field means to each field that the message names. |
|
|
239
|
+
| `secrets-public-key-unknown` | warning | A secrets.public entry names a key that no envFile defines. | Define the key in an envFile, or remove it from secrets.public. |
|
|
240
|
+
| `secrets-redact-key-too-short` | warning | A secrets.redact key's value is shorter than the minimum length build-secret-set.ts will actually redact, so it never gets redacted. | Use a longer value for the key, or remove the key from secrets.redact. |
|
|
241
|
+
| `secrets-redact-key-unknown` | warning | A secrets.redact entry names a key that no envFile defines. | Define the key in an envFile, or remove it from secrets.redact. |
|
|
242
|
+
| `serial-tag-on-scenario` | error | A @nukadoko:serial tag is on a Scenario/Scenario Outline line; nuka run --concurrency only reads it from the Feature line, so it has no effect there. | Move @nukadoko:serial to the Feature line. |
|
|
243
|
+
| `show-requests-failed` | warning | showRequests could not draw a request on its page, so no requests trace was written. http.jsonl still has every request. | Correct what the message names, such as a browser that is not installed (npx playwright install chromium), or turn showRequests off. |
|
|
244
|
+
| `state-missing` | error | A step requires a state, and by what the steps of the earlier lines declare, the line can only be reached with that state not held: no step gives it, no earlier line gives it to that holder, or the last line that touched it ends it. nuka run refuses the scenario before any of its steps runs, --no-check included. | Put a line that runs a step whose gives names the state before the line that requires it, or move the line that ends it below that line. When the step of an earlier line gives the state without saying so, add the state to that step's gives. |
|
|
245
|
+
| `state-shape-mismatch` | error | Steps name one state in two shapes, some with the args key that tells its holders apart ([state, key]) and some with the name alone, so no line that requires it is judged. | Write the state the same way in every step: with a key in each requires, gives, and ends entry, or with the name alone in all of them. |
|
|
246
|
+
| `step-args-invalid` | refused | nuka do has no --args, or --args is not valid JSON. | Pass --args as a JSON object with the keys that nuka describe <step> lists. |
|
|
247
|
+
| `step-description-todo` | note | A typed step's description is still the placeholder nuka scaffold wrote. | Replace the description with one sentence that says what the step does. |
|
|
248
|
+
| `step-file-import-failed` | error | A step file under featuresDir failed to import, so any step it defines never reaches the vocabulary. | Correct the import or the error that the message names in the file, then run nuka check again. |
|
|
249
|
+
| `step-file-unsupported-extension` | error | Discovery found a .cjs or .cts step file; nukadoko is ESM-only and never imports it. | Write the file as an ES module with a .ts, .mts, .js, or .mjs extension. |
|
|
250
|
+
| `step-inputs-invalid` | refused | nuka do cannot run the step as given: a from key, a fixture, or a --use record does not fit. | Correct the step or the flags as the message says. |
|
|
251
|
+
| `step-needs-one-scenario` | refused | nuka run --step walks one execution of one scenario, and the run selects more than that: several scenarios, several environments, --repeat above 1, --base, or a scenario whose conditions do not hold in its environment. | Name one scenario with <file>:<line>, one environment with --env, and leave out --repeat and --base. |
|
|
252
|
+
| `step-option-ignored` | warning | A defineStep call passes a key that defineStep does not read, such as rationale, which was removed, so the key has no effect and its value is shown nowhere. | Delete the key from the defineStep call. Move rationale text into a comment above defineStep first. |
|
|
253
|
+
| `step-record-unreadable` | warning | A step wrote a step record that could not be read back, so run.json and the summary have no declaration or measurement for it. | Correct what the message names, such as a full disk or a process that removed the run directory during the run. |
|
|
254
|
+
| `summary-not-written` | warning | The run finished, and a summary file could not be written. | Correct what the message names, such as the summary path's directory. |
|
|
255
|
+
| `table-docstring-key-mismatch` | error | A step's table or docstring is attached to a line, but zero, or more than one, of its args keys is left unconsumed by pattern captures (exactly one must be left for the attachment to fill), or the one key it fills is of a type the attachment can never satisfy (a table is string[][], a docstring is a string). | Leave exactly one args key that no capture fills, typed string[][] for a table or string for a docstring, or remove the attachment from the line. |
|
|
256
|
+
| `target-not-found` | refused | A target names a file or a directory that does not exist. | Name a file or a directory that exists. |
|
|
257
|
+
| `target-unreadable` | refused | A target exists, and nukadoko could not read it. | Make the file readable, or name another target. |
|
|
258
|
+
| `then-compat-step` | warning | A compat step is bound in Then position. A compat step cannot declare claims, so nukadoko cannot see what it judges. | Move the step to defineStep with claims, or move the line out of Then position. |
|
|
259
|
+
| `then-without-claims` | error | A typed step that runs is bound in Then position. A Then judges through claims; a step that only reads or records a value belongs in a Given or When. | Bind a claim step (defineStep with claims) at this line, or move the line to Given or When. |
|
|
260
|
+
| `trace-version-unknown` | warning | A Playwright trace has a version nukadoko cannot read, so its actions are not in the step record. | Install the Playwright version nukadoko is tested against. |
|
|
261
|
+
| `tracked-secret-looking-key` | warning | An envFile tracked by git defines a key that looks like a secret by name, but that key is not in secrets.redact. | Add the key to secrets.redact, or move it to an envFile that git does not track. |
|
|
262
|
+
| `undeclared-write` | note | A step that declares mutates: false has, in its trace, a write the program committed to a table that holds state: the execution events say the step changed what a later step may read, and its declaration says it did not. A write to a table the program's tables list marks as bookkeeping or infrastructure is not one, and neither is a write that rolled back or whose commit state no line decides. | Declare mutates: true on the step when it is meant to write, or stop the write in the program when it is not; a table that holds bookkeeping or infrastructure is marked so in the program's tables list (docs/spec.md "Lists"). |
|
|
263
|
+
| `undefined-step` | error | No step definition matches a line in a feature file. | Run nuka scaffold --feature with the feature file to write a stub for each undefined line, or reword the line to match a step that exists. |
|
|
264
|
+
| `undefined-step-check-suppressed` | warning | A step file failed to import, or a line would match a step whose pattern has an unregistered parameter type, so the undefined-step finding that cause could explain is held back until it is fixed. | Fix the step-file-import-failed or playwright-missing finding, or the pattern error, that held it back, then run nuka check again. |
|
|
265
|
+
| `unexpected-error` | refused | The command stopped on an error that has no code of its own. | Read the message; it is the error the command stopped on. |
|
|
266
|
+
| `unexpected-failure` | failed | A scenario's steps passed and the program failed underneath one of them in a way no @expects: tag of the scenario names: a response with a status from 500 to 599, an error the page threw that nothing caught, or an error the program reported in its execution events with handled: false. Its cell is broke, so the claims that held prove nothing about the criterion. | Fix what failed in the program. A scenario that causes the failure on purpose names it with a tag on its Scenario line, such as @expects:status=503, @expects:error=<class>, or @expects:page-error=<name>; the finding's fix: line spells the tag. |
|
|
267
|
+
| `unfillable-required-key` | error | A step's args key is required, but nothing on this line (no pattern capture, no table/docstring attachment, and no declared from) can ever fill it. | Capture the key in the pattern, attach a table or a docstring, declare from for the key, or make the key optional. |
|
|
268
|
+
| `unknown-capture-key` | error | A pattern captures a key that is not a key of the step's args schema. | Rename the capture to a key of the args schema, or add the key to the schema. |
|
|
269
|
+
| `unknown-environment` | refused | --env names an environment that nukadoko.program.ts does not define. | Pass default or an environment nukadoko.program.ts defines, or add it to environments there. |
|
|
270
|
+
| `unknown-parameter-type` | error | A pattern names a parameter type this project has not registered, such as {custom} with no matching config.parameterTypes entry. | Register the type in config.parameterTypes, or use a built-in type such as {key:string}. |
|
|
271
|
+
| `unknown-step` | refused | The command names a step that is not in the vocabulary. | Name a step that nuka steps lists. |
|
|
272
|
+
| `unnamed-capture` | error | A step's pattern has a capture with no name, such as {int} instead of {key:int}; every capture must name the args key it fills. | Name the capture after the args key that it fills, as {key:type}. |
|
|
273
|
+
| `unsupported-hook-tag-expression` | error | A compat hook's tag expression could not be parsed, so nukadoko cannot tell which scenarios it applies to. | Rewrite the hook's tags as a tag expression that nukadoko parses, such as @a and not @b. |
|
|
274
|
+
| `unterminated-capture` | error | A pattern has an opening { with no matching closing }, so the pattern cannot be parsed. | Close the capture with }, or escape a literal { as \\{. |
|
|
275
|
+
| `version-probe-failed` | warning | The environment's version probe did not answer, so the records have no target version. | Correct the environment's version setting in nukadoko.program.ts, or the endpoint it names. |
|
|
276
|
+
| `walk-failed` | failed | nuka step found the walk paused after a step that failed, or after a step whose AfterStep hook failed: the scenario is failed, and the pause names which of them failed and its message. The walk still waits for its answer, and nothing is left to stop. | Show the person the failure and the pause's views, answer next when they have seen it, and read the step record for the cause. |
|
|
277
|
+
| `walk-gone` | failed | nuka step found a walk whose nuka run --step process ended without recording how: it was killed, or it crashed, so its world, its browser, and its fixtures may not have been torn down. | Stop what the walk left running, if anything, and start the walk again with the command the finding names. |
|
|
278
|
+
| `walk-in-progress` | refused | nuka run --step found another walk in progress in this project: one walk at a time, since nuka step answers the walk the state directory names. | Finish the walk in progress with nuka step, or stop its nuka run --step process, then start this one. |
|
|
279
|
+
| `walk-not-current` | refused | nuka step names a walk that is not the walk in this project: a later walk replaced it, or no walk with that number started yet. An answer names its walk so that it cannot move a walk the person was not shown. | Run the nuka step wait the finding names, show the person the pause it prints, and answer with that walk's number. |
|
|
280
|
+
| `walk-not-found` | refused | nuka step found no walk to answer or wait for: no nuka run --step recorded one, or the walk an answer is for was replaced by a later one. | Start a walk with nuka run <feature>:<line> --step, then run nuka step wait. |
|
|
281
|
+
| `walk-run-kept` | note | nuka clean kept a run directory because a walk (nuka run --step) that is live writes there, and nuka step answers its pauses through it. While a walk is starting, every run directory with no run.json is kept, since its run may have made one already. | Run nuka clean again once the walk ended; nuka step wait --walk <n> reports when it does. |
|
|
282
|
+
| `walk-stopped` | failed | A walk (nuka run --step) was stopped at a pause with nuka step stop, so the steps after it did not run and nothing shows the scenario holds. The scenario is stopped, not failed, and its row is red. | Run the scenario without --step, or walk it to its last step, for a run that shows it holds. |
|
|
283
|
+
| `worker-output-unreadable` | warning | A worker, under --concurrency or in a tree of nuka run --base, wrote a line on its stdout that is not one of its messages. | Remove the code that writes to process.stdout from the step files or the code they import. |
|
|
284
|
+
| `working-tree-unknown` | note | nuka verdict could not get a git tree id for the working tree: outside a repository, before its first commit, or a git call failed. Whether the newest run judged this tree is unknown, so the verdict is that run's own table. | No change is necessary. In a git repository with a commit, nuka verdict compares the tree with the one the run judged. |
|
|
285
|
+
| `world-setup-failed` | warning | A compat World could not be set up for a scenario. | Correct the World class or the defineWorld call the message names. |
|
|
286
|
+
<!-- /generated -->
|
|
287
|
+
|
|
288
|
+
## Streams and exit codes
|
|
289
|
+
|
|
290
|
+
- stdout carries what was asked for: `do` one step record, `check`/`steps`/`clean` their report (one JSON value with `--json`), `describe` one JSON contract, `step` where the walk stands. `run` writes nothing there unless asked: one scenario's `run.json` entry per line under `--records`, or `run.json` under `--json`.
|
|
291
|
+
- stderr carries what a person watches: `run` progress, the paths it wrote, and the summary line; the findings of a failed scenario, a refusal, an import failure, or a warning. Under `--json` nukadoko writes nothing there; Node's own process warnings and a step's own output still can.
|
|
292
|
+
- Exit 0: done, and the report or run is green.
|
|
293
|
+
- Exit 1: it ran and is red (a `check` error, a `failed`, `unproven`, or `moved` row of `run`'s verdict table, a `run` that failed outside every scenario (a hook, a world that did not start, a worker), or a failed `do` step, a step file that does not import, a `check --fail-on` hit, a `verdict` with no run that judged this working tree whole and left it green, a `report` that left out part of the run, `report-incomplete`, or a `steps` or `describe` that printed a step contract it could not read whole, `contract-unreadable`, or a `run` that selected no scenario, `nothing-selected`, or a `step` that found its walk paused where its scenario failed, `walk-failed`, or ended red, interrupted, or gone), or it failed while running.
|
|
294
|
+
- Exit 2: refused, nothing ran (a bad flag, an invalid config, a missing target, an unknown step, a missing peer, `run` stopped by `check`). The refusal is a `refused` finding with a code; under `--json` it is in the envelope, whose `verdict` is `refused`.
|
|
295
|
+
- Exit 128 + n: `run` or `do` stopped by signal n after teardown.
|
|
296
|
+
- A step record's `error.kind`: `args_invalid`, `result_invalid`, `binding_invalid`, `world_invalid`, `timeout`, `unsupported`, `claim_broken`, `unobserved`, `claim_unjudged`, `step_error` (docs/spec.md "Records").
|