The NoETL Book

Declarative, event-sourced orchestration — from your first playbook to distributed, edge and agent runtimes.

This book is written iteratively, alongside the system it describes. Every chapter carries a status badge so you always know whether you are reading about something that ships today or something that is still being built. See How to Read This Book.

Foreword

STUB

Reserved for the project owner.

Introduction

REAL

NoETL is a declarative orchestration system. You describe work as a playbook: a YAML document that lists steps, the tool each step runs (an HTTP call, a SQL query, a script, another playbook), and the arcs that move control from one step to the next (Chapter 4, Chapter 5, Chapter 6).

A runtime executes the playbook and records what happens as events: the execution started, a step ran and returned this result, the execution completed. You can watch a local run write them (1.3, Chapter 2). On a server, the events are the execution: its state is computed from them, and they are never edited (Chapter 3).

The same grammar runs in three places (Chapter 11):

  • in one process on your machine, with noetl run (Chapter 8);
  • as a long-lived listener, with noetl subscribe and noetl serve (Chapter 9);
  • on a cluster, where a server decides what runs next and autoscaled worker pools do the work (Chapter 10).

They are three implementations, and they do not behave identically. This book says where they differ, and tests its examples to keep those statements true (8.1).

How this book is written

NoETL changes every week, so every page carries a badge that says whether its subject is shipped (REAL), partly shipped (PARTIAL) or only designed (TARGET), and every number says whether it was measured, deployed or planned (How to Read This Book). Claims are checked against the code at a named release, and the status ledger records which release each page was checked against. Where a common belief about NoETL is wrong, the page says so, and Appendix F collects the corrections.

The arc of the book

PartYou will learn
I Getting Startedinstall the CLI, run a playbook, build a small real pipeline
II The Modelwhat NoETL is; every key of a playbook; tools; control flow; sub-playbooks
III The Three Runtimeslocal, daemon and distributed, and how to choose
IV EHDBthe storage engine under the event log and the command bus
V Distributionthe distributed catalog and cross-instance execution
VI Interop & ConcurrencyMCP and agents; the planned coroutine model
VII Resources & Performancewhat a playbook costs, where the time goes, WASM at the edge
VIII Appliedlarger systems built on NoETL
IX Operationsdeploying, releasing, rolling out, observing and securing NoETL

Parts I and II and most of Part III are written first. The rest follows the roadmap. A page that is not written yet says so with a STUB badge.

Check your understanding

How to Read This Book: Status Badges, Quizzes and Traces

REAL

Status badges

NoETL moves fast, and some of what this book covers is designed but not yet built, or built but switched off. Every page opens with a badge:

BadgeMeaning
REALShipped and released. Shipped flags are on by default or enabled in a documented deployment. You can run the examples.
PARTIALSome of it is real. The rest is released behind an off-by-default flag, proven only in a test cluster, or exists only as a single deployment. The page says which parts are which.
TARGETDesigned, usually in an RFC, but not built. These pages describe intent and are rewritten when the code lands.
STUBThe page is planned but not written yet.

Inside a page, individual claims, numbers above all, carry one of the six labels the NoETL resource model defines. The meanings below are quoted from it (labels, resource-model.json, server v3.161.2):

LabelMeaning
MEASUREDobserved on a cluster or harness; read environment/date/source before reusing it
DEPLOYEDread off the production cluster on as_of; configuration, not code
DEFAULTa code default (env var + value); a deployment may override it
GUIDANCEa planning rule derived from the figures; not a measurement
TARGETa goal or budget; not a measurement
NOT_YET_MEASUREDa real question with no number; do not invent one

A MEASURED number in this book also says where, when and over how many runs it was measured. A number without a label is a bug in the book.

Quizzes

Most sections end with a short quiz. The quizzes are there to help you learn, not to grade you: answers are not reported anywhere (the book has no quiz telemetry), and a wrong answer shows an explanation of the misconception behind it. If a question is confusing, that is a bug in the book. Please report it.

Examples

Every playbook in this book is a file under examples/ in the book's repository, and CI checks it on every change:

  • local examples are run with the pinned NoETL CLI, and their output must match what the page shows;
  • distributed examples are checked against the server's schema, but not run, because they need a cluster. The page says so where it shows one.

The CLI version the examples are tested against is in Appendix E.

Not built yet (TARGET)

Two interactive features are planned and not built yet:

  • Traces (#7): a recorded event log shown as a step-through, with the execution's state after each event.
  • ▶ runnable examples (#8): examples that run in the page, on the local runtime compiled to WebAssembly.

Until they exist, no page shows a trace widget or a ▶ button.

Where the book is going

The roadmap shows every chapter, its status and when it will be written. To help write it, see Appendix H.

Try it

This is what an end-of-section quiz looks like. It checks the three ideas above.

Getting Started

REAL

This chapter gets NoETL onto your machine and runs your first playbook. You need no server, no database and no cluster: the noetl command-line tool has a local runtime that runs a playbook inside the CLI process.

Every example in this chapter is in the book's repository under examples/ch01/, and CI runs it with NoETL CLI v6.4.1.

Check your understanding

Installation

REAL

The CLI is a single Rust binary called noetl, with a short alias ntl. There are three documented ways to install it. They do not all give you the same version.

Each channel below was installed on a clean CI runner by the book's install-paths workflow (.github/workflows/install-paths.yml), which then ran noetl --version and the Chapter 1 example. Results as of 2026-11-14:

ChannelCommandVersion installedExample ran
APT (Ubuntu 24.04)see below6.4.0 (package 6.4.0-1)yes
PyPIpip install noetl5.3.2yes
Homebrew (macOS)brew tap noetl/tap, brew trust noetl/tap, brew install noetl6.4.0 (built from source)yes

The latest CLI release is v6.4.1 (2026-11-15). The book's examples are tested against it. The table above was taken on 2026-11-14, at v6.4.0; the only change in v6.4.1 is the local sink fix (8.2).

APT (Debian / Ubuntu)

$ echo 'deb [trusted=yes] https://noetl.github.io/apt noble main' | sudo tee /etc/apt/sources.list.d/noetl.list
$ sudo apt-get update
$ sudo apt-get install noetl
$ noetl --version
noetl 6.4.0

Use jammy instead of noble on Ubuntu 22.04. The source is marked trusted=yes: the repository is not signed, so APT does not verify its packages' origin.

PyPI

$ python -m venv .venv
$ .venv/bin/pip install noetl
$ .venv/bin/noetl --version
noetl 5.3.2

The PyPI package is not a Python implementation. It is the same Rust CLI compiled as a Python extension, so it has no runtime dependencies, and both noetl and ntl land on your path (noetl/noetl README, "What is in this repository"). It is useful when you want NoETL inside a Python environment, for example to call noetl.run(...) from Python.

PyPI is behind

As of 2026-11-14 the newest PyPI release is 5.3.2, uploaded 2026-10-17. The CLI itself is at 6.4.1. Behaviour in this book is checked against 6.4.1. Where you need a newer CLI, install it from APT or Homebrew.

Homebrew (macOS)

$ brew tap noetl/tap
$ brew trust noetl/tap
$ brew install noetl
$ noetl --version
noetl 6.4.0

```admonish warning title="brew trust is needed with current Homebrew" Until 2026-11-15 the tap's own instructions said only brew tap noetl/tap and brew install noetl (the step was added in noetl/homebrew-tap#2). With Homebrew 7.0.11 (the CI runner's version on 2026-11-14), that fails: "Refusing to load formula noetl/tap/noetl from untrusted tap noetl/tap." Homebrew's suggested fix, brew trust noetl/tap, makes it work.


The formula (`noetl/homebrew-tap`, `Formula/noetl.rb`) builds the CLI
from the **v6.4.0** source tarball, so the first install compiles Rust
code. On a `macos-latest` GitHub runner it took **16 minutes**
(MEASURED: 2026-11-14, n = 1, including installing the Rust
toolchain).

## Check it works

```console
$ noetl --version
$ noetl run --help

Check your understanding

Hello, Playbook

REAL

A playbook is a YAML file. This is the smallest valid one: the four required keys, and a workflow with one step.

# Chapter 1.2: the smallest valid playbook. Four required keys, one step.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: minimal
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        "hello, playbook"
  • apiVersion: noetl.io/v2 and kind: Playbook say what the document is. They are the only accepted values.
  • metadata.name names it.
  • workflow is the list of steps. Each step has a name (step) and a tool. Here the tool is rhai, a small embedded scripting language, and the step's result is the value of its last expression.
  • The first step is called start. A NoETL server always begins an execution at start, so name your first step that.

Chapter 4 covers every key.

Adding an input and a second step

# Chapter 1.2: hello, with an input. The first step runs a shell command (local
# runtime field `cmds:`), the second a Rhai expression.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: hello
workload:
  who: world
workflow:
  - step: start
    tool:
      kind: shell
      cmds:
        - echo "hello {{ workload.who }}"
    next:
      - step: done
  - step: done
    tool:
      kind: rhai
      code: |
        40 + 2
  • workload holds the playbook's inputs, with defaults. A template reads them: {{ workload.who }}.
  • next sends control from start to done when start finishes.
  • The first step runs a shell command. Locally the commands go under cmds:. On a cluster the shell tool's field is command: instead (5.1). This example is for the local runtime.

Check your understanding

Running It Locally with the CLI

REAL

noetl run

$ noetl run examples/ch01/hello/playbook.yaml
runtime: local (…)
📋 Running playbook: hello
   API Version: noetl.io/v2

🔹 Step: start

🔹 Step: done

The first line says which runtime ran the playbook and why. The CLI picks it in this order (noetl run --help, CLI v6.4.1):

  1. the -r / --runtime flag: local, distributed or auto;
  2. otherwise, the active context's runtime, if it sets one (noetl context);
  3. otherwise, local.

So noetl run <file> runs locally unless you have selected a context that says otherwise. Add -r local to be sure. The progress lines go to standard error. They name the steps, but they do not print the steps' output: the echo in start is captured as the step's result, not shown. Add -v to see routing decisions (✓ Route: done (default)).

Reading the result: --json

$ noetl run examples/ch01/hello/playbook.yaml -r local --json

With --json, the CLI prints one JSON object on standard output and nothing else there:

{
  "executed_steps": [
    "start",
    "done"
  ],
  "final_result": "42",
  "playbook_name": "hello",
  "status": "ok",
  "step_results": {
    "done": "42",
    "start": "hello world"
  }
}

(The book's CI runs exactly this command and compares this output, minus the run's timestamps, duration and file path.)

FieldMeaning
statusok if the run finished
executed_stepsthe steps that ran, in the order they first ran
step_resultseach step's result, as text
final_resultthe result of the last step that ran

Passing a value in for one run:

$ noetl run examples/ch01/hello/playbook.yaml -r local --json --set who=reader

overrides workload.who for that run.

The local event trail

NoETL records an execution as events (Chapter 3). The local runtime can record them too. Add --event-buffer:

$ noetl run examples/ch01/hello/playbook.yaml -r local --event-buffer
$ noetl buffer list --json
$ noetl buffer cat <execution_id>

Each run gets a directory under $NOETL_LOCAL_DIR (default ~/.noetl/local), holding events.feather (Apache Arrow) and metadata.json. noetl buffer cat prints the events as JSON lines. For the hello playbook on CLI v6.4.1 it printed four events, shown here trimmed to their key fields. Ids and times differ per run:

{"event_type":"playbook.started","status":"RUNNING","step":""}
{"event_type":"step.exit","status":"COMPLETED","step":"start","result":{"data":"hello world"}}
{"event_type":"step.exit","status":"COMPLETED","step":"done","result":{"data":42}}
{"event_type":"playbook.completed","status":"COMPLETED","step":"","result":{"duration_seconds":0.318}}

noetl push sends closed buffers to a NoETL server's event log (POST /api/events/batch) so a local run can be inspected alongside cluster runs (Chapter 8).

What the local runtime cannot run

The local runtime runs only some tool kinds, and it ignores some of the grammar. It has no python and no postgres, and it does not execute loop:, for example. It tells you before running when a kind is unsupported. Chapter 8 has the full list.

Check your understanding

Project: Fetch, Transform, Store — Your First Real Playbook

REAL

In this project you build a playbook that does real work on your machine, with only the CLI installed:

  1. fetch two JSON documents over HTTP;
  2. store each response in a DuckDB table;
  3. loop back to fetch the next one, and stop after two;
  4. transform the table into a summary and write it to a CSV file;
  5. read the file back, as a check.

The documents are two of NoETL's own published files, the DSL manifest and the playbook schema, fetched at a pinned commit of the server repository so that the data never changes. That lets the book's CI run this exact playbook on every change and compare its result.

Everything here runs on the local runtime of CLI v6.4.1. It uses only kinds the local runtime supports: duckdb, rhai and http.

The playbook

# Chapter 2 project: fetch two documents over HTTP, store them in DuckDB,
# write a summary file. Local runtime (CLI 6.4.1), local kinds only.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: fetch_transform_store
workload:
  # Two of NoETL's own published files, at a pinned server commit, so the
  # data never changes under the example.
  base: https://raw.githubusercontent.com/noetl/server/983e36e3ec4c60f5b2a03b4130b7d4fd388a3ec7/orchestrate-core/schema
  db: /tmp/noetl-book-ch02.duckdb
  out: /tmp/noetl-book-ch02-summary.csv
workflow:
  - step: start                          # create (or reset) the table
    tool:
      kind: duckdb
      db: "{{ workload.db }}"
      query: "CREATE OR REPLACE TABLE docs (i INTEGER, name VARCHAR, doc JSON)"
    vars:
      i: "0"                             # the loop counter starts at 0
    next:
      - step: pick
  - step: pick                           # which file is document number i?
    tool:
      kind: rhai
      code: |
        ["dsl-manifest.json", "playbook.schema.json"][{{ vars.i }}]
    next:
      - step: fetch
  - step: fetch                          # HTTP GET it
    tool:
      kind: http
      method: GET
      url: "{{ workload.base }}/{{ pick.result }}"
    next:
      - step: load
  - step: load                           # store the response, bound as a parameter
    tool:
      kind: duckdb
      db: "{{ workload.db }}"
      query: "INSERT INTO docs VALUES (?::INTEGER, ?, ?::JSON)"
      params:
        - "{{ vars.i }}"
        - "{{ pick.result }}"
        - "{{ fetch.result }}"
    next:
      - step: advance
  - step: advance                        # i = i + 1
    tool:
      kind: rhai
      code: |
        {{ vars.i }} + 1
    vars:
      i: "{{ advance.result }}"
    next:
      - step: pick                       # the back-edge: go round again ...
        when: "{{ vars.i != 2 }}"        # ... until i reaches 2
      - step: report
  - step: report                         # transform + write the file
    tool:
      kind: duckdb
      db: "{{ workload.db }}"
      query: >-
        COPY (
          SELECT i, name,
                 doc->>'$.status' AS http_status,
                 len(json_keys(doc->'$.body')) AS top_level_keys
          FROM docs ORDER BY i
        ) TO '{{ workload.out }}' (HEADER)
    next:
      - step: check
  - step: check                          # read the file back
    tool:
      kind: duckdb
      db: "{{ workload.db }}"
      query: "SELECT * FROM read_csv_auto('{{ workload.out }}') ORDER BY i"

Run it:

$ noetl run examples/ch02/fetch-transform-store/playbook.yaml -r local --json

Its final_result is the CSV read back by check:

[
  {
    "http_status": 200,
    "i": 0,
    "name": "dsl-manifest.json",
    "top_level_keys": 10
  },
  {
    "http_status": 200,
    "i": 1,
    "name": "playbook.schema.json",
    "top_level_keys": 8
  }
]

and /tmp/noetl-book-ch02-summary.csv contains:

i,name,http_status,top_level_keys
0,dsl-manifest.json,200,10
1,playbook.schema.json,200,8

Walking through it

start creates the table. CREATE OR REPLACE makes the playbook safe to run twice. Its vars: sets the loop counter i to 0.

pick turns the counter into a file name. A rhai step's result is the value of its last expression. The template {{ vars.i }} is replaced before the script runs, so the script the engine sees is ["dsl-manifest.json", "playbook.schema.json"][0].

fetch is an http step. Its result is a JSON object with the response's status and body.

load inserts one row. The values go in as bound parameters (? in the SQL, params: in the step), never pasted into the SQL text. The response body contains quotes, and parameters need no escaping.

advance adds one to the counter and stores it back in vars.i. Its next is the decision point:

next:
  - step: pick                 # the back-edge ...
    when: "{{ vars.i != 2 }}"  # ... taken while i is not 2
  - step: report               # otherwise, carry on

A list of targets is exclusive: the first one whose when is true wins (6.1). The arc back to pick is a back-edge, an arc to a step that has already run (6.4).

report does the transform in SQL and writes the file with DuckDB's COPY … TO. check reads it back with read_csv_auto.

Every duckdb step names its database file with db:. Without one, the local runtime uses .noetl/state.duckdb next to the playbook file (default_duckdb_path, CLI v6.4.1). A relative db: is also resolved against the playbook's directory, not your current directory.

Does the loop terminate?

Always ask this of a back-edge. Nothing in NoETL stops a loop for you; the guard is the only bound (6.4). Here: i starts at 0, advance is the only step that changes it, it adds exactly 1 each time, and the loop exits when i is 2. So the loop body runs exactly twice. Had advance added 2, i would go 0, 2 and exit after one pass. Had it added 3, i would skip past 2 and the loop would never end: guard on != only when you are sure the counter hits the value exactly.

What the run recorded

Run it with -v to watch the routing decisions:

🔹 Step: advance
   ✓ Route matched: pick ({{ vars.i != 2 }})
🔹 Step: pick
…
🔹 Step: advance
   ✗ Route skipped: pick ({{ vars.i != 2 }})
   ✓ Route: report (default)

and with --event-buffer to record the run's events (1.3). On CLI v6.4.1 the buffer held:

playbook.started
step.exit  start
step.exit  pick
step.exit  fetch
step.exit  load
step.exit  advance
step.exit  report
step.exit  check
playbook.completed

This is the vocabulary the rest of the book uses:

  • a step is a named unit of the workflow (fetch);
  • a tool is what a step runs (http);
  • an arc is a transition in next, with an optional when guard;
  • an event is a record of something that happened, and the sequence of events is the execution's history.

The local trail shows each step once

pick, fetch, load and advance ran twice, but the local buffer has one step.exit for each of them. At CLI v6.4.1 it records one exit per step, at its first run, so a back-edge loop's later passes do not appear. executed_steps in the --json output works the same way. A NoETL server records every pass (Chapter 10).

What changed and why

ChoiceWhy
Data from a pinned commitDeterministic input, so the result can be checked automatically
CREATE OR REPLACE in startRe-running the playbook does not fail or duplicate rows
Parameters, not string pastingHTTP bodies contain quotes; parameters are never parsed as SQL
Counter in step vars:That is how the local runtime passes values between steps; a server would use set: (4.2)
A guard that is reached exactlyThe != guard is safe only because the counter steps by 1 from 0
Transform in SQL inside one stepOne step does all the rows. A loop of steps would pay the orchestration cost once per row

Checkpoint

Extend it

  • Add a third file (resource-model.json) to pick and change the guard. Re-check the termination argument.
  • Add a column to the report: the number of tool_kinds in the manifest (json_array_length(doc->'$.body.tool_kinds')).
  • Make the output path an input: run it with --set out=/tmp/mine.csv.
  • Read Chapter 8 and list what you would have to change to run this playbook on a cluster. Hints: the counter (vars: → set:) and the {{ <step>.result }} references.

What NoETL Is

REAL

NoETL is a declarative, event-sourced workflow engine. You describe a workflow as a playbook: steps, the tools they run, and the rules for moving between them. NoETL runs it, and it records every transition as an immutable event. The execution's state is never stored anywhere else: it is computed from those events whenever it is needed.

The same playbook can run in three places: in-process on your machine (the local runtime), as a long-running listener (the daemon), or on a cluster of servers and workers (the distributed runtime). Part III covers the three. This chapter covers the ideas they share:

Each idea is tied to the code that implements it at server v3.161.2 (commit 983e36e) and worker v6.15.0, or to the project's written execution-model rule where the idea is a rule about how features must be built.

Check your understanding

Declarative Orchestration

REAL

In an imperative workflow, a script calls each task in turn: it decides the order as it goes, it holds the state in its variables, and if it crashes, the state dies with it. In NoETL the playbook does not call anything. It declares:

  • the steps and the tool each one runs (Chapter 5);
  • the arcs between steps and their when guards (Chapter 6);
  • inputs (workload) and credential references (keychain) (Chapter 4).

The orchestrator decides what runs and when. On a server it is orchestrate-core's WorkflowOrchestrator. Each time something happens, such as an execution starting or a step finishing, it looks at the playbook and the execution's history, and returns the next commands to dispatch. It does no work itself, and it keeps no memory of its own between calls.

That split has consequences you will meet throughout the book:

  • Order comes from arcs, not from position. A step's place in workflow does not decide when it runs (4.3).
  • Steps dispatched together run together. If two arcs are taken in the same pass, both steps run at once on different workers (6.0).
  • The engine needs nothing from the run but its events. Any orchestrator instance can take the next decision for any execution, because the decision depends only on the playbook and the event history (next section).

Note

Declarative does not mean "anything you write is honoured". Several keys in the grammar are parsed and then ignored at the versions this book covers: max_in_flight, spec.on_error, spec.timeout and tool.eval, for example (6.5). The grammar says what is accepted; the chapters say what is applied.

Check your understanding

Event Sourcing: The Log Is the Truth

REAL

Every execution has an event log: a sequence of records, one for each thing that happened. "The execution started." "This step's command was issued." "A worker claimed it." "It completed with this result." The log is append-only. Events are added and are never edited or deleted. A server comment states the rule directly: the event log "is append-only, immutable, and never purged" (src/services/secret_material.rs, server v3.161.2). That is why registration refuses inline secrets (4.4): once something is in the log, it stays there.

State is a fold over events

NoETL does not keep an "execution status" record that it updates in place. When the orchestrator needs to decide what to do next, it is handed the execution's events and the playbook, rebuilds the execution's state from the events, and computes the next commands. The input of the server's orchestration drive is exactly that:

#![allow(unused)]
fn main() {
pub struct OrchestrateInput {
    pub events: Vec<Event>,              // the execution's events
    pub playbook: Playbook,              // the blueprint
    pub trigger_event_type: Option<String>,
    // ...
}
}

(plugins/orchestrate/src/lib.rs, v3.161.2.) The output is the next commands and the next events to append. Nothing else carries state from one decision to the next. Even a set: value survives between steps only because it is written into the log as a ctx.updated event (4.2).

By default this drive runs as a WASM plug-in on a worker in the system pool (orchestrate_plugin_drive, default true, src/config/app.rs). The server keeps an in-process fallback. Both run the same orchestrate-core code, which is why it can be compiled to WASM at all: it is a pure function of its inputs.

The events you will see

These event types appear in the server and orchestrator code at v3.161.2, among others:

EventRecords
playbook.startedthe execution began
step.entera step was entered (dispatched)
command.issueda command for a step was put on the command bus
command.claimed, command.starteda worker took it and began
call.donethe tool call returned
command.completed, command.failedthe command's outcome, with its result or error
step.exit, step.skippeda step finished, or was not taken (6.2)
ctx.updatedset: values were persisted
playbook.completed, playbook.failedthe execution's terminal outcome

Chapter 10 follows one execution through all of them, in order, on a real cluster.

Why it matters to you

  • Replay. Because state is computed from events, any past moment of an execution can be reconstructed by folding its events up to that point.
  • No hidden state. If something is not in the log, the engine does not know it. A value a step computed but did not return, or set, is gone after the step.
  • Big things don't belong in it. A step result travels in an event. Above 100 KiB it is moved out to the result store and referenced (5.3). Large data belongs in a data store a step reads and writes.

Check your understanding

Ephemeral Blueprints and Stateless Workers

REAL

Two words describe how NoETL is built: blueprint and worker.

Playbooks are blueprints

A playbook is control flow and policy for one request. It is invoked on demand, and it holds no state between invocations beyond what the event log records. Nothing of a playbook "runs" while no execution of it is in progress. There is no resident process per playbook, and no long-lived agent or MCP server sitting inside NoETL waiting for work. When a playbook is published as an MCP tool or an agent (Chapter 18), each call is a new execution of the blueprint.

Workers are stateless compute

A worker is a process with a fixed number of slots (WORKER_MAX_CONCURRENT, default 4, resource model DEFAULT). For each slot it repeats one cycle:

  1. claim one command from the command bus;
  2. run that command's tool, the step's single tool or a whole tool list (5.2);
  3. emit the outcome as events;
  4. release the slot.

The slot is held from claim until the tool returns (resource model slot_rule, citing worker v6.15.0 src/worker.rs). The worker keeps nothing about the execution between commands. The next command of the same execution may run on any worker.

Where data access happens

The project's execution-model rule (in noetl/ai-meta, agents/rules/execution-model.md) states the shape every feature must keep:

  • All data access happens inside playbook steps. A read, a write, a third-party API call: each is a tool in a step, under that playbook's policy. Clients never reach a database directly.
  • The gateway is a gatekeeper only. It authenticates and routes requests and delivers results; it never reads or writes domain data on a client's behalf (Chapter 10).
  • NoETL's own tables are reached through the server's API. Workers call the server rather than holding their own connections to NoETL's database.

These are design rules. They describe how the system is meant to be built, and code review enforces them. When this book finds code that does not follow one, the chapter says so. Ch. 4.4's postgres default connection is one such case.

Check your understanding

Two Catalogs: Internal Objects vs Business Data

PARTIAL

NoETL deals with two kinds of stored information, and it keeps them strictly apart.

The internal catalogBusiness data
WhatNoETL's own objects: playbooks, and other catalog kinds such as subscriptionsYour domain data: customers, orders, bookings, documents
Who reads itthe NoETL server, through /api/catalog/*playbook steps only, through tools such as postgres, http, mcp
Where it livesthe server's store (see below)wherever it belongs: your databases, APIs, buckets

A playbook in the internal catalog is the program that reads the business data. The two never mix: business data is not put into the internal catalog or into NoETL's event store, and NoETL's own objects are not read by steps from business stores. This is a project rule, and the reason why data access happens inside steps (3.3). It is stated as owner direction in the RFC postgres-to-ehdb-internal-data.md (2026-08-29, design only): NoETL's internal orchestration data belongs in EHDB, and "only user/business result data should stay in Postgres".

Where the internal catalog is stored today

This section is PARTIAL because the storage is in transition. At server v3.161.2 (checked in the code):

  • /api/catalog/* reads and writes the Postgres table noetl.catalog (src/db/queries/catalog.rs). Every catalog read resolves from it by default.
  • An EHDB catalog log exists, but only as a shadow dual-write: NOETL_CATALOG_LOG=shadow also records each registration in an EHDB store, and nothing reads it (src/handlers/catalog_log.rs).
  • Serving catalog reads from EHDB is staged: NOETL_CATALOG_READ_SOURCE can be postgres (the default), verify (compare both, serve Postgres) or tier (serve EHDB). The code calls the cutover "a flag flip, and … an owner decision" (src/handlers/catalog_read.rs).

Not built yet (TARGET)

The design target is an internal catalog stored in EHDB only (Chapter 16, Part IV). At v3.161.2 that is built as a shadow and a staged read path, not the default.

Check your understanding

Anatomy of a Playbook

REAL

A playbook is a YAML document that describes a workflow: a list of steps, each of which runs one tool, plus the rules for moving from one step to the next. NoETL reads the playbook, runs the steps, and records every transition as an event. This chapter walks through every part of the document. The next two chapters cover the tools a step can run (Chapter 5) and how control moves between steps (Chapter 6).

Everything in this chapter was checked against the grammar the NoETL server publishes, orchestrate-core/schema/playbook.schema.json, at server v3.161.2 (commit 983e36e, 2026-11-12), against the server's validator (src/playbook/parser.rs) at the same commit, and against the local runtime in CLI v6.4.1. The full key-by-key reference is generated from that file in Appendix A.

The whole thing on one page

Here is a complete playbook. Every example in this book is a file the book's CI runs; this one is examples/ch04/anatomy/playbook.yaml.

# Chapter 4: every part of a playbook in one file.
apiVersion: noetl.io/v2          # required; the only accepted value
kind: Playbook                   # required; the only accepted value
metadata:                        # required
  name: anatomy                  # required
  path: book/ch04/anatomy        # where it lives in the catalog once registered
  description: The parts of a playbook, smallest useful form.
  labels:
    chapter: "4"
workload:                        # inputs: read as {{ workload.<key> }}
  greeting: hello
  who: world
workflow:                        # required: the steps, in a list
  - step: start                  # the server starts here, so name the first step `start`
    desc: Build a greeting
    tool:
      kind: rhai
      code: |
        "{{ workload.greeting }}, {{ workload.who }}"
    next:
      - step: shout
  - step: shout
    desc: Upper-case the greeting
    tool:
      kind: rhai
      code: |
        "{{ workload.greeting }}, {{ workload.who }}!".to_upper()

Run it with the local runtime:

$ noetl run examples/ch04/anatomy/playbook.yaml -r local --json

The --json flag prints one result object on standard output. Among its fields are the steps that ran, in order, and each step's result:

{
  "executed_steps": [
    "start",
    "shout"
  ],
  "final_result": "HELLO, WORLD!",
  "playbook_name": "anatomy",
  "status": "ok",
  "step_results": {
    "shout": "HELLO, WORLD!",
    "start": "hello, world"
  }
}

Top-level keys

A playbook has eight top-level keys. Four are required.

KeyRequiredWhat it holdsSection
apiVersionyesThe grammar version. Must be noetl.io/v2.4.1
kindyesThe document type. Must be Playbook.4.1
metadatayesname (required), path, description, labels, and opt-in extensions4.1
workloadInputs: values the steps read as {{ workload.<key> }}4.2
varsTop-level variables4.2
workflowyesThe list of steps4.3
keychainHow credential aliases are sourced4.4
workbookNamed, reusable tool definitions4.5

Myth

"The steps go under steps:." There is no steps: key. The step list is workflow. A playbook that uses steps: fails before it runs: the local runtime reports missing field `workflow` and the schema check reports 'workflow' is a required property. The example examples/ch04/no-steps-key checks both in CI.

Two checks, at two different times

A playbook passes two kinds of check, and they are not run at the same moment.

  1. The schema (playbook.schema.json) checks shape: required keys, value types, and which tool.kind values exist. It is deliberately permissive in one way: unknown keys are not rejected. A misspelt optional key, such as worklaod:, is silently ignored rather than reported.

  2. The validator in the server checks meaning. At v3.161.2, validate_playbook (src/playbook/parser.rs:164) requires:

    • apiVersion is exactly noetl.io/v2, and kind is exactly Playbook;
    • a step named start exists;
    • step names are unique;
    • every next target names a step that exists;
    • when and loop.in expressions are non-empty, and contain no stray { outside a {{ … }} (this is the whole check; the expression itself is not parsed until it runs);
    • a loop has a non-empty iterator, plus in: (or, for mode: cursor, a cursor block);
    • a pipeline (a list under tool:) has at least one task.

    It also refuses the old case: blocks outright.

The server runs the validator when an execution starts, not when a playbook is registered. As the server's own comment puts it (src/handlers/dsl.rs:227), "a document can register and still be unexecutable". The server has a dry-run endpoint, POST /api/dsl/validate, that runs both registration's checks and the validator and lists every problem at once. It is mounted only when the server sets NOETL_DSL_KB=true, which is off by default.

The local runtime is more forgiving

The local runtime in CLI v6.4.1 does not run the server's validator. It starts at the first step in workflow, whatever its name, and does not require a start step. A playbook that runs locally can therefore still be refused by a server. Name your first step start and it works in both places. Chapter 8 lists every difference.

Check your understanding

apiVersion, kind, metadata

REAL

The first three keys say what the document is and where it lives.

apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: anatomy
  path: book/ch04/anatomy
  description: The parts of a playbook, smallest useful form.
  labels:
    chapter: "4"

apiVersion and kind

Both are required strings with exactly one accepted value each. The server's validator compares them with constants in the grammar (noetl_orchestrate_core::dsl::API_VERSION and PLAYBOOK_KIND) and refuses anything else, for example Unsupported API version: noetl.io/v1. Expected noetl.io/v2 (src/playbook/parser.rs:164-183, server v3.161.2). The same constant is what a server reports from GET /api/dsl/version, so the two cannot disagree.

kind is also how the catalog tells document types apart: the same catalog holds other kinds, such as Subscription documents for the daemon (Chapter 9), which are validated differently.

metadata

KeyRequiredMeaning
nameyesThe playbook's name. Appears in every run result as playbook_name.
pathIts address in the catalog, such as book/ch04/anatomy. Other playbooks call it by this path.
descriptionFree text.
labelsA map of string to string, for filtering.

When a playbook is registered without a path, the catalog uses its name as the path (registration_identity, src/services/catalog.rs:498). Registration fails only if both are missing.

metadata also carries three opt-in extensions. The schema does not list them, because each is read only when a server flag turns its feature on. With the flag off, the key is ignored. Each one has its own chapter:

KeyWhat it doesServer flag (default off)Chapter
metadata.expose.mcpPublishes the playbook as one MCP tool at POST /api/mcpNOETL_MCP_SERVER18
metadata.expose.agentPublishes it as an agent with a card at /api/agents/*NOETL_AGENT_ENDPOINT18
metadata.catalog.hot_reloadLets named sub-playbooks resolve @latest inside a pinned runNOETL_CATALOG_HOT_RELOAD (also needs NOETL_CATALOG_PINNING and NOETL_CATALOG_CAS)16

The table is generated from the server's DSL manifest (metadata_extensions, dsl-manifest.json at v3.161.2). The full list of flags is in Appendix C.

Partial

All three extensions are released code, but every one of them is off unless the server sets its flag. This book does not say whether any particular deployment sets them.

Check your understanding

workload, vars and Templating

REAL

A playbook gets its inputs from workload and reads them, and other values, through templates: {{ … }} expressions inside strings. This section covers both. It also covers the most important portability fact in this chapter: the server and the local runtime do not share a variable model. A playbook that passes values between steps will behave differently on the two unless it is written for both.

Server facts here were checked at server v3.161.2 (commit 983e36e) and worker v6.15.0. Local facts were checked at CLI v6.4.1 and are asserted by CI examples.

workload: inputs

workload is a map of inputs with their default values:

workload:
  greeting: hello
  who: world

Every template can read it as {{ workload.<key> }}. A run can override it:

  • locally, with noetl run … --set who=cli (repeatable) or --payload '{"who": "cli"}';
  • on a server, with the payload of the execute request (Chapter 10).

On the server, workload keys are also available without the prefix, as {{ who }} (build_context, orchestrate-core/src/state.rs). Locally, --set who=cli sets both {{ workload.who }} and {{ who }}.

Templates

On the server: Jinja (minijinja)

The server and the worker render templates with minijinja, a Rust implementation of Jinja2. Filters, comparisons, arithmetic and if expressions work as they do in Jinja. Undefined values are chainable: {{ a.b.c }} with no a renders as an empty string rather than an error (UndefinedBehavior::Chainable, orchestrate-core/src/template.rs, and the same in noetl-tools).

The names a step's templates can see on the server are:

NameWhat it is
workload.<key>, or plain <key>the workload
<step>.<field>, <step>.data.<field>a completed step's result data
steps.<step>a completed step's full result envelope
<key>, ctx.<key>values set by set: (below)
output.<field>in a step's own set: and in its next arcs: that step's result
iter.<name>, <name>, _index, _totalinside a loop body (6.3)
keychain.<alias>.<field>a credential, rendered only on the worker (4.4)
execution_id, path, versionthe execution's identity

On the local runtime: token substitution

The local runtime does not run a Jinja engine. It substitutes tokens in a single pass (render_template, executor/src/template.rs, CLI v6.4.1):

  • {{ name }} is replaced only when written with exactly one space inside each brace. {{name}} is left as it is.
  • Four filters exist: lower, upper, trim and default.
  • An unknown name is left in place, braces and all, not rendered empty.
  • There are no expressions: no arithmetic, no if, and no comparison except in conditions (6.2).

This example is run in CI:

# Chapter 4.2: how the LOCAL runtime (CLI 6.4.1) renders templates.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: templating_local
workload:
  who: book
workflow:
  - step: start
    tool:
      kind: shell
      cmds:
        - echo "a={{ workload.who }} b={{workload.who}} c={{ workload.who | upper }} d=[{{ workload.missing }}]"

Its result, checked by CI:

{
  "executed_steps": [
    "start"
  ],
  "final_result": "a=book b={{workload.who}} c=BOOK d=[{{ workload.missing }}]",
  "playbook_name": "templating_local",
  "status": "ok",
  "step_results": {
    "start": "a=book b={{workload.who}} c=BOOK d=[{{ workload.missing }}]"
  }
}

So b stayed literal (no spaces), c used the upper filter, and d (an unknown name) stayed literal. On a server, b would render as book and d as an empty string.

Passing values between steps

Here the runtimes really diverge. There are three variable mechanisms in the grammar, and each runtime honours a different subset:

MechanismServer (v3.161.2)Local (CLI v6.4.1)
top-level vars:parsed; nothing reads itnot loaded
step vars: (extract from the result)parsed; nothing reads itworks: sets {{ vars.<key> }}
step set:works: values persisted as a ctx.updated event, read as {{ <key> }} or {{ ctx.<key> }}parsed; nothing reads it
a step's result{{ <step>.<field> }}, {{ output.<field> }}{{ <step>.result }} (the whole result as text)

The server claims were checked by searching every reader of these fields in the server and worker at the versions named. Step vars and top-level vars have none. Step set: is applied in the orchestrator (orchestrate-core/src/orchestrator.rs, "a step's set: fires once per completion, and the rendered values are persisted to the event log as a ctx.updated event").

This local example uses all three mechanisms. CI checks what each one produced:

# Chapter 4.2: which variable mechanisms the LOCAL runtime (CLI 6.4.1) honours.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: variables_local
workload:
  who: book
vars:                     # top-level vars: parsed, not loaded locally
  colour: blue
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        21 * 2
    vars:                 # step vars: honoured locally (ignored by the server)
      answer: "{{ start.result }}"
    set:                  # step set: honoured by the server (ignored locally)
      ctx.flag: "on"
    next:
      - step: report
  - step: report
    tool:
      kind: shell
      cmds:
        - echo "workload={{ workload.who }} step_vars={{ vars.answer }} top_vars={{ vars.colour }} set={{ flag }} ctx_set={{ ctx.flag }}"
{
  "executed_steps": [
    "start",
    "report"
  ],
  "final_result": "workload=book step_vars=42 top_vars={{ vars.colour }} set={{ flag }} ctx_set={{ ctx.flag }}",
  "playbook_name": "variables_local",
  "status": "ok",
  "step_results": {
    "report": "workload=book step_vars=42 top_vars={{ vars.colour }} set={{ flag }} ctx_set={{ ctx.flag }}",
    "start": "42"
  }
}

Step vars: worked locally (step_vars=42). Top-level vars and set: did not, and their tokens were left in place.

Myth

"Use vars: to pass a value to the next step." That is true only on the local runtime. On a server at v3.161.2, nothing reads step vars: or top-level vars:. Use set: there, for example set: {ctx.answer: "{{ output.value }}"}, then read it as {{ answer }}. No single mechanism works on both runtimes today.

How set: names work on the server

A set: key may carry a scope prefix. ctx., iter. and step. are stripped, so ctx.offset writes a variable called offset. Any other key is written exactly as given, dots included (apply_set_mutations, orchestrate-core/src/state.rs). Because each completion's values go into the event log, they survive the re-dispatch that loops need (6.4).

Check your understanding

workflow: Steps

REAL

workflow is a list. Each item is one step: a named unit that runs one tool and then says where to go next.

workflow:
  - step: start
    desc: Build a greeting
    tool:
      kind: rhai
      code: |
        "{{ workload.greeting }}, {{ workload.who }}"
    next:
      - step: shout
  - step: shout
    tool:
      kind: rhai
      code: |
        "{{ workload.greeting }}, {{ workload.who }}!".to_upper()

Step keys

These are all the keys a step has in the grammar at server v3.161.2 (Step in orchestrate-core/src/playbook.rs, and the Step type in Appendix A).

KeyRequiredWhat it isCovered in
stepyesThe step's name. It must be unique within the playbook; next targets refer to it.here
toolyes (server)What the step runs: one tool, or an ordered list of toolsChapter 5
descA descriptionhere
nextWhere control goes after the step: one name, a list, or a router of arcs with when guards6.1
whenAn enable guard: an expression checked before the step runs6.2
loopRun the step once per item of a collection6.3
specStep behaviour: next_mode, timeout, on_error6.5
argsInput arguments for the step5.3
varsValues to extract from the step's result into variables5.3
setVariable mutations applied when the step completes5.3

Two rules from the server's validator apply to the list as a whole (validate_playbook, src/playbook/parser.rs, server v3.161.2):

  • One step must be named start. The server begins every execution there, wherever it sits in the list.
  • Step names are unique, and every name used in a next must exist.

There is no special end step to declare. A step with no next simply ends its branch. Chapter 6 explains when the whole execution counts as finished.

Where the local runtime differs

Checked in CLI v6.4.1 (src/playbook_runner.rs):

  • It starts at the first step in the list, not at start. You can change that with --target <step>.
  • tool is optional. A step without one runs nothing and just routes.
  • It still runs the old case: blocks, which the server refuses.

Write playbooks for the server's rules (a start step, a tool on every step, no case:) and both runtimes accept their structure. A tool's own fields can still differ between the two; Chapter 5 shows where.

Step order is not run order

The position of a step in workflow decides nothing except, locally, which step runs first. Run order comes from next. This playbook lists done before start. It is still valid, and on a server it runs start and then done:

# Chapter 4.3: list position is not run order. The server starts at `start`;
# the local runtime (CLI 6.4.1) starts at the first step in the list.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: step_order
workflow:
  - step: done
    tool:
      kind: rhai
      code: |
        "done"
  - step: start
    tool:
      kind: rhai
      code: |
        "start"
    next:
      - step: done

The local runtime runs it differently. It starts at the first step in the list, done, which has no next, so the run ends there and start never runs. The book's CI checks exactly that (examples/ch04/step-order):

{
  "executed_steps": [
    "done"
  ],
  "final_result": "done",
  "playbook_name": "step_order",
  "status": "ok",
  "step_results": {
    "done": "done"
  }
}

Check your understanding

keychain: Credentials by Reference

REAL

A playbook never contains a secret. It contains a reference, an alias such as pg_main or openai_token, and NoETL resolves the alias to the secret only at the moment a worker runs the step. This section explains why, and the two ways to write a reference.

Why not inline?

Everything a NoETL server knows about an execution is in its event log, which is append-only and never purged (Chapter 3). A step's rendered configuration travels in the event that dispatches it. A password typed into a playbook would therefore live in the log for the life of the deployment, with no way to remove it.

So the server refuses a playbook at registration if it finds unambiguous secret material in it: a PEM private-key block, a service-account JSON with both private_key and client_email, a three-part JWT, or a provider-prefixed token such as AKIA… or ghp_…. The error names the YAML path and the kind of material. It never echoes any part of the value (src/services/secret_material.rs, called from registration_checks, server v3.161.2). The check is deliberately conservative: it does not guess from entropy, so a secret that matches none of those patterns gets through, and keeping it out remains the author's job.

Two ways to reference a credential

1. auth: <alias> on the tool

- step: load_users
  tool:
    kind: postgres
    auth: pg_main
    query: "SELECT id, email FROM users LIMIT 10"

When the worker runs the step, it fetches the credential stored under pg_main from the server (GET /api/credentials/<alias>). It then merges the credential into the tool's configuration according to the credential's type: postgres becomes host, port, user, password and database; bearer, api_key and basic become an HTTP auth block; nats, pubsub and kafka become source connection fields; snowflake becomes Snowflake fields. Any other type is an error (src/executor/auth_alias.rs, worker v6.15.0). The worker also accepts the key credential: in place of auth:.

An alias that is not in the keychain fails the step cleanly, with Credential alias '<name>' not found in keychain. It does not hang.

2. {{ keychain.<alias>.<field> }} in a template

- step: call_api
  tool:
    kind: http
    method: GET
    url: https://api.example.com/v1/items
    headers:
      Authorization: "Bearer {{ keychain.example_api.api_key }}"

The server renders every other template in a step before dispatching it, but it leaves keychain.* templates unrendered (render_value_deferring_keychain, orchestrate-core/src/template.rs, server v3.161.2). The worker resolves the alias, renders the template in memory, and runs the step. The secret is therefore never written into the dispatched command or the event log.

An unresolved keychain template renders as empty

By default, if {{ keychain.example_api.api_key }} cannot be resolved, it renders to an empty string, and the step runs anyway. In the example above it would send Authorization: Bearer and get a 401 from the API, which looks like a problem with the API rather than with the alias. A worker started with NOETL_KEYCHAIN_STRICT=true fails the step instead. That setting is off by default (src/executor/keychain_namespace.rs, worker v6.15.0).

The keychain: block

The top-level keychain: list says how an alias is sourced, when it is not simply a credential registered with the server. Each entry has a name (the alias) and, among other fields:

  • provider: the secret backend that resolves it: gcp (Google Secret Manager), aws, azure, vault or k8s;
  • map: output key → secret-path template;
  • auth: the credential used to authenticate to the provider itself;
  • region, residency, allowed_regions, no_broker_fallback: data-residency controls.

The full field list is generated in Appendix A. Chapter 31 covers how keychain entries are stored, sealed and rotated.

There is no default connection, by convention

The NoETL convention is that every step that touches a credentialed resource names its credential explicitly. There is no ambient database, and no environment-level fallback.

The postgres tool does not enforce this

Checked at tools v4.6.0 (the version worker v6.15.0 uses): if a postgres step has no auth (or credential) and no connection fields, PostgresTool builds a default connection to localhost:5432, user postgres, database postgres, with no password (build_connection_string, src/tools/postgres.rs). The worker does not refuse such a step: its alias resolver returns early when there is no alias (src/executor/auth_alias.rs). The worker's own comment says such a step "fell back to a default (unreachable) connection".

So the rule holds only if you follow it. Always give a postgres step an auth.

Locally

The local runtime has its own credential store, outside any server:

$ noetl credential set example_api      # prompts for the secret
$ noetl credential list                 # aliases and types, never values

At CLI v6.4.1, credential: <alias> in http and agent steps reads from this store (Chapter 8).

Check your understanding

workbook: Reusable Tasks

REAL

When several steps run the same tool with mostly the same configuration, define it once in workbook and refer to it by name.

workbook:
  - name: fetch_rates
    tool:
      kind: http
      method: GET
      url: https://api.example.com/v1/rates
      args:
        currency: USD

workflow:
  - step: start
    tool:
      kind: workbook
      name: fetch_rates          # the workbook entry to use
      args:
        currency: EUR            # overrides the entry's default
    next:
      - step: done
  - step: done
    tool:
      kind: noop

How a reference is resolved

The server resolves references when it parses the playbook, before validating it (resolve_workbook_references, src/playbook/parser.rs, server v3.161.2). For every step whose tool.kind is workbook:

  1. It looks up the entry whose name matches the step's tool.name. A step without name is an error (tool.kind=workbook requires a 'name' field), and so is an unknown name. That error lists the names that do exist.
  2. It replaces the step's tool with the entry's tool, so the step above runs kind: http.
  3. It merges the step's args over the entry's args, key by key, and the step's value wins. input: is accepted as another name for args. If either side is not a map, the step's args replace the entry's entirely.

What a tool then does with its args depends on the kind. A python step, for example, sees them as an args dict (Chapter 5). The workbook only decides which args the tool receives.

From then on, nothing else in the system knows a workbook was involved. The orchestrator and the worker see an ordinary http step.

Each entry has a name, a single tool, and an optional sink. An entry holds one tool, not a list, so an ordered tool list (5.2) cannot live in a workbook entry.

Not on the local runtime

At CLI v6.4.1 the local runtime does not accept kind: workbook. A playbook that uses it is refused before any step runs, with the list of kinds the local runtime supports.

Check your understanding

Tools

REAL

Every step runs a tool: a piece of work of a given kind, such as an HTTP request, a SQL query, a Python script or a call to another playbook. NoETL itself does no work in a step. It decides which step runs next, and hands the step's tool to a worker, which runs it and reports the result back as an event.

- step: start
  tool:
    kind: http          # which tool
    method: GET         # the tool's own fields
    url: https://api.example.com/v1/items

A step's tool is one of two things:

  • one tool, a map with a kind (sections 5.1 and 5.3); or
  • an ordered list of tools, run one after another as a single unit of work (5.2).

Three facts shape everything in this chapter. They are checked at server v3.161.2, worker v6.15.0 and tools v4.6.0, the tool library that worker version uses:

  1. A step holds one worker slot from the moment it is claimed until its tool returns. Waiting inside a tool keeps the slot: an awaited sub-playbook, a polled Kubernetes Job, an LLM call. (Resource model step_kinds.slot_rule, DEFAULT; worker src/worker.rs.)
  2. The worker sets no wall-clock timeout on a command. A step is bounded only by its own tool's timeout, and several kinds have none by default (step_kinds.no_global_timeout, DEFAULT).
  3. Tools do not retry by themselves. A retry configuration exists in the tool library, but no executor applies it (step_kinds.retry_config_inert, DEFAULT). Section 6.5 covers what does retry.

Check your understanding

The Tool Kinds

REAL

The server publishes the list of kinds it accepts in its DSL manifest, orchestrate-core/schema/dsl-manifest.json. At server v3.161.2 (commit 983e36e) the manifest lists 27 kinds. 25 are accepted with no flag set, and 2 are gated, off unless the server sets a flag:

Gated kindServer flagAlso needs
agentNOETL_TOOL_KIND_AGENTa worker started with NOETL_WORKER_AGENT_TOOL=true
mcpNOETL_TOOL_KIND_MCP—

With its flag off, the server refuses a gated kind like any unknown kind. Chapter 18 covers both.

The 25 kinds accepted by default, grouped by what they do:

GroupKinds
Run codepython, shell, rhai, wasm, noop
Query and move datapostgres, duckdb, ducklake, snowflake, snowflake_transfer, transfer, gcs, artifact
Call outhttp, gateway
Run on Kubernetesscript (a Job the worker polls), container (a Job that calls back)
Composeplaybook, playbooks, iterator, workbook, task_sequence
Messaging and secretsnats, subscription, secrets

Accepted means the server's parser takes the kind. Whether a given worker can run it is a separate question. The manifest says so itself: "Which kinds a live worker can execute is reported by workers … and is not known to this process."

Appendix B is generated from the manifest and the resource model. For every kind it gives how a worker executes it, how long it holds a slot, its default timeout, and any measured figures.

How some common kinds run

From the resource model's step_kinds, all DEFAULT values at v3.161.2, citing tools v4.6.0:

KindRuns asHolds the slotDefault timeout
pythona subprocess on the workerfor the whole runnone unless the step sets one
shella subprocessfor the whole runnone unless set
httpin-process (reqwest)for the whole request30 s
postgresin-process, one pool per connection stringfor the whole querynone
duckdbin-processfor the whole querynone; a large query uses the worker pod's memory
rhaiin-processfor the whole scriptnone, and no operation limits
playbooka separate child execution (Chapter 7)only for the start request, unless the parent waits for the result30 s for the start request
containera Kubernetes Jobno: the slot is freed once the Job is creatednone by default
noopin-processbriefly, but it still pays the per-step orchestration cost—

python is a worker kind, not a retired one

Myth

"NoETL dropped Python." What was retired is the Python platform: the old Python server, worker and tools, removed from noetl/noetl in 2026-08 (523 files, 25bef859). Each is now its own Rust repository. kind: python is still a supported tool. On a worker it runs your code in a python3 subprocess (tools v4.6.0 src/tools/python.rs). What has no Python is the local runtime: CLI v6.4.1 refuses kind: python before any step runs.

A python step gets its tool args as a dict named args. It reports a value by setting a global result, or by a top-level return, which the tool wraps in a function for you:

# Chapter 5.1: `kind: python` runs as a subprocess on a worker (distributed
# runtime). The local runtime refuses it (see examples/ch08/python-refused).
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: python_step
workload:
  items: [3, 1, 2]
workflow:
  - step: start
    tool:
      kind: python
      args:
        items: "{{ workload.items }}"
      code: |
        # `args` is a dict of the tool's args; set `result` (or `return` at top level)
        result = {"sorted": sorted(args["items"]), "count": len(args["items"])}

This example needs a worker, so the book's CI validates it against the schema but does not run it.

Local kinds, and fields that differ

The local runtime (CLI v6.4.1) accepts its own set of kinds: agent, auth, duckdb, http, mcp, noop, playbook, provider, rhai, shell and sink. Any other kind is refused before the first step runs, with the list (Chapter 8). Three of those, auth, provider and sink, are local-only: the server's parser does not accept them.

Even a kind both runtimes accept can take different fields. The sharpest case is shell:

Worker (tools v4.6.0)Local (CLI v6.4.1)
Fieldcommand: (one string)cmds: (a string or a list)
Written with the other runtime's fieldcmds: alone fails: command is a required field of ShellConfigcommand: is ignored: the step runs nothing
# Chapter 5.1: the worker's shell tool takes `command:`; the local runtime
# (CLI 6.4.1) takes `cmds:`. Locally, `command:` is ignored: the step runs
# nothing, is not recorded, and the run still ends `ok`.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: shell_command_local
workflow:
  - step: start
    tool:
      kind: shell
      command: echo "this never runs locally"

Locally, this step runs nothing, is not even recorded as executed, and the run still ends ok (checked in CI):

{
  "executed_steps": [],
  "final_result": null,
  "playbook_name": "shell_command_local",
  "status": "ok",
  "step_results": {}
}

So there is no shell step that runs on both runtimes. For examples that must run in both places, this book uses rhai, whose code: field is the same on both sides.

Check your understanding

The Ordered Tool List: One Command, One Slot

REAL

A step's tool can be a list. The tools run in order, each one can use the results of the ones before it, and the step completes when the last one finishes.

# Chapter 5.2: an ordered tool list. The server sends this whole list to ONE
# worker as ONE `task_sequence` command; it holds one slot for all three.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: ordered_tools
workload:
  base: 20
workflow:
  - step: start
    tool:
      - name: fetch                 # flat form: `name` is the label
        kind: python
        args:
          base: "{{ workload.base }}"
        code: |
          result = {"value": int(args["base"]) + 1}
      - double:                     # nested form: the map key is the label
          kind: python
          args:
            value: "{{ fetch.value }}"
          code: |
            result = {"value": int(args["value"]) * 2}
      - name: report
        kind: noop

Each item needs a label, the name its result is known by. There are two ways to write one, and both appear above:

  • flat: a name: field next to kind: (fetch, report);
  • nested: a one-key map whose key is the label (double).

The server's validator refuses a nested item with more than one key, and an empty list (validate_tool_definition, src/playbook/parser.rs, server v3.161.2).

What actually runs

The list is not dispatched one tool at a time. The server turns the whole list into one command of kind task_sequence (build_tool_from_definition, orchestrate-core/src/commands.rs, v3.161.2):

  • One worker claims that command, and one slot is held for the whole list.
  • The sub-tasks run one after another, inside that one command (tools v4.6.0 src/tools/task_sequence.rs).
  • To the rest of NoETL the list is a single step: one command dispatched, one result reported.

Myth

"Each tool in a list is its own task, so a list spreads work across workers." It does not. A three-tool list is one task_sequence command on one worker in one slot, for as long as all three take. Splitting work across workers means separate steps, a parallel loop (6.3), or sub-playbooks (Chapter 7).

That makes the list a good fit for several small, related operations. It saves the per-step orchestration cost between them, which Chapter 22 shows is usually the largest cost. It is a poor fit for work that should run in parallel.

Passing results along the list

Inside the list, each finished sub-task's result is available to the later ones by its label: {{ fetch.value }} or {{ fetch.data.value }}. The double item above reads fetch's result that way. A sub-task can also have:

  • args: (or input:), rendered against everything so far, before the sub-task runs;
  • set:, rendered after it runs, with its result available as output, to carry values forward to the later items;
  • spec.policy.rules, which decide what happens after the sub-task: continue, retry, jump to another label, break or fail. This is the retry mechanism that actually works (6.5).

The server leaves args/input and set unrendered when it builds the command, because they refer to results that only exist on the worker as the list runs.

The step's own result is a map from each label to that sub-task's data. The server also copies each label's fields to the top level, so a later step can read {{ start.double.value }} and also {{ start.value }} (flatten_task_sequence_data, orchestrate-core/src/state.rs). If two sub-tasks return the same field name, which one ends up at the top level is not specified, so use the labelled form.

The iteration cap

A do: jump rule can send the list back to an earlier label, so a list can loop. To stop a loop that never reaches its break, the sequence counts every sub-task execution, jumps and retries included. Above the cap it stops with the error max_iterations_exceeded.

SettingDefaultLabel
NOETL_TASK_SEQUENCE_MAX_ITERATIONS (worker env)1,000,000 sub-task executions per stepDEFAULT (tools v4.6.0 task_sequence.rs)

It is the only iteration cap in the server, worker and tools code at these versions. Loops and back-edges between steps have none (Chapter 6).

Not on the local runtime

The local runtime cannot read a tool list

At CLI v6.4.1 a step whose tool: is a list fails to parse, with workflow[0].tool[0]: invalid type: map, expected variant identifier, and nothing runs. CI checks this (examples/ch05/pipeline-refused-local). The example above is a distributed one: CI validates it against the schema but does not run it.

Check your understanding

Results, References and Size Limits

REAL

When a tool finishes, the worker reports its result in an event. Later steps read that result through templates. This section covers what a result looks like to a template, and what happens when a result is too big to travel in an event.

Reading a result on the server

The worker wraps a tool's output in an envelope: status, data, stdout, stderr and so on. The server unwraps the data part (extract_user_data, orchestrate-core/src/state.rs, v3.161.2) and exposes it to later templates under the step's name:

WriteTo get
{{ fetch_user.email }}the field email of step fetch_user's data
{{ fetch_user.data.email }}the same thing (an alias, so both spellings work)
{{ steps.fetch_user }}the full envelope, status included
{{ output.email }}inside fetch_user's own set: and next arcs: its data

To keep a value as a named variable, use set: on the step (4.2):

- step: fetch_user
  tool:
    kind: http
    method: GET
    url: "https://api.example.com/v1/users/{{ workload.user_id }}"
  set:
    ctx.email: "{{ output.email }}"     # later: {{ email }}
  next:
    - step: notify

A loop step's result is a list, one entry per iteration, in the order the iterations finished, which in parallel mode need not be the order they started (6.3). A tool list's result is a map keyed by label (5.2).

Reading a result locally

The local runtime (CLI v6.4.1) keeps each step's result as text:

  • {{ fetch_user.result }} is the whole result as a string;
  • inside that step's own vars:, {{ result.email }} reads a field of the result, if it parses as JSON.

So {{ fetch_user.email }}, the server form, is left unrendered locally, and {{ fetch_user.result }}, the local form, renders empty on a server. Chapter 8 has the full list of differences.

Size limits

A step's result travels in an event, and a step's command carries a rendered context. Both have size limits. Above them, the data moves by reference instead of inline. All values are code defaults from the resource model at v3.161.2; a deployment may override them.

WhatLimitSettingAbove the limit
A step result in an event100 KiB (102,400 bytes)NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES (worker)spilled to the result store and replaced by a reference, so a later read costs a fetch
A command's context512 KiB (524,288 bytes)NOETL_COMMAND_CONTEXT_MAX_BYTES (server)offloaded as a __context_ref__
A request body to /api/execute or /api/events2 MiB (2,097,152 bytes)none: the HTTP framework's defaultthe request is refused

Each is labelled DEFAULT in the resource model (Appendix D), with sources worker src/executor/command.rs and server src/config/app.rs, src/main.rs.

Two practical consequences:

  • Returning a large payload from a step is not free. Every later read of it fetches it back. If a later step needs only a count or an id, return just that.
  • Large data belongs in a data store that a step writes to and the next step reads from: a table, a bucket, a DuckDB file. Do not pass it through results. This is also the execution model's rule: data access happens inside steps, and the event log records what happened, not the data itself (Chapter 3).

Check your understanding

Control Flow

REAL

A playbook's steps say what to do. Their next, when and loop keys say in what order, whether and how many times. This chapter covers all three, plus what happens when a step fails (6.5).

Control flow is where most wrong beliefs about NoETL live, so every rule here is tied to the code that implements it. Server rules are from the orchestrator in orchestrate-core at server v3.161.2 (commit 983e36e). It is the same engine whether the server drives an execution itself or runs it as WASM on a worker. Local behaviour is from CLI v6.4.1, and every local claim is a CI example.

How an execution moves

The server does not run a playbook as a script from top to bottom. It reacts to events:

  1. The execution starts by dispatching the step named start.
  2. When a step finishes, the worker reports it with a completion event. That event triggers an orchestration pass.
  3. In each pass the orchestrator evaluates the next arcs of the completed steps, applies their when guards, and dispatches the targets that are taken. A target that is not taken is recorded with a step.skipped event.
  4. Steps dispatched in the same pass run at the same time, each in its own worker slot.

The whole history, including every dispatch, completion and skip, is the execution's event log (Chapter 3).

When an execution is finished

An execution completes when nothing is still running and either a step named end has completed, or some step with no next has completed (check_completion, orchestrate-core/src/orchestrator.rs). It fails when a step fails and nothing else is still running (6.5).

There is a third outcome, and it surprises people.

A branch whose arcs all fail stalls the execution

If a step has next arcs and none of them is taken (every when is false), nothing is dispatched. That step is not a step "with no next", so it does not count as an ending either. If nothing else is running, the execution is neither completed nor failed: it has no terminal event and stays in progress.

The server's own sweep for this shape ("all branches evaluated false, no successor issued", src/handlers/nonconvergence_sweep.rs) is off by default (nonconvergence_sweep_enabled: false). When it is turned on, it fails such an execution after a 24-hour grace period.

Always give a router a final arc with no when, a default branch, unless a stall is what you want.

end is a convention, not a keyword. The engine treats a target named end specially. The validator, though, requires every next target to be a step in the playbook. So to route to end, define a step called end.

Sections

Check your understanding

next and Routers

REAL

next says where control goes when a step finishes. It has four forms. The server tries them in this order when it parses the YAML (NextSpec, orchestrate-core/src/playbook.rs, v3.161.2):

#FormExampleTaken on the server
1one step namenext: reportalways
2a list of namesnext: [a, b]all of them, in parallel
3a list of targets {step, when?, args?}next: [{step: a, when: …}, {step: b}]by mode, exclusive by default
4a router {spec: {mode}, arcs: [{step, when?, set?}]}see belowby mode, exclusive by default

All four in one playbook (examples/ch06/next-forms, a distributed example that CI validates against the schema):

# Chapter 6.1: the four forms of `next`, on a server. Each form is one step.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: next_forms
workload:
  tier: gold
workflow:
  - step: start
    tool: { kind: noop }
    next: by_name                      # 1. one step name: always taken
  - step: by_name
    tool: { kind: noop }
    next: [fan_a, fan_b]               # 2. a list of names: ALL taken (fan-out)
  - step: fan_a
    tool: { kind: noop }
    next:                              # 3. a list of {step, when, args}: exclusive by default
      - step: gold_path
        when: "{{ workload.tier == 'gold' }}"
        args: { reason: gold }
      - step: other_path
  - step: fan_b
    tool: { kind: noop }
    next:                              # 4. a router: spec.mode + arcs
      spec: { mode: inclusive }        #    inclusive = every matching arc
      arcs:
        - step: audit
          when: "{{ workload.tier in ['gold', 'silver'] }}"
        - step: notify
          set: { ctx.channel: email }  #    arc-level set: mutations for the target
  - step: gold_path
    tool: { kind: noop }
  - step: other_path
    tool: { kind: noop }
  - step: audit
    tool: { kind: noop }
  - step: notify
    tool: { kind: noop }

Exclusive and inclusive

Forms 3 and 4 decide which targets to take by mode (evaluator.rs, v3.161.2):

  • exclusive (the default): take the first target, in the order written, whose when is true or absent. Later targets are not evaluated at all; they are recorded as skipped.
  • inclusive: take every target whose when is true or absent. All are dispatched in the same pass, so they run in parallel.

A router reads its mode from next.spec.mode. A list of targets reads it from the step's spec.next_mode. If neither is set, the mode is exclusive. A misspelt mode value also means exclusive: any string other than inclusive does.

Myth

"next: [{step: a}, {step: b}] runs a and b." It runs only a. A list of targets is exclusive by default, and a target without when always matches, so the first one wins and b is skipped. To run both, write a list of names (next: [a, b]), or set spec.next_mode: inclusive on the step, or use a router with mode: inclusive.

Passing values along an arc

  • A target in form 3 may carry args, a map merged as-is into the target step's dispatch context. It is not rendered.
  • An arc in form 4 may carry set, a map whose values are rendered against the current context and written with the same ctx. / iter. / step. prefix-stripping as step-level set: (4.2). It affects the context of the step it dispatches. Unlike a step's own set:, it is not written to the event log as a ctx.updated event.

Routers do not take args, and the grammar's own comment says arc args: is not supported. Use set.

On the local runtime

The local runtime (CLI v6.4.1) implements forms 3 and 4 the way the server does, except that "in parallel" becomes "one after another" in one process. CI checks both:

  • examples/ch06/next-targets: a list of targets runs only the first, so executed_steps is ["start","a"];
  • examples/ch06/next-router-inclusive: an inclusive router runs both, so executed_steps is ["start","a","b"].

It does not implement forms 1 and 2:

# Chapter 6.1 (local, CLI 6.4.1): `next: <name>` and `next: [names]` are IGNORED locally; the run stops after `start` and still ends ok.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: next_names_local
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        "start"
    next: [a, b]
  - step: a
    tool:
      kind: rhai
      code: |
        "a"
  - step: b
    tool:
      kind: rhai
      code: |
        "b"
{
  "executed_steps": [
    "start"
  ],
  "final_result": "start",
  "playbook_name": "next_names_local",
  "status": "ok",
  "step_results": {
    "start": "start"
  }
}

```admonish warning title="Locally, next: b and next: [a, b] do nothing" At CLI v6.4.1, a next that is a bare name or a list of bare names is ignored. The run stops after the step, with status ok and no warning. For a playbook that must run locally too, write targets (next: [{step: b}]) or a router.


## Check your understanding

<div class="quiz-placeholder" data-quiz-name="&quot;ch06-01&quot;" data-quiz-questions="{&quot;questions&quot;:[{&quot;context&quot;:&quot;A list of TARGETS is exclusive by default, and a target without `when` always\nmatches, so the first wins and `b` is skipped. `next: [a, b]` (a list of\nNAMES) would run both.\n&quot;,&quot;id&quot;:&quot;120d7a7d-513e-4c63-8989-9105531e3686&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;Only `a`.&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;`a` and `b`, in parallel.&quot;,&quot;`a`, then `b`.&quot;,&quot;Neither: targets need `when`.&quot;],&quot;prompt&quot;:&quot;On a server, which steps run after `next: [{step: a}, {step: b}]`?&quot;}},{&quot;context&quot;:&quot;`NextMode` defaults to Exclusive, and any string other than `inclusive`\n(including a typo) parses as exclusive (orchestrate-core `evaluator.rs`).\n&quot;,&quot;id&quot;:&quot;352b820e-b4bd-4d60-ac18-948a02cf9026&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;exclusive, unless the step's `spec.next_mode` says otherwise&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;inclusive&quot;,&quot;parallel&quot;,&quot;It is a validation error.&quot;],&quot;prompt&quot;:&quot;A router omits `spec.mode`. Which mode applies?&quot;}},{&quot;context&quot;:&quot;Locally only target lists and routers are implemented. CI asserts this\n(`examples/ch06/next-names-ignored-local`).\n&quot;,&quot;id&quot;:&quot;2d031a66-6c9d-442e-8e8d-8c0c2befe8ef&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;Nothing: the bare-name forms are ignored locally and the run ends `ok`.&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;`a` and `b`.&quot;,&quot;`a` only.&quot;,&quot;The run fails to parse.&quot;],&quot;prompt&quot;:&quot;On the local runtime (CLI v6.4.1), a step has `next: [a, b]`. What runs after it?&quot;}}]}" data-quiz-cache-answers="true"></div>


<script type="text/javascript" src="quiz/quiz-embed.iife.js"></script><link rel="stylesheet" type="text/css" href="quiz/style.css">

when Guards

REAL

A when is a condition, written as a template. It appears in two places, and they are evaluated at different moments.

WhereEvaluatedIf false
on an arc (next target or router arc)when the step it leaves has completed, in the next orchestration passthat arc is not taken
on a step (step.when)when the step is about to be dispatched by an arcthe step is skipped (see below)

Arc guards: after the step completes

An arc's when is evaluated only in an orchestration pass, and a pass is triggered by a completion event such as command.completed (orchestrator.rs, v3.161.2). So the guard can use the result of the step it leaves:

- step: check_status
  tool:
    kind: http
    method: GET
    url: https://api.example.com/v1/jobs/{{ workload.job_id }}
  next:
    spec: { mode: exclusive }
    arcs:
      - step: done
        when: "{{ output.state == 'finished' }}"
      - step: failed
        when: "{{ output.state == 'error' }}"
      - step: wait_and_retry          # default arc: no `when`

In an arc guard, output is the completed step's result data, and {{ check_status.state }} means the same thing. Everything else a template can see (4.2) is available too.

Step guards: before the step runs

A step's own when is checked when an arc is about to dispatch it, against the context that arc would give it, its set included. When it is false, the server (v3.161.2, orchestrator.rs):

  1. records a step.skipped event for the step;
  2. follows the skipped step's own next, taking only the first matching arc, and checks the guard of that step in turn;
  3. stops if there is no matching arc; that path of the workflow ends there.

So a step guard skips one step, not the rest of the path.

Note

The start step's when is never evaluated: the server dispatches start directly when the execution begins.

What counts as true

The server renders the guard with minijinja. If you omit {{ }}, it adds them. Then it compares the rendered text. These values are false, compared case-insensitively after trimming: an empty string, false, 0, no, none, null, off, {} and []. Anything else is true (evaluate_condition, orchestrate-core/src/template.rs). Two consequences:

  • {{ a and b }} renders the value of b when a is true, as Python's and does, so a non-empty value counts as true.
  • An undefined name renders as an empty string, so a guard on a misspelt variable is false.

On the local runtime

The local runtime (CLI v6.4.1) supports a smaller condition language: ==, !=, 'x' in y, and a bare value tested for truthiness with the same false-like words. It has no < or > and no and / or (evaluate_condition, executor/src/condition.rs). For anything more, compute the decision in a rhai step and test its result. The local runtime also differs from the server in two ways that change which path a run takes. CI checks both:

# Chapter 6.2 (local, CLI 6.4.1): an undefined name in a condition is left in place, so the guard is TRUE locally. On a server it renders empty: FALSE.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: when_undefined_local
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        "start"
    next:
      - step: a
        when: "{{ workload.not_set }}"
      - step: b
  - step: a
    tool:
      kind: rhai
      code: |
        "a"
  - step: b
    tool:
      kind: rhai
      code: |
        "b"
{
  "executed_steps": [
    "start",
    "a"
  ],
  "final_result": "a",
  "playbook_name": "when_undefined_local",
  "status": "ok",
  "step_results": {
    "a": "a",
    "start": "start"
  }
}

An undefined name is TRUE locally

Locally, an unknown name is left in the template as text, and non-empty text is true. So when: "{{ workload.not_set }}" takes the arc locally (above: a ran). On a server, the same guard renders empty and is false.

# Chapter 6.2 (local, CLI 6.4.1): a false step `when` ends the branch locally. On a server, `a` is skipped and its `next` (b) is still followed.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: when_skip_local
workload:
  go: "false"
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        "start"
    next:
      - step: a
  - step: a
    tool:
      kind: rhai
      code: |
        "a"
    when: "{{ workload.go }}"
    next:
      - step: b
  - step: b
    tool:
      kind: rhai
      code: |
        "b"
{
  "executed_steps": [
    "start"
  ],
  "final_result": "start",
  "playbook_name": "when_skip_local",
  "status": "ok",
  "step_results": {
    "start": "start"
  }
}

A false step guard ends the branch locally

Locally, a step whose when is false is skipped and its branch ends: b never runs. On a server, a is skipped and its next is followed, so b runs.

Check your understanding

loop: One Step, Many Items

REAL

NoETL has two ways to repeat work, and both are real:

  1. loop: on a step runs that step once per item of a collection (this section).
  2. Back-edges: an arc that goes back to an earlier step, guarded by when (6.4).
# Chapter 6.3: a parallel loop. The server dispatches ALL items at once;
# max_in_flight is parsed but nothing reads it (server v3.161.2).
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: loop_parallel
workload:
  cities: [Lisbon, Oslo, Quito]
workflow:
  - step: start
    loop:
      in: "{{ workload.cities }}"
      iterator: city
      spec:
        mode: parallel
        max_in_flight: 1              # no effect: all three are dispatched together
    tool:
      kind: python
      args:
        city: "{{ iter.city }}"       # also {{ city }}, {{ iter._index }}, {{ iter._total }}
      code: |
        result = {"city": args["city"], "len": len(args["city"])}
    next:
      - step: summarize
  - step: summarize                   # here {{ start }} is the loop's result: a list
    tool: { kind: noop }

The keys

KeyMeaning
loop.inA template that evaluates to a list. Required for sequential and parallel.
loop.iteratorThe name each item gets. Must not be empty.
loop.spec.modesequential (the default), parallel, or cursor
loop.spec.max_in_flightParsed, and ignored (see below)

Inside the loop body each item is available as {{ iter.<iterator> }} and also as plain {{ <iterator> }}, together with {{ iter._index }} and {{ iter._total }}, which are also available plain as _index and _total. The same values are injected into the tool's args (build_iteration_command, orchestrate-core/src/commands.rs, v3.161.2). There is no loop.index.

Sequential and parallel

These were checked in orchestrator.rs at v3.161.2:

  • sequential dispatches item 0. Each time an item completes and nothing else of the loop is in flight, it dispatches the next. One slot at a time.
  • parallel dispatches every item at once: dispatch_count = if is_parallel { total } else { 1 }. A 500-item parallel loop puts 500 commands on the bus in one pass. They run as fast as there are free worker slots, so a large loop can occupy a whole pool.

Myth

"max_in_flight limits how many items of a parallel loop run at once." It does not. At server v3.161.2, loop.spec.max_in_flight is parsed into the grammar and nothing reads it: not the orchestrator, not the server, not the worker. The server's resource model says the same: "max_in_flight is parsed but has no reader, so it does not throttle anything". To bound concurrency today, use sequential mode, split the collection across steps, or size the worker pool (Chapter 10).

The loop's result

When the last item completes, the step completes. Its result is a list of each iteration's result, in the order the iterations completed. In parallel mode that need not be the order of in:; the code says so itself: "may not match dispatch index in parallel mode" (state.rs). If order matters, have each iteration return its own index or key.

An empty collection completes the step at once, with the result [] and no commands dispatched.

cursor mode

mode: cursor is for draining a work queue rather than a fixed list. Instead of in:, the loop has a cursor.claim query (a postgres tool by default) that atomically leases a batch of rows, for example with FOR UPDATE SKIP LOCKED. The body runs once per claimed row, loop.spec.frame.row_concurrency rows at a time (default 1). When the batch is done, the next one is claimed. A claim that returns no rows ends the loop. frame.max_rows caps each claim. The lease and heartbeat fields are documented as advisory. Cursor mode is used only when a playbook asks for it.

On the local runtime

```admonish warning title="The local runtime ignores loop:" At CLI v6.4.1 the local runtime parses loop: but has no code that reads it. A loop step runs once, as if loop: were not there, and the run ends ok. CI checks this (examples/ch08/loop-runs-once). Locally, iterate with a back-edge (6.4) or inside one step: a set-based DuckDB query, or a Rhai script. Chapter 8 covers local iteration.


The examples on this page are distributed. CI validates them against
the schema but does not run them.

## Check your understanding

<div class="quiz-placeholder" data-quiz-name="&quot;ch06-03&quot;" data-quiz-questions="{&quot;questions&quot;:[{&quot;context&quot;:&quot;Parallel mode dispatches every item at once, and `max_in_flight` has no\nreader at server v3.161.2. Slots then decide how many RUN at once, but all\n400 are queued.\n&quot;,&quot;id&quot;:&quot;623e6c5d-c981-49c2-8942-de68d1737040&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;400&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;10&quot;,&quot;1&quot;,&quot;As many as there are free slots.&quot;],&quot;prompt&quot;:&quot;A parallel loop over 400 items sets `max_in_flight: 10`. How many iteration\ncommands does the server dispatch in the first pass?\n&quot;}},{&quot;context&quot;:&quot;Results are appended in arrival order, which \&quot;may not match dispatch index in\nparallel mode\&quot; (`state.rs`). Return an index or key from each iteration if\norder matters.\n&quot;,&quot;id&quot;:&quot;9e6dbfb4-10c1-49e1-9ebb-eda84344db2a&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;The order the iterations completed.&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;The order of the `in:` collection.&quot;,&quot;Sorted by item value.&quot;,&quot;Random, reshuffled on each read.&quot;],&quot;prompt&quot;:&quot;In what order are a parallel loop's results in its aggregated list?&quot;}},{&quot;context&quot;:&quot;The server binds the item both under `iter.` and at the top level, with\n`_index` and `_total`. There is no `loop.*` namespace.\n&quot;,&quot;id&quot;:&quot;1c466bf2-1891-480f-8fd1-e0928364a79a&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;`{{ iter.city }}` (or plain `{{ city }}`)&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;`{{ loop.item }}`&quot;,&quot;`{{ loop.city }}`&quot;,&quot;`{{ item }}`&quot;],&quot;prompt&quot;:&quot;How does a loop body refer to the current item when `iterator: city`?&quot;}}]}" data-quiz-cache-answers="true"></div>


<script type="text/javascript" src="quiz/quiz-embed.iife.js"></script><link rel="stylesheet" type="text/css" href="quiz/style.css">

Back-Edges: Loops Made of Arcs

REAL

A back-edge is an arc to a step that has already run. Guarded by when, it turns part of the workflow into a loop: fetch a page, check whether there is another, go back and fetch again. This is how NoETL expresses loops whose length is not known in advance, such as pagination, polling and retries of a whole step.

# Chapter 6.4: a back-edge loop on a server. `fetch_page` runs once per page;
# the arc back to it is guarded by the page counter. Nothing else bounds it.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: back_edge
workload:
  pages: 3
workflow:
  - step: start
    tool: { kind: noop }
    set:
      ctx.page: 0                     # becomes {{ page }}
    next:
      - step: fetch_page
  - step: fetch_page
    tool:
      kind: python
      args:
        page: "{{ page }}"
      code: |
        result = {"page": int(args["page"]) + 1}
    set:
      ctx.page: "{{ output.page }}"   # persisted as a ctx.updated event
    next:
      spec: { mode: exclusive }
      arcs:
        - step: fetch_page            # the back-edge: an arc to a step that already ran
          when: "{{ page | int < workload.pages | int }}"
        - step: done
  - step: done
    tool: { kind: noop }

The loop variable travels in set:. Each completion of fetch_page persists page as a ctx.updated event, so the next pass, and the re-dispatched step, sees the new value (4.2).

How the server recognises one

Every completion event triggers a pass that re-evaluates the arcs of every completed step, so the orchestrator must tell a real loop from a stale arc. An arc from src to target is treated as a back-edge, and re-dispatches target, only when all three of these hold (orchestrator.rs, v3.161.2):

  1. target has already finished;
  2. target can reach src through the workflow, so there is a cycle;
  3. src finished after target, or the arc is a self-loop.

Re-dispatching does not reset anything. A step's state and its result are kept by step name, so each new completion overwrites the previous result. If you need every page's result, collect them yourself, in set: or in a data store. Back-edges are also left out of fan-in barriers, so a step that waits for several branches does not wait for a loop's earlier iterations.

Nothing bounds it but your guard

Myth

"The server stops a runaway loop after some number of iterations." It does not. At v3.161.2 there is no cap on how many times a back-edge can re-run a step, and none on how many items a loop: can have. A search of the server, worker and tools for iteration or re-entry limits finds only the tool-list cap, which counts sub-tasks inside one step (5.2). The when on the back-edge is the only thing that ends the loop.

A related setting is easy to mistake for a cap. NOETL_RECONCILE_MAX_NOOPS (default 225, about 30 minutes at the 8 s reconcile tick) stops the server re-driving an execution that is making no progress. A loop that is making progress resets it, so it is not a bound on a loop.

So before shipping a back-edge, answer the question in this section's quiz: will this loop terminate? The guard must reach false on every path, for example a counter compared to a limit, or a "has more" flag that the source eventually clears.

On the local runtime

Back-edges work locally (CLI v6.4.1), with the local variable rules: the counter travels in step vars:, not set:. This version runs in CI:

# Chapter 6.4 (local, CLI 6.4.1): a back-edge loop. `count` re-runs until its
# guard fails. Locally the counter travels in step `vars:` (the server ignores
# those; see examples/ch06/back-edge for the server form).
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: back_edge_local
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        0
    vars:
      n: "{{ start.result }}"
    next:
      - step: count
  - step: count
    tool:
      kind: rhai
      code: |
        {{ vars.n }} + 1
    vars:
      n: "{{ count.result }}"
    next:
      - step: count
        when: "{{ vars.n != 3 }}"
      - step: done
  - step: done
    tool:
      kind: rhai
      code: |
        "finished at {{ vars.n }}"
{
  "executed_steps": [
    "start",
    "count",
    "done"
  ],
  "final_result": "finished at 3",
  "playbook_name": "back_edge_local",
  "status": "ok",
  "step_results": {
    "count": "3",
    "done": "finished at 3",
    "start": "0"
  }
}

count ran three times, but executed_steps lists it once, because the local result lists each step the first time it runs. The local runtime has no cap either. An unguarded back-edge was observed still running, with no output, when it was stopped after 60 seconds.

Check your understanding

Errors, Timeouts and Retries

PARTIAL

This page is PARTIAL because most of the error-handling keys in the grammar are parsed and then ignored. The grammar describes more than the engine does. The table below separates the two, checked at server v3.161.2, worker v6.15.0 and tools v4.6.0 by searching for every reader of each key.

KeyIn the grammarApplied?
spec.on_error (fail / continue / retry)yes (StepSpec)no: no reader in server, worker or tools
spec.timeout ("30s", "5m")yes (StepSpec)no: no reader; step commands carry no timeout
tool.eval (continue / retry / break / jump / fail, with attempts, backoff, delay)yes; the validator checks the action namesno: copied into the command, and no worker or tool reads it
the tool library's retry setting—no: "parsed but no executor applies it" (resource model retry_config_inert)
spec.policy.rules on a sub-task of a tool listyesyes: inside task_sequence only
a tool's own timeout_secondsper kindyes, for the kinds that read it

Myth

"Set spec.on_error: retry (or retry:) and NoETL will retry a failed step." Nothing does that at these versions. on_error, spec.timeout and tool.eval are accepted, validated in part, and then never consulted. A failed step fails.

What does retry: policy rules in a tool list

Inside an ordered tool list (5.2), each sub-task may carry spec.policy.rules. After the sub-task runs, the first rule whose when matches decides what happens (task_sequence.rs, tools v4.6.0):

tool:
  - name: call_api
    kind: http
    method: GET
    url: https://api.example.com/v1/report
    spec:
      policy:
        rules:
          - when: "{{ output.status == 'error' and _attempt < 3 }}"
            then: { do: retry, delay: 2, backoff: exponential }
          - when: "{{ output.status == 'error' }}"
            then: { do: fail }
          - else:
              then: { do: continue }
  • do is continue, retry, jump (with to: <label>), break or fail. An unknown or missing do means continue.
  • retry defaults to 3 attempts, backoff: none and a delay of 1.0 s. backoff may also be linear or exponential.
  • A rule's when sees output (status, data, error) and the attempt number _attempt.
  • When no rule matches, an error means fail and success means continue.

To retry a single tool this way, make it a one-item tool list. To retry a whole step, use a back-edge with a counter (6.4).

Timeouts

The worker sets no wall-clock limit on a command (resource model no_global_timeout, DEFAULT). Each tool kind brings its own default, from the resource model at v3.161.2:

KindDefault timeout
http30 s; per-request timeout_seconds overrides it
mcp60 s (NOETL_MCP_REQUEST_TIMEOUT_SECONDS)
script600 s, also the Job's deadline
agent300 s per model request
python, shellnone unless the step sets timeout_seconds
postgres, duckdb, rhai, transfernone

All are DEFAULT. Appendix B lists every kind. A step with no timeout that hangs holds its worker slot indefinitely.

What a failure does

When a step's command fails (command.failed), the server (orchestrator.rs, v3.161.2):

  • does not follow the failed step's next arcs: there is no "on failure, go to …" arc;
  • if other steps are still running, waits. The comment in the code says each in-flight branch gets to record its own outcome;
  • once nothing is running, ends the execution FAILED, with Failed steps: <names>.

Partial

Sibling branches keep running after a failure, and their completions are handled by the normal path, which can dispatch their successors. A failed step also counts as "done" for a fan-in barrier, so a step that joins branches can still run after one branch failed. How the final status is decided when the last sibling finishes successfully is in code this book has read but not run. Treat that case as unverified.

On the local runtime (CLI v6.4.1), the first failing step stops the whole run with an error, and nothing after it runs. CI checks this (examples/ch06/failure-local).

Check your understanding

Composition: Sub-Playbooks

REAL

A step can run another playbook. That is how NoETL composes larger workflows from smaller ones, and how one playbook reuses another, such as a provider integration, an MCP wrapper or a shared clean-up. The tool is kind: playbook.

This chapter covers what such a call creates (7.1) and what it costs (7.2). The cost is often more than the work inside the child. Facts are from tools v4.6.0 (the tool library worker v6.15.0 uses) and the resource model at server v3.161.2.

Check your understanding

kind: playbook and Child Executions

REAL

# Chapter 7: a parent that awaits a child playbook's result (distributed runtime).
# The child is a separate execution; with return_result the parent's slot is held,
# polling every 2 s, until the child finishes.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: parent
  path: book/ch07/parent
workflow:
  - step: start
    tool:
      kind: playbook
      path: book/ch07/child          # the child's catalog path
      args:
        city: Lisbon
      return_result: true            # wait, and make the child's result this step's result
      result_step: start             # which child step's result to return
      timeout: 60                    # seconds to wait (default 180 with return_result)
    next:
      - step: use_it
  - step: use_it
    tool:
      kind: python
      args:
        weather: "{{ start.forecast }}"
      code: |
        result = {"summary": "Lisbon: " + str(args["weather"])}

(A distributed example: CI validates it against the schema but does not run it.)

What the call creates

On a cluster, a kind: playbook step does not run the child inside the parent. The worker calls the server's POST /api/execute and starts a separate execution of the child, which has its own event log (Chapter 3) and runs on whatever worker pool its own steps target. The worker sends the parent's id with the request, so the child carries a parent_execution_id (src/tools/playbook.rs, tools v4.6.0). A step can override it with parent_execution_id:.

The step's fields include:

FieldMeaning
paththe child's catalog path (and optionally version, digest)
argsthe child's inputs, sent as the payload of its execute request (payload: is accepted too)
return_resulttrue: wait for the child and use its result as this step's result
result_stepwith return_result: which child step's result to return. Unset: the latest call.done result
return_steplegacy: wait, and return the child's status payload instead of its data
timeoutseconds: the start request (default 30), and also the wait (default 180 with return_result, 300 with return_step)
poll_intervalseconds between status polls while waiting (default 2, minimum 1)

All the defaults are DEFAULT values in tools v4.6.0.

Fire-and-forget or await

Default (async)return_result: true (or return_step)
The step returnsas soon as the child starts, with {status, execution_id}when the child finishes, with its result
The parent's slot is heldonly for the start requestfor the whole wait, polling every 2 s
On timeout—return_result: the step fails. It does not return an empty result

The default is async: a parent that does not ask to wait only starts the child. return_result is opt-in because, as the source puts it, the 100+ existing callers keep their async semantics. An operator kill-switch, NOETL_PLAYBOOK_AWAIT_CHILD_RESULT (default true), can turn return_result back into the legacy status payload.

An awaiting parent and its child can deadlock a small pool

While a parent awaits, it holds a slot and its child needs one. If both run on the same small pool, enough concurrent awaiting parents can occupy every slot, and no child can start. The resource model's guidance is to budget two slots per awaiting parent and to avoid sending both to a small pool (step_kinds deadlock_note, GUIDANCE).

Calling another NoETL instance

path can also name a playbook on another NoETL instance (noetl://<instance>/<path> or peer/<instance>/<path>), with remote: import | delegate. That is gated on the server and covered in Chapter 17.

Locally

The local runtime runs kind: playbook in the same process, with path relative to the parent file. input: becomes the child's workload. As on a cluster, the step has no result unless it sets return_result: true (examples/ch08/sub-playbook, CI). See 8.2. The two runtimes use different field names for the child's inputs: args on a worker, input locally.

Check your understanding

What a Hop Costs

REAL

A hop is one kind: playbook call. It is never free: the child is a whole execution, with its own dispatch, claims, events and completion, on top of whatever work it does. The cost is real and was measured. The improvements planned since then are not built, so they appear below as TARGET.

Measured

From the resource model (step_kinds, kind: playbook, server v3.161.2), all MEASURED on prod:

FigureWhatWhenSource
~9 sorchestration cost of one hop, regardless of the work inside it2026-08-24noetl/travel wiki, itinerary planner (#286)
~10–15 s per hopthe same work as a child vs inline: a 369 ms Firestore read took 11.4 s as a child; 663 ms of Places work took 1.5 s inline2026-08noetl/travel wiki, itinerary planner, latency
34.7 s → 19.4 s median (−44 %)a paired A/B test: provider children inlined into the planner as python steps2026-06-29noetl/ai-meta Sessions-Log

Read each one with its date. The resource model's own caveat: several of these figures predate later dispatch fixes, so "measure on the target cluster at the target load before committing to a budget".

Not yet measured

The latency-reduction build plan (ai-meta PR #556, docs/rfc/latency-reduction-plan.md, open, design only) gives an awaited hop at about ~3–5 s today. It labels that figure predicted, next to the 9–15 s MEASURED in 2026-08. In this book's labels that is NOT_YET_MEASURED: a real question without a measured answer.

Not built yet (TARGET)

The plan's later stages aim to remove the 0–2 s poll per awaited hop and to return the awaiting parent's slot, and finally to turn a pure child hop into a function call inside one compiled WASM run. All of that is design only (PR #556, open), with each stage's flags off by default.

The heuristic

The resource model's GUIDANCE:

Prefer an inline python step to a kind: playbook child when the child only wraps one call: each hop measured ~9-15 s of orchestration on prod, and inlining cut a planner turn by 44%.

So use a sub-playbook when you get something real for the cost: reuse across many parents, a separate pool or credentials, independent failure, or a child that is itself a large workflow. Don't use one to wrap a single call.

To estimate a playbook's wall clock, the resource model's rule is steps × per-step overhead + Σ step work + hops × hop overhead (GUIDANCE). Chapter 21 and Chapter 22 take it further.

Check your understanding

The Local Runtime: noetl run

REAL

The local runtime runs a playbook inside the noetl CLI process, with no server, no bus and no workers. It is the fastest way to try a playbook, and it is how the book's CI runs its examples. It is also a different implementation from the server's: it parses the same grammar, but it supports fewer tool kinds, ignores some keys, and has its own template and condition rules. This chapter is the complete list of those differences at CLI v6.4.1. Every claim here is either a CI example or a line of the CLI's source at that tag.

Which runtime runs a playbook

noetl run <ref> picks its runtime with a three-rung ladder (resolve_runtime, src/lib.rs, CLI v6.4.1):

  1. -r / --runtime, if it is local or distributed. The value auto, which is also the default, means "not set".
  2. Otherwise, the active context's runtime, unless that is auto or unset. Contexts are managed with noetl context.
  3. Otherwise, local.

Every run prints its choice and where it came from on standard error, for example runtime: local (default), runtime: local (--runtime flag) or runtime: distributed (from context 'prod'). A stale context therefore never silently sends a run to a server.

The <ref> can be a file path, a catalog://name@version reference or a catalog id. The local runtime runs files. A catalog reference needs -r distributed.

What the local runtime is good for

  • learning the DSL, and fast iteration on control flow;
  • playbooks built from http, duckdb, rhai, shell and playbook steps that run on one machine;
  • CI checks of playbook logic, as this book does.

What it is not: a way to test a cluster playbook end to end. Sections 8.2 and 8.3 show why.

Sections

Check your understanding

One Process, One Interpreter

REAL

The local runtime is a tree-walking interpreter in src/playbook_runner.rs (CLI v6.4.1). It reads the YAML, checks the kinds, and then calls steps: running a step means running its tool and then calling execute_step on each next target it takes. So:

  • Everything is sequential. An inclusive router or a fan-out runs its targets one after another, in one process.
  • A back-edge is a recursive call. A loop of N passes is N nested calls. An unguarded back-edge simply keeps running: one was observed still running, with no output, when it was stopped at 60 seconds.
  • The first failing step ends the run with an error. There is no failure routing (6.5).
  • It starts at the first step in workflow, not at start, unless you pass --target <step> (4.3).

The differences from the server

Every difference the book has found so far, in one place. Each row links to where it is shown, and most are CI examples that would fail if the behaviour changed.

AreaServer (v3.161.2)Local (CLI v6.4.1)Shown in
First stepstartfirst in the listexamples/ch04/step-order
Templatesminijinja; undefined → emptyexact {{ name }} tokens, 4 filters; unknown left in placeexamples/ch04/templating
Passing valuesstep set:step vars:examples/ch04/variables-local
A step's result{{ step.field }}{{ step.result }} (text)5.3
next: name, next: [a, b]takenignoredexamples/ch06/next-names-ignored-local
False step whenskip, follow its nextskip, branch endsexamples/ch06/when-skip-local
Undefined name in a guardfalsetrueexamples/ch06/when-undefined-local
Conditionsfull Jinja==, !=, in, truthy6.2
loop:iteratesruns onceexamples/ch08/loop-runs-once
Tool list (task_sequence)one commandparse errorexamples/ch05/pipeline-refused-local
shell fieldcommand:cmds: (command: ignored)examples/ch05/shell-command-local
case: blocksrefusedstill run4.3
Event trailevery passeach step onceCh. 2

Warning

Several of these differences fail silently: the run ends with status ok and no warning. A playbook that "works locally" has been checked against the local runtime, not against a server.

Check your understanding

Local Tool Kinds and Their Limits

REAL

At CLI v6.4.1 the local runtime accepts eleven kinds: shell, http, playbook, duckdb, auth, sink, rhai, provider, agent, mcp and noop. That is the list in its refusal message (LOCAL_KINDS_FOR_MESSAGE). The check itself asks the CLI's Tool type, so the message cannot drift from it. Three of them (auth, provider, sink) do not exist on a server (Appendix B).

Everything else is refused, before anything runs

Any other kind fails the whole run before the first step, with every offending step listed. This is the real output for a python step (examples/ch08/python-refused, checked in CI):

Error: Playbook 'py_local' uses tool kinds the local runtime cannot run:
  step `start`: kind `python`
Local tool kinds: shell, http, playbook, duckdb, auth, sink, rhai, provider, agent, mcp, noop.
Run it on a cluster instead: noetl run … --runtime distributed

Myth

"The local runtime runs Python and Postgres steps." It runs neither. python, postgres, workbook and every other non-local kind are refused up front. CI checks python, postgres and workbook (examples/ch08/python-refused, postgres-refused, workbook-refused).

The check used to skip such steps with a note and still end the run ok. It became a hard refusal so that one run lists everything a playbook would need to move to a cluster (comment on reject_unsupported_kinds, citing noetl/ai-meta#539).

Notes on the local kinds

KindLocally
rhaiRuns the script in-process. The result is the last expression. code: is the same field as on a worker, so rhai is the most portable kind.
shellRuns cmds: (a string or a list). command: is ignored, and the step then runs nothing (5.1).
httpmethod, url, headers, params, body. The result is {status, body}. credential: <alias> reads the local credential store (noetl credential set).
duckdbdb: (default .noetl/state.duckdb next to the playbook; relative paths resolve against the playbook's directory), query:, params: (bound ? values). The result is the rows as JSON.
playbookRuns the child in the same process, resolving path relative to the parent. input: is passed to the child as workload. The step has no result unless return_result: true, the same opt-in as on a cluster. A path on another NoETL instance (noetl://…, peer/<instance>/…) is refused.
mcpCalls an MCP server at a URL. A server: mcp/<path> catalog reference is refused unless NOETL_MCP_<SLUG>_ENDPOINT or NOETL_MCP_URL supplies an endpoint.
agentRuns a model call loop. Credentials come from the local store.
sinkWrites the result of the most recently completed step to a file, a DuckDB table or GCS (format: json, the default, yaml or csv). See below.
auth, providerLocal-only. auth obtains a provider access token (provider, scopes); provider runs cloud-provider operations through the same tool a worker would use.
noopDoes nothing, and the step is not recorded in executed_steps.

The sub-playbook case, run in CI (examples/ch08/sub-playbook):

# Chapter 8.2: `kind: playbook` locally runs the child in the same process.
# Without `return_result: true` the step has no result (same opt-in as on a cluster).
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: parent
workflow:
  - step: start
    tool:
      kind: playbook
      path: ./child.yaml
      input:
        name: parent
      return_result: true
{
  "executed_steps": [
    "start"
  ],
  "final_result": "hello from the child, parent",
  "playbook_name": "parent",
  "status": "ok",
  "step_results": {
    "start": "hello from the child, parent"
  }
}

```admonish note title="Fixed in v6.4.1: sink writes the most recent result" Up to CLI v6.4.0 the local sink tool wrote context.step_results.values().last(). step_results is a hash map, which has no defined order, so once two or more steps had results the sink wrote an arbitrary one, and which one changed from run to run. From v6.4.1 (noetl/cli#111) the runner records which step finished most recently, a back-edge re-run included, and the sink writes that step's result.


This example has eight steps that each produce a result before the
sink, then reads the file back. On v6.4.0 it printed a different word
on different runs; on v6.4.1 it always prints `eight`
(`examples/ch08/sink-last-result`, run in CI). `sink` is local-only, so
the server's playbook schema refuses this playbook; CI checks that too:

```yaml
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: sink_last_result
  description: Eight steps produce results; the sink writes the last one.
workflow:
  - step: start
    tool: {kind: rhai, code: '"one"'}
    next: [{step: two}]
  - step: two
    tool: {kind: rhai, code: '"two"'}
    next: [{step: three}]
  - step: three
    tool: {kind: rhai, code: '"three"'}
    next: [{step: four}]
  - step: four
    tool: {kind: rhai, code: '"four"'}
    next: [{step: five}]
  - step: five
    tool: {kind: rhai, code: '"five"'}
    next: [{step: six}]
  - step: six
    tool: {kind: rhai, code: '"six"'}
    next: [{step: seven}]
  - step: seven
    tool: {kind: rhai, code: '"seven"'}
    next: [{step: eight}]
  - step: eight
    tool: {kind: rhai, code: '"eight"'}
    next: [{step: save}]
  - step: save
    tool:
      kind: sink
      format: json
      target:
        type: file
        path: /tmp/noetl-book-ch08-sink.json
    next: [{step: check}]
  - step: check
    tool:
      kind: duckdb
      db: /tmp/noetl-book-ch08-sink.duckdb
      query: "SELECT content FROM read_text('/tmp/noetl-book-ch08-sink.json')"
[
  {
    "content": "eight"
  }
]

Check your understanding

Iterating Without loop: — Arcs, SQL and Rhai

REAL

Myth

"The local runtime runs loop:." At CLI v6.4.1 it parses loop: into Step.loop_config, and nothing reads that field (git grep loop_config finds only its declaration). A loop step runs once, as if loop: were absent, and the run ends ok with no warning. CI checks this: examples/ch08/loop-runs-once.

The reference page docs/reference/rust_local_execution.md in noetl/docs lists step.loop under "current DSL semantics (what local mode must preserve)". That is a requirement, and at v6.4.1 the code does not meet it.

Three ways to iterate locally actually work. All three are CI examples.

1. A back-edge with a when guard

Route back to an earlier step until a counter reaches its limit. The counter travels in step vars: locally (6.4, examples/ch06/back-edge-local; Chapter 2 uses one too). Each pass is a full step, and the guard is the only thing that stops it.

2. Set-based SQL in one duckdb step

When the work is "do this to every item", let one query do it:

# Chapter 8.3: iterate inside ONE step with set-based SQL (local runtime, CLI 6.4.1).
# One duckdb query processes every item; no loop, no extra steps.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: iterate_sql
workload:
  cities: '["Lisbon", "Oslo", "Quito"]'
workflow:
  - step: start
    tool:
      kind: duckdb
      db: /tmp/noetl-book-ch08.duckdb
      query: >-
        SELECT city, length(city) AS letters
        FROM (SELECT unnest(from_json(?, '["VARCHAR"]')) AS city)
        ORDER BY city
      params:
        - "{{ workload.cities }}"
{
  "executed_steps": [
    "start"
  ],
  "final_result": "[\n  {\n    \"city\": \"Lisbon\",\n    \"letters\": 6\n  },\n  {\n    \"city\": \"Oslo\",\n    \"letters\": 4\n  },\n  {\n    \"city\": \"Quito\",\n    \"letters\": 5\n  }\n]",
  "playbook_name": "iterate_sql",
  "status": "ok",
  "step_results": {
    "start": "[\n  {\n    \"city\": \"Lisbon\",\n    \"letters\": 6\n  },\n  {\n    \"city\": \"Oslo\",\n    \"letters\": 4\n  },\n  {\n    \"city\": \"Quito\",\n    \"letters\": 5\n  }\n]"
  }
}

This is usually the best choice: one step, no orchestration per item, and the database does the iteration. The list goes in as a bound parameter and unnest(from_json(…)) turns it into rows.

3. A loop inside one rhai step

# Chapter 8.3: iterate inside ONE step with a Rhai loop (local runtime, CLI 6.4.1).
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: iterate_rhai
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        let out = [];
        for city in ["Lisbon", "Oslo", "Quito"] {
          out.push(city + ":" + city.len());
        }
        out
{
  "executed_steps": [
    "start"
  ],
  "final_result": "[\"Lisbon:6\",\"Oslo:4\",\"Quito:5\"]",
  "playbook_name": "iterate_rhai",
  "status": "ok",
  "step_results": {
    "start": "[\"Lisbon:6\",\"Oslo:4\",\"Quito:5\"]"
  }
}

Rhai has for, while and arrays. Use it for small in-memory transformations. Rhai has no default timeout and no operation limits (Appendix B), so keep the loop bounded.

Which to use

NeedUse
A per-item side effect (an HTTP call per item)a back-edge
Transform or aggregate a collectionset-based SQL
A small in-memory computationRhai
The same playbook must also run on a serverwrite loop: for the server and test it there. Locally it runs once.

Check your understanding

The Local Event Buffer and noetl push

REAL

A local run normally leaves no history. With --event-buffer, it records its events the way a server would, in a local file you can read or ship to a server later (noetl run --help, noetl buffer --help, noetl push --help, CLI v6.4.1).

$ noetl run playbook.yaml -r local --event-buffer
$ noetl buffer list --json
$ noetl buffer cat <execution_id>
  • Each run gets a directory $NOETL_LOCAL_DIR/<execution_id>/. The default is ~/.noetl/local. It holds events.feather (Apache Arrow Feather V2) and metadata.json (status, event count, start and end times).
  • The events are playbook.started, one step.exit per step, and playbook.completed or playbook.failed. A step that ran several times appears once (Chapter 2).
  • noetl buffer cat prints the events as JSON lines. noetl buffer append lets a shell step add its own events, for example infrastructure facts.

Shipping a run to a server

$ noetl push <execution_id>
$ noetl push --all --dry-run

noetl push POSTs each closed buffer to the server's /api/events/batch as an Arrow file. The server appends the events to its event log without orchestrating them: it records the history and does not resume or re-run anything. Buffers are pushed oldest first, and pushed_at is written to metadata.json so each one is sent once.

Note

Pushing needs a reachable server and the right context or --server. That is distributed-runtime territory (Chapter 10). The book's CI does not push.

Check your understanding

The Daemon: noetl subscribe and noetl serve

REAL

The local runtime runs one playbook and exits. The daemon keeps the CLI running and starts playbooks when something happens:

  • noetl subscribe <spec> holds a message source open (NATS, Pub/Sub, Kafka or a timer) and runs a playbook once per message.
  • noetl serve publishes playbooks over HTTP, as an MCP server (POST /mcp) and as agents (/api/agents/*), and runs one per call. noetl subscribe --serve <addr> does both in one process.

Both run playbooks on the local runtime (Chapter 8), with all of its rules and limits. Neither needs Kubernetes, a NoETL server or a database (noetl instance --help: "Run a kind:Subscription listener standalone in local mode (no k8s, no server)", CLI v6.4.1).

What the daemon is not

It is not a general-purpose service manager or scheduler. It runs one subscription spec (plus, optionally, an HTTP surface) per process. The timer source gives it a schedule, but there is no job table and no cluster. For durable, multi-worker execution, dispatch to a server (9.3) or use the distributed runtime (Chapter 10).

Sections

Check your understanding

Subscriptions: NATS, Pub/Sub, Kafka

REAL

A subscription is its own YAML document, kind: Subscription. It names a source, and a dispatch target: the playbook to run per message. This one uses the timer source, so it needs nothing else running:

# Chapter 9: a timer subscription. Run it with:
#   noetl subscribe examples/ch09/timer/subscription.yaml --events ./trail.jsonl --max-messages 2
apiVersion: noetl.io/v1
kind: Subscription
metadata:
  name: ticker
spec:
  source: timer
  every: 1s
  immediate: true
  payload: { who: daemon }
  dispatch:
    playbook: ./playbook.yaml
# Chapter 9: the playbook a timer subscription runs once per tick.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: greet
workload:
  who: nobody
workflow:
  - step: start
    tool:
      kind: rhai
      code: |
        "hello, {{ workload.who }}"
$ noetl subscribe examples/ch09/timer/subscription.yaml --events ./trail.jsonl --max-messages 2
…
✓ subscription stopped — received=2 dispatched=2 spooled=0 replayed=0 failed=0 pending_spooled=0
  event-sourced trail: ./trail.jsonl

That is the real summary line from a run on CLI v6.4.1. The book's CI does not run daemons, so this example is checked against the schema only.

Sources

The source implementations live in the shared tool library (src/tools/source/, tools v4.6.0), the same code a worker's subscription runtime uses:

source:Messages come from
natsa NATS JetStream pull consumer (url, stream, consumer, credentials)
pubsuba Google Pub/Sub subscription
kafkaa Kafka topic
timera clock: one message every every (at least 100 ms), with payload merged into each

kafka and pubsub are optional build features of the tool library (#[cfg(feature = …)]). This book ran only the timer source, so whether a given CLI build includes Kafka or Pub/Sub support is something to check on your binary.

Source credentials come from explicit fields or from auth: <alias> plus --credential <file>. In local mode an alias is resolved from that file and never from a server.

One run per message

For each message, the daemon builds an envelope and runs the target playbook in-process with the envelope as its workload. The fields chosen by dispatch.payload_from are merged to the top level, so a message field order_id is read as {{ workload.order_id }} (src/subscribe/dispatch.rs). The loop dispatches a message before it polls for the next one, so runs do not overlap.

The timer source's rules (tools v4.6.0 source/timer.rs):

  • one tick per poll, so a run that overruns the period produces one catch-up tick, never a burst;
  • the next tick is due every after the previous one fired;
  • ticks are not acknowledged or redelivered: a failed tick is not retried, and the next tick is the retry;
  • each message carries payload plus tick (counting from 1), scheduled_at and fired_at.

Useful flags: --once (drain once and exit), --max-messages N, --playbook-dir, --events, --spool-dir, -v.

Check your understanding

Spooling and the Event Trail

REAL

The event trail

The daemon writes every event to a JSONL file: one JSON object per line, --events <path> (default ./<name>-events.jsonl). It emits the same event envelope as the in-cluster runtime, so the file is a replayable, event-sourced log of the daemon's life. These are the event types from the two-tick run in 9.1, in order:

subscription.lifecycle         REGISTERED
subscription.lifecycle         ACTIVE
subscription.message.received  RECEIVED
playbook.started               STARTED
playbook.completed             COMPLETED
subscription.message.received  RECEIVED
playbook.started               STARTED
playbook.completed             COMPLETED
subscription.lifecycle         DRAINING
subscription.lifecycle         DEACTIVATED

Each playbook run has its own execution id. The subscription's lifecycle events carry the subscription's id.

The spool: store and forward

A subscription can declare a spool. When the downstream (the target of dispatch) is unreachable, messages are written to disk and replayed when it comes back. In local mode the only spool backend is local_disk (src/subscribe/spool.rs, CLI v6.4.1). The engine (circuit breaker, ordering, idempotency, dead-letter, retention) is shared with the worker's spool runtime, from the tool library.

The loss-safety contract, as the source states it:

  • the source's batch is already acknowledged when it is fetched, so a message in hand is no longer on the source;
  • each message is therefore written durably to the spool before anything else;
  • the spool drains only after an active probe confirms that the downstream is reachable again.

The circuit breaker's state is a JSON file next to the spool, so a restart in the middle of an outage resumes in the right phase. Spool and circuit events go into the same JSONL trail. The summary line counts them: spooled, replayed, pending_spooled.

Check your understanding

Dispatching to a Server

REAL

--dispatch server

By default each message runs a playbook locally (--dispatch local). With --dispatch server, the daemon instead sends each message to a NoETL server as POST /api/execute (--server-url, or the resolved base URL). The daemon becomes an ingress: it listens at the edge and the cluster does the work. That is how you run playbooks with python, postgres or loop: from a subscription the cluster cannot reach directly. Combined with the spool, messages survive a server outage.

noetl serve: MCP and agents, locally

$ noetl serve --playbooks ./playbooks

noetl serve scans a directory, recursively and on every request, for playbooks that opt in with metadata.expose (4.1). It publishes them as:

  • an MCP server: POST /mcp, one MCP tool per playbook with expose.mcp;
  • agents: /api/agents/*, for playbooks with expose.agent, with callbacks to origins allowed by --callback-origin.

Defaults and limits (CLI v6.4.1 noetl serve --help):

OptionDefault
--listen127.0.0.1:8765. Any non-loopback address needs --token-file
--max-concurrent4 playbooks at once; more are refused with 503
--task-dbnone: agent tasks are in memory and lost on restart

--task-db <file> keeps agent tasks in SQLite, so they survive a restart: finished tasks stay readable, working ones are rerun, and owed callbacks are delivered. It was added in CLI v6.3.0 (2026-11-11, CHANGELOG "serve: durable agent tasks with --task-db").

noetl subscribe --serve <addr> serves the same surface for as long as the daemon runs. Chapter 18 covers MCP and agents in depth, including the server-side equivalents, which are gated.

Check your understanding

The Distributed Runtime

REAL

The local runtime (Chapter 8) runs a whole playbook in one process. The distributed runtime splits the same work across services that each do one job. Its parts are a gateway, a server, a command bus and pools of workers. This chapter follows a request through them.

Every claim here was checked against server v3.161.2, worker v6.15.0 and gateway v3.22.1. Deployment numbers come from the public resource model (noetl.ai/dsl/resource-model.json), whose DEPLOYED entries were read off the production cluster on its as_of date, 2026-11-11.

The path of one request

 client
   │  HTTPS, session token
   ▼
 gateway ─────────────── authenticates, authorizes, proxies,
   │                     streams results back (SSE)
   │  POST /api/execute
   ▼
 server ──────────────── writes playbook_started, builds the first
   │                     commands, owns the event log and the catalog
   │  publish command notification
   ▼
 cmdbus-writer ───────── the EHDB command bus: a durable log per pool
   │                     and shard, plus a claim coordinator
   │  claim commands.<pool>.>
   ▼
 worker pools ────────── shared (user steps), system (the drive),
                         subscription; each worker has N slots
   │
   └─ events back to the server: POST /api/events
        └─ command.completed triggers the next drive pass,
           which runs as a command on the system pool

The loop at the bottom is the heart of it. A worker finishes a step and reports command.completed. That event starts a drive pass: the orchestrator reads the playbook and the events so far and decides the next commands. By default that pass is itself a command, run as WASM on a worker in the system pool (10.2).

What each part owns

PartRunsOwnsNever does
Gatewaynoetl-gatewaysessions, request ids, the client's SSE streamrun tools or touch your data
Servernoetl-serverthe event log, the catalog, command records, the first commandsrun tools (it has no tool runtime)
Command busthe worker binary in host mode (cmdbus-writer)the durable command log and who claimed whatdecide what runs
Workersnoetl-worker, one Deployment per poolnothing between commandsread or write noetl.* directly; they call the server's API

Sections

10.5 is not written yet

Section 10.5 steps through the event log of one real execution with the book's trace viewer (T-05). That needs an execution captured from a stack running tagged releases, which the book does not have yet. The event sequence it will show is already listed in 10.2.

Where the runtime's records live

Postgres holds the event log of record, EHDB carries the buses, and ehgraph (embedded, off by default) holds topology as a read model. 15.1 puts the three side by side.

Check your understanding

Gateway: The Gatekeeper

REAL

The gateway is the only part a client talks to. It decides who is calling and whether they may, then passes the request to the server and streams the results back. It never runs a tool and never reads or writes your data on a client's behalf. Everything here is gateway v3.22.1 unless a page says otherwise.

What it serves

RouteWhat it isAuth
/api/auth/* (login, validate, check-access, logout, providers)sign-in and session checkspublic
/noetl/{*path} (GET, POST, PUT, DELETE, PATCH)the proxy: forwarded to the server's /api/{path}session
/graphqla GraphQL front for the same callssession
/noetl/mcp/*, /noetl/agents/*MCP and agent proxies (Chapter 18)session
GET /eventsthe client's live result stream (SSE)session
/ingress/{listener}push ingress for webhooks; refused unless NOETL_INTERNAL_API_TOKEN is settoken

(src/main.rs:350-523.)

The session token can arrive as Authorization: Bearer, an X-Session-Token header or a session_token cookie (src/auth/middleware.rs:111-142).

What the proxy does to a request

Before forwarding, the gateway:

  1. checks that the session may use that route and owns the execution it names (src/proxy.rs:214-257);
  2. rewrites uid / user_uid in the body to the verified session's user, so a client cannot act as someone else (src/proxy.rs:286-311);
  3. forwards the body, Content-Type, Accept and x-* headers (src/proxy.rs:358-380).

It can also pick a server shard by execution_id (src/proxy.rs:118-150).

Sign-in is a playbook

Myth

"The gateway checks sessions itself." By default it does not. It validates a session by starting a playbook on the server (GATEWAY_SESSION_VALIDATE_VIA_PLAYBOOK, default true, src/auth/mod.rs:177-181) through POST /api/execute (src/noetl_client.rs:85-97). It is an ordinary execution. Its default path, api_integration/auth0/auth0_validate_session (src/config/gateway_config.rs:247), has no system/ prefix and the gateway sends no pool override, so it runs on the shared pool alongside user work (10.3). The synchronous REST paths are off by default (NOETL_AUTH_SYNC, NOETL_AUTHZ_SYNC). The gateway still decides; the check is a workflow.

That is the code default. A deployment can turn the synchronous path on, and a code comment in gateway v3.22.1 says login and validation sync (NOETL_AUTH_SYNC) "is already live in prod" (src/auth/mod.rs:224). This book has not read the cluster, so it states only the default and that comment.

Validated sessions are cached, so a request does not start a playbook every time.

Gatekeeper, not stateless

Myth

"The gateway is stateless." It keeps three kinds of state:

  • sessions, the request store and execution owners in EHDB key-value storage (NOETL_KV_ADDR, required at start-up, src/main.rs:132-161);
  • the open SSE connections, in process (ConnectionHub);
  • pending callbacks, in process (CallbackManager).

What it does not keep is your data. That is the rule that matters: the gateway never reaches a database to satisfy a client request.

How results get back

The gateway subscribes to the EHDB events feed (NOETL_EVENT_FEED_ADDR, required, src/main.rs:181-197). For each event it looks up which client started that execution and pushes it to that client's GET /events stream (src/event_feed.rs).

The feed only carries what the server publishes

At server v3.161.2 the server publishes an event to that feed only when NOETL_EVENT_INGEST_PUBLISH_ONLY=true (code default false) and the execution is not a system/ playbook (should_publish, src/handlers/event_write.rs:304-318). With code defaults the SSE stream receives nothing. A deployment that streams results sets the flag. Worker v6.15.0's documentation says the server does run with it on (src/event_bus.rs, 13.4); this book has not read a cluster to confirm it.

Check your understanding

Server: The Orchestrate-Core Drive

REAL

The server is the control plane. It owns the event log, the catalog and the command records, and it is the only service that talks to NoETL's own Postgres schema. It runs no tools: the tools registry is kept off it on purpose (Cargo.toml, "must not land on the control plane"). Everything here is server v3.161.2.

What happens on POST /api/execute

The handler is execute_one (src/handlers/execute.rs). In order, it:

  1. resolves the playbook from the catalog and parses it, and merges the request's workload into the playbook's;
  2. writes the first event, playbook_started (execute.rs:948-1018);
  3. builds the first commands itself, in process, with orchestrate-core's CommandBuilder (generate_initial_commands, execute.rs:1667-1876);
  4. for each command, writes a command.issued event and a noetl.command row, then publishes a notification to the command bus (execute.rs:1286, 1883-1933, 1952).

The pool the notification goes to is chosen here, once, for the whole execution (10.3).

The drive

After the first commands, every decision is made by a drive pass. One pass is a pure function:

InOut
the playbook, and the WorkflowState folded from the execution's eventsthe next commands, events to emit, and whether the execution is complete

(evaluate_state, orchestrate-core/src/orchestrator.rs:384; the result type is OrchestrationResult, :290-302.) The same crate is the reducer that folds events into state (WorkflowState::apply_event, orchestrate-core/src/state.rs:519).

A pass is triggered when a worker reports command.completed or command.failed (src/handlers/events.rs:769-779).

Where the drive runs

Myth

"The server runs the orchestrator." By default it does not. It issues the drive as a command, step name __orchestrate__, that runs the system/orchestrate WASM plug-in on a worker in the system pool (dispatch_orchestrate_command, execute.rs:1568-1650). The switch is NOETL_ORCHESTRATE_PLUGIN_DRIVE, default true (src/config/app.rs:70-87). Set to false, the server drives in process instead (events.rs:4018).

When the plug-in finishes, its result comes back on the meta-step's call.done. The server applies it: emits the events, issues the commands as a batch, and writes playbook.completed or playbook.failed when the pass says the execution is done (apply_worker_orchestration, events.rs:4163-4200).

The drive leaves no trace in the event log. Its command writes no command.issued (execute.rs:1603: "The meta-command writes NOTHING to noetl.event"), and its lifecycle events are not stored (events.rs:676-711). The state is a function of the real step events, so storing the drive's own would only add load.

Two consequences

  • The system pool is on every execution's critical path. A user step waits for a system-pool slot between steps (10.4).
  • The first commands are built by the server, not by the drive. A bug that shows up only on the first step and not later ones is looking at two different code paths.

The events of a one-step execution

For a playbook whose start step has no next, with default flags, the stored events are, in order:

#EventWritten byWhere
1playbook_startedserverexecute.rs:1006
2command.issued (step start)serverexecute.rs:1286
3command.claimedserver, in the claim handlerevents.rs:1177
4command.startedworkerworker src/executor/command.rs:547
5call.doneworkercommand.rs:1099
6command.completedworkercommand.rs:3679-3689
7playbook.completedserver, applying the drive's resultevents.rs:4184

Between 6 and 7 the drive ran on the system pool and stored nothing. There is no step.enter for a start step that does not loop (execute.rs:1778). The names are not uniform: playbook_started has an underscore and playbook.completed a dot. The reducer matches playbook_started and both spellings of each terminal event (state.rs:528-550).

Workers write their events through the server's API (POST /api/events, worker src/client/control_plane.rs:577). No worker connects to NoETL's Postgres.

Check your understanding

The Command Bus and Worker Pools

REAL

A command is a request to run one step. The server writes it down, the command bus holds it until a worker takes it, and exactly one worker runs it. This section covers how that hand-off works at server v3.161.2 and worker v6.15.0.

The bus is EHDB, and it is a worker binary

Myth

"Commands travel over NATS." Not any more. NATS is refused outright: NOETL_COMMAND_BUS is required, has no default, and only the EHDB bus is accepted (server src/command_bus.rs:47-90, worker src/command_bus.rs:85-115). Names such as nats_filter_subject in the worker's config are leftovers.

The bus runs as the cmdbus-writer, a StatefulSet that runs the worker binary in host mode (NOETL_COMMAND_BUS_HOST=true, worker src/worker.rs:159-204). It is not a separate product. It hosts:

  • an ingest face, where the server publishes command notifications;
  • a claim coordinator, where workers compete for them;
  • a metrics face, which the autoscaler reads (10.4).

(src/command_bus.rs:129-200; each face has its own NOETL_COMMAND_BUS_*_BIND.) The same process can also host the event bus (NOETL_EVENT_BUS_HOST), which serves the gateway's live feed and its key-value store (10.1).

Subjects

The writer files each command under a subject derived from the notification, commands.<pool>.shard.<n> (worker src/command_bus.rs:364-368). A worker claims everything for its pool with the filter commands.<pool>.> (src/worker.rs:233-244).

A worker learns its pool from NOETL_FEED_FILTER_SUBJECT (for example noetl.commands.shared.>), and refuses to start without one: "Refusing to default … because a worker on the wrong pool stalls executions silently" (worker.rs:236-242).

Which pool runs a step

The pool is chosen once per execution, when the server publishes the first command (src/handlers/execute.rs:1976-1983):

  1. the request's pool override (execution_pool, or the x-noetl-pool header), if given;
  2. otherwise from the playbook's catalog path: system/… → system, subscription/… → subscription;
  3. otherwise shared.

Myth

"Each step can choose its pool." There is no step-level pool field in the playbook model at v3.161.2. Every step of an execution goes to the same pool, and the drive passes between steps go to system (10.2).

Claiming: two locks

  1. The bus hands a command to one worker and waits for an ack. An unacked command is redelivered after NOETL_COMMAND_BUS_ACK_WAIT_SECS (default 30 s, worker src/command_bus.rs:191).
  2. The server is the real gate. The worker calls POST /api/commands/{id}/claim, which takes a Postgres advisory lock on the command id and checks for an existing claim (claim_command, server src/handlers/events.rs:929-1134). This writes command.claimed. A second claimant is told the command is already claimed and skips it.

Only after the server claim succeeds does the worker ack the bus and start the tool (worker src/worker.rs:821-833).

When a worker dies mid-command

Myth

"If a worker crashes, its step is retried on another worker." At default flags it is not. The bus was acked when the claim succeeded, so it will not redeliver. The command stays claimed by a worker that no longer exists, no command.completed arrives, and the execution stays RUNNING. The server's reconciler re-drives it every 8 s and finds nothing new to issue (server src/config/app.rs:600-608), until NOETL_RECONCILE_MAX_NOOPS (default 225, about 30 minutes) stops the re-driving (6.4). After that it is simply RUNNING, forever.

Two server sweeps end such an execution, and both are off by default:

SweepFlag (default)What it does
orphan sweepNOETL_ORPHAN_SWEEP_ENABLED (false)finds a claim held by a worker with no heartbeat (TTL 90 s) after a grace of 180 s, and writes playbook.failed (app.rs:608-660)
non-convergence sweepNOETL_NONCONVERGENCE_SWEEP_ENABLED (false)writes playbook.failed for an execution whose newest event has not moved for a grace period while no live worker holds a command: the shapes the orphan sweep cannot see, such as a command never claimed or a router whose arcs were all false (src/main.rs:1361-1378, app.rs:680-700)

Neither re-runs the step: the orphan sweep "never re-executes a side-effecting step". A playbook cannot catch the crash either. Its retry rules react to a command.failed (6.5), and none arrives. A crash mid-step ends, at best, in a failed execution that you re-submit, so a step that might be re-run that way should be safe to run twice.

Check your understanding

Slots, Pools and KEDA Autoscaling

REAL

How many steps can run at once, and what happens to the rest? The answer is the slot model plus the autoscaler. Code facts are worker v6.15.0. Numbers labelled DEPLOYED are from the public resource model (noetl.ai/dsl/resource-model.json), which read them off the production cluster on 2026-11-11; they describe that cluster on that day, not a default and not a recommendation.

A slot is a semaphore permit

Each worker process has WORKER_MAX_CONCURRENT slots, default 4 (src/config.rs:115-118), held in a semaphore (src/worker.rs:313). The claim loop takes a slot before it pulls a command (worker.rs:748-754), so a full worker claims nothing. The slot is released:

  • when the command's tool returns and its events are sent (worker.rs:848-850);
  • at once, if the claim turns out to be already taken, deferred or failed (worker.rs:926-999), or the pull returns nothing;
  • early, when a step parks on an external callback: the worker skips its own call.done and frees the slot while the external system works (src/executor/command.rs:1326-1333).

So a pool's capacity is replicas × slots. Commands beyond it wait on the command bus, not in the worker.

The deployed pools

PoolReplicasSlots eachCapacityCPU / memory (request / limit)Label
worker-rust-pool, the user pool (shared)2, KEDA 2-2048 at min, 80 at max250m / 2; 256Mi / 768MiDEPLOYED
worker-system-pool (two Deployments)1 + 1, fixed24750m / 2; 3Gi / 3GiDEPLOYED

The system pool runs every drive pass (10.2), and every system/ playbook. On that cluster at most 4 of those run at a time, whatever the user pool's size.

Autoscaling on bus lag

Myth

"KEDA scales the workers on NATS consumer lag." NATS is gone. The trigger is ehdb_feed_subject_lag, the number of commands waiting on a subject. The cmdbus-writer serves it on its metrics face, sampled every 2 s, one series per commands.<pool>.shard.<n> subject (worker src/command_bus.rs:505-518). The server does not produce it.

The deployed ScaledObject (DEPLOYED, 2026-11-11):

SettingValue
targetnoetl-worker-rust (the user pool)
triggermetrics-api: ehdb_feed_subject_lag{subject="commands.shared.shard.0"} from the command-bus writer
target value2
min / max replicas2 / 20
polling interval / cooldown10 s / 30 s

With a target of 2, KEDA aims for about one replica per two waiting commands: replicas ≈ ceil(lag / 2), between 2 and 20 (the rule the resource model records with the ScaledObject; it describes the setting, not a measured response).

Myth

"The system pool autoscales too." The noetl/ops repository declares a system-pool ScaledObject (3-10 replicas). The resource model records that it is not on the cluster, so the system pool does not scale. A manifest in a repository is a statement of intent; only a read of the cluster says what runs.

What has been measured

WhatValueLabel
user pool under 200 real executions (200/200 completed)replicas 2 → 4 → 8 → 16 → 20 → 2MEASURED, prod, 2026-07-31
a new GKE Autopilot node when a scale-up needs one~60-90 sMEASURED, prod
command.issued → command.claimed, pool not saturatedp50 138.5 / p95 156.4 / p99 181.0 ms (n = 60)MEASURED, prod, 2026-07-30
the same, 90 commands offered in 1.2 s against 8 slotsp50 2123 / p99 3735 msMEASURED, prod, 2026-07-30
time for the user pool to ramp under load on the EHDB triggerno numberNOT_YET_MEASURED
sustained executions per secondno numberNOT_YET_MEASURED

(All from the resource model's concurrency section, which names each source.) The fourth row is the slot model at work: 90 commands, 8 slots, so most of them waited on the bus. The 2 s median is queueing, not the bus being slow.

Check your understanding

Following One Execution End to End

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Choosing a Runtime, and When Not to Use NoETL

REAL

The same playbook grammar runs in three places. They are not interchangeable. This page puts them side by side, with each cell tied to the chapter or source it comes from. Sections 11.1–11.7 then ask the earlier question: whether NoETL is the right tool at all, compared with a program, an existing tool, an AI agent, an MCP server or a microservice. Versions: CLI v6.4.1, server v3.161.2 (resource model as_of 2026-11-11), worker v6.15.0.

At a glance

Local (noetl run -r local)Daemon (noetl subscribe / serve)Distributed (server + workers)
Runs wherein the CLI processin a long-running CLI processon a NoETL server's worker pools
Started byyou, onceeach message, timer tick or HTTP callPOST /api/execute, the gateway, another playbook
Tool kinds11 local kinds; no python, postgres, workbook, …: refused up front (8.2)the same as local, unless --dispatch server (9.3)25 kinds accepted by default, plus agent and mcp behind flags (5.1)
loop:runs once (8.3)runs once (local runtime)sequential, parallel, cursor (6.3)
Tool listsparse error (5.2)parse errorone task_sequence command (5.2)
Passing valuesstep vars:step vars:step set: (4.2)
Concurrencynone: targets run one after another (8.1)one message at a time; serve runs up to 4 playbooks at once (--max-concurrent, DEFAULT) (9.3)replicas × slots. The user pool is 8 slots at minimum and 80 at maximum, the system pool 4 (DEPLOYED, resource model concurrency.pools, as of 2026-11-11)
Durabilitynone. The optional event buffer is a record, not a resume point (8.4)the local_disk spool survives outages; --task-db keeps agent tasks (9.2, 9.3)an append-only event log; state is folded from it (3.2)
Credentialsthe local store, noetl credential (4.4)a --credential file for the source; the local store for stepsthe keychain, resolved on the worker (4.4)
Fixed cost per stepsmall: in-process, no busthe same as local per run~4.5 s per step on prod in 2026-08 (MEASURED, resource model); hops ~9–15 s (7.2)
Needsthe CLIthe CLI (and a message source, unless timer)a server, a bus and worker pools (Chapter 10)
Refuses or ignoresnon-local kinds (refused); loop:, bare-name next, set: (ignored) (8.1)the same as localcase: blocks; gated kinds and features unless their flags are on (4.1)

Mind the per-step cost figure

"~4.5 s per step" is a 2026-08 measurement of one playbook on prod. The resource model warns that several of its figures "predate later dispatch fixes". The latency plan (ai-meta PR #556, open) reports ~0.95 s per step on prod on 2026-11-02 (n = 4). Treat both as dated measurements and measure your own cluster (Chapter 22).

How to choose

  1. Does it need python, postgres or another cluster-only kind, or real loop: fan-out? Then distributed, or the daemon with --dispatch server.
  2. Is it triggered by messages, a schedule or HTTP calls, on one machine? The daemon.
  3. Is it a one-off, a CI check or a fast edit-and-run loop, using local kinds? Local.
  4. Must it run on both? Write it for the server's rules, then check it against the local differences table (8.1) before trusting a local run.

Check your understanding

What NoETL Is Good At

REAL STUB

Not yet written. Planned: event-sourced, replayable, auditable multi-step orchestration; declarative, versioned playbooks; one grammar across local, daemon and distributed runtimes; long-running and resumable flows on the distributed runtime; coordinating heterogeneous tools and providers. Each claim tied to the chapter that proves it.

When a Program Is Better

REAL

NoETL charges per step. A program charges per unit of work. When the job is one tight computation, the per-step charge buys you nothing, and a program, script or library call is the better tool. This section shows what a step costs, so you can do that arithmetic yourself.

What a step costs

Each row is a measurement, with where, when and how many runs. These numbers change with releases: the distributed figures fell by more than two thirds in November 2026 alone. Re-measure before you budget.

WhereCostLabel and source
Local runtime: starting the CLI~166 ms per runMEASURED by this book, 2026-11-19: CLI 6.4.1 on an Apple M1 Max, n = 10, p50 wall time of a one-step playbook
Local runtime: a trivial shell step~3.3 mssame run: (p50 of a 21-step chain − p50 of a 1-step run) ÷ 20
Local runtime: a trivial rhai step~259 mssame run and method
Distributed, kind, idle32–36 ms p50 of orchestration per stepMEASURED, kind benchmark harness, 2026-11-14, server 3.161.2 / worker 6.15.0, two reps (ai-meta wiki Sessions-Log)
Distributed, production217 ms p50, 546 ms p95 of orchestration per step (712 / 1483 ms before that day's changes)MEASURED, prod, 2026-11-15 (ai-meta wiki Sessions-Log; the record does not state n)
Distributed, production: an awaited child playbook~1.0 s p50 (2026-11-15); ~0.83 s (2026-11-16)MEASURED, same record

That is the overhead alone, before the step does any work. The resource model's guidance turns it into an estimate: wall clock ≈ steps × per-step overhead + the sum of the work + hops × hop overhead (7.2, 21.5).

The rhai row is not a typo, and it is not a property of Rhai. In this measurement, on CLI 6.4.1, a rhai step that returns a constant cost about as much as a quarter of a second, while a shell step that spawns a process cost 3 ms.

The cause was later traced, and a fix has shipped. noetl-tools v4.7.2, published 2026-11-28, is "fix(rhai): stop building a reqwest Client on every rhai step" (tools#123). CLI v6.4.3, published 2026-11-29, takes that crate. Its release notes say "take noetl-tools 4.7.2 so a rhai step stops costing ~250 ms" (cli#117, which those notes say closes tools#123 and ai-meta#594). Cargo.lock at tag v6.4.3 resolves noetl-tools 4.7.2. The newest CLI release as of 2026-12-01 is v6.4.5 (published 2026-11-30). Its lockfile resolves noetl-tools 4.7.3. The v4.7.3 notes add only the parked-await timeout fix (tools#125), on top of v4.7.2.

Re-measure pending: NOT_YET_MEASURED

The ~259 ms row stays. It is this book's measurement of CLI 6.4.1 (2026-11-19, Apple M1 Max, n = 10). This book has not re-measured a trivial rhai step on an official CLI ≥ 6.4.3. That cost is NOT_YET_MEASURED. The "~250 ms" phrase is the v6.4.3 release note's claim. The table keeps the 6.4.1 row.

Same work, two shapes

The same million-addition loop, run 10 times each on the same machine on 2026-11-19 (p50 wall time, process start included):

Shapep50
A Python 3.12 script: for i in range(1000000): s += i93 ms
One NoETL rhai step running the same loop (noetl run -r local)540 ms

The loop is not the expensive part. The NoETL run spends most of its time starting the CLI and paying for the step. Now imagine making each addition its own step, for example with a loop: over a million items on the distributed runtime. A parallel loop: dispatches one command per item and needs a free slot for each (resource model guidance, server v3.161.2). At ~0.2 s of overhead per step, the overhead alone is measured in hours. Never put a hot loop's iterations into steps.

When to reach for a program

Use a plain program, script or library when all of these hold:

  • It is one computation. No step needs to wait for, retry against, or be resumed after a different system.
  • Latency matters per call. It has to answer in tens of milliseconds, or it runs thousands of times a second.
  • The work is a loop. The cost scales with items, not with stages.
  • Nobody needs the record. No one will ask later which inputs produced which output, or replay a run.

If any of them fails, read on: that is where NoETL starts to earn its overhead.

Usually the answer is both

Most real pipelines are a few coarse stages around one or two heavy computations. The shape that works is a program inside a step:

- step: score
  tool:
    kind: shell
    cmds:
      - python3 -m scoring.run --in data/batch.parquet --out data/scored.parquet

The program does the hot loop at full speed. NoETL does what a program does badly: it records which playbook version ran the stage, with which inputs and what result (3.2), sequences it with the other stages, and lets you rerun or inspect it later. You pay the per-step cost once per stage, not once per item. The quantum case study (Chapter 26) is built exactly this way: hours of compute inside shell steps, with NoETL around them.

What wrapping does not give you

Putting a program in a step does not make it retry, time out or resume by itself. At these releases, a failed step fails (6.5), and the local runtime keeps no resume point (Chapter 11). If you need those, build them: a guarded back-edge for retries, the tool's own timeout_seconds, and the distributed runtime for durability.

Check your understanding

When an Existing Tool Is Better

REAL STUB

Not yet written. Planned: don't wrap what already works: a purpose-built CLI, a database's own scheduler or a stream processor; what wrapping adds (a record, sequencing) and what it costs (a step per call).

NoETL and AI Agents

PARTIAL STUB

Not yet written. Planned: open-ended reasoning and judgment belong to an agent; defined, repeatable flows belong to a playbook; NoETL orchestrates agents as steps (kind: agent, behind its gate) and caps their calls.

NoETL and MCP Servers

PARTIAL STUB

Not yet written. Planned: MCP exposes tools and data to a model; NoETL orchestrates calls. When each is right, and how they compose: kind: mcp to call a server, a playbook exposed as an MCP tool.

NoETL and Microservices

REAL STUB

Not yet written. Planned: always-on request/response services with tight SLAs and independent scaling vs workflow execution measured in seconds; where they coexist (a service calls a playbook, a playbook calls a service); the travel app as a seconds-scale example.

A Decision Guide

REAL STUB

Not yet written. Planned: "use NoETL when… / reach for X instead when…", with the tradeoffs side by side: latency, per-step overhead, observability, auditability, operational cost.

Project: Taking Your Playbook Distributed

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

EHDB: The Event Horizon Database

REAL

EHDB is NoETL's own storage engine: an append-only log built for the event log and the command bus. It replaced NATS as the transport between the server and the workers, and it is the substrate the platform is moving its state onto (Chapter 14).

This chapter describes ehdb v0.15.1, the version server v3.161.2 and worker v6.15.0 both pin (their Cargo.lock files name the tag). Code facts are from that tag. Facts about production come only from the dated public record in the ai-meta wiki (the Sessions-Log and Home pages) and its issues, and each carries its date.

Where EHDB sits

StoreRuns inHolds
command busthe cmdbus-writer (worker binary, host mode)every command, per pool and shard (10.3)
event busthe same process, its own engineevery noetl.event on its way to the materializers and the gateway
embedded event-log tierthe serverthe server's own EHDB store, with retention and archive
chain storethe servereach execution's events linked by prev_event_id (13.7)

Sections

The docs and the code disagree in places

Some of ehdb's own documents at v0.15.1 describe an older state than its code. For example, docs/spec/durability-window.md says there is no age-based seal trigger, but crates/ehdb-l0/src/part.rs:530-536 seals on age. This chapter follows the code and says where it does.

EHDB's sibling store

ehgraph, the graph database for topology, shares EHDB's change-log design but none of its code or data. 15.1 sets out which of Postgres, EHDB and ehgraph is authoritative for what.

Check your understanding

Why NATS Was Replaced

REAL

Until July 2026 NoETL's commands and events travelled over NATS JetStream. Today NATS is gone from the platform: the server and the workers refuse to start with any command bus but EHDB (NOETL_COMMAND_BUS, required, worker v6.15.0 src/command_bus.rs:85-115).

The dates

DateWhat happenedRecord
2026-07-15The decision: "EHDB takes over from NATS"ai-meta docs/rfc/ehdb-nats-takeover-plan.md
2026-07-26, 07-27Two earlier attempts did not complete: held at canary (07-26), then a full flip that failed (07-27)Sessions-Log, 2026-07-28
2026-07-27The third flip succeeded: EHDB is the production command bus (server v3.58.1, worker v5.81.1)Sessions-Log, "2026-07-28 — EHDB is the production command bus"
2026-08-01NATS deleted: its namespaces removed (server v3.60.1, worker v5.88.0)Sessions-Log, "2026-08-01 — NATS IS DELETED"

The reasons given

  • One fewer system to run. The coupling RFC's goal was no external infrastructure dependency except Kubernetes.
  • Delivery in one hop. The takeover plan's design has a stateful writer per shard that owns both the durable log and delivery; workers subscribe to it directly and the server is out of the delivery path (ehdb-nats-takeover-plan.md, decision 3).
  • A plaintext credential retired (ai-meta#188).

Names in the worker's configuration such as nats_filter_subject and the NATS_FILTER_SUBJECT fallback are leftovers from that period (worker src/config.rs:40-46).

Check your understanding

The Append Log: Parts, Segments, Manifest

REAL

EHDB stores records in an append-only log. Nothing is updated in place: a record is written once, and the only deletion is retention dropping whole old files. All facts here are ehdb v0.15.1, crates/ehdb-l0.

Parts

Appends go to the active part, a local file. When it is full it is sealed: closed, made immutable as an .eslog part, and uploaded asynchronously to the storage substrate (src/lib.rs:36-41, src/part.rs:1-19). A part seals when any of these is reached (part.rs:530-536):

TriggerDefault
size8 MiB (DEFAULT_SEAL_MAX_BYTES, src/engine.rs:67)
record count1024 (DEFAULT_SEAL_MAX_RECORDS, engine.rs:65)
ageoff unless configured (NOETL_EHDB_SEAL_MAX_AGE_SECS on the server, NOETL_EHDB_SEAL_MAX_AGE_MS on the worker)

The records in the active part are the unsealed tail. They live on the local disk only until the part seals (13.6).

"Segments" is the older name: the L0 part frame is byte-identical to the earlier durable-segment format (lib.rs:52-55).

The manifest

The manifest is a versioned list of the sealed parts (PartMeta rows) plus reclaimed_through, the point below which retention has dropped data (src/catalog.rs:251-267). The engine keeps the 32 most recent manifest versions (engine.rs:80).

When a write is durable

FlushPolicy (part.rs:33-50) has three postures:

PostureWhat it doesUsed for
EveryAppendfsync after every append; durable before the append returnsthe default for the source-of-truth event log
group commitappends do not fsync alone; the caller syncs a batch, and must do so before acknowledging any record in itthe bus writers: N records that arrive together share one fsync (ai-meta#205)
Bufferedfsync every N recordsderived or metrics tiers only

Group commit does not widen the crash window: a record is still durable before its writer confirms it. It changes the cost.

Reads

A read merges the active part (held in memory, so a writer can read its own writes), the local sealed parts and any replica parts, and uses the manifest to skip parts that cannot hold what was asked for (lib.rs:40). Skipping by key is what the bloom filters are for (13.3).

Check your understanding

Bloom Filters and the Prune Floor

REAL

Blooms: skipping parts

Each sealed part carries bloom filters over execution_id, per part and per granule inside it (ehdb v0.15.1 crates/ehdb-l0/src/bloom.rs:1-13). A read for one execution asks each part's bloom first: "definitely not here" skips the part, "maybe here" reads it. A bloom can say maybe for an execution that is not there (a false positive), but never no for one that is.

The prune floor

Retention deletes old parts, but it must not delete events an execution still needs. The floor is the lowest sequence that must be kept: the minimum over every execution not yet safe to prune, such as one still running or not yet archived (server v3.161.2 src/services/event_archive.rs:246, 863-875). Everything below the floor can go.

The floor is found with the blooms: a part whose bloom says maybe for a live execution is treated as holding it. So a false positive on an old part pins the floor there, and nothing above it can be pruned, though no live data is in it.

Two fixes, both recorded in the public log:

FixSwitchDefaultOn prod
floor-exact: confirm the floor holder with an exact read before trusting a bloomNOETL_EHDB_FLOOR_EXACT (server)off (event_archive.rs:2059, 2428-2440)armed 2026-11-04 (Sessions-Log, "2026-11-04 (evening) — #517 floor-exact armed on prod")
bloom scheme 2: the legacy probes (h1 + i·h2) mod m could collapse onto few bits; scheme 2 derives each probe independently with SplitMix64EHDB_BLOOM_SCHEME (1 or unset = legacy, 2 = new; any other value reads as legacy)legacy (bloom.rs:19-58)readers first (ehdb v0.15.0, 2026-11-06), then armed on the server and the cmdbus-writer 2026-11-07 (Sessions-Log, "Release B")

Readers before writers

Scheme 2 filters cannot be read by an older reader. That is why the rollout put the reader (v0.15.0) everywhere first and armed the writer a day later, and why an unrecognised value of EHDB_BLOOM_SCHEME falls back to legacy: "a typo must never write a filter an older reader cannot open" (bloom.rs:54-58).

Check your understanding

Two Buses: Commands and Events

REAL

The cmdbus-writer (10.3) can host two EHDB buses in one process, each with its own engine, directory and fsync stream (worker v6.15.0 src/event_bus.rs:1-33).

Command busEvent bus
Carriescommands, per pool and shard: commands.<pool>.shard.<n>every noetl.event
Written bythe server, at each command.issuedthe server, as it ingests events
Read byworkers, which compete for claimsthree durable materializer groups (noetl_materializer, noetl_result_materializer, noetl_state_materializer) and the gateway's SSE feed
SwitchNOETL_COMMAND_BUS_HOSTNOETL_EVENT_BUS_HOST
Also hoststhe lag metric KEDA readsthe gateway's key-value store and the WAL fan-out the off-server state builder replays

Why two engines

Events run about an order of magnitude hotter than commands (the worker's own note, event_bus.rs). The binding cost in an EHDB engine is fsync under the engine lock (ai-meta#205), so sharing one engine would put event volume in front of command dispatch. Separate engines keep a burst of events from slowing the next claim.

The event bus carries the source of truth

When the server publishes events instead of inserting them (NOETL_EVENT_INGEST_PUBLISH_ONLY=true), the first materializer group is the only writer of the durable noetl.event log (event_bus.rs). The worker's documentation says the server runs that way; with the code default (false) the server inserts directly (10.1).

Check your understanding

Writer Election and Fencing

REAL

An EHDB shard must have one writer. If two processes both believe they own the log, they can write conflicting histories. Two mechanisms prevent it: an election decides who the writer is, and a fence refuses writes from one that no longer is.

The election

The writer holds a Kubernetes Lease named ehdb-shard-<shard> (ehdb-shard-00000000 for shard 0; ehdb v0.15.1 crates/ehdb-reference/src/election.rs:169).

SettingDefaultVariable
enabledoffNOETL_EHDB_ELECTION
lease duration15 sNOETL_EHDB_ELECTION_LEASE_SECS
renew interval5 s ("three missed renewals lose the lease")NOETL_EHDB_ELECTION_RENEW_SECS

(ehdb election.rs:53-55; the switch is read by worker v6.15.0 src/ehdb/lease_store.rs:162-166.) The holder identity is the pod's hostname plus a random id, so a restarted pod is a new candidate and waits out the old lease: failover takes about lease + renew + 1 = 21 s (worker v6.15.0 src/ehdb/election.rs:38-51). The epoch is the lease's transition count.

On prod, the record for 2026-10-10 says "C2+C3 (election + fencing) remain HELD" (ai-meta wiki Home). By 2026-11-04 the election was running: the lease was held at epoch 29 (Home, "Verified state", from the writer's /metrics), and a writer restart on 2026-11-06 moved it to 30 (Sessions-Log, 2026-11-06).

The fence

EpochFence (ehdb v0.15.1 crates/ehdb-core/src/fence.rs) has three modes: off, shadow (count what it would refuse) and enforce (refuse a durable mutation whose epoch is lower than the highest one accepted). The switch is NOETL_EHDB_FENCING, default off, and without a running election the fence is inert.

On prod: enforce, armed

Read off the writer on 2026-11-16 (ai-meta wiki Umbrella-EHDB-Primary-Serve, 04:30 UTC; read only):

  • the writer StatefulSet sets NOETL_EHDB_FENCING=enforce and NOETL_EHDB_ELECTION=true, in every retained revision back to 2026-10-21 (the true start is earlier and not recorded);
  • ehdb_engine_fence_active reads 2 (enforce) on both the command bus and the event bus, and the fence's epoch (33) equals the election's;
  • the binary is worker 6.11.9, not v6.15.0;
  • what enforce had refused: 7 and 5 writes, all in the first ~10 s after the pod started, before the first election token reached the fence.

Code notes describe code, not a cluster

Worker v6.15.0 src/worker.rs:133-147 records that the election once acquired its lease +332 s after the writer started, behind two engine opens. Under enforce that would have refused every durable write for about 5.5 minutes per restart, on the one process hosting both buses, "and it is why enforce was not armed". The election's start was moved ahead of the bus hosts to fix that. The note is history from the code, not a statement about what prod runs today; the reading above is.

Why the order of start-up mattered

The incident is a general lesson about fences: a fence makes a late election into an outage. The failover window you publish (21 s here) holds only if the election runs first; anything that delays it widens the window for every restart.

Check your understanding

Durability: Tail Replication and the Unsealed Tail

PARTIAL

How much can EHDB lose? The answer depends on which records you ask about: sealed ones or the unsealed tail (13.2).

Sealed parts

A sealed part is immutable, so copying it needs no consensus: EHDB writes it once to each of N places (ehdb v0.15.1 crates/ehdb-l0/src/lib.rs:80-94). For the server's event-log store, an off-box object-storage replica was armed on prod on 2026-10-10 (Sessions-Log, "the off-box replica was armed").

The unsealed tail

The active part exists only on the local disk until it seals. A lost disk loses it. Tail replication ("B3") copies the tail off the node on a timer, so a loss is bounded by the tick rather than by the part size (crates/ehdb-l0/src/engine.rs:110-128):

SettingDefaultVariable
tail replicationoffNOETL_EHDB_TAIL_REPLICATION
tick15 s
clean up replicated tail objects (false keeps them all)onNOETL_EHDB_TAIL_CLEANUP

The project's own framing of what the server store's replicas buy is a "bounded-loss consistent prefix of sealed history, not 'no data loss'" (ai-meta wiki Home, the #460 block).

Tail replication is in the server's embedded store only (server v3.161.2 src/handlers/ehdb_embedded.rs:1015-1033), and was live on prod with a 60 s tick from 2026-10-10 (Sessions-Log, "B3+D2 live on prod"). It bounds the loss; it does not make writes synchronously durable.

The bus stores

The buses are single-copy

The command and event buses on the cmdbus-writer use the local filesystem substrate only (worker v6.15.0 src/command_bus.rs:286); the worker has no object-storage substrate. Their sealed parts and their tail sit on one volume. Treat the bus as durable against a process restart, not against losing its disk.

Check your understanding

The Chain Store

PARTIAL

Reading one execution's history from a log ordered by time means scanning everything around it. The chain store links each execution's events by (execution_id, prev_event_id), so its history can be read by following links (ehdb v0.15.1 crates/ehdb-l0/src/chain.rs:1-40).

Three gates

The server reads from the chain only when all three are set (server v3.161.2 src/db/queries/event_chain.rs:218-262):

GateOff when
NOETL_CHAIN_POPULATEunset (an allow-list: 1, true, yes, on)
NOETL_CHAIN_ADVANCEunset (same)
NOETL_CHAIN_SOURCE=chainany other value, or unset

All three are off by default, so the chain store serves nothing unless a deployment arms them. Without the populator, the source resolves to off.

On prod: serving, after three attempts

DateEventRecord
2026-09-28the populator proven; a problem found: after a restart, a running execution's next event got prev = NULL, and the store could not tell that pseudo-root from a genuine first eventSessions-Log, 2026-09-28
2026-09-29both halves of the root problem fixed (a coverage record plus head hydration)Sessions-Log, "the chain-store root problem, both halves"
2026-09-30ramp rolled back: a third mechanism, events chained in the wrong order (ai-meta#362, fixed by ordering the chain by links in ehdb v0.4.5)Sessions-Log, "the chain store ramp is ROLLED BACK"
2026-10-06gates disarmed at 18:36Z and re-armed at 19:23Z on evidenceSessions-Log, 2026-10-06 (evening)
2026-10-09"all three chain gates still armed"Sessions-Log, 2026-10-09 (deploy)

That is the latest dated statement this book found.

What is still open

The comparator that checks the chain against the log reports false divergence when its log snapshot is behind the store: staleness read as conflict (ai-meta#360, open). The chain store serves; the instrument that would show it agrees with the log is not yet trustworthy.

The general lesson

The root problem is worth remembering beyond EHDB: a store that marks "the first event" by an absent link cannot tell a real beginning from a gap. A restart creates exactly that gap. Whatever marks a beginning must be written, not inferred from something missing.

Check your understanding

EHDB as the State Substrate

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Embedded State: One EHDB per Shard

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

The Execution-Partitioned Event Store (RFC #355)

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

What Retiring Reconcile and Re-Drive Buys

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

ehgraph: A Graph Database for Topology

PARTIAL

ehgraph is the NoETL ecosystem's labeled-property graph database, for topology: what is connected to what. It runs as its own server, or embedded in noetl-server. Server v3.161.2 embeds git f200516 (2026-11-10, Cargo.toml:250). ehgraph has no release tag. The embedded graph stays off unless NOETL_EHGRAPH_EMBEDDED is exactly true. On production it is embedded and idle (dated record, 2026-11-22; 15.1).

The chapter is PARTIAL for those two reasons: an untagged revision, and a switch that is off by default. Code facts are from f200516 and from server v3.161.2. Production facts are from the dated public record. Where ehgraph's own pages disagree with the code at that revision, the chapter follows the code and names the page.

Sections

  • 15.1 Three Stores, Three Jobs REAL — Postgres is the system of record, EHDB carries the buses, ehgraph is a topology read model and stores nothing in EHDB.
  • 15.2 The Model PARTIAL — one label per node, typed properties, soft deactivation, a per-namespace change log, snapshots and session graphs, one primary per domain.
  • 15.3 Querying PARTIAL — the openCypher subset, Query API v2, Bolt on the standalone server, and the TCK 2024.3 recount.
  • 15.4 Transactions PARTIAL — snapshot reads, one serializable commit, and conditional commits with expect.
  • 15.5 ehgraph Inside the Server PARTIAL — the noetl-cluster mount, the single-writer declaration, the instance graph, and rollback across format versions.
  • 15.6 Operations PARTIAL — backup to a directory or GCS, compaction (off by default), and memory budgets.
  • 15.7 Where It Is Heading TARGET — the designs that would use ehgraph as a read model of runtime topology. Read replicas are not built.

Three pages are behind the code at f200516

docs/wiki/Roadmap.md still lists compaction and "an S3 or GCS client" as not in this release. docs/wiki/Architecture.md still describes the backup prefix as a directory standing in for an object store. docs/wiki/Embedding.md still says noetl-server pins 760f572. 15.5 and 15.6 follow the code and quote the stale sentences beside it.

Check your understanding

Three Stores, Three Jobs

REAL

A NoETL deployment has three stores of its own: Postgres, EHDB and ehgraph. They are easy to confuse, because the same words get used for each (log, snapshot, version). They hold different things, and only one of them is the record. This section says which store does which job, at server v3.161.2, which embeds ehgraph at git f200516. Business data (your data) lives in none of them (3.4).

Who is authoritative for what

StoreHoldsAuthoritative?
Postgresthe event log (noetl.event), the catalog (noetl.catalog), credentials, commandsyes: it is the system of record. Every event is written with INSERT INTO noetl.event (src/db/queries/event.rs:40), and the catalog reads and writes Postgres by default (3.4)
EHDBthe command bus and the event bus (13.4); a mirror of the event log; the chain storenot yet for state. It carries every command and event in flight. The event log reaches it as a mirror of the Postgres row (src/handlers/ehdb_eventlog_mirror.rs), appended asynchronously on production per the dated record of 2026-11-22. Making it the authoritative state store is a design (Chapter 14, TARGET)
ehgraphtopology graphs: which instances exist, which pools they are in, which playbooks they can run, who knows whomnever. It is a read model: a picture projected from the instance registry. The design calls it "never authoritative" (ai-meta RFC interstate-runtime-bus.md §5)

So the answer to "where is the truth about this execution?" is Postgres today. The answer to "what is connected to what?" is meant to be ehgraph. Neither EHDB nor ehgraph replaces Postgres at these releases.

ehgraph is not part of EHDB

The names suggest a family, and the designs share ideas: an append-only change log of frames, sealed immutable parts, an age-based seal. But ehgraph only borrows the design. Its README states that the repository does not depend on EHDB and "never stores graph data in an EHDB dataset" (noetl/ehgraph f200516, README.md), and its crates do not link it. The server's own pin comment says the same: ehgraph "does not link EHDB" (server v3.161.2 Cargo.toml:248).

The practical consequence is the one that matters in an incident. The two stores fail, back up and restore independently. An EHDB problem does not touch the graph, and a graph that refuses to open does not stop the buses.

Why a graph store at all

Topology questions are path questions. "Which instances can run this playbook, and through which pool?" or "what did this instance hand work to, and when?" are joins of unknown depth in a table, and one MATCH in a graph. ehgraph keeps such graphs as a labeled property graph, with history: deactivating a node keeps it, so "who knew whom, and when" can still be answered after an instance is gone (server src/instances/graph.rs:19-22).

It is deliberately small:

  • one writer per graph, a single primary with no replicas yet;
  • graphs assumed to fit in one node's memory, up to about 10⁶ elements;
  • scale-out by adding instances per topology domain, not by splitting one graph (docs/wiki/Roadmap.md).

Off by default, and idle where it is on

Built, embedded, and not yet used

In server v3.161.2 the embedded graph is off unless NOETL_EHGRAPH_EMBEDDED=true, and the topology writer needs NOETL_EHGRAPH_TOPOLOGY_WRITER=true plus a token file with a write grant (src/ehgraph_embedded.rs:77, src/instances/graph.rs:28-33). Nothing in the server reads the graph. No server code calls graph.query, graph.neighbors, graph.path or graph.cypher.

On production, the dated record of 2026-11-22 reads the graph as embedded, writer switched on, and idle: noetl_instance_total{outcome="graph_written"} was 0 since the server pod started on 2026-11-19, and the backup loop had shipped no new objects (ai-meta wiki Sessions-Log, 2026-11-22). A counter is a reading over a window, here about three days. It says nothing was written in that window, not that the writer cannot write.

Sections 15.2–15.6 cover what ehgraph supports today. 15.7 covers what it is planned to become: the read model for runtime topology.

Check your understanding

The Model: a Labeled Property Graph with History

PARTIAL

ehgraph stores a labeled property graph: nodes and directed edges, each with one type and a map of properties, plus the history of how that graph changed. This page is the model at git f200516 (2026-11-10). It is PARTIAL for the same reason as the chapter: ehgraph has no release tag, and the server embeds it behind NOETL_EHGRAPH_EMBEDDED, off by default (15.1). How to query the model is 15.3. How a batch becomes one version is 15.4.

The word label on this page is the graph type. A playbook tool-list label is a different term (Appendix G).

One type, and a property map

docs/wiki/Cypher.md §1 maps the store onto openCypher:

In the storeWhat a query sees
A namespaceThe graph. The request chooses it (namespace, /db/{namespace}, or Bolt database=). A query does not name the namespace
A node's type, exactly oneIts label. (n:AccessPoint) matches type = "AccessPoint". A node with no type, or with a second type, is refused (15.3)
An edge's typeThe relationship type. Edges are directed
props: string, int, float, bool, timestamp, list, or mapProperties. A timestamp is stored as a timestamp and reads back as {"$timestamp": "<rfc3339>"}. Timestamps compare with each other
Caller-chosen string idThe reserved property id. It is never stored inside props. Matching {id: …} is a direct lookup
Default edge id edge:{src}:{type}:{dst}:{origin}One relationship for a (start, type, end) triple, unless the write gives the edge its own id

JSON numbers with no fraction are integers (docs/wiki/API-and-MCP.md). An edge whose src or dst is missing or inactive is rejected, and the whole batch is rejected with it. ehgraph does not create a placeholder node.

An optional file data_dir/schemas/<namespace>.json turns validation on for that namespace. Without the file the namespace is schemaless. With "strict": true, only declared types are accepted and required properties must be present (docs/wiki/Getting-Started.md).

Each element also carries first_seen, last_seen, source, origin, execution_id, and version_updated. Cypher reads them with eh.firstSeen, eh.lastSeen, eh.source, eh.origin, eh.executionId, eh.version, and eh.active.

Deleting keeps the history

DELETE and graph.deactivate soft-deactivate. The element stays, with its history and its versions (docs/wiki/Cypher.md; crates/ehgraph-cypher/src/exec.rs:80-81, as 15.3 cites). A deactivation bumps version_updated. MATCH and graph.query see active elements unless the request asks for inactive ones (active: false) or for either (active: "any").

MERGE on a deactivated id reactivates it. An identical upsert, same ids and same content, writes nothing and does not bump the version.

The change log is the authority

Each namespace has its own monotonic graph_version. A write batch is one framed record: magic || version || length || crc32 || json body, with ehgraph's magic EHGR. The shape is the one EHDB's L0 log uses. The process does not link EHDB and does not write an EHDB dataset (docs/wiki/Architecture.md; the README states the same boundary).

A write is acknowledged only after the frame is fsynced and the head pointer is published. If the process dies after the frame is durable and before the head file moves, the next open fast-forwards the head. A torn tail is truncated and ignored.

Replaying a batch with the same idempotency key does not change state or version. An identical upsert with no key is also a no-op. Keys are remembered per namespace for a bounded window (docs/wiki/API-and-MCP.md):

  • Time (DEFAULT): [store] idempotency_window_s, 24 hours, measured on the log clock (the highest committed ts_ms, which never goes backwards), not on the wall clock (crates/ehgraph/src/config.rs:155-157).
  • Count (DEFAULT): [store] idempotency_max_keys, 100,000. The oldest keys go first (config.rs:159-161).

Inside the window, the same key with a different payload is CONFLICT. After the key is forgotten, a retry is a new write planned against the current graph: an unchanged upsert is still a no-op, a retry that lands after someone else changed those elements re-applies the old payload, and a reused key with a different payload is accepted.

Parts seal on size, on record count, or on age. The defaults are 8 MiB, 1,024 records, and 30 seconds, and the age seal is on (config.rs:367-375, default_seal_age). Sealed parts are immutable. That age bound is how long a record can sit in the unshipped tail a backup can still lose (15.6).

Materialized state and session graphs are derived. Deleting namespaces/<name>/derived/ and reopening rebuilds them from full snapshots plus the log.

Snapshots and session graphs

graph.snapshot.create writes an Arrow IPC snapshot at the current head. The scope defaults to the full namespace.

A session opens explicitly (graph.session.open) or on first use. The server loads one scope — the full namespace, a property filter, a k-hop neighbourhood, or a named snapshot — builds Arrow record batches and a CSR adjacency index, and pins that graph_version. Later reads in the session do not touch the log. graph.session.refresh builds a new graph and swaps it in. A read that started before the swap finishes on the old version.

Sessions are read-only. A write that names a graph_session_id returns READ_ONLY_SESSION. Writes go to the log and show up in the session only after a refresh.

Memory has a per-session cap and a global budget (15.6). On overflow the server drops only sessions that are already closed or expired, then returns MEMORY_BUDGET_EXCEEDED. It does not evict an active session. The idle timeout is 300 seconds and the maximum lifetime is 24 hours (DEFAULT, config.rs:358-363). A later read with that id returns SESSION_EXPIRED.

Two owners who load the same scope get two resident graphs. Copies are not shared. Concurrent first loads for the same owner and the same scope share one load.

One primary per topology domain

You run one instance per purpose. The README's examples are ehgraph-noetl-cluster (embedded in the server) and ehgraph-network (standalone, for qnetmon). Each instance is a single primary. Instances do not know about each other. Read replicas are named in the config and refused at open (15.7).

One process holds an exclusive lock on data_dir/LOCK. A second process on that directory is refused, and so is a second handle in the same process. EhGraph::open calls ensure_primary before it serves (crates/ehgraph/src/lib.rs:188). role = "replica" and role = "standby" return UNAVAILABLE: "read replicas and standby are not enabled" (crates/ehgraph-api/src/dispatch.rs:1272-1278).

docs/wiki/Roadmap.md assumes these graphs fit in one node's memory, up to about 10⁶ elements, and says to scale by adding instances rather than by splitting one namespace. That size is an assumption (GUIDANCE), not a measurement taken for this page. Sharding is deferred until a measured domain does not fit.

Check your understanding

Querying: openCypher, Query API v2 and Bolt

PARTIAL

ehgraph speaks a practical subset of openCypher, the query language of Neo4j, Memgraph and others. This section says what the subset covers, where it stops, and how well it matches the language's own test suite. Everything here is ehgraph at git f200516 (2026-11-10), the commit server v3.161.2 embeds. The page is PARTIAL for two reasons: ehgraph has no release tag yet, and the server embeds it behind NOETL_EHGRAPH_EMBEDDED, off by default (15.1).

Four ways in, one store

InterfaceWhereNotes
MCP tool graph.cypherPOST /mcp, tools/callwhat a kind: mcp playbook step uses
HTTPPOST /v1/cypherthe same body and result envelope
Neo4j Query API v2 shapePOST /db/{namespace}/query/v2, transactions under …/query/v2/txthe plain-JSON shape Neo4j's own HTTP API uses
Bolt 5.0, falling back to 4.4[bolt] listen = "…" in the standalone server's configofficial Neo4j drivers over bolt://; off unless configured (crates/ehgraph-server/src/lib.rs:20-22)

(docs/wiki/Cypher.md.) The older fixed tools (graph.upsert, graph.query, graph.neighbors, graph.path, …) remain the stable contract. Cypher is an extra interface over the same store.

Bolt is not on the embedded graph

The server's embedded instance serves the HTTP and MCP routes under /ehgraph/noetl-cluster (server src/ehgraph_embedded.rs:90) and does not open a Bolt listener: there is no Bolt code in the server at v3.161.2. Bolt exists in the standalone ehgraph server, and the listener has no TLS yet (TARGET), so the docs advise loopback or a TLS proxy in front.

What the subset covers

Reads and writes, both:

  • Matching: MATCH, OPTIONAL MATCH, WHERE, multiple patterns, relationship direction and type alternatives, named paths, shortestPath and allShortestPaths.
  • Variable-length paths: *, *m..n and the other forms, with trail semantics and an upper bound capped at 16 hops (max_hops: 16, crates/ehgraph-cypher/src/exec.rs:41).
  • Shaping: WITH, UNWIND, RETURN with DISTINCT, ORDER BY, SKIP, LIMIT; aggregation; UNION; CASE; list comprehensions; pattern predicates and comprehensions; EXISTS { pattern }.
  • Writes: CREATE, MERGE (with ON CREATE SET and ON MATCH SET), SET, REMOVE n.k, DELETE, DETACH DELETE.
  • Transactions: several statements committed atomically as one graph version, serializable and optimistic (first committer wins), with conditional commits (section 15.4).

A typical topology question:

MATCH p = shortestPath((a:AccessPoint)-[*..8]->(:Internet))
RETURN a.name, [n IN nodes(p) | n.name] AS via

Where it differs from Neo4j

These are not bugs to work around. They follow from ehgraph's model.

  • One label per node. A node's label is its type, and it has exactly one (exec.rs:1639). Multiple labels, label expressions (:A&B) and REMOVE n:Label are refused. So is a node with no label (CREATE ()).
  • DELETE deactivates. Deleted elements are soft-deactivated, and their history and versions are kept (exec.rs:80-81). MATCH sees active elements unless the request asks for inactive ones.
  • id is the element id, not a property. id(n) returns ehgraph's string id, not Neo4j's integer.
  • Idempotent writes report idempotently. MERGE … SET with unchanged values writes nothing and creates no new version, and properties_set counts only real changes.

Not supported at f200516: CALL procedures and subqueries, COUNT { }, FOREACH, LOAD CSV, regular expressions (=~), temporal and spatial types, reduce(), schema DDL (CREATE INDEX), and neo4j:// routing. GQL-only syntax is on the roadmap, not in the subset.

How well it matches the standard

ehgraph runs the openCypher TCK (the language's conformance suite), release 2024.3, on 2026-11-10. The scenario-level results are in docs/wiki/tck-results.json. The book recounted them from that file:

ScenariosPassFailOut of modelPass rate, allPass rate, in-model
3,8962,2924341,17058.8%84.1%

"Out of model" scenarios use features ehgraph does not have by design. By the recorded reasons, 1,069 of the 1,170 involve temporal or spatial types, 52 CALL procedures and 44 multiple labels per node. "In-model" is pass ÷ (pass + fail).

The largest single gap is unlabeled nodes. Of the 434 failures, 391 come from scenarios that create a node with no label in their setup or query. The book counted the failure reasons in the JSON to check that figure. Without them the in-model rate would be 98.2%. ehgraph deliberately counts them as failures: an unlabeled node is a gap in the model, not a reason to drop the test. Whether unlabeled nodes get a mapping is an open roadmap item.

Reading a conformance number

"84% of the TCK" without its denominator overstates this result. Quote the release (2024.3), the date, both rates, and that most of the remaining failures share one cause. Re-run it (scripts/tck.sh) before quoting a newer number.

Check your understanding

Transactions

PARTIAL

A change to an ehgraph namespace commits as one graph_version, or it does not commit. Several statements can share that commit. This is ehgraph at git f200516, and the page is PARTIAL because that revision has no release tag and the server embeds it behind a default-off switch (15.1). The element versions these commits check are the model's version_updated (15.2). The Cypher subset that runs inside a transaction is 15.3.

Writers that send a plain graph.upsert or graph.deactivate with no expect keep the same path, the same versions, and the same responses (docs/wiki/Transactions.md).

KindWhereWhat it guarantees
Conditional commit (expect)graph.upsert, graph.deactivate by ids, graph.cypher, graph.tx.commit, Query API commit, Bolt BEGIN with tx_metadata.expectApplies only while every expected element version, and the graph version if you sent one, still holds. Otherwise VERSION_CONFLICT (409) and nothing is written
Auto-commit Cypher writegraph.cypher, POST /db/{ns}/query/v2, Bolt RUN outside BEGINOne serializable graph version for every upsert and deactivation in the statement. A lost race re-runs on the new head
Multi-statement transactiongraph.tx.begin / run / commit / rollback, Query API /tx, Bolt BEGIN / RUN / COMMIT / ROLLBACKSnapshot reads plus read-your-writes. Every statement commits as one graph version, serializably, or none of them do

Conditional commits: expect

"expect": {
  "graph_version": 9121,
  "versions": {"gw:1": 9121, "lock:job-7": 0}
}

graph_version is optional: the namespace head must equal it, and 0 means the namespace must be absent. Each entry in versions is that element's version_updated. 0 means the element must not exist (create-if-absent). A deactivation bumps version_updated, so a concurrent delete fails a stale expectation.

The check runs under the store's write lock, in the same critical section that appends the commit. An unknown key inside expect is rejected (400). A server from before this feature ignores an unknown top-level expect, so a caller that depends on it checks graph.instance.info: features must contain "expect".

Several statements, one commit

graph.tx.begin     {namespace, timeout_ms?, source?, execution_id?}
                   → {tx_id, graph_version, expires_ms}
graph.tx.run       {tx_id, query, params?, max_rows?}
                   → {columns, rows, stats, expires_ms}
graph.tx.commit    {tx_id, expect?, idempotency_key?}
                   → {graph_version, changed, writes}
graph.tx.rollback  {tx_id} → {rolled_back}

The Neo4j Query API uses the same semantics (docs/wiki/Transactions.md):

RequestEffect
POST /db/{ns}/query/v2/txOpen. 202 with transaction.id and transaction.expires. An optional statement runs immediately
POST /db/{ns}/query/v2/tx/{id}Run one statement in that transaction
POST /db/{ns}/query/v2/tx/{id}/commitCommit. ehgraph accepts an expect extension. 202 with bookmarks: ["ehgraph:{ns}:{version}"]
DELETE /db/{ns}/query/v2/tx/{id}Roll back. 404 TransactionNotFound if it is already gone

On Bolt, BEGIN opens the transaction (the database name is the namespace, tx_timeout is honoured, and tx_metadata.expect is the conditional commit). COMMIT returns a bookmark. ROLLBACK, RESET, GOODBYE, and a dropped connection all discard it.

The 6×15=90 figure was recounted, not re-run

docs/wiki/Transactions.md records a check with the official Python driver 5.28.1: 6 threads, each doing 15 read-modify-write increments, finished at exactly 90, and the driver retried the conflicts. This chapter recounted that product from the sentence (6×15=90). The driver was not re-run against f200516 for this page, so the 90 is the wiki's recorded result, not a new measurement.

What a transaction can see

BEGIN pins the namespace head. Every statement reads that snapshot plus the transaction's own earlier writes. Commits from other writers stay invisible inside the transaction.

Nothing reaches the store before COMMIT. Writes live in a copy-on-write overlay. ROLLBACK frees that memory and does not touch the log. A failed statement fails the transaction, as in Neo4j: later statements and COMMIT are refused, and only ROLLBACK is accepted. The earlier writes are discarded with it.

COMMIT sends the net effect — upserts with full property images, plus soft deactivations — to Store::transact, which appends one change-log frame and so one graph_version. Schema rules and "identical content does not bump the version" apply as they do for graph.upsert. A transaction whose net effect is empty commits without a new version.

The commit is serializable optimistic concurrency: first committer wins. While the transaction runs it records a footprint:

It recordedWhenA later commit conflicts if it…
Element idsAny lookup, found or not, and every element writtenChanged that element
LabelsA label scan MATCH (n:L)Created or changed any L node
"All nodes"A scan with no label, MATCH (n)Changed any node
Adjacency of node xAn expansion from xCreated, changed, or removed an edge at x

Under the write lock, COMMIT looks at elements with version_updated above the snapshot. If none of them intersects the footprint, the transaction's reads are still what the head would return, and committing now is equivalent to having run it serially at the head. If one intersects, the commit fails with VERSION_CONFLICT and a message that starts serialization conflict: and names the element. Nothing is written. The client re-runs the whole transaction. If the head has not moved, the scan is skipped.

The check is per element, per label, and per adjacency. It is not per property: a concurrent write to a different property of a node you read still conflicts. Writes to elements you neither read nor scanned do not. The wiki's example is a topology writer updating access points while a transaction edits Account nodes.

An auto-commit Cypher write uses the same commit. A lost race re-runs the statement on the new head, up to 3 attempts (DEFAULT, crates/ehgraph-api/src/dispatch.rs:965, AUTOCOMMIT_ATTEMPTS), and then returns VERSION_CONFLICT. The caller sees only the committed attempt. Older auto-commit results reported upserts and deactivations as two versions. At f200516 they are one: writes: [{"op": "commit", …}], or [] when nothing changed.

Timeouts, grants, and the error codes

The idle timeout is 30 seconds by default and at most 10 minutes (DEFAULT, crates/ehgraph-api/src/tx.rs:42 and :44, DEFAULT_TX_TIMEOUT_MS and MAX_TX_TIMEOUT_MS). Bolt's tx_timeout uses the same bound. Each statement resets the idle timer. At most 256 transactions are open per instance (tx.rs:40, MAX_OPEN_TXS). A transaction belongs to the principal that opened it. BEGIN checks the read grant. An updating statement, and a COMMIT that writes, check the write grant. An open transaction keeps its snapshot resident until it ends.

ehgraphHTTPNeo4j code on Bolt and the Query APIWhat the client does
VERSION_CONFLICT "serialization conflict: …"409Neo.TransientError.Transaction.OutdatedRe-run the whole transaction. execute_write does this
VERSION_CONFLICT "expectation failed: …"409Neo.ClientError.Schema.ConstraintValidationFailedRe-read the versions in expect, then retry
NOT_FOUND "transaction … not found"404Neo.ClientError.Transaction.TransactionNotFoundStop. It expired, committed, or rolled back

ehgraph already serializes commits through one store lock and already keeps version_updated on each element, so the footprint check needs no lock table. A change-log frame could already hold a mix of upserts and deactivations, so transactions do not change the on-disk format. Older builds still read the log.

Check your understanding

ehgraph Inside the Server

PARTIAL

The server can run the noetl-cluster graph in-process. At server v3.161.2 that graph is off unless the deployment turns it on, and on the production reading of 2026-11-22 it was on and idle (15.1). This page is PARTIAL because the switch is off by default and because the embedded engine is the untagged ehgraph rev f200516.

The same engine runs standalone. The log, the tools, the grants, the sessions, and the budgets are the same in both modes (docs/wiki/Embedding.md). The standalone server is what serves a domain such as network. This page is the embedded path.

The mount, and the switches

NOETL_EHGRAPH_EMBEDDED must be exactly true (src/ehgraph_embedded.rs:77). Unset, the module's own comment says not a byte of ehgraph runs, no route is mounted, and the server behaves as the release before the pin. When it is true, the server opens EhGraph::open_embedded_async from the TOML at NOETL_EHGRAPH_CONFIG and mounts graph.router() at /ehgraph/noetl-cluster (ehgraph_embedded.rs:90). That router is HTTP and MCP. The embedded instance opens no Bolt listener (15.3).

SwitchDefaultWhat it arms
NOETL_EHGRAPH_EMBEDDEDoff (must be exactly true)Open the embedded graph and mount it
NOETL_EHGRAPH_CONFIGunsetPath to the ehgraph TOML (instance, data_dir, backup_prefix, budgets, grants). It holds bearer tokens
NOETL_EHGRAPH_HOST_REPLICASunset, and unset refusesMust be 1. There is no default
NOETL_EHGRAPH_HOST_ORDINALderived from HOSTNAMEOptional StatefulSet pod index. Only 0 may write
NOETL_EHGRAPH_TOPOLOGY_WRITERoff (must be exactly true)Project the instance registry into the graph
NOETL_EHGRAPH_TOPOLOGY_TOKEN_FILEunsetA file holding a bearer token. The writer does not start without a readable, non-empty file
NOETL_EHGRAPH_TOPOLOGY_NAMESPACEtopologyThe namespace the registry projection writes (src/instances/graph.rs:45)

The domain and the namespace are different. The embedded domain is noetl-cluster (EMBEDDED_DOMAIN, ehgraph_embedded.rs:88). The registry writes the namespace topology unless the namespace variable is set. Any other domain in the TOML is refused: network runs standalone (prepare_config, ehgraph_embedded.rs:189-194).

auth.mode = "disabled" is refused for an embedded instance unless auth.allow_disabled_embedded = true is also set, for a local-only host (crates/ehgraph/src/lib.rs:189-197 at f200516).

If the graph is armed and then refuses or fails to open, the server still serves everything else. The refusal is logged at error, and every request under /ehgraph/noetl-cluster answers 503 with the reason (ehgraph_embedded.rs:34-39, 296-312). No partial instance is left running.

The single-writer declaration

An embedded instance is a single writer. The data-directory lock only covers one volume: two server pods, each with its own volume, would each take the lock and become two primaries. The server therefore refuses to open unless the deployment says it is the only writer (ehgraph_embedded.rs:15-31):

  • NOETL_EHGRAPH_HOST_REPLICAS is set, and set to 1.
  • NOETL_SHARD_COUNT > 1 refuses, and so does NOETL_EXECUTION_AFFINITY=true.
  • The pod ordinal (NOETL_EHGRAPH_HOST_ORDINAL, otherwise the trailing -N of HOSTNAME) must be 0. ehgraph enforces that itself (crates/ehgraph/src/config.rs:98-103).

The TOML must not carry its own [embedded] section. The declaration comes from the deployment (ehgraph_embedded.rs:197-202). ehgraph then checks the declaration, a process-wide claim on the instance_id and the domain, and the directory lock.

The declaration is not a proof

docs/wiki/Embedding.md says so, and the server comment repeats it. A host that runs two replicas and declares one defeats the check. The server's own refusals (shard count, execution affinity, ordinal) are the other half, and they only see the configuration they are given.

start_maintenance runs the session sweep and the backup loop on the server's runtime. Shutdown waits up to 10 seconds, drains in-flight calls, and releases the lock (SHUTDOWN_TIMEOUT, ehgraph_embedded.rs:93).

The instance graph the registry writes

The server is the only writer. An instance never opens the graph (src/instances/graph.rs:3-6). The projection runs only when all three of these hold: the writer variable is exactly true, the embedded graph is running, and the token file is readable (graph.rs:219-239). Missing any one of them, the registry works as it does with the writer off, and nothing is written.

One registration becomes nodes and edges in the namespace (graph.rs:6-17):

ElementIdType
Nodecontrol:<server id>control_plane
Nodeinstance:<instance id>noetl_instance
Nodepool:<name>pool
Nodeplaybook:<path or glob>playbook
Edgeinstance → controlregistered_with
Edgeinstance → poolin_pool
Edgeinstance → playbookcan_run
Edgeinstance → instanceknows, from known_peers, and only toward a peer that is live
Edgeinstance → instancedelegated_to, one edge per task handoff

Every element carries source: instance-registry. A lapsed lease is retired with graph.deactivate by that source and not_seen_since, which is the soft deactivation in 15.2. The node stays, so "who knew whom, and when" is still answerable after the instance is gone.

ehgraph rejects an edge to a missing or inactive node and rejects the whole batch with it. knows and delegated_to therefore go in their own batches, one edge each. A peer that is not in the graph yet costs that one edge, and the instance's own record still commits (graph.rs:24-26).

As 15.1 records from a search of server src at v3.161.2, no server code calls graph.query, graph.neighbors, graph.path, or graph.cypher. The writer can project the registry. Nothing in that tree reads the projection back.

Rollback refuses a format it does not know

An embedded graph rolls back with the server. Every on-disk JSON file carries a format field and is decoded with no unknown fields (crates/ehgraph-store/src/format.rs at f200516). STORE_FORMAT is 2 (format.rs:49). Format 1 is the MVP shape (a file with no marker counts as 1). Format 2 is a compacted namespace manifest: floor_version and floor_snapshot. A file is written at the lowest format that describes it, so a directory stays at format 1 until compaction has actually run on a namespace. Compaction is off by default (15.6).

A file newer than this build, or a field this build does not know, makes open refuse, with a message that names the file. The server's pin comment says the /ehgraph/noetl-cluster routes then answer 503 (Cargo.toml:241-246). The graph does not silently drop the fields it does not understand. The recovery is to roll the server forward, or to restore a backup the older build took.

Embedding.md still names pin 760f572

docs/wiki/Embedding.md at f200516 says noetl-server pins this repo at 760f572 (noetl/server#557, 2026-11-07). Server v3.161.2 pins f200516 (Cargo.toml:250), the revision this chapter describes. The page lists what that older pin already contained: GCS backups, bounded idempotency keys, memory budgets, compaction left off, and the read/write path fixes. Those are in the tree at f200516. This chapter did not diff 760f572 against f200516 commit by commit. The server pin moves only in a chore change, so moving it does not by itself cut a server release (Embedding.md).

Check your understanding

Operations: Backup, Compaction and Budgets

PARTIAL

ehgraph at git f200516 can ship a backup to a directory or to Google Cloud Storage, can fold shipped change-log parts into a snapshot, and bounds the memory an instance will hold. The page is PARTIAL: there is no release tag, compaction is off unless the config turns it on, and the 15-minute restore target in the operations page has not been measured. The embedded graph's backup loop on production had shipped nothing on the 2026-11-22 reading (15.1).

GET /healthz returns instance_id, domain, role, and state (serving once the process holds the lock). GET /metrics is Prometheus text. Every series carries instance_id and domain (docs/wiki/Operations.md).

Backup

backup_prefix chooses the target (crates/ehgraph-backup/src/lib.rs:5):

PrefixTarget
A filesystem path, such as /var/backups/ehgraph/ehgraph-networkA directory
gs://<bucket>/<prefix>A Google Cloud Storage prefix (lib.rs:119)

Any other scheme:// is refused (lib.rs:132-136). S3 is not a target at this revision.

Both targets follow one order (docs/wiki/Operations.md, and ehgraph-backup/src/lib.rs:10-16):

  1. Immutable objects are put-if-absent: sealed parts, snapshots, instance.json, and schema files. On GCS that is an upload with ifGenerationMatch=0 (crates/ehgraph-backup/src/gcs.rs:7). A retry does not rewrite an object that already landed.
  2. Per namespace, the manifest is written after the parts it names, and the head after the manifest.
  3. checkpoint.json is written last. A crash mid-ship leaves the previous checkpoint, and every object that checkpoint names exists.

ehgraph never deletes from a backup prefix. A GCS target uses [backup] auth = "metadata" by default (the GKE metadata server, Workload Identity), or env:VAR, or none for an emulator. Transient errors (timeouts, 408, 429, 5xx) are retried 4 times (gcs.rs:45, ATTEMPTS). A 401 or 403 is UNAUTHORIZED and names the missing permissions. Inside the server, the graph uses the pod identity the server's own GCP auth uses, or a token the host passes through OpenOptions::backup_token (docs/wiki/Embedding.md).

A ship runs from the process that holds the lock: backup_interval_s (0 means ship only when asked; DEFAULT), POST /v1/admin/backup with an operator grant (namespace = "*"), or EhGraph::backup_now. The ehgraph backup CLI takes the data-directory lock, so it fails while the server or the embedding host is up. That is the single-writer rule (15.2).

Restore is offline, into an empty data directory. It format-checks checkpoint.json before it writes anything. A restored instance comes up at the backed-up version. Later writes continue from there. Restoring one instance does not touch another instance's directory or prefix.

RPO is the unshipped tail: versions still in an unsealed part, plus anything sealed and not yet copied. Age seal bounds how long a record can sit unsealed (DEFAULT 30 seconds, 15.2). The operations page states the bound as backup_interval_s + seal_max_age_s, and says that is 60 seconds with the example config and that 60 seconds is the RPO target. That 60 is GUIDANCE for the example config, not a measurement of a running cluster. The reported series are ehgraph_backup_lag_versions, ehgraph_backup_lag_seconds, ehgraph_backup_failures_total, and ehgraph_backup_last_shipped_timestamp_seconds (0 if nothing has ever shipped).

RTO is the time to copy the prefix plus replay on open. docs/wiki/Operations.md names a target of 15 minutes for one domain at the planning size of about 10⁶ elements, and says that target has not been measured against a real bucket (NOT_YET_MEASURED). The same page, under "What the lag means", also says there is no numeric RTO in this release and that restore time is the copy plus the rebuild. Both sentences are in that file. This chapter does not pick one of them.

Roadmap.md and Architecture.md still describe an older backup

docs/wiki/Architecture.md says the backup directory "is a filesystem prefix. It stands in for an object store until an S3-compatible client is chosen." docs/wiki/Roadmap.md, under "Not in this release", still lists "An S3 or GCS client" and "Compaction of log segments covered by a retained snapshot." At f200516 the code has a GCS client (gcs.rs, and open_target on a gs:// prefix) and has compaction, off by default (below). docs/wiki/Operations.md matches the code. The book follows the code.

Compaction, off by default

Without compaction the change log grows for the life of a namespace, and so does replay on open. With it on, sealed parts are folded into a full snapshot after each successful backup:

[store]
compaction = true      # DEFAULT false
compact_min_parts = 8  # DEFAULT: compact only when at least this many parts can go

compaction defaults to false (crates/ehgraph/src/config.rs:145 and the Default impl at :207). compact_min_parts defaults to 8 (config.rs:151-153).

A prefix of sealed parts is dropped only when every part in it is all three of these (docs/wiki/Operations.md):

  • Shipped: at or below the backup checkpoint's backed_up_version. A part that was never backed up is never dropped.
  • Covered by a full snapshot written exactly at the new floor version.
  • Outside the idempotency window, or it records no idempotency key. Those keys are already forgotten, so the window does not change.

The order is crash-safe. The floor snapshot is made durable, then the new manifest (with floor_version and the pinned floor_snapshot) is written, and only then are the part files deleted. A crash before the manifest leaves the old log in force. A crash after it leaves part files that the next open removes rather than re-adopts. A restore from a backup prefix keeps every part it ever received, and open treats the pre-compaction parts as already folded.

graph_at and graph.version.info at a version below the floor return NOT_FOUND. The floor and everything after it stay readable. snapshot_keep (DEFAULT 16) never removes the floor snapshot. A compacted manifest is format 2, which older builds refuse (15.5). Compaction runs under the backup's ship lock, so it does not delete a part a ship is still copying.

The per-namespace series are ehgraph_log_parts, ehgraph_log_bytes, ehgraph_log_floor_version, and ehgraph_open_replay_seconds.

Leave compaction off until rolling back past this release is no longer required. Turning it on writes format 2, and a server built before the pin cannot open that manifest.

Memory budgets

An instance holds three kinds of memory (crates/ehgraph/src/budgets.rs):

MemoryBoundOn overflow
Materialized graph, every namespace, always residentresident_graph_bytesA write that would grow it is refused with MEMORY_BUDGET_EXCEEDED before it is logged. Writes that do not grow it, and opening, are not refused for this cap
Sessions (Arrow batches)global_bytes, per_session_bytesEnded sessions are evicted first, then the open fails with MEMORY_BUDGET_EXCEEDED. An active session is not dropped
Idempotency keysidempotency_max_keysThe oldest keys are forgotten (15.2)

Standalone defaults (DEFAULT, budgets.rs:77-82): 256 MiB for all sessions, 64 MiB for one session, and an unlimited graph (0).

Embedded defaults come from the host limit: [budgets] host_memory_bytes, otherwise the container cgroup limit (budgets.rs:20-31). For whatever the config leaves unset, the resident graph gets 10% of the host, sessions get 10% together, and one session gets a quarter of that session budget. Each derived value is at least 16 MiB. Open refuses if the graph budget and the session budget together exceed half the host (budgets.rs:133-144). With no detectable limit, the fixed session defaults apply and the graph is capped at 256 MiB (budgets.rs:106-110). The server sets no [budgets] of its own, so an armed embedded graph takes these derived numbers (docs/wiki/Embedding.md). graph.instance.info reports them. ehgraph_budget_bytes{kind} and ehgraph_resident_graph_bytes are the series.

docs/wiki/Operations.md summarises crates/ehgraph-store/tests/resident_bytes.rs as about 1,660 bytes per element for a noetl-cluster-shaped graph (about six properties, including a two-entry map on nodes, and one property on edges) and about 670 bytes for an element with no properties. On that summary, 10⁴ cluster-shaped elements are about 16 MiB and 10⁶ are about 1.6 GiB, and the page says to budget about 20% more for allocator overhead. The test itself asserts that the estimate stays within 25% of the measured heap (resident_bytes.rs:133-137). This chapter did not re-run the test, so those byte figures are the operations page's summary, not a new measurement. The planning size of about 10⁶ elements is the roadmap's assumption (GUIDANCE), the same one 15.2 cites.

Call start_maintenance on an embedded graph. Without it, idle sessions never expire and the budget fills (docs/wiki/Embedding.md). The server does call it (15.5).

Check your understanding

Where It Is Heading: a Read Model for Runtime Topology

TARGET

Today ehgraph is a single primary. The server can embed the noetl-cluster graph and can project the instance registry into it, behind switches that are off by default, and on the 2026-11-22 reading that projection was idle (15.1, 15.5). Nothing in the server reads the graph. The designs below would keep that arrangement and point more topology questions at it. They are drafts. None of the TARGET pieces is built. The page is TARGET.

A read model here means a picture projected from somewhere else. The registry, the event log, or another store remains the record. The graph can lag, and it can disagree with the record. Queries against it answer "what is connected to what?" for operators and agents. They do not decide a write.

Runtime topology for the interstate bus

docs/rfc/interstate-runtime-bus.md (ai-meta RFC #586) is a draft for review dated 2026-11-16. Its own status line says nothing in the TARGET sections is built: no code, no manifest, and no production change. It was written against server ebd3f30d (v3.165.0), which is later than the v3.161.2 this chapter's code facts use.

The draft's job for ehgraph is the read model of "what is connected to what" (§5.1). The interstate layer would not read the graph to decide where to send work. It would read the instance registry. The graph would be fed from the registry and from events, and the draft calls it "never authoritative". §8.3 would add handed_to and replied_to edges from the new interstate events, described as an extension of the delegated_to edge the server's projection already knows how to write (src/instances/graph.rs:17 at v3.161.2). Those new edge types are TARGET. The events they would be drawn from are TARGET too.

RFC #586 says the instance graph is written on prod

§0 says "ehgraph has the instance graph, written on prod (DEPLOYED)". §5.1 labels the noetl-cluster writer "DEPLOYED". The dated reading of 2026-11-22, recorded in 15.1, is the opposite of a write in that window: noetl_instance_total{outcome="graph_written"} was 0 since the server pod started on 2026-11-19, and the backup loop had shipped nothing. The projection code exists, and the writer can be switched on, and that counter over those three days read 0. One of the RFC sentence and the reading needs to be updated, or a later write needs to be observed. This page does not treat "written on prod" as a fact.

Cell topology

docs/rfc/firecracker-cells-worker-pool.md is a draft for review dated 2026-11-16. Its status line says nothing is built. A cell, in that draft, is an isolation boundary, a runtime profile, a resource envelope, a mailbox, and an identity (§5.3). Hosts and their profile sets would be discovered through the existing D8 dataset. Individual cells would not be registered cluster-wide. The host would be the authority.

The draft says ehgraph can render cell topology — host, then cells, then profile and principal — for operators and agents, as a read model fed from D8 and from events. It says the graph is not authoritative: it is a single-primary MVP, and a view that disagrees with the hosts is a representation, not the record. That rendering is TARGET. No cell exists to render.

Peer catalog nodes

docs/rfc/distributed-playbook-catalog.md describes a catalog that, in its "as built" section of 2026-11-10, has three phases merged (server v3.157.0 through v3.160.0) with the flags off in production. The ehgraph pieces of that RFC are still listed as TARGET:

  • §9: peer catalog nodes in ehgraph (origin=catalog, held_by edges), so a topology query could answer where a playbook lives.
  • §11, requirement 1, the TARGET column: ehgraph held_by nodes, beside push completion and cross-instance cancel.
  • §12.5: a delegated call leaves no ehgraph edge. An edge from A's call to B's execution is TARGET.

The catalog's own discovery path is the instance registry and the bloom advert, which is a different mechanism and is covered with the catalog chapters. ehgraph is not on that path at f200516.

Read replicas are not built

docs/wiki/Roadmap.md Stage 0 is this release: one primary per domain. Stage 1 would be a read replica that tails the change log from a graph_version cursor and serves reads and sessions. Writes on a replica would be rejected with UNAVAILABLE and a hint pointing at the primary. A warm standby would be that follower plus a manual, owner-gated promotion, needing a Kubernetes Lease and store-side fencing. The roadmap says ehgraph will not enable role = replica or role = standby until both exist.

At f200516 the server refuses those roles at open (crates/ehgraph/src/lib.rs:188, crates/ehgraph-api/src/dispatch.rs:1272-1278). The storage shape Stage 1 would tail is already there: each namespace log is an ordered sequence of frames keyed by graph_version, and sealed parts are immutable (docs/wiki/Architecture.md). No code in this release subscribes to that tail. The roadmap's trigger for starting Stage 1 is a measurement — an RTO tighter than restoring a volume, or read load that does not fit on one node — and that measurement is not taken.

Sharding and multi-writer are deferred on the same page. The graphs this server is for are assumed to fit on one node, up to about 10⁶ elements (GUIDANCE). Scale-out in this design is another instance, another domain, not a split namespace.

Check your understanding

The Catalog

PARTIAL

This chapter is the repository noetl/catalog at git 473b2d5 (2026-10-07), the tip of main when this outline was written. The workspace version in Cargo.toml is 0.1.0. git ls-remote --tags returned no tags, so there is no release to pin a reader to. Code facts below are from that commit. The design spec is design/catalog-model.md. The pages under docs/wiki/ are a staging copy: docs/wiki/Home.md says the GitHub wiki repository had not been created, and it dates its own refresh at 2026-10-06.

The README calls the status design phase. It says the crates are scaffolding plus a CI gate, that the model lands incrementally behind flags, and that the design spec is the reference. The tree at 473b2d5 contains five crates (catalog-model, catalog-store, catalog-extract, catalog-ingest, catalog-api), a Dockerfile, and release workflows under .github/workflows/. The store implements four EHDB datasets (16.3).

The chapter is PARTIAL for that reason: the code is on main, and it is not a tagged release. The design spec's AC10 stays open. The traceability test records why: catalog-api serves /api/catalog/*, and nothing in noetl/server links catalog-store (crates/catalog-store/tests/spec_acceptance_traceability.rs). This chapter does not re-check the server.

Cargo.toml pins ehdb-l0 and ehdb-core to ehdb tag v0.4.5 (commit 688924f). Chapter 13 describes ehdb v0.15.1. Those are different pins. This chapter does not retell Chapter 13.

4.1 links here for hot reload of a pinned playbook. Content addressing, resolvers, bloom discovery, hot reload and kind: wasm do not appear in the catalog README, docs/wiki, or the design spec. 16.7 records that absence. It does not describe those mechanisms.

Sections

The catalog's docs and its tree disagree

Several representations at 473b2d5 describe an older tree than the one they sit in.

  • docs/wiki/Home.md lists only catalog-model as landed. The workspace Cargo.toml lists five crates.
  • That wiki page says the Dataset impl count is 0 until a later phase. 16.3 shows the store test expects 4, and the model test expects 0 only inside catalog-model.
  • The README says the model lands behind flags. The only NOETL_ variable the API binary reads is NOETL_INTERNAL_API_TOKEN (crates/catalog-api/src/lib.rs:41, src/main.rs:16-21). Unset or blank, writes return 503. The process also reads CATALOG_STORE_ROOT (default ./catalog-store) and CATALOG_BIND (default 127.0.0.1:8091) (main.rs:8-9). Those two are not NOETL_ names.
  • The design spec's plan names NOETL_CATALOG_MODEL=shadow as the gate for a later read path. A search of the tree at 473b2d5 finds that name only in design/catalog-model.md. No Rust file reads it. The plan table also marks the store and the extractor "off by default". No flag in the crates turns those crates off.
  • The README's route list has no DELETE, no /api/catalog/restore, no /api/catalog/ingest and no /api/catalog/constraints. router (lib.rs:81-134) registers all four.

Check your understanding

Two Catalogs

PARTIAL

noetl/catalog is one of two things NoETL calls a catalog. The README at git 473b2d5 draws the line, and says conflating the two is the mistake that page exists to prevent.

Internal catalog — this repositoryBusiness catalog — not this repository
What it holdsNoETL's own objectsDomain data: hotels, flights, trips, items, orders, translations
Storage, as this repo states itEHDB only. No external datastoreExternal Postgres, a third-party API, an object store
Interface/api/catalog/*A playbook step, under that playbook's policy
Who owns itThe platformThe domain

The sentence the README asks the reader to keep:

The internal catalog holds the playbook that reads the business data. It never holds the business data.

Its concrete example is from noetl/travel. The playbook adiona/playbooks/catalog_list.yaml is an internal object. The tables it reads, adiona.items, adiona.item_content and adiona.item_category, stay in external Postgres and are reached by a kind: postgres step. The README says none of that business data enters EHDB, and that it must not be pushed into this store as a resource type, an attribute or a relation.

The same page says the business catalog is already the playbook pattern, not a component to build. It gives one count this chapter did not re-count: 53 files under adiona/playbooks/*.yaml in that travel example. Treat 53 as the README's figure, not a measurement repeated here.

The repository is still marked design phase in that README, and AC10 in the design spec is open (Chapter 16). The table above is the repository's rule for its own store. It is not a claim that a deployment serves this binary.

What the internal side says it holds

The README names six types: playbook, credential, mcp, agent, memory and subscription. The code seed is noetl_resource_types in crates/catalog-model/src/noetl_types.rs. All six are constructed with catalogued: true, and the test in that file asserts every seed has catalogued: true. subscription is included with a module note that it is not a seeded noetl.resource row. The function's own comment says the list is a convenience seed, not an allowlist: an unknown name is reported, not refused.

ResourceType::new lowercases the name (resource_type.rs). The wiki and the test comment state a production count of mixed-case catalog rows (875 of one spelling, 650 of the other) and attribute a partial query result to that. This chapter did not re-count those rows. The lowercase constructor is what the code at 473b2d5 does.

A resource type is not a tool kind. The model module says agent and mcp are resource types, and that they are rejected as step tool kinds. This chapter did not re-read the server's tool-kind enum. The catalog's own test only checks that those two names are known resource types.

Where the documents disagree about credential

credential is catalogued in the seed and excluded in the spec

At 473b2d5 the repository says both of the following.

  • The README, the wiki scope table, design spec §2.10, and noetl_types.rs include credential with catalogued: true. The seed test requires that flag.
  • Design spec §1.1, §4.1 and §12 say credential is deliberately not catalogued, because the CLI diverts credentials elsewhere. catalog-extract records a Requires edge whose target type is credential and comments that the type is deliberately not held (crates/catalog-extract/src/lib.rs). The wiki's invariant list repeats "not catalogued". A unit test in resource_type.rs builds ResourceType::new("credential", false, false) to show the two booleans are independent. That call is not the seed.

This page follows the seed the API actually constructs, and it leaves the exclusion as an open disagreement inside one commit. It does not treat either sentence as overturned.

lang is on the model and idle for NoETL objects

Attribute::new sets lang to None (crates/catalog-model/src/attribute.rs). The store's neutral read keeps only those language-neutral values (crates/catalog-store/src/store.rs, the attributes fold). The README says this dimension was added from a business-catalog translation pattern, that no internal consumer was found, and that it is not built on further. Localized writes exist on the model (Attribute::localized) and on the API; the README's "inert" is about NoETL's own objects, which use Attribute::new.

Check your understanding

The Model

PARTIAL STUB

Not yet written. This section will cover ResourceType, Entity (resource_type, path, version), attributes, relations and provenance (Declared, Extracted, Observed) as crates/catalog-model defines them at git 473b2d5. The credential disagreement is already in 16.1. Facts stay on that commit.

Four Datasets

PARTIAL

noetl/catalog does not store rows in ehdb's d7_catalog dataset. It appends to four datasets of its own. At git 473b2d5 their names are constants in crates/catalog-store/src/datasets.rs:

ConstantDataset idForward keyWhat a forward read returns
c1c1_catalog_entitypathThe versions of that path
c2c2_catalog_relationfrom_pathEdges leaving that path
c3c3_catalog_attributepathAttributes on that path
c4c4_catalog_typenameThat resource type

The crate comment says four logs exist because the partition key differs: entity and attribute reads are by path, and "what references X" would be a full scan of a path-keyed log. The README states the same split as an invariant named AC3: adding a resource type adds rows, not a fifth dataset.

d7_catalog is already an ehdb dataset

The catalog comment says ehdb's d1–d10 names are taken, including d7_catalog, so this crate implements Dataset downstream and uses the c prefix. That comment matches the exports more closely than it matches ehdb's own header.

At ehdb v0.4.5 (commit 688924f, the tag in the catalog's Cargo.toml):

  • crates/ehdb-l0/src/registry.rs implements Dataset for d7_catalog. The file header calls it the playbook, tool and resource registry, one CatalogOp per register or deregister, folded by taking the last op for a path.
  • crates/ehdb-l0/src/lib.rs exports dataset ids D1 through D10.
  • The same lib.rs header still says "Still OUT (later work): the D3…D10 dataset impls".

The same registry.rs is present at ehdb v0.15.1, the tag Chapter 13 describes, and it still defines DATASET_D7_CATALOG. Chapter 13 does not describe that dataset. This outline did not audit the rest of v0.15.1's d1–d10 list, and it does not edit Chapter 13.

So at the pin the catalog builds against, ehdb already has a catalog dataset with a different shape (CatalogKind of playbook, tool or resource; content as a string; a deleted flag). noetl/catalog's four logs sit beside that dataset. They are not a documented replacement for it in either repository's README.

Reverse rows share the four logs

A second query dimension does not add a dataset. Each reverse index is another row kind in an existing log, keyed by a prefix the README and the constants both set to the control character U+0001:

DatasetConstantSynthetic key
c1TYPE_KEY_PREFIX\u{1}type/<kind>
c2EDGE_TO_KEY_PREFIX\u{1}to/<path>
c3REVERSE_KEY_PREFIX\u{1}attr/<name>
c4TYPE_REGISTRY_KEY\u{1}alltypes

c4's sentinel is one key for every declared type name, not one key per type. The comment on TYPE_REGISTRY_KEY says a type listing that only walked the six seeded names hid any type declared later, and that the sentinel keeps the Dataset count at four.

The catalog comment cites ehdb engine.rs:1489 for the rule that read_index_after matches index_key by exact string equality. At ehdb v0.4.5 that comparison is D::index_key(...) == index_value at engine.rs:1445 and :1454, not at line 1489. The behaviour the comment relies on is in the file. The line number is stale.

The README's account of an earlier fold, which this chapter did not re-run: a planted .last() under a shared synthetic key returned 1 of 49 objects using one attribute, 0 of 48 after one of them unset it, 1 of 53 playbooks, and 1 of 40 callers of one path. The handlers and the store comments repeat the 1-of-49 and 0-of-48 pair. The README's point is that the wrong answer was a short plausible list, including an empty one, rather than an error. The fold the README describes as the fix accumulates the set. This page does not present those four ratios as a production measurement.

Two tests, two counts, and a stale wiki

catalog-model's AC3 test counts impl Dataset lines under that crate's src/ and expects 0. The message in the test still says "P1 is model-only" and that a later phase will land four datasets (crates/catalog-model/tests/adding_a_resource_type_costs_no_schema.rs).

catalog-store's AC3 test counts the same pattern under the store crate and expects 4 (ac3_dataset_count_is_fixed.rs). Its header says the model test remains true and would now pass vacuously, because the impls moved.

docs/wiki/Home.md (refresh date 2026-10-06) still says the count is 0 until that later phase. The README on the same commit says AC3 asserts exactly four. The store test is the one that matches the README. The wiki matches the model test's wording, which only covers catalog-model.

Check your understanding

The HTTP API

PARTIAL STUB

Not yet written. This section will cover router in crates/catalog-api/src/lib.rs at git 473b2d5: the routes, write auth (NOETL_INTERNAL_API_TOKEN, 503 when unset, 403 on a bad header), and full-set reads. The README's route list omits DELETE, /restore, /ingest and /constraints; the router registers them. That gap is named in Chapter 16.

Ingest and a New Type

PARTIAL STUB

Not yet written. This section will cover catalog-extract and catalog-ingest at git 473b2d5: walking a directory or a git ref, references found by document kind, and the rule that an unknown kind yields an empty reference list. Adding a type is a ResourceType row, not a new dataset (16.3).

What the EHDB Pin Requires

PARTIAL STUB

Not yet written. This section will cover the operational requirements the catalog wiki and design/catalog-model.md §6 state for the EHDB the crate pins (tag v0.4.5): a seal-age setting together with a timer, the flush policy for rare writes, manifest retention left at its default, one writer, and the same ehdb tag for any process sharing local_root. Chapter 13 describes ehdb v0.15.1. The pin gap is in 16.3. Each requirement will be checked against ehdb v0.4.5 before it is called REAL.

Not in These Sources

STUB

Not yet written, and not described from memory. The previous outline of this chapter listed content-addressed digest identity, resolvers (noetl://, object-store URLs, db://, ehdb://), per-execution pinning, bloom-filter discovery, hot reload, and kind: wasm.

None of those topics appear in the noetl/catalog README, docs/wiki, or design/catalog-model.md at git 473b2d5. This outline did not use the ai-meta RFC the old acceptance criteria cite. Until a permitted source actually contains them, this section stays empty. 4.1 still links to the chapter opener for hot reload; the opener points back here.

Cross-Instance Execution: "Run It on B"

PARTIAL

A kind: playbook step starts a child execution (Chapter 7). Until now the child has always come from the same server's catalog. This chapter is about a child that another NoETL instance holds. Instance A names a playbook on instance B and either copies it home and runs it on A's workers (import), or asks B to run it on B's own workers (delegate).

The reference names the owner. It has two spellings, both defined in the server's DSL manifest (orchestrate-core/schema/dsl-manifest.json, feature remote_execution):

noetl://<instance>/<path>[@<version>][#sha256:<hex>]
peer/<instance>/<path>

<instance> is an instance id such as ni- followed by 32 hex characters. Section 17.1 explains where that id comes from.

Every code fact on this page was checked against noetl/server v3.165.5, noetl/tools v4.7.3, noetl/worker v6.19.2 and noetl/cli v6.4.5 (the tags current on 2026-12-01), and each feature is tied to the release that first shipped it. Prod facts come from the as-built manifest in noetl/ops at 7695b1b (2026-12-01), which is a record in a repository, not a live read of the cluster.

What exists today

PieceFirst releaseStatus
Instance identity (ML-DSA-87) and signed register / discoverserver v3.156.0Released. On prod the registry is on and admits nobody
remote: import and remote: delegate on kind: playbookserver v3.161.0, noetl-tools v4.6.0, worker v6.15.0Released, every flag off by default, not set on prod
The pin across instances (caller and owner)server v3.161.0Released with the flags above
A cached import never outranks the owner in a new treeserver v3.161.0 (fix 8c25af52)Released with the flags above
Local runtime and noetl serve refuse a remote reference by namecli v6.4.0Released, on (no flag)
Held wait for a delegated call (NOETL_CATALOG_REMOTE_PUSH)server v3.163.0, noetl-tools v4.7.0Released, flag off, not set on prod

That is why the page badge is PARTIAL. The code is merged and released, and a two-runtime kind test proves it. No deployment documented in a public record has it switched on.

Prod: the registry is on and trusts nobody

The as-built prod manifest (ci/manifests/noetl/server-rust-embedded-sts-prod.yaml in noetl/ops at 7695b1b) sets NOETL_INSTANCE_REGISTRY=true and does not set NOETL_INSTANCE_TRUSTED_IDS or NOETL_INSTANCE_TRUST. Trust then defaults to an allowlist with no ids (src/instances/gate.rs), so every signed register, discover or peer call is refused. No NOETL_CATALOG_CAS, NOETL_CATALOG_PINNING, NOETL_CATALOG_DISCOVERY or NOETL_CATALOG_REMOTE_* flag is set in any prod manifest there. The ops note ci/manifests/noetl/latency-prod/README.md (2026-11-15) says the same: "Prod has no NOETL_CATALOG_REMOTE_* set, so cross-instance calls are not in use." That README also warns the server manifest had drifted from the live env before then; the book has no live read.

Where the proof comes from

The only end-to-end run is the kind test ci/kind/e2e_catalog_remote_exec.sh in noetl/ops. It builds two full runtimes in one kind cluster. B has its own database (noetl_b), its own command-bus writer, its own shared and system workers, and its own key and trust list. Then it checks four things:

  1. Delegate: A calls noetl://<B>/xc/target twice while B registers v2 in between, and both calls run v1 on B's workers under one pin on B.
  2. Import: the same calls run on A as peer/<B>/xc/target, and the leaf resolves on its home instance.
  3. Fresh roots see the new versions.
  4. The negatives: outside B's allowlist gives 403, a bad mode gives 422 (the script accepts 400 or 422), and delegate where NOETL_CATALOG_REMOTE_CALLS is off gives 403 by name.

The RFC (ai-meta docs/rfc/distributed-playbook-catalog.md §12.4) reports this as kind 50/50 (MEASURED by the author on a kind cluster, 2026-11-11, n = 1 run). The book has not re-run it.

The map of this chapter

  • 17.1 Instance identity and the peer registry. The key, the id, the signed envelope, and why prod admits nobody.
  • 17.2 remote: import vs remote: delegate. Who resolves, who runs, how A gets the result back, and what each costs.
  • 17.3 Pins across instances. The caller pin, the owner pin, races, conflicting digests, the cached import, and home-instance resolution.
  • 17.4 Flags and the fail-closed allowlist. Every switch on each side, in enable order.
  • 17.5 Which runtimes can call another instance. The distributed runtime can; the CLI and serve refuse by name.
  • 17.6 What is still TARGET. Push completion, cancel, clock alignment, the ehgraph edge, batching.

This chapter builds on the per-execution pin, the catalog watermark that holds a whole execution tree to the catalog as it was when the root started. The pin itself is server code (src/services/catalog_cas.rs) behind NOETL_CATALOG_PINNING. Section 17.3 explains only as much of it as a remote reference needs.

What this chapter is not

The instance registry's own handoff (/api/instances/tasks/submit and the inbox, in src/instances/) is how a CLI instance picks up work. Delegation between servers does not use it. It uses the catalog routes /api/catalog/peer/execute and /api/catalog/peer/execution, covered in 17.2.

Instance Identity and the Peer Registry

PARTIAL STUB

Not yet written. This section will cover the instance key (ML-DSA-87, FIPS 204 context noetl-instance/v1), the id ni- + hex of the first 16 bytes of SHA-256 of the public key, the signed envelope and the admission order (signature, freshness, audience, purpose, replay, trust), and the registry routes /api/instances/register, /api/instances/discover and GET /api/runtime/instances. All of it is in noetl/server src/instances/ since v3.156.0. On prod the registry is on (NOETL_INSTANCE_REGISTRY=true) and admits nobody: trust defaults to an allowlist and NOETL_INSTANCE_TRUSTED_IDS is not set in the as-built manifest. Facts stay on server v3.165.5 and the noetl/ops as-built record; see the chapter opener.

remote: import vs remote: delegate

PARTIAL

When a playbook on A calls a playbook that B holds, someone has to answer two questions: whose catalog says what the body is, and whose workers run it. B's catalog always answers the first question. The mode answers the second:

  • import: A fetches B's body, checks it against its digest, files it under peer/<B>/<path>, and runs it on A's workers. B serves one catalog lookup and runs nothing.
  • delegate: A asks B to run that exact digest on B's workers. A gets back a call id, and A's step waits on it through A.

Both modes shipped in server v3.161.0 (commit 64a2fa73), noetl-tools v4.6.0 (commit 6d36ebd, which forwards remote: and follows detail_path) and worker v6.15.0 (which pins noetl-tools =4.6.0). The facts below are checked at server v3.165.5, in src/services/catalog_remote.rs, src/services/catalog_cas.rs and src/handlers/execute.rs, and at noetl-tools v4.7.3, src/tools/playbook.rs.

Off by default, off on prod

Neither mode does anything until the caller sets NOETL_CATALOG_REMOTE_CALLS=true (on top of NOETL_CATALOG_CAS and NOETL_CATALOG_PINNING). Delegation also needs NOETL_CATALOG_DISCOVERY on the caller, and NOETL_CATALOG_REMOTE_SERVE with a matching NOETL_CATALOG_REMOTE_SERVE_ALLOW glob on the owner. None of these is set in the prod manifests in noetl/ops at 7695b1b. With the caller flag off, a step's remote: is ignored, except that remote: delegate is refused by name with 403 so that the playbook never quietly runs somewhere other than where its author asked.

Choosing the mode in a playbook

The mode is a key on the kind: playbook tool. This is the caller from the noetl/ops kind test (ci/kind/catalog/remote/caller.yaml.tmpl), with the template placeholders filled in. ni-… stands for B's real instance id:

apiVersion: noetl.io/v2
kind: Playbook
metadata: { name: xc_caller, path: xc/caller }
workflow:
  - step: start
    tool: { kind: noop }
    next: [ { step: first } ]
  - step: first
    tool:
      kind: playbook
      path: "noetl://ni-…/xc/target"   # B's playbook, by owner and path
      remote: delegate                  # or: import (the default)
      return_result: true               # wait, and hand back the child's result
      result_step: call_leaf            # which child step's result to return
      timeout: 240                      # seconds the step will wait
    next: [ { step: end } ]
  - step: end
    tool: { kind: noop }

Every key under tool: is a field of noetl-tools' PlaybookConfig. remote and digest were added in v4.6.0. return_result, result_step, timeout and poll_interval are older. The server's DSL manifest documents remote and digest as the step_keys of the remote_execution feature. When a step does not say, the caller's NOETL_CATALOG_REMOTE_MODE decides (import if unset). An unknown value there is logged and treated as import. An unknown value on a step is refused with 422.

Side by side

importdelegate
Who resolvesB (signed catalog.resolve), once per root and referenceB (signed catalog.resolve), once per root and reference
What A storesB's body, under peer/<B>/<path>A row in noetl.catalog_remote_call; no body is needed
Who runs itA's workers, as a normal child of the stepB's workers, as an execution on B
Where its events goA's event logB's event log only. The kind test asserts 0 of B's events in A
Its childrenResolve on the home instance: bare x/y means peer/<B>/x/y (17.3)Resolve on B, under one pin shared by every call from A's root (17.3)
How A's step learns the resultThe usual child poll on AIt polls A's /api/catalog/remote/calls/{call_id}, which A proxies from B
If B is downA cached import can stand in, once, when the tree has no answer yet (17.3)No fallback. The call fails
Needs on BDiscovery and trust of AAlso NOETL_CATALOG_REMOTE_SERVE and an allowlist glob for the path

Import, step by step

 A: worker (step "first")        A: server                       B: server
 ────────────────────────        ─────────                       ─────────
 POST /api/execute ───────────►  resolve inside the root's pin
   path: noetl://<B>/xc/target   remote pin for this root and
   remote: import                reference?  ── yes ─► use it
   parent_execution_id           ── no ──► locate ───────────►  catalog.resolve
                                            ◄────────────────   body + digest
                                 verify the digest, import as
                                 peer/<B>/xc/target, record the
                                 remote pin (first writer wins)
                                 start a child on A's bus
 ◄──── execution_id (local) ───
 poll the child on A as for any
 sub-playbook (Chapter 7)

In import mode A's event log holds the whole child run, B holds nothing of it, and the only thing B ever served was the catalog lookup. Inside the imported playbook, a bare xc/leaf is rewritten to peer/<B>/xc/leaf (home-instance resolution, home_rewrite), so the leaf is also B's, imported and run on A.

The remote pin applies to a child inside a pinned tree. A root execution that names a remote playbook goes through the catalog's peer lookup and import directly. Its own children are then pinned as above.

Delegate, step by step

 A: worker                 A: server                          B: server
 ─────────                 ─────────                          ─────────
 POST /api/execute ──────► wants_delegate: REMOTE_CALLS on,
   remote: delegate        a noetl:// or peer/ reference
                           find B in A's registry (live lease)
                           remote pin for this root? ─ no ─► catalog.resolve
                                                     ◄─────  body + digest
                           verify, record the pin (first writer wins)
                           signed catalog.execute ─────────► admit A (signature, freshness,
                             path, digest, payload,          audience, purpose, nonce, trust)
                             origin_root, call_id            REMOTE_SERVE on? path matches
                                                             an allowlist glob? not peer/…?
                                                             the one pin for (A, origin_root)
                                                             start digest on B's bus
                                                             record catalog_remote_exec
                                                     ◄─────  execution_id (B's)
                           insert catalog_remote_call
 ◄── execution_id = call_id,
     remote.detail_path =
     /api/catalog/remote/calls/{call_id}
 every poll_interval:
 GET {detail_path}/status ► signed catalog.execution ──────► only if A started it
                           ◄──────────────────────────────── B's status
 ◄── status + remote note
 … until COMPLETED / FAILED / CANCELLED, then
 GET {detail_path} ──────► signed catalog.execution ──────► B's detail (events)
 ◄── detail; the tool picks result_step's result → call.done on A

The details matter:

  • A must know B, and B must trust A. A looks B up in A's own instance registry and needs B's lease to be live. B registers with A through NOETL_CATALOG_PEERS, so A must trust B. B admits A's catalog.execute only if A is in B's trust list. A lapsed lease answers 404 "peer … is not registered here (or its lease lapsed)".
  • B runs exactly the digest A pinned. The signed body carries the digest. B runs it inside the pin it keeps for (A, origin_root), so a newer version of the same path on B is never substituted (17.3).
  • B refuses rather than guesses. A path no allowlist glob matches, or any peer/… path, gets 403. So does a peer B does not trust. With NOETL_CATALOG_REMOTE_SERVE set and no allowlist, B logs that every peer execute will be refused. A passes B's 403 back as 403, B's 404 as 404, and anything else as 502.
  • Only the starter may read. B answers catalog.execution only for an execution whose catalog_remote_exec row names the asking instance. Any other instance gets 404.
  • detail_path cannot leave A. noetl-tools follows it only when it starts with /api/ and contains no :// and no ... A reply can therefore never point A's worker at another host.
  • A naming itself is an error. A delegate reference to A's own id, or to local, is refused with 422 ("call it without remote: delegate").
  • Not batchable. remote: delegate with dedup, or through the batch execute route, is refused with 422.

What A records

A's event log holds the parent step's events. The step's call.done carries the child's result, and its child execution id is the call id, not B's execution id. B's run is in B's event log. On A's side the link is one row in noetl.catalog_remote_call: call_id, root_execution_id, parent_execution_id, instance_id, reference, path, version, digest and remote_execution_id. B keeps the reverse row in noetl.catalog_remote_exec: execution_id, origin_instance, origin_root, origin_execution_id and origin_call_id. There is no ehgraph edge from A's call to B's execution (17.6).

At most once? No: what a retry does

This is read from the code at server v3.165.5. The kind run does not test it, because it never times out a call after B has started it. Each delegate attempt on A mints a fresh call_id, and B dedupes on nothing: catalog_remote_exec has only execution_id as its key, and origin_call_id is nullable and not unique. B starts the run before it answers. So if A's signed request fails after that point (the 15 s client timeout, a dropped connection, or a failed catalog_remote_call insert on A), A's step sees an error while B's run keeps going, and no row on A points to it. Only B can see that orphan. If the step then runs again, B runs the same digest a second time. A delegated call is at-least-once on retry, not exactly-once, so make targets idempotent. The pins do hold within one root: the retry finds the same caller pin, so the same digest, and B reuses its one pin for (A, origin_root), so the same sub-playbook versions. They do not make it run once. The nonce check does not help here either: B remembers each (signer, nonce) in memory for twice the clock-skew window, so it refuses a replay of the same envelope, but every attempt is signed with a new random nonce.

What waiting costs

By default (noetl-tools v4.7.3, poll_interval DEFAULT 2 s, minimum 1 s) the waiting step sleeps, then asks A for {detail_path}/status. A turns each poll into one signed ML-DSA-87 request to B. If the status read fails, the tool also tries the detail route, which is a second signed request in that round. At the end there is one more for the detail. A one-minute child therefore costs about 30 signed requests A→B per waiting step. That is arithmetic from the DEFAULT interval; it has not been measured (NOT_YET_MEASURED). Each signed request has a 15 s client timeout (DEFAULT, catalog_peer.rs).

Two more costs are easy to miss:

  • The worker slot stays busy. The server parks a return_result await, and frees its slot, only for a fresh local child (fresh_local in execute.rs). A delegated call is never parked, even with NOETL_PLAYBOOK_AWAIT_PARK on, so A's worker slot is held for the whole of B's run.
  • The step has its own deadline. timeout is DEFAULT 180 s with return_result: true and 300 s otherwise. If it passes, A's step fails with a timeout. B's run is not told and keeps going (17.6).

A held wait exists, behind three flags

Server v3.163.0 (commit 765147ff, ai-meta#559) and noetl-tools v4.7.0 (commit ad03a84) add a held wait. With NOETL_EXECUTION_WAIT on the worker, the tool asks {detail_path}/wait. A mounts that route only when NOETL_CATALOG_REMOTE_PUSH=true. A then sends one signed request with wait_secs, and B (also with NOETL_CATALOG_REMOTE_PUSH) holds it until the run is terminal or 10 s pass (MAX_PEER_WAIT_SECS, DEFAULT). That is about one signed request per 10 s instead of one per 2 s. An owner without the field answers 400, and A then asks it once a second inside the window. A caller without the route has no x-noetl-wait header, and the tool falls back to the 2 s poll for the rest of the call. This is still a long poll that A initiates, not B pushing completion to A. On prod, NOETL_EXECUTION_WAIT is set on the server and workers (since 2026-11-15) but NOETL_CATALOG_REMOTE_PUSH is not, so a delegated call there would fall back to polling.

Which one to use

Use import when A should own the run. A gets the events, the worker pool and the cost, and B only has to answer one lookup (POST /api/catalog/peer/resolve, signed, purpose catalog.resolve). B's body is copied to A, and the run uses A's workers and whatever A's workers can reach. Use delegate when the work must happen on B: B's data, B's credentials or B's pools. B must be up for the whole call, must list the path in its allowlist, and A pays a worker slot and a signed request every poll interval while it waits.

Pins Across Instances

PARTIAL

A pinned execution tree runs against the catalog as it was when its root started. On one server that is a single number. The root records a watermark, the largest catalog_id at its start, and every child resolves with catalog_id <= watermark (watermark_now and resolve_execute in noetl/server src/services/catalog_cas.rs, behind NOETL_CATALOG_PINNING). A version registered after the root started is invisible to the tree.

That number cannot hold a reference to another instance, for two reasons:

  1. B's catalog ids mean nothing on A. They come from B's database. Comparing one with A's watermark compares two unrelated counters.
  2. An import lands after the root started. When A imports B's body mid-run, the new row on A gets a catalog_id above the root's watermark. A watermark rule would either hide it or, if bypassed, let every later call fetch whatever B holds now.

So server v3.161.0 adds two more pins, one on each side. Both are in src/services/catalog_remote.rs (checked at v3.165.5) and both are live only with NOETL_CATALOG_REMOTE_CALLS (caller) or NOETL_CATALOG_REMOTE_SERVE (owner), on top of NOETL_CATALOG_CAS and NOETL_CATALOG_PINNING.

Off by default, off on prod

These tables are created only when a remote flag is on and the CAS tables are ready (ensure_schema). None of the flags is set in the prod manifests in noetl/ops at 7695b1b. Everything below is the behaviour of released code that the two-runtime kind test exercised, not something a public deployment runs.

The caller pin: one answer per root and reference

noetl.execution_remote_pin
  root_execution_id  BIGINT  ┐ primary key
  reference          TEXT    ┘
  instance_id, path, version, digest, mode, created_at

The first time a reference to B is resolved inside a tree, A writes what it resolved to: B's path, version and digest. Every later call in the same tree, from any step and at any depth, gets that digest. This holds in both modes. In import mode A looks up its local import by that digest. In delegate mode A sends that digest to B.

The key is canonical. RemoteTarget::key writes every spelling as noetl://<instance>/<reference>, so these three calls share one pin:

# in the root, a direct reference
tool: { kind: playbook, path: "noetl://ni-…/xc/leaf" }
# elsewhere, the import name
tool: { kind: playbook, path: "peer/ni-…/xc/leaf" }
# inside the imported peer/ni-…/xc/target, a bare name (home-instance resolution)
tool: { kind: playbook, path: xc/leaf }

A version or digest in the reference is part of it, so xc/leaf@2 and xc/leaf are different references with different pins. A direct source such as gs://… or db://… called from inside a pinned tree is pinned the same way, keyed by its URI (PinKey::Source). Before v3.161.0 it was fetched again on every call.

Races: the first writer wins

Two steps of one tree can resolve the same new reference at the same moment. Each one asks B, and each one gets an answer. If B registered a new version between the two asks, the answers differ. The write settles it:

INSERT INTO noetl.execution_remote_pin (...) VALUES (...)
ON CONFLICT (root_execution_id, reference) DO NOTHING;
-- then read the row back

pin_put returns the row that is stored, not the one the caller tried to write. The loser silently adopts the winner's digest. A logs "remote pin race: another call in this tree pinned first", and both calls run the same body. In import mode the loser's own import may stay on A as an unused row. The tree never runs it.

Conflicting digests: refused, never swapped

A step can name the digest it expects: #sha256:… on a noetl:// reference, @sha256:… on a name, or the tool's digest: key. If the tree already pinned a different digest for that reference, the call fails with 422: "<key>: this tree pinned <A's digest>, asked for <the step's digest>". The server does not re-pin the tree or fetch the newer body, and the step that asked does not run. The same holds when B answers with a body that does not match its own digest (verify_fetched) and when the step's digest does not match what B holds. Each is an error, and a cached copy is never used to cover it.

A cached import is not the authority

An import leaves a row on A under peer/<B>/<path>. It is tempting to treat that row as the answer next time. Inside a pinned tree, the server does not:

  1. If the root already has a remote pin for the reference, use it. B is not contacted in import mode. A reads its import by the pinned digest, and if that import has been removed the call fails with 404 ("pinned to … but that import is gone").
  2. Otherwise ask B (a signed catalog.resolve), import, and pin.
  3. Only if B cannot answer, and A has a cached import, pin the tree to the cached copy. A logs "owner unreachable; pinning this tree to the local import". A validation error (a wrong digest, a bad reference) is not "cannot answer". It fails the call.

Step 3 is a fallback for availability, and it is recorded. Once the tree is pinned to the cached copy, every later call in the tree uses it, even after B comes back. A fresh root asks B again.

The kind run found the bug this ordering fixes, and the fix (8c25af52, "a cached peer/ import never outranks the owner in a new tree") shipped in the same release, v3.161.0. A fresh tree ran a leaf v2 that an earlier tree had imported, while B already held v3.

Delegate mode has no fallback

Step 3 exists only for import. A delegated call needs B to run it, so if B is unreachable the call fails: 502 for a transport error, or 404 if B's lease in A's registry has lapsed. A held pin does not change that.

Home-instance resolution

A playbook imported from B was written against B's catalog. When it calls xc/leaf by a bare name, it means B's xc/leaf, not a same-named playbook that happens to exist on A. With NOETL_CATALOG_REMOTE_CALLS on, home_rewrite turns a bare child path called from a parent whose pinned path is peer/<B>/… into peer/<B>/<child>. It leaves alone anything that already starts with peer/, contains ://, or is a digest. The rewritten name is then a remote reference and gets the caller pin above. In the kind test, the imported peer/<B>/xc/target called xc/leaf, and A pinned noetl://<B>/xc/leaf.

The owner pin: one tree on B per calling root

Delegate mode runs the target on B, and the target can call B's own sub-playbooks. Those must hold still too, across all of A's calls from one root, not just within one delegated execution.

noetl.catalog_remote_origin
  origin_instance  TEXT    ┐ primary key
  origin_root      BIGINT  ┘
  local_root, watermark, pinned_at_ms, created_at

On the first catalog.execute from (A, origin_root), B takes its own watermark at that moment and stores it. The insert uses ON CONFLICT … DO NOTHING followed by a read, so the first writer wins here as well. Every later delegated execution from that pair starts with that pin as an override (pin_override on ExecuteRequest), so B's sub-playbooks resolve as if every call were part of one tree on B.

  • A new root on A gets a fresh pin on B, and sees B's newer versions.
  • The same root id from a different instance gets a different pin. The key includes the instance id, which comes from the caller's signature, not from the request body.
  • A peer never widens B's policy. The override carries the default policy, so a hot-reload rule does not apply to delegated runs.
  • The pin is B's watermark at A's first delegated call, not at A's root start. Nothing aligns the two instances' clocks (17.6).

One root, end to end

This is the kind test's delegate run (noetl/ops ci/kind/e2e_catalog_remote_exec.sh, step 4), written as a timeline. The target calls xc/leaf by a bare name:

 time   A (root R)                           B
 ────   ──────────                           ─
 t0     R starts; Phase-1 watermark on A
 t1     step first: noetl://B/xc/target ──►  no origin pin for (A,R): take B's
        caller pin: target → v1                watermark W1, run target v1;
                                               xc/leaf → v1 (≤ W1)
 t2                                          register target v2 and leaf v2
 t3     step second: same reference      ──►  origin pin (A,R) exists: W1
        caller pin hit: target → v1            run target v1; xc/leaf → v1
 t4     R completes: both calls leaf v1
 t5     new root R2 calls again          ──►  no pin for (A,R2): W2 > v2
        new caller pin: target → v2            target v2; xc/leaf → v2

The import run (step 5) has the same shape on A alone. Both calls ran peer/<B>/xc/target v2 on A, with its leaf home-resolved to peer/<B>/xc/leaf v2, while B registered v3 between them. A fresh root then saw v3, and B ran no execution at all.

Where the pins are, and where they are not

The caller pin and the call row are tables on A (execution_remote_pin, catalog_remote_call). The owner pin and the reverse row are tables on B (catalog_remote_origin, catalog_remote_exec). A child that A imports has its own Phase 1 pin row with reason import. A delegated call adds nothing to A's event log beyond the parent step's events (17.2).

Flags and the Fail-Closed Allowlist

PARTIAL STUB

Not yet written. This section will list every switch the two sides need, in enable order, with its default and its prod value: NOETL_CATALOG_CAS and NOETL_CATALOG_PINNING (prerequisites), NOETL_CATALOG_DISCOVERY with NOETL_CATALOG_PEER_KEY_FILE, NOETL_CATALOG_PEERS and NOETL_CATALOG_SELF_URL (the peer key and registration), NOETL_INSTANCE_TRUSTED_IDS on both sides (trust is mutual), then NOETL_CATALOG_REMOTE_CALLS and NOETL_CATALOG_REMOTE_MODE on the caller and NOETL_CATALOG_REMOTE_SERVE and NOETL_CATALOG_REMOTE_SERVE_ALLOW on the owner. The allowlist is path globs and fails closed: with none, every peer execute is refused, and a peer/… path is never served onward. Flags are strict "true". Facts from noetl/server src/services/catalog_remote.rs at v3.165.5.

Which Runtimes Can Call Another Instance

PARTIAL STUB

Not yet written. This section will say which runtime can follow a remote reference. The distributed runtime can, with flags off by default (server v3.161.0, noetl-tools v4.6.0, worker v6.15.0). The local runtime (noetl run) and noetl serve refuse a noetl://<instance>/… or peer/<instance>/… path by name when the step runs (refuse_remote_reference in noetl/cli src/playbook_runner.rs, cli v6.4.0); before v6.4.0 the same path failed as a missing file. They have no instance key, peer registry or catalog. Calling another instance from them is TARGET.

The refusal is the one cross-instance behavior that can be exercised without two running servers. This local example reaches a kind: playbook step whose path names another instance:

# Chapter 17.5: the local runtime refuses cross-instance playbook references by name.
apiVersion: noetl.io/v2
kind: Playbook
metadata:
  name: remote_reference_refused
workflow:
  - step: call_remote
    tool:
      kind: playbook
      path: "noetl://ni-0123456789abcdef0123456789abcdef/demo/target"
      remote: delegate

With the pinned CLI it fails with the stable reason "names a playbook on another NoETL instance". It does not try to treat the reference as a local file.

What Is Still TARGET

TARGET STUB

Not yet written. This section will list what cross-instance execution does not do, each checked against noetl/server v3.165.5: B pushing completion to A (a held long-poll, not a push, exists behind NOETL_CATALOG_REMOTE_PUSH since server v3.163.0 and is PARTIAL, not set on prod); cancelling A's parent does not cancel B's run; B's pin uses B's watermark at the first delegated call, with no clock alignment across instances; no ehgraph edge from A's call to B's execution; remote: delegate is not batchable (422) and takes no dedup; a delegated await never parks its worker slot; no idempotent delegation (B does not dedupe by origin call id, so a retried call can run twice, 17.2).

MCP and Agents

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

kind: mcp: Calling MCP Servers

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

kind: agent: Agent Steps

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

A Playbook as an MCP Server

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

A Playbook as an Agent

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

The Interop Matrix Across Runtimes

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Project: Expose a Playbook as an MCP Tool and Call It from an Agent

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Coroutines and Structured Concurrency

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Concurrency Today: Fan-Out, Fan-In and Its Gaps

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Leaf Units and Ownership

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

spawn, join, select

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Cancellation and Slots

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Flags and the Staged Rollout

TARGET STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

The Resource Model

REAL

How long will a playbook take, how many worker slots will it hold, and what can stop it? NoETL publishes its answers as one machine-readable file, the resource model: noetl.ai/dsl/resource-model.json, the same file as orchestrate-core/schema/resource-model.json in the server repository. This chapter teaches you to use it.

Every page here reads the file at server v3.161.2, model version 1, as_of 2026-11-11. The full listing, every figure with its label, is Appendix D; this chapter does not reprint it.

Read this first

The file opens with three rules (read_first). In short:

  1. Orchestration dominates. On NoETL a step's latency is mostly the cost of orchestrating it, not the work it does. Count steps and sub-playbook hops before estimating anything else.
  2. Figures are dated and local. A number from kind does not transfer to prod, and an old number may predate a fix.
  3. Live values beat the file. A running server answers /api/dsl/version; a worker's limits are its environment; what a run actually cost is in its events.

What is in it

SectionAnswersChapter section
labelswhat kind of number each figure is21.1
step_kindswhat each tool kind holds and how long it may run21.2
limitsthe caps a worker enforces, with their environment variables21.3
concurrencypools, slots, autoscaling, queueing21.4
heuristics, orchestration_overheadhow to turn the figures into an estimate21.5
not_yet_measuredthe questions with no number yet21.6
metricswhere a real run's cost is recorded21.5

The model is a representation

The file is generated from Rust source written by people from code, measurements and cluster reads (orchestrate-core/src/resource_model.rs). The server's tests check that the committed JSON is what that source generates (tests/dsl_artifacts.rs:46) and refuse a number with no label. Nothing checks that each figure is still true. So treat it like any copy: true only while something forces it to agree. This chapter checked its code claims against worker v6.15.0 and tools v4.6.0 and reports two places where it disagrees with the code or with itself (21.4).

Check your understanding

Labels: MEASURED, DEPLOYED, DEFAULT, GUIDANCE, TARGET

REAL

Every figure in the resource model carries a label, and the label decides what you may do with the number. The server's tests refuse a number without one (orchestrate-core/src/resource_model.rs, server v3.161.2). The definitions are the file's own (labels, as_of 2026-11-11):

LabelMeansBefore you reuse it
MEASUREDobserved on a cluster or harnessread its environment, date and source; it describes that build under that load
DEPLOYEDread off the production cluster on as_ofit is configuration, not code: it changes without a release
DEFAULTa code default (env var + value)a deployment may override it; check the environment
GUIDANCEa planning rule derived from the figuresit is arithmetic, not a measurement
TARGETa goal or budgetnobody has achieved it yet
NOT_YET_MEASUREDa real question with no numberdo not invent one (21.6)

Three numbers about the same thing

The user pool's slots show how labels differ:

FigureLabelWhat it tells you
WORKER_MAX_CONCURRENT = 4 slots per workerDEFAULTwhat a worker does if nobody sets the variable
user pool: 2 replicas, KEDA 2–20, 8 slots at min, 80 at maxDEPLOYED (2026-11-11)what one cluster ran on one day
command.issued → command.claimed p50 2123 ms with 90 commands against 8 slotsMEASURED (prod, 2026-07-30)what queueing cost once, under that burst

None of them is wrong, and none answers the others' question. A plan needs to say which one it used.

A label is not a freshness guarantee

A MEASURED figure is true of the build it was taken on. The model's own caveat on orchestration cost: "several of these figures predate later dispatch fixes" (orchestration_overhead.caveat). A label tells you what kind of number it is, not that it is current.

Check your understanding

Per-Step-Kind Costs

REAL

The model profiles the tool kinds whose execution was read in the worker and tools code (step_kinds.kinds, as_of 2026-11-11). For each it says how the kind runs, how long it holds a worker slot, and what timeout applies by default. The rest of the parser's kinds (artifact, gateway, gcs, iterator, nats, playbooks, secrets, snowflake_transfer, workbook) are listed as not profiled; nothing is measured for them.

KindRunsHolds the slotDefault timeout
pythonsubprocesswhole runnone unless the step sets timeout_seconds
shellsubprocesswhole runnone unless the step sets timeout_seconds
httpin processwhole request30 s client default; timeout_seconds overrides. The body is read in full, no cap
postgresin process, a pool per connection stringwhole querynone set by the tool
duckdbin processwhole query, in the worker's memorynone
rhaiin processwhole scriptnone, and no operation limits
wasmin process, one module at a time per workerinvocation plus any wait for the wasm lock30 s (21.3)
mcpremote JSON-RPCwhole callNOETL_MCP_REQUEST_TIMEOUT_SECONDS, clamped to 180 s
agentin-process loop of remote model callsthe whole loopbounded by tool-call and child limits
playbooka separate child executiononly for the start request; with return_result / return_step the whole child, polling every 2 s30 s to start; the await is the step's timeout, else 180 s / 300 s
scriptKubernetes Job, polled every 2 suntil the Job finishes600 s
containerKubernetes Jobno: freed once the Job is created; a callback ends the stepnone by default
snowflakeremote RESTwhole statement60 s statement timeout
task_sequencein process, sub-tasks in orderall sub-tasksper sub-task
noopin processbrieflyit still pays the per-step orchestration cost

(Each row cites tools v4.6.0 or worker d1c9584, which is in v6.15.0; the per-kind citations are in Appendix B.)

Two rules that hold for every kind

  • No global timeout. "The worker sets no wall-clock timeout per command" (step_kinds.no_global_timeout, tools v4.6.0 src/registry.rs:241-259). A kind with no default timeout can hold a slot indefinitely unless the step sets one.
  • The tool retry config is inert. ToolConfig.retry is parsed but no executor applies it (step_kinds.retry_config_inert). Do not budget for automatic retries (6.5).

What has been measured

Only a few kinds have numbers, and most of them are about orchestration around the kind, not the kind itself:

KindFigureLabel
python0.66 s warm / 1.20 s cold for a simple playbook end to endMEASURED, idle kind, 2026-05
python9.3 s → 3.0 s when a provider call moved from a kind: playbook child to inline pythonMEASURED, prod, 2026-08-24
playbook~9 s of orchestration per hop, regardless of the work insideMEASURED, prod, 2026-08-24
playbookmedian 34.7 s → 19.4 s (−44%) when provider children were inlinedMEASURED, prod, 2026-06-29 (paired A/B)
wasm~1.5 s once, first dispatch of a ~1.6 MB module on a fresh podMEASURED, kind, 2026-06
agenta hosted LLM call inside a real stepNOT_YET_MEASURED

The per-step latency of http, duckdb, postgres and mcp steps on prod is not measured (21.6).

Check your understanding

Limits: WASM Fuel, Agent Caps, Context Sizes

REAL

A limit is a number that stops something. The model lists the ones a worker or server enforces, each with the variable that changes it (limits, as_of 2026-11-11). All are DEFAULT: code values a deployment may override. The ones checked for this page against worker v6.15.0 are marked ✓.

Plug-ins (kind: wasm)

LimitDefaultVariable
fuel per invocation10,000,000,000 ✓NOETL_WASM_FUEL (0, off, none or unlimited removes it)
wall clock per invocation30 s ✓ (10 ms granularity)NOETL_WASM_TIMEOUT_MS
linear memory1024 MiB ✓NOETL_WASM_MAX_MEMORY_MB

(worker src/plugin.rs:41-47.) A trip increments noetl_worker_plugin_limit_trips_total{limit}. No metric reports the fuel a run actually spent; the model says to read it from the worker's debug log.

Agent steps (kind: agent)

LimitDefaultVariable
tool calls per agent step32 ✓NOETL_AGENT_MAX_TOOL_CALLS
time per playbook-bound child180 s ✓NOETL_AGENT_TOOL_TIMEOUT_SECS
turns8step max_turns
tokens per model call4096step max_tokens

(worker src/executor/agent_host.rs:50-51; tools v4.6.0 src/tools/agent.rs.) The model cannot raise the tool-call budget; exceeding it ends the step with agent.final refused: tool_call_budget. Worst case for one step: 32 × 180 s = 96 minutes of one held slot (GUIDANCE).

Sizes

LimitDefaultWhat happens past it
step result in an event (NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES)100 KiBspilled to the result store; a downstream read becomes a fetch (5.3)
command context (NOETL_COMMAND_CONTEXT_MAX_BYTES)512 KiBoffloaded as a __context_ref__
request body on /api/execute and /api/events2 MiBrefused (the axum default; no explicit layer)
events returned by GET /api/executions/{id}the 2000 most recentolder ones are not in the response

Waiting and draining

LimitDefaultVariable
extra retry window for event emits while the server is down (the slot stays held)120 sNOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS
finishing in-flight commands on SIGTERM150 sNOETL_WORKER_DRAIN_TIMEOUT_SECS
slots per worker4 ✓WORKER_MAX_CONCURRENT (21.4)

What is not a limit

There is no per-command wall-clock timeout, no cap on back-edge re-runs, and no cap on loop: items (6.4). A step is bounded by its own tool's timeout and nothing else (21.2).

Check your understanding

The Slot and Pool Model

REAL

Section 10.4 showed how slots and pools work on a cluster. This section is about using that model to plan: how many slots a playbook needs at its peak, and where it can get stuck.

The rule

"Every command holds one worker slot from claim until its tool returns, including case evaluation and its lifecycle event emits" (step_kinds.slot_rule, DEFAULT). A pool's capacity is replicas × slots; commands beyond it queue on the bus. On the cluster read on 2026-11-11 (DEPLOYED): the user pool had 8 slots at minimum and 80 at maximum, and the system pool 4.

Counting slots, not steps

Two GUIDANCE rules from heuristics:

  • A parallel loop takes N slots at once. A loop: in parallel mode dispatches every item together, and max_in_flight does not throttle it (6.3). 30 items need 30 free slots on the pool, or the rest queue. At the 8-slot minimum, a 30-item loop runs in about four waves until KEDA adds replicas.
  • An awaiting parent needs two slots. A kind: playbook step with return_result or return_step, or an agent's playbook tool, holds the parent's slot while the child needs another (Chapter 7).

The deadlock you can build

The model's note on kind: playbook: "an awaited child needs a free slot on its own pool while the parent holds one; if both target the same small pool, enough concurrent awaiting parents can occupy every slot." With 8 slots, 8 parents awaiting children at the same time hold all 8, and no child can start. Each parent waits until its await times out (180 s by default for return_result).

The pool is chosen per execution (10.3), so a parent and its children land on the same pool unless the child is started with a pool override. Keep awaiting fan-outs smaller than the pool, or do not await.

Where the model disagrees

Checking the model against worker v6.15.0 and against itself:

  1. slot_rule misses the callback release. It says a slot is released early "only on a failed or refused claim". But the worker also frees the slot when a step parks on an external callback: it skips its own call.done and returns, "freeing the slot while an external system works" (worker src/executor/command.rs:1326-1333).
  2. The model contradicts itself. Its own container entry says the slot is freed once the Job is created (the callback pattern), which is that same early release.

So for planning: a container step, or any step that returns a pending callback, costs its slot only until it hands off, not for the whole external job.

Check your understanding

Estimating a Playbook Before You Run It

REAL

The model's first heuristic is the estimating rule (heuristics, GUIDANCE, as_of 2026-11-11):

wall clock ≈ steps × per-step overhead + Σ(step work) + hops × hop overhead

where steps counts every step run (a step that a back-edge re-runs counts each time) and hops counts awaited kind: playbook children. The model's figures for prod: ~4.5 s per step and ~9-15 s per hop (orchestration_overhead.measured, MEASURED, prod, 2026-08). "Re-measure: the overhead, not the work, decides the total."

A worked estimate

Take the playbook from Chapter 2, moved to a cluster. Its loop body (pick, fetch, load, advance) runs twice, so the step runs are:

StepRuns
start1
pick, fetch, load, advance2 each = 8
report, check1 each = 2
total11

There are no sub-playbooks, so hops = 0.

TermValueLabel
orchestration: 11 × ~4.5 s~50 sGUIDANCE from a MEASURED figure (prod, 2026-08)
work: 2 small HTTP fetches, 5 small DuckDB queries, 2 rhai one-linersnot knownNOT_YET_MEASURED on prod for http and duckdb
hops0
estimate~50 s + the workGUIDANCE

The work here is tiny, so the estimate is about 50 s, nearly all of it orchestration. For scale: the local runtime runs the whole playbook, the two HTTP fetches included, in 1.7-2.0 s (MEASURED: CLI v6.4.1 on the author's laptop, 2026-11-15, n = 3; Chapter 8). The difference is the cost of distribution, paid per step. It buys a durable event log, the full set of tool kinds, and scale; whether that is worth 50 s is the question Chapter 11 helps you answer.

The 4.5 s figure is older than the code you will run

The model's caveat: "several of these figures predate later dispatch fixes". A later measurement put orchestration at ~0.95 s per step (MEASURED, prod, 2026-11-02, n = 4), in an RFC that is still under review (noetl/ai-meta PR #556). With that figure the estimate is ~10 s + the work. Which one is right for your cluster is exactly what you have to measure; Chapter 22 covers where the time goes.

What changes the estimate most

  • Adding a hop. Make fetch an awaited sub-playbook, and each of its 2 runs adds a child execution: +2 × 9-15 s = +18-30 s, more than the whole loop's orchestration at the newer figure. The model's advice: inline a child that only wraps one call (GUIDANCE).
  • Adding steps, not work. Splitting report into three steps adds two step runs, ~9 s at the older figure, for no extra work.
  • Peak slots. This playbook needs one slot at a time. A parallel loop: over 30 items would need 30 at once (21.4).

Check the estimate

The model lists where a real run's cost is recorded (metrics):

  • GET /api/executions/{id} returns started_at, completed_at and up to the 2000 most recent events, each with created_at. There is no duration field: subtract.
  • Each step's call.done carries result.context.duration_ms, the tool's own time.
  • command.started → command.completed timestamps give the step's wall clock including any slot wait after claim.

Orchestration per step is then roughly (execution wall clock − Σ duration_ms) ÷ step runs. With n = 1 that is one observation, not a figure: label it MEASURED with the date, environment and n, as the model does.

Check your understanding

What Is Not Yet Measured

REAL

The resource model lists the questions that are real and have no number (not_yet_measured, as_of 2026-11-11). Verbatim, all seven:

  1. per-step latency of http, duckdb, postgres and mcp steps on prod
  2. latency of a hosted LLM call inside a real playbook step
  3. sustained executions per second on prod
  4. worker slot occupancy over time
  5. user-pool KEDA ramp time on the EHDB trigger, and scale-down time on prod
  6. catalog URI fetch latency
  7. unsaturated prod command-bus latency after 2026-07-30

Why this list matters

The model's rule for this label is "a real question with no number; do not invent one". It is a defence against a common failure: a plan that needs a number, finds none, and borrows the nearest one. Three borrowings this list rules out:

Tempting borrowingWhy it is wrong
"The bus adds ~140 ms": the p50 138.5 ms issued → claimed figureit is from 2026-07-30; item 7 says nothing unsaturated has been measured since
"The local run took 40 ms, so the HTTP step costs 40 ms"a local figure does not transfer to prod (read_first), and item 1 is open
"Ramp time is about a minute", from the ~60-90 s Autopilot node figurethat is node provisioning only; item 5, the pool's ramp on the EHDB trigger, is open

Closing one

A gap closes when someone measures it and the model gains a MEASURED entry with environment, date, n and a public source, in a server release. 21.5 shows where the numbers come from for one execution. Until a release carries the figure, this book treats the question as open.

Check your understanding

Orchestration Overhead

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Where a Step's Time Goes

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Postgres vs EHDB on the Hot Path

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

The Ranked Fixes

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Measuring Honestly

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

WASM at the Edge

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Purity: What Can Compile

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

From Playbook to Module: The Compiler Stages

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

A Playbook in a Cloudflare Worker

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Parity and Limits

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Project: Ship a Pure Playbook to the Edge

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Agent and Bot Fleets on NoETL

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

The Shared-VM Baseline

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Isolation and Scoped Credentials

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Cost and Concurrency

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

The Architecture to Win

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Case Study: A Quantum Compilation Pipeline on the Local Runtime

REAL STUB

Not yet written. Goals, sources and the quiz plan for this chapter are in docs/BOOK-PLAN.md (Part VIII and §2.8).

noetl/quantum: a NoETL entry in a public quantum-circuit compilation competition, read at commit 9208fa2. Project level only: no competition data, scores or circuits.

Planned sections:

  • 26.1 The Pipeline and Its Honest Defaults — the baseline and optimize playbooks; with no data the pipeline writes no circuit and records no score rather than inventing one.
  • 26.2 Validate Before You Run — written.
  • 26.3 Long-Running Compute: Budgets and Deadlines — a seven-hour wall clock split per task, a per-transform budget, and a hard deadline that keeps the unmodified circuit when a transform overruns.
  • 26.4 Shell as the Escape Hatch — written.

The Pipeline and Its Honest Defaults

REAL STUB

Not yet written. Planned: the baseline and optimize playbooks; with no data the pipeline writes no circuit and records no score rather than inventing one.

Validate Before You Run

REAL

The quantum project's optimize playbook runs for hours on the local runtime, inside a notebook session that is killed after twelve. A typo found at hour six wastes the whole session. So the project validates every playbook against the live grammar before anything runs: in CI on every push, and again whenever the playbook changes. This section shows how, and what the validator can and cannot tell you.

The source is noetl/quantum at commit 9208fa2: vqcc/dsl_validate.py, scripts/validate_playbooks.py and .github/workflows/ci.yml. The server side is src/handlers/dsl.rs at server v3.161.2. The public endpoint was read on 2026-11-17, when it reported server 3.165.1.

The API

Chapter 4 introduced the validator. It is a server route, POST /api/dsl/validate, that runs registration's checks and the parser on a document, without registering, storing or executing anything. On your own server it exists only if NOETL_DSL_KB=true, which is off by default (src/handlers/dsl.rs:18-21). The public deployment at noetl.ai has it on, and no credentials are needed: the route reads only compiled grammar.

The project posts the YAML text as it is:

curl -s -X POST https://noetl.ai/api/dsl/validate \
  -H 'Content-Type: application/yaml' \
  --data-binary @playbooks/vqcc_optimize.yaml

On 2026-11-17 that returned:

{
  "valid": true,
  "register_verdict": "accept",
  "execute_verdict": "accept",
  "kind": "playbook",
  "path": "playbooks/vqcc_optimize",
  "findings": [],
  "schema_digest": "sha256:25071111774314cbf0c83ee9925b53701c2228232574bda3b13b1e27d58b372c",
  "api_version": "noetl.io/v2",
  "note": "Dry run: nothing was registered, stored or executed."
}

Two verdicts, because registration does not parse

The response has two verdicts because they can disagree (validate_document, src/handlers/dsl.rs:230-300):

  • register_verdict comes from the same functions catalog registration calls: identity, tool kinds and inline secrets.
  • execute_verdict adds the playbook parser, which registration does not run. The parser checks the start step, unique step names, next targets and similar rules.

A playbook with no step named start shows the gap. On 2026-11-17 the public endpoint answered such a probe with "register_verdict": "accept", "execute_verdict": "reject" and one finding, playbook_rule: Workflow must have a step named 'start'. The catalog would accept that playbook, and every attempt to run it would fail (Appendix F).

The probe had a second error as well, a next target that does not exist, but the response reported only the first. Registration checks each report their own findings. The parser stops at its first error (parse_verdict, server src/services/catalog.rs:598-607). So fix the finding, validate again, and repeat until findings is empty.

The grammar moves, so pin what you validated against

Every response carries schema_digest, a hash of the JSON Schema that server accepts. The quantum playbook's header records each revalidation with its date, the server version and the digest (playbooks/vqcc_optimize.yaml:1-23). Between 2026-11-10 and 2026-11-13 the digest changed twice. A "valid" from last week is a claim about last week's server.

The server can also tell you when your pin is stale: send the digest you generated against as x-noetl-schema-digest, and if it differs the response gains a schema_drift field (validate_response, src/handlers/dsl.rs:302-329 at v3.161.2; still present at v3.165.1). The project sends that header (vqcc/dsl_validate.py:55).

The drift field did not arrive

On 2026-11-17, a request to the public endpoint with a mismatched x-noetl-schema-digest came back without schema_drift, in two tries with different header casing. The server code adds it, so something between the client and the server drops the header. Do not treat a missing schema_drift as proof that your pin is current. Compare digests on the client: fetch GET /api/dsl/version and compare its schema_digest with the one you pinned. The project's script prints both side by side for that reason.

A fallback is not a pass

When noetl.ai cannot be reached, the project still runs a local check: a step named start, no duplicate names, every next target exists (local_semantic_check, vqcc/dsl_validate.py:77-122). That check is labelled "remote": false, with its source. It never counts as acceptance. A playbook is accepted only when the remote answer is valid: true (line 152), and the CI script exits 1 when the API was not reached at all (scripts/validate_playbooks.py). A validator that quietly falls back to a weaker check and reports green gives you less than no validator, because you believe it.

What to copy

  • Validate in CI against the server you will run on, not only against a local schema copy.
  • Read both verdicts. register_verdict: accept does not mean the playbook can run.
  • Re-validate after each fix: the parser reports one rule at a time.
  • Record the digest and date of each validation, and compare digests yourself.
  • Label any fallback as a fallback, and never count it as a pass.

Check your understanding

Long-Running Compute: Budgets and Deadlines

REAL STUB

Not yet written. Planned: a seven-hour wall clock split per task, a per-transform budget, and a hard deadline that keeps the unmodified circuit when a transform overruns.

Shell as the Escape Hatch

REAL

The quantum playbooks do their work in Python. The local runtime they pin cannot run a kind: python step. Every step is therefore kind: shell, and the Python program is a command inside that step. This section says which binary that pin is, why the playbooks are shaped that way, and which costs this book can and cannot put a number on.

The source is noetl/quantum at commit 9208fa2: playbooks/vqcc_pipeline.yaml, playbooks/vqcc_optimize.yaml, and playbooks/vqcc_portfolio.yaml. The runtime behavior below is noetl/cli tag v5.3.2, src/playbook_runner.rs.

Which binary "NoETL 5.3.2" is

The playbook headers say the files were checked on NoETL 5.3.2. At this commit that name is one thing: the PyPI wheel noetl==5.3.2 (requirements-baseline.txt, docs/tutorial/01-environment.md).

The wheel's recipe is packaging/pypi/ at noetl/noetl tag pypi-v5.3.2. That directory's Cargo.toml depends on the crates.io crate noetl at version 5.3 (default features off), and its Cargo.lock resolves noetl 5.3.2. That crate version is the noetl/cli release v5.3.2: tag commit 5ff491e9f0d26729e509674090668b49ec1230a6 (the prefix 5ff491e the quantum tree cites), Cargo.toml version = "5.3.2", published 2026-10-17.

The root pyproject.toml on tag pypi-v5.3.2 is a different file. It says it is not a distribution, and the version written there is 4.26.2. Installing that checkout would not produce this CLI.

The book's own examples stay on CLI v6.4.1. Claims in this section about what a local step does are about CLI v5.3.2, unless they name v6.4.1.

Every step is shell

At 9208fa2, every step tool under playbooks/ is kind: shell:

PlaybookStepsTool kind
vqcc_pipeline.yaml11shell
vqcc_optimize.yaml14shell
vqcc_portfolio.yaml10shell

The baseline's first step is the shape of the rest. The command is a shell string that runs the project's module:

- step: start
  tool:
    kind: shell
    cmds:
      - >-
        cd "{{ workload.repo_root }}" && PYTHONUNBUFFERED=1 python3 -u -m vqcc.pipeline prepare
        --mode "{{ workload.mode }}"
        --data-dir "{{ workload.data_dir }}"
        --runs-root "{{ workload.runs_root }}"
        --repo-root "{{ workload.repo_root }}"
        --seed "{{ workload.seed }}"

On the baseline, check-data, adapt, verify-official, cost, package, and record are the same shape: python3 -u -m vqcc.pipeline inside kind: shell. vqcc_optimize.yaml uses that module too. vqcc_portfolio.yaml uses python3 -u -m vqcc.portfolio. None of the three files has a kind: python step.

Why the local runtime forces that

CLI v5.3.2's execute_tool has an arm for Tool::Unsupported. It prints "Tool not supported in local execution mode", lists the kinds it does run (shell, http, playbook, duckdb, auth, sink, provider, agent), and returns Ok(None). The step does not fail the run. python is not in that list. A playbook that put the work in kind: python would skip it and still be able to finish ok.

The playbook header says the same thing from the project's side: the published local CLI that runs the file does not execute kind: python, while the server grammar accepts both shell and python. Shell is how the same file stays acceptable to both.

By CLI v6.4.1 that skip has become a hard refusal before the first step (8.2). The escape hatch is still required. What changed is the failure mode: a python step no longer disappears inside a run that exits 0. It stops the run up front.

What that costs

Two facts about cost are verified. One number this book already published applies to a different CLI and a trivial command. The running time of these playbooks is not a number this book has.

The shell arm at CLI v5.3.2 sends the command through the tools bridge. The comment there says the bridge collects stdout and stderr and returns them when the command finishes, and that long-running shell steps no longer show output line by line. PYTHONUNBUFFERED=1 and python3 -u unbuffer the Python process. They do not make the CLI print the step's output before the step exits. A step that runs for a long time is silent in the CLI's step result until it returns.

A trivial local shell step cost ~3.3 ms in this book's measurement on CLI 6.4.1 (2026-11-19, n = 10; 11.2). That figure is a one-line command on a later CLI. It is not a measurement of vqcc_pipeline.yaml or vqcc_optimize.yaml.

Wall clock: NOT_YET_MEASURED

This book has not measured how long these playbooks take on CLI 5.3.2 or on any later CLI. It does not import timings from a competition run. The cost this section stands behind is the shape: one shell process per step, output at step exit, and no kind: python on the local runtime the project pins.

What to copy

  • Name the binary. "NoETL 5.3.2" here is the PyPI wheel of CLI crate 5.3.2 (release v5.3.2, 2026-10-17), not the root pyproject.toml on tag pypi-v5.3.2.
  • If the local runtime cannot run the kind you want, put that program in kind: shell and say so in the playbook header. A skipped python step that still exits 0 is not a run of that step.
  • Expect the step result when the process exits. Unbuffering Python is a separate knob from the CLI collecting the step's output at the end.
  • Keep the book's trivial-step figure labelled with its CLI and its date. Do not reuse it as the cost of a long compute step.

Check your understanding

Deployment Modes

REAL

NoETL runs in three places. The local runtime is one process on your machine (Chapter 8); it needs no deployment. This chapter covers the other two: a kind cluster on your laptop, and production on GKE. It ends with the one way production is changed: an image patched in by digest.

All deployment code and manifests live in the public noetl/ops repository. Facts here are read at ops commit 6c55cbe (2026-11-15) and ai-meta playbooks/ at 0e835fd, plus dated public records. This book has not run these against a cluster; each fact is labelled as read. No project ids, registry paths or hostnames appear here.

The order is fixed

code + unit tests ─▶ kind (same images, same topology) ─▶ production, by digest

Kind first, always: a wrong config key, a missing variable or a broken probe costs minutes there and hours in production. Then production changes one workload at a time, by an image-only patch, never by applying a manifest (27.3, and Chapter 29 for the rollout itself).

Sections

Check your understanding

Local kind First

REAL

kind runs Kubernetes in containers on one machine. NoETL's kind cluster runs the same components as production: server, worker pools, the cmdbus-writer and the gateway (Chapter 10).

The cluster

noetl/ops ci/kind/config.yaml defines a cluster named noetl (kube context kind-noetl). It maps host ports to the services, among them:

Host portService
8082NoETL server API
38090gateway API
54321Postgres

automation/infrastructure/kind.yaml creates it (kind create cluster --config=ci/kind/config.yaml), on a Podman machine named noetl-dev.

Converge the topology

The current kind path is a set of NoETL playbooks, run with the CLI in local mode (automation/ehdb/README.md):

# from a clone of noetl/ops
noetl run automation/ehdb/ehdb_platform.yaml --runtime local \
  --set action=converge --set profile=kind --set context=kind-noetl
actionDoes
planrenders every object and server-side dry-runs it; changes nothing
convergereconciles the topology, then verifies it
statusreports what is deployed and checks the EHDB-only invariants
verifythe functional proof on an already-converged cluster
teardownremoves the ScaledObject and the writer; keeps the volumes

It drives four child playbooks: the writer (ehdb_writer.yaml), the server, pools and gateway (ehdb_runtime.yaml), the user pool's autoscaler (ehdb_autoscaler.yaml) and the proof (ehdb_verify.yaml).

The profile is a guard

profile=kind refuses any context that is not kind-*, and profile=prod refuses one that is. A kind command cannot reach production by a wrong default context. Pass context explicitly anyway: the default kube context is whatever you last used.

Under profile=kind, images are local (imagePullPolicy: Never), volumes small, and the writer image is set by writer_image. Build the images from the tagged release you mean to test and load them with kind load. This topology exists as code only because it was reconstructed: after NATS was deleted (2026-08-01) the production shape had been made by hand and "never written back" (automation/ehdb/README.md).

The older playbook is stale

automation/development/noetl.yaml

The contributor rules still name automation/development/noetl.yaml (action=redeploy). At 6c55cbe it builds the legacy Python image (docker/noetl/dev/Dockerfile), applies NATS manifests, and rewrites the image in every file under ci/manifests/noetl/, which now includes the production manifests. It was last changed 2026-05-23. Do not use it for the current stack.

Check your understanding

Production on GKE

REAL

Production runs on GKE Autopilot, which provisions nodes per pod (the manifests carry autopilot.gke.io/* annotations; a new node takes about 60-90 s, 10.4). This page describes it as the committed manifests in noetl/ops ci/manifests/noetl/ declare it, at 6c55cbe.

What the manifests declare

WorkloadKindReplicasNote
noetl-server-rust-embeddedStatefulSet1, must stay 1a second replica is a second snowflake generator with the same machine id, so duplicate event_ids (server-rust-embedded-sts-prod.yaml)
noetl-server-rustDeployment0retired; held at 0 for the same reason
noetl-worker-rustDeployment2the user pool (shared), autoscaled by KEDA
noetl-worker-system-pool, -shard1Deployments1 eachthe system pool, not autoscaled
noetl-cmdbus-writerStatefulSet1both buses (10.3)
gatewayDeploymentcaptured from the live cluster, "STAGED, NOT APPLIED" (ci/manifests/gateway/deployment.yaml)

Images come from the release pipeline (Chapter 28): release.yml publishes them to GHCR, the artifact of record, and they are copied to the cluster's registry.

Shape-only manifests

Myth

"The manifest says which image runs." Not in production. The worker and system-pool manifests have no image: field: "DECLARED BY THE DEPLOY, NOT HERE" (worker-rust-deployment-prod.yaml:134-142). The pins they used to carry fell behind live, so re-applying one rolled prod back past shipped fixes (ai-meta#323). Server-side apply leaves a field the manifest does not claim, so a shape-only file cannot roll an image back. shape-only-check.sh fails if a pin creeps back in.

The server StatefulSet is the exception: its manifest still carries a digest, marked as an as-built record to be treated as documentation.

Committed is not live

A manifest is a copy of the cluster, and nothing forces it to agree:

  • ai-meta#267 (opened 2026-08-14, open) found the production manifests omitted 84 live environment variables. A full re-apply would have silently unconfigured production.
  • A system-pool ScaledObject (3-10 replicas) is committed (ci/manifests/keda/), but the public resource model records on 2026-11-11 that it is not on the cluster.

So read a manifest as intent. What runs is what the cluster reports, and the version is what each pod's *_build_info says (Chapter 30).

Check your understanding

Deploy by Digest

REAL

Production is changed by patching one container's image, by digest, in one workload at a time. A digest (image@sha256:…) names exact bytes; a tag can be moved, a digest cannot. This is the procedure the public playbooks write down and have executed (ai-meta playbooks/257-worker-5115-noop-roll/README.md, 2026-08-11; playbooks/516-ehdb-426-rollout/README.md, 2026-11-04).

The steps

  1. Record the rollback first. Read the digest each workload runs now and write it down. noetl/ops keeps an append-only ledger per component (ci/manifests/noetl/ledger/*.tsv: version, digest, released, git sha, note); "the rollback target is the row above the one currently running".
  2. Dry-run against the server, and diff the whole object. Render the patch with --dry-run=server and compare it with the live object. Proceed only if the diff is exactly the change you meant. playbooks/517-floor-exact/roll2.sh mechanizes this: it "refuses unless the diff is exactly the one intended change".
  3. Patch the named container only. kubectl set image <workload> <container>=<image>@sha256:<digest>. A wildcard (*=) also replaces init containers; that broke a start-up check on kind (516 README). Container names differ between kind and production, and a wrong name makes set image a silent no-op (playbooks/210-t5-readiness/ROLLBACK.md).
  4. Verify from the process, by the version on its *_build_info series, not from the Deployment spec.
  5. Rollback is the same command with the recorded digest.

Why not apply the manifest

2026-09-08: a 55-minute outage from one apply

Reworked production manifests were applied after a server-side dry-run that checked one field: that the running image would not change. It did not. But the same manifest declared a volume for a claim that had never existed. The writer pod could not schedule, and because it hosts both buses, dispatch stopped for about 55 minutes. Three of five workloads also rolled, because removing pod-template annotations changes the template hash. A whole-object diff would have shown the volume at once (ai-meta wiki Sessions-Log, 2026-09-08).

The lesson is in step 2: a dry-run answers only the question you ask it. Diff everything, and know before you patch whether the change touches spec.template, because then the workload restarts.

Check your understanding

Releases and Version Pinning

REAL

Every NoETL release you can run (a server image, a worker image, a CLI tarball) is cut by a machine from commit messages. Knowing how that machine decides tells you two things: why a merged fix may never ship, and which number to trust when two disagree.

Facts here are each repository's .github/workflows/semantic-release.yml, release.yml and .releaserc.json on main, read on 2026-11-15, plus the run logs and issues cited.

The pipeline

  1. A PR merges to main. By convention it is a merge commit, though the repositories' settings also allow squash.
  2. semantic-release runs on the push (semantic-release.yml, semantic-release 24.2.3, preset conventionalcommits). It reads every commit since the last tag and picks a version, or none.
  3. If it picks one, it tags it and dispatches release.yml with that version. It has to dispatch explicitly: a tag pushed with the workflow's own token does not trigger other workflows.
  4. release.yml builds and publishes: the crate, the container image (ghcr.io/noetl/<repo>:<version>), and a GitHub Release.

Which commits release

From @semantic-release/commit-analyzer's default rules (lib/default-release-rules.js), which the .releaserc.json files do not override:

CommitReleases
feat!: …, or BREAKING CHANGE: in the bodymajor
feat: …minor
fix: …, perf: …, a revertpatch
chore:, docs:, test:, refactor:, anything elsenothing

Myth

"Only the merge subject counts." semantic-release analyses each commit on the branch, not just the merge. The logs show it: on 2026-11-08 the server run analysed ten commits, four "Merge pull request" subjects and six chore: commits, and ended "There are no relevant changes, so no new version is released" (semantic-release.yml run of 5cf0712d). A "Merge pull request" subject is not a conventional commit and counts for nothing.

The last row of the table is the trap. A chore: merge produces a green build and no release, and nothing says so. The change sits on main, correct and undeployable. If a change must reach a cluster, it needs a releasing type. After merging, check that the tag moved:

git fetch origin --tags && git tag --sort=-v:refname | head -1

The escape hatch

release.yml also accepts a manual dispatch with a version input. That publishes whatever version you type, bypassing the commit check. It has been used. Server v3.153.0 was published by a manual dispatch at 19:02 UTC on 2026-11-08, about fourteen hours after semantic-release had declined that commit (the two runs above, and the release's own timestamps). Its four PRs were all chore:.

The tag is the version

Myth

"Cargo.toml says which version this is." On the server, worker and tools repositories it does not. The release bot no longer commits the version bump to main (a required status check rejects that push), so the committed version is a floor that lags behind the tags. On 2026-11-15: server Cargo.toml 3.112.3, newest tag v3.163.1; worker 6.0.0 vs v6.18.0; tools 4.0.1 vs v4.7.0. release.yml says it directly: "THE TAG IS AUTHORITATIVE, NOT Cargo.toml".

Each build job writes the tag's version into Cargo.toml before compiling (ci/stamp-version.sh), so the binary knows its real version. A running service reports it as the version label of its *_build_info metric (server src/metrics.rs:885-900). That label is the version a cluster runs. A manifest, a note or Cargo.toml is a copy.

The CLI and gateway repositories still commit the bump (chore(release): version 6.4.1 [skip ci] on the CLI), so there the two agree.

Never set the version by hand

On 2026-08-03 a runbook step told an operator to bump the worker's Cargo.toml by hand before tagging. semantic-release ran on the same merge without knowing:

  • main ended up at 5.91.3, below the hand-pushed tag v5.92.0;
  • two images had identical code and different versions;
  • the next automatic release would have sorted below 5.92.0.

Prod was unaffected, because it was rolled by image digest, not tag. It took two more releases to climb back above the hand-made number (ai-meta#224, closed 2026-08-04). Merge with a conventional type and let the pipeline choose.

A commit type is an unchecked semver claim

semantic-release knows only the prefix. On 2026-09-07 noetl-tools v3.27.0 added a public field to a struct that another crate builds with a struct literal. In Rust that breaks the caller, yet it shipped as a minor, because the commit said feat:. It stayed hidden until a consumer next resolved its caret range (ai-meta#330, open). So pin exact versions where breakage would hurt, and treat a caret range as a decision the resolver makes later.

How this book pins

The book follows its own advice:

PinWhat it fixes
examples/NOETL_CLI_VERSION (6.4.1)the CLI that CI downloads, checksum-verified, to run every example
tools/SERVER_SCHEMA_PIN (server v3.161.2, commit 983e36e)the server the generated appendices come from

Every REAL page names the release its claims were checked against. Bumping a pin is a reviewed change: the generated diff shows what moved.

Check your understanding

Rollout and Rollback Discipline

REAL

Chapter 27 covered how one workload's image is changed. This chapter covers the order: what to check, in what sequence, and when to undo. Every rule here was written after something went wrong. Each is stated with the dated record that taught it.

Sources: ai-meta playbooks/516-ehdb-426-rollout/ and playbooks/517-floor-exact/ at 0e835fd (procedures, and the records of their execution), and the public issues and wiki Sessions-Log entries cited. This book has run none of it.

Smoke before and after every roll

A smoke is a short, fixed set of real executions that must pass. The one production uses is "agreed with the owner 2026-11-04" (516 README) and has three parts:

  • seven credential-free fixture playbooks from the noetl/e2e suite (scripts/prod_regression_validate.py --set smoke: hello world, Python, arguments, variables, a loop, output selection, a large result), gate "7/7 COMPLETED";
  • one turn of a real product playbook through the server API;
  • one turn of another through the live gateway as a guest, so sign-in, the proxy and the result stream are exercised too.

The rule, in the script's own words: "Run before AND after every roll; any FAIL => roll back" (smoke.py). Before matters as much as after: a smoke that already fails cannot tell you the roll broke it.

Prove the smoke reached the right cluster

smoke.py refuses to run unless it can read noetl_server_build_info, and prints it. A port-forward that silently points at another cluster would otherwise give a confident pass for the wrong system.

One pool at a time

Rolling a system pool stalls every drive

Measured on production on 2026-11-03: a fresh system-pool pod fails every drive pass ("WAL chain incomplete") for about 7–10 minutes while it replays the event feed. It reports ready after about 8 s, so readiness says nothing about it. The first roll that day restarted both system pools together, stopped all executions, and was read as a regression and rolled back. The fix was to roll them one at a time: with one pool warm, smoke turns slowed to about 110–127 s instead of stalling (ai-meta#504, closed 2026-11-03).

The order the 516 playbook records: server → smoke → user pool → smoke → system pool A → wait out the catch-up → smoke → system pool B → smoke. "Never both system pools together." A smoke failure inside a catch-up window counts against the window, not the release.

Workers drain on shutdown since worker v6.11.3 (worker#390, 2026-11-03). On SIGTERM a worker stops claiming, lets in-flight commands finish within NOETL_WORKER_DRAIN_TIMEOUT_SECS (default 150 s), then deregisters; the pool manifests' grace period went from 30 to 180 s to match. Before that, a roll dropped claimed commands and the execution failed minutes later (ai-meta#511).

Rollback is a recorded digest

Before each step, the playbooks record the digest each workload runs. After it, a table: workload, new digest, rollback digest, smoke before → after. Rollback is the same image-only patch with the recorded digest. Real cases from the public record:

DateWhatWhy
2026-07-26bus cutover held at canary, rolled backflipping would have stranded about half the shared commands (ai-meta#202)
2026-07-27full bus flip rolled back; a third round succeeded the same day~10% of commands were never claimed (ai-meta#203)
2026-09-30chain-store gates disarmed (an environment change, ~16 s)the parity check read 772/0, then 13/839 an hour later (wiki Sessions-Log)
2026-11-03system pools back to the previous workerevery drive stalled; the cause was rolling both at once (ai-meta#504)

The lesson of 2026-09-30 is worth keeping: a check that passes on a lot of traffic over a short time has not passed. Size a soak by duration, not volume.

Readers before writers

When a release changes a format that one component writes and others read, order matters. Bloom scheme 2 (ehdb v0.15.0, ai-meta#517) went out as two releases:

  1. Release A, 2026-11-06: every reader learns the format; nothing writes it. Server, then each worker deployment, one at a time, then a soak of at least 24 h. Until B, rolling back below v0.15.0 is safe.
  2. Release B, 2026-11-07: writers set EHDB_BLOOM_SCHEME=2, one store at a time. Rollback is to unset it.

The rollback floor moves

After B, no reader may run below v0.15.0 while scheme-2 data exists. An old reader does not refuse: on kind it fell back silently and rewrote the manifest (517 README). So B waited for a reader that refuses loudly (ehdb v0.15.1), and the rollback pins moved up with it. After a format change, the old digest is no longer a safe rollback.

Restart costs to plan for

RestartCostSource
cmdbus-writer~21 s failover (15 s lease), the cost of the election516 README, 2026-11-04
cmdbus-writer, side effectone gateway execution-owner record is lost; that turn completes but cannot be polled, so a smoke may fail once and pass on retryai-meta#523, open
system pool~7–10 min of no-op drivesai-meta#504

Check your understanding

Observability and Alerting

REAL

When a playbook misbehaves on the distributed runtime, three questions come up in turn. What happened to this run? Is the platform healthy? And would anyone have been told if it were not? This chapter answers each with what NoETL ships.

Code facts are server v3.161.2, worker v6.15.0, gateway v3.22.1 and CLI v6.4.1. Alerting facts are the noetl/ops repository at commit 3f63656 (2026-11-02) plus the dated public record, each with its date.

One run: the execution id is the trace key

Every execution gets an execution_id from a snowflake generator in the server, before any I/O (src/handlers/execute.rs:366-371). Its events, its commands and its child executions are all keyed by it. So the trace of one run is its event log, read by that id:

ReadWhat you get
noetl status <execution_id> (add --json for everything)the status summary; falls back to the event log if the server has no cached state (CLI src/lib.rs:5726-5910)
GET /api/executions/{execution_id}the execution with its events: type, step (node_name), status, time, result, error (server src/services/execution.rs:28-50)
GET /api/executions/{execution_id}/statusstatus only

Status is worked out from the events (determine_status), not read from a stored column. Chapter 10 lists the events a one-step run writes.

Myth

"NoETL exports distributed traces." Not at these releases. Server, worker and gateway use tracing for logs and have no OpenTelemetry dependency (their Cargo.toml files), so no spans leave the process. What exists is a join point: a caller may pass a W3C trace object (traceparent, tracestate, baggage) to POST /api/execute. The server stores it on playbook_started and passes it to the execution's commands and to child executions that do not bring their own (src/handlers/execute.rs:50-56, 476-483). The code calls execution_id "the primary NoETL trace key" and the W3C object "the external join".

Inheritance is best effort. If the parent's state is no longer hot, the child starts a fresh trace segment rather than scan the event log (execute.rs:1036-1056).

The platform: three metric surfaces

Each service serves Prometheus text at /metrics:

ServiceWhereUnauthenticated?Off switch
serverits HTTP port, /metricsyes, with the health routes (src/main.rs:90-104)NOETL_DISABLE_METRICS (default false; the server reads NOETL_-prefixed variables, src/config/app.rs:1086-1088)
workerWORKER_METRICS_BIND, default 0.0.0.0:9090 (src/config.rs:124-134), next to /healthz and /readyzyes (src/metrics_server.rs:59-62)none
gateway/metrics (src/main.rs:435-437)yes, merged outside the auth layer (src/main.rs:508-520)none

The cmdbus-writer runs the worker binary, so it serves the worker surface too, plus the bus-lag face the autoscaler reads (10.4).

execution_id is never a metric label

A label value per run would grow the metric registry without bound. So metrics answer "how many, how slow, how far behind", and the event log answers "which run". To go from a bad number to a run, find the time window in the metric, then list executions in that window.

A few series the alerts below read, each found in code at these releases:

SeriesServed byTells you
noetl_ehdb_command_publish_failed_total{reason}server (src/metrics.rs:703)commands that did not reach the bus
noetl_worker_claim_failed_total, noetl_worker_claim_succeeded_totalworker (src/metrics.rs:1147-1156)whether a pool is claiming work
noetl_worker_materializer_skipped_totalworker (src/metrics.rs:1138)events the materializer dropped
noetl_gateway_auth_bypass_enabled{mode}gateway (src/ingress/mod.rs:332-360)1 if GATEWAY_AUTH_BYPASS accepts every token

The last one shows a design rule worth copying. It is present at 0 on a healthy gateway, not absent. "Authentication is on" and "I cannot tell" must not look the same. Before the gauge, the only signal was a warning logged on every request.

Would anyone be told? Alert policies as code

Paging rules live in noetl/ops as ci/monitoring/alertpolicies.json: 26 policies at 3f63656, each a PromQL query with a duration (how long it must hold before paging). They cover the bus, claims, the materializer, the gateway's auth gauge, the EHDB mirror and parity checks, and volume space and inodes.

ci/monitoring/apply-alertpolicies.sh applies them. It matches on display name, updates what exists, creates what does not, and never deletes: a policy dropped from the file stays live and is reported, because silently removing a paging rule is worse than leaving a stale one. --dry-run shows what would change.

Two paths, one delivers

The repository also holds Prometheus Rules objects (ci/manifests/noetl/gmp/rules-*.yaml). They look like alerting and they evaluate. But per the repository's own README, the managed Alertmanager they feed has no receiver configured, so their alerts reach nobody. Only the Cloud Monitoring policies page. The README calls the Rules files "documentation and kind-parity".

Myth

"A policy attached to a notification channel will reach someone." Attachment is not delivery. The API does not expose whether an email channel is verified, and an unverified one accepts every setting and delivers nothing. Delivery was proven on 2026-08-19 by firing a temporary policy and receiving the mail (ci/monitoring/README.md). After any channel change, repeat that test.

What forces the file and the live policies to agree

Nothing yet. Applying is a manual step. The repository's CI (.github/workflows/validate.yml, added 2026-10-03) checks that files parse; it does not compare them with what is live. That gap is ai-meta#471, open:

  • On 2026-10-15 the file and live had drifted in both directions: three committed policies were never applied, one live policy was in no file, and one live policy had a 0s duration where the file intended 1800 s.
  • That 0s came from the apply script: a policy with no duration key is applied as 0s (pol.get('duration', '0s')), so a stable count paged at once and kept paging. Every policy at 3f63656 now sets duration explicitly.
  • On 2026-10-16 it was reconciled: 23 committed, 23 live, none mismatched, none without a channel.

The file has grown to 26 since. Whether the three newer policies are live is not in a dated public record. This book does not read the project, so it does not say.

Scrape coverage is a risk

An alert on a metric nobody scrapes never fires, and nothing reports the silence. On the production cluster a PodMonitoring object names the pods to scrape; pod annotations are ignored. Two selector defects were fixed in noetl/ops ceb49bc on 2026-10-04:

  • The server's monitor selected the Deployment's label, but that Deployment had been at 0 replicas since the serving pod moved to a StatefulSet. The pod that served was scraped by nothing for 25 days.
  • The workers' monitor listed four app names. Two matched nothing, and two pods of a newer system pool were not on the list.

Both now select by a label that every intended pod carries (component: server; worker-pool must exist) rather than by a list of names (ci/manifests/noetl/gmp/podmonitoring-noetl.yaml).

Check coverage, not configuration

A selector that lists workloads is a copy of the workload set, and nothing makes it follow when a workload is replaced. Select on a label the workloads must have. Then check that every service's *_build_info series is present (noetl_server_build_info, noetl_worker_build_info, noetl_gateway_build_info): a missing build_info means nothing scrapes that pod, which is different from a counter that never moved.

Check your understanding

Credentials and Secrets

REAL

Section 4.4 showed how a playbook refers to a credential: an auth: alias or a {{ keychain.<alias>.<field> }} template, never the secret itself. This chapter follows the secret behind the alias: how the server stores it, how it reaches a worker, what keeps it out of the event log, and which protections are switched off until you turn them on.

Code facts are server v3.161.2 and worker v6.15.0; manifest facts are noetl/ops at 6c55cbe. No secret, store path or alias of any deployment appears here.

Stored: encrypted, and fail-closed

Credentials and keychain entries are stored with envelope encryption: each record has its own data key, wrapped by a key encryption key (KEK) (server src/crypto/envelope.rs:117; one cipher serves both stores, src/main.rs:1451).

  • The KEK comes from NOETL_ENCRYPTION_KEY. Without it, or with an empty value, the server refuses to start; the old all-zero default key is gone (src/main.rs:1119-1158).
  • NOETL_ALLOW_INSECURE_DEFAULT_KEY=true starts it anyway with a random key per process, so anything written is unreadable after a restart. It exists for throwaway tests.
  • NOETL_KMS_PROVIDER=gcp-kms (with NOETL_GCP_KMS_KEY) moves the KEK into Cloud KMS. The default is local (src/crypto/mod.rs:33-61).
  • Every secret variable can be given as a file: <VAR>_FILE is read into the environment at the top of main (src/main.rs:1180-1184).

Delivered: what a worker fetches

When a step names an alias, the worker asks the server for it: GET /api/credentials/<alias>?include_data=true&execution_id=… (worker src/client/control_plane.rs:918-946). Without include_data=true the server returns metadata only (server src/handlers/credentials.rs:31-33). With it, the response is the decrypted secret. If the store has no such alias, the server can resolve it from a provider: keychain entry (GCP, AWS, Azure, Vault, Kubernetes; src/secrets/mod.rs:116-131) and caches the result for that execution.

Three protections sit around that call. All three are off or permissive by default:

ProtectionDefaultTo turn it on
bearer gate on the credential routesshadow: counts what it would reject, rejects nothing; a typo also means shadow (src/auth_gate.rs:25-93)NOETL_INTERNAL_AUTH_MODE=enforce, with NOETL_INTERNAL_API_TOKEN on server and every caller
sealed delivery: the secret encrypted to the worker's own key (X25519, HKDF-SHA256, ChaCha20-Poly1305)off; plaintext fetch (worker src/executor/auth_alias.rs:425-460)NOETL_SEALED_CREDENTIALS=true and WORKER_ID on the worker
mTLS between worker and serveroff; plain HTTP (server src/tls.rs, worker src/client/tls.rs)NOETL_TLS_CERT/NOETL_TLS_KEY/NOETL_TLS_CLIENT_CA on the server, NOETL_TLS_CLIENT_CERT/NOETL_TLS_CLIENT_KEY on the worker

Shadow means open

With the gate in its default shadow mode, anything that can reach the server's credential routes can read decrypted credentials. On any deployment that holds real secrets, set NOETL_INTERNAL_AUTH_MODE=enforce and make sure every legitimate caller sends the token; the shadow counters exist to tell you which callers those are before you switch.

Sealed delivery covers only the auth: path. A {{ keychain.* }} template is resolved through the plaintext fetch even when sealing is on (worker src/executor/keychain_namespace.rs:183).

Kept out of the event log

The event log is append-only and never purged, so a secret written there stays for the life of the deployment. Three mechanisms keep it out:

  1. The server does not render keychain.* templates. It renders everything else in a step and leaves those for the worker (orchestrate-core/src/template.rs:299-345, used by commands.rs:370-378). The dispatched command carries the template, not the value.
  2. The drive command never resolves secrets. A drive pass runs as a command too (10.2). The worker skips keychain resolution for it (src/executor/command.rs:480-492, marked as a leak fix): before the guard, a step two or more hops into a playbook could carry a resolved bearer token into command.issued. The guard shipped on 2026-07-08 in worker v5.70.3 (commit 2031a8b4).
  3. Results are scrubbed before they are stored or cached: values under sensitive key names, and strings that look like secrets (bearer tokens, JWTs, sk-…, ghp_…), become [REDACTED] (worker src/scrub.rs:25-51, applied at command.rs:2068).

The scrubber matches shapes, not your secrets

It does not know the values in your keychain. A tool that echoes a secret in an unrecognised shape under an innocent key name gets it stored. Do not print credentials from a step, even to debug.

The server also refuses to register a playbook that contains obvious secret material (4.4).

Not in the worker's environment, by convention

Business credentials belong in the keychain, not in a worker's environment. That is a deployment rule, not something the code enforces: NOETL_KEYCHAIN_ENV_VARS is an allow-list of environment variables the worker copies into every command's secrets (empty by default, worker src/executor/command.rs:55-63). Anything listed there is visible to every step on that pool. The production manifests use it for one platform token on the system pools only.

Bootstrap secrets: files, not the wallet

Three secrets cannot live in the credential store, because the store needs them:

SecretWhy it cannot be in the wallet
NOETL_ENCRYPTION_KEYit decrypts the wallet
POSTGRES_PASSWORDthe wallet is a Postgres table
NOETL_INTERNAL_API_TOKENit authenticates calls to the wallet

In the production manifests they arrive as files projected from Google Secret Manager through the Secrets Store CSI driver (*_FILE variables), not as Kubernetes Secret references (ci/manifests/noetl/*-prod.yaml). The user pool and the writer mount no secrets. Per the dated record, the move to files finished on 2026-08-28; a file is present or absent at start-up, with nothing to hang on.

Built but not doing anything yet

Three features that ship inert

  • Secret audit. The noetl.secret_audit table is created at every start and has a read endpoint, but at v3.161.2 nothing writes to it: the audit service has no caller outside its own module. Expect it to be empty. NOETL_SECRET_AUDIT_REQUIRED is parsed and has no effect.
  • Residency. Region tags, a residency policy and a cross-region broker exist, but with NOETL_SERVER_REGION unset the server runs in "legacy mode" and checks nothing (src/secrets/mod.rs:96-108).
  • KEK rotation is an internal endpoint (POST /api/internal/wallet/rotate-kek); it runs only when someone calls it.

So "the wallet supports X" and "your deployment does X" are different claims. Check each setting on your deployment.

Check your understanding

Representation Drift: Keeping What You Know True

REAL STUB

Not yet written. Goals, sources and the quiz plan for this section are in docs/BOOK-PLAN.md.

Case Study: The Travel Playbooks

REAL STUB

Not yet written. Goals, sources and the quiz plan for this chapter are in docs/BOOK-PLAN.md (Part X and §2.8).

noetl/travel: a family of playbooks behind a travel app, read at commit cd210d7.

Planned sections:

  • 33.1 From Screen to Playbook to Firestore — the contract shape every playbook in the family shares: the app posts its own object, the playbook persists it and returns a render-ready payload; and the gateway allowlist that lets a signed-in user start these playbooks.
  • 33.2 The Profile Flow: Read, Save, Read Back — written.
  • 33.3 Provider Calls: Inline or Child Playbook — HotelBeds, Duffel and Places through MCP playbooks; when a child playbook's hop cost is worth paying and when the planner inlines the call; how two copies of one provider drifted.
  • 33.4 The Itinerary Planner: State Across Turns — a conversational planner: threads, per-turn state, guards and routers in a long playbook.
  • 33.5 Regression-Testing a Playbook Family — written.

From Screen to Playbook to Firestore

REAL STUB

Not yet written. Planned: the contract shape every playbook in the family shares: the app posts its own object, the playbook persists it and returns a render-ready payload; and the gateway allowlist that lets a signed-in user start these playbooks.

The Profile Flow: Read, Save, Read Back

REAL

The travel app's profile page calls one playbook for two jobs. At sign-in it reads the user's profile. On the settings page it saves whatever section the user just edited. Either way, it returns the stored profile plus a few suggested places near the user's home. The playbook is short, but almost every step in it exists because of a runtime rule. This section shows which rule, and how you would find it.

The source is playbooks/profile.yaml in noetl/travel at commit cd210d7 (catalog path muno/playbooks/profile). Runtime rules are checked against server v3.161.2 and tools v4.6.0. It is one of the playbooks a signed-in regular user may start: it is on the gateway's default allowlist (gateway v3.22.1 src/authorization.rs:41-49; Chapter 34 covers that list).

The shape

start ─▶ validate_input ─┬─▶ begin_read ──────────────┐
                         ├─▶ save_profile ────────────┴─▶ load_profile ─▶ plan_suggestions ─┬─▶ suggest_pois ───┐
                         └─▶ reject_input ─▶ end                                           └─▶ skip_suggestions ┴─▶ build_response ─▶ end

The app sends uid, a profile object, and read_only: true at sign-in. The playbook checks the input, writes if it should, and then reads the document back. It plans suggestions from the stored profile, calls Places if there are coordinates, and builds the response.

Three decisions in the header

The playbook's description explains each design choice before any step does it:

  • Merge, not overwrite (lines 37-42). The settings page saves one section at a time. A plain set_doc replaces the whole document, so saving "personal info" would delete saved trips. The save passes merge: true (line 273), so a partial save stays partial.
  • Read back, don't echo (lines 44-47). Returning the request as if it were the result is free, and it is wrong. It reports success for fields the store may have changed or refused. load_profile reads the document after the write, so the response shows what is actually stored. The header records a dated two-write test against the live store: after the second, partial write, the read-back held the fields of both writes.
  • The save is the contract; suggestions are extra (lines 49-54). A save that worked must report success even if Places is down. See the warning below for how far the runtime enforces this.

There is also a fourth decision, about reads (lines 112-121). Sign-in used to go through save_profile too, merging an empty object. That deleted nothing. But every sign-in wrote to the store, and because a merge creates a missing document, "never saved a profile" could no longer be told apart from "saved an empty one". The read_only flag gives reads their own branch.

Rules the runtime forces

First match wins, so arc order matters

validate_input routes with mode: exclusive (lines 212-216):

- when: "{{ validate_input.ok and validate_input.read_only }}"
  step: begin_read
- when: "{{ validate_input.ok }}"
  step: save_profile
- step: reject_input

An exclusive arc set takes the first arc whose when is true (6.1). A valid read matches both of the first two conditions. If the two arcs were swapped, every sign-in would write again. The comment above the arcs says so, because the edit that breaks this looks harmless.

A skipped step is skipped for good

Why does begin_read exist? It is a noop that only forwards to load_profile. Why not route the read straight to load_profile?

When an exclusive arc set picks one arc, the other targets are recorded as skipped (6.1). Skipped counts as done, the same as completed or failed (orchestrate-core state.rs:1044-1054). And a later arc to a step that is already done is ignored, unless it is a loop back-edge (orchestrator.rs:1364-1368).

So suppose load_profile were one of validate_input's targets.

  1. A save wins the arc set, so load_profile is recorded as skipped.
  2. save_profile then routes to load_profile, and that arc is ignored.
  3. The run stops dispatching. It never fails, and it never finishes.

The playbook did this twice. First build_response was a direct target of the suggestions router, and a profile with coordinates stranded the run after every real step had succeeded (lines 359-368). Then load_profile was a target of the read/save router, and every save stranded. begin_read, skip_suggestions and reject_input are the fix. Each branch gets its own entry step, and a step that several branches lead to is never itself a target in an exclusive set.

Make the rule mechanical

The repository has a guard for this, scripts/playbook_skip_topology_test.py. CI runs it on every playbook change (.github/workflows/playbook-tests.yml). It fails any playbook that can route to a step its own branch already skipped. A rule that lives only in a comment works until someone forgets to read the comment.

A python step sees only what you bind

validate_input is kind: python. Its comment (lines 141-145) records how the playbook's first real run failed: the code read workload.get("uid") and got NameError. The python tool runs your code with each key of input: as a global, plus input_data, args, variables, execution_id and step (tools v4.6.0 src/tools/python.rs:557-573). workload is not one of them. Templates can read workload; code: can read only what input: passes to it:

input:
  uid: "{{ workload.uid | default('') }}"
  read_only: "{{ workload.read_only | default(false) }}"

Don't trust a type that crossed a template

read_only reaches the code through a template, so the playbook does not assume it is a boolean. In Python, bool("false") is True, which would send a real save down the read branch and look like success. The code accepts only explicit spellings (true, 1, yes, on) as true. It treats anything it does not recognise as a write (lines 159-171), because reading by mistake would quietly stop saving profiles. It also checks coordinates with bool excluded, since True is an int in Python and would read as a latitude (lines 178-186).

How far "never fail the save" is enforced

Not verified: the suggestions fallback

suggest_pois is meant to be optional. It carries a policy rule, when: "{{ output.status == 'error' }}" → do: continue, under its tool: (lines 400-408). Section 6.5 verified that policy rules are applied for the sub-tasks of an ordered tool list. This step has a single kind: playbook tool, and for a single tool the server renders the whole tool config when it builds the command (orchestrate-core/src/commands.rs, build_tool_command). That happens before any output exists. This book has not verified that the rule turns a Places failure into continue for this step. That question is tracked in book#95.

If you need a step to be optional, use a form you have seen work: a one-item tool list with a policy rule (6.5), tested by making the provider fail.

What to copy

  • Write the reason for each design choice in the playbook header, next to the code.
  • Merge partial writes, then read back what the store actually holds.
  • Give every branch its own entry step. Never make a join step an alternative in an exclusive arc set. Then add a check that enforces it.
  • Bind everything a code: block needs through input:, and normalise values that cross a template.
  • Before you rely on an error-handling key, check that something actually applies it.

Check your understanding

Provider Calls: Inline or Child Playbook

REAL STUB

Not yet written. Planned: HotelBeds, Duffel and Places through MCP playbooks; when a child playbook's hop cost is worth paying and when the planner inlines the call; how two copies of one provider drifted.

The Itinerary Planner: State Across Turns

REAL STUB

Not yet written. Planned: a conversational planner: threads, per-turn state, guards and routers in a long playbook.

Regression-Testing a Playbook Family

REAL

The travel repo does not treat a green app build as a test of its playbooks. It runs the family through a playbook. qa/regression/suite.yaml in noetl/travel at commit cd210d7 (catalog path muno/qa/regression/suite) dispatches each case, writes one result document per case, and exits non-zero when anything is red. The suite's executor profile is local.

One process per case

The suite header says why the cases are not kind: playbook children. A runner has to run every case and report all of them. A failed step fails the run (6.5). A child that fails would abort the parent, so the first red case would hide the rest. Each case is its own noetl exec. The suite records that process's exit code. It does not let the code stop the loop.

The runner resolves noetl once (command -v noetl) and passes that path into the case. A nested dispatch then uses the binary the suite started, rather than whatever else is first on PATH inside the child.

Evidence between steps goes through files in the workspace. The prepare step deletes results/ before the run. The report is built by reading those files, so a document left behind by an earlier run would be counted again, including a pass for a case this run never started.

Four verdicts, computed, not declared

qa/regression/lib/qa_report.py at that commit computes the verdict. The case does not pass one in.

VerdictWhen verdict() returns it
passa reason was not set, at least one assertion was recorded, and every assertion has ok
failan assertion failed
blockedthe case called block, because a precondition was absent
errorthe assertion list is empty, or the harness itself broke

finish() returns process exit code 0 only for pass. blocked returns 1 as well. A case that did not run is not a pass, and a suite that counted it as green would be reporting coverage it does not have.

require_debug() exits before any case when Python's __debug__ is false. Under -O or PYTHONOPTIMIZE the interpreter strips assert statements, so a suite could report success having checked nothing. The suite invokes the reporter as env -u PYTHONOPTIMIZE python3.

Cases that can reach a live system leave the gateway URL and the server endpoint empty in the workload. Empty, those tiers call block. fail_on_blocked defaults to false, so a missing credential is reported as missing coverage and does not by itself fail the build. The README says to set it true in an environment that is supposed to have every precondition. Blocked stays not a pass either way.

This page does not quote the machine path, the test user id, or the host name baked into the case files. They are in the source. The shape does not need them.

The self-test must go red

qa/regression/selftest/vanishing-case.yaml is not a travel check. Its only step prints a line and exits 3, before it writes a result document. The suite turns a dispatch that produced no result file into error, and exits 1 when any case is error. The README's expected outcome for a run that includes this case is suite_status fail and a non-zero exit.

A runner that comes back green from that case is losing cases. Every other result it prints is then worth less than it looks.

A local run of a python playbook is not a test of it

cases/hotel-cards-smoke.yaml splits the check. Its comment says hotel-cards is kind: python, and that a local run printed "Tool not supported in local execution mode", skipped the step, and still exited 0. That sentence is the text CLI v5.3.2 prints for Tool::Unsupported, and that arm returns Ok(None), so the step does not fail the run (src/playbook_runner.rs at tag v5.3.2, the Unsupported arm). The suite does not name the CLI it observed. The words match that release.

At CLI v6.4.1 the local runtime refuses python before any step runs (8.2). The suite still does not pin a version: it uses whatever noetl is on PATH. Under either behavior, a local execution of hotel-cards is not evidence that hotel-cards ran. The tier that always runs reads the file: it parses, keeps its catalog path, still reaches a terminal step, and still declares its widget type. The live tier stays blocked until a server endpoint is set.

Not re-checked, and one question left open

The suite README tells case authors two further rules: a later step cannot read a previous step's fields, and an arc when must be a single comparison because compound booleans are mis-evaluated. CLI v5.3.2 calls render_template with context.step_results (src/playbook_runner.rs), so the first claim is not the whole story of that release. This book has not re-run either claim. The suite's practice stands without them: it passes evidence through files, and it writes the report from a shell step so the step can exit non-zero when the report is red.

The profile playbook's suggest_pois policy rule stays unverified. Section 33.2 marks it. This section does not resolve it (book#95).

The suite also refuses kind: sink for the report. Its comment says that, on the runtime they used, a sink of the step context wrote an empty file and still exited 0. Section 8.2 records that from CLI v6.4.1 the sink writes the most recently completed step's result. This book has not re-checked the suite's sink observation on that CLI. Writing the report in the shell step is what lets the suite fail on the report's contents.

What to copy

  • Run every case, then compute the verdict from the assertions. A case must not be able to declare itself green.
  • A missing precondition is blocked. Blocked is not a pass.
  • Keep a self-test that dies before it writes a verdict, and require that self-test to turn the suite red.
  • Do not treat a local run of a kind: python playbook as evidence the playbook ran. On the CLI whose message the suite quotes, that kind is skipped and the run can still exit 0. On CLI v6.4.1 it is refused before the first step.
  • Pin the CLI the suite resolved, and pass evidence through files the report actually reads.

Check your understanding

Case Study: Authentication and Authorization

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this chapter are in docs/BOOK-PLAN.md (Part X and §2.8).

How a NoETL deployment decides who may start which playbook and read which execution.

Planned sections:

  • 34.1 Sign-In Is a Playbook — Auth0 session validation as an ordinary execution, the session cache, and the synchronous path that can replace it.
  • 34.2 Deny by Default: Two Roles and an Allowlist — exactly two roles, admin and regular user; the user-playbook allowlist; guest sessions.
  • 34.3 Who Owns an Execution — a regular user may read or cancel only executions they started; how ownership is recorded.
  • 34.4 Granting Roles and Verified Email — role grants by playbook and verified-email role inheritance: in flight at the time of writing, labelled until a release carries them.

Sign-In Is a Playbook

PARTIAL STUB

Not yet written. Planned: Auth0 session validation as an ordinary execution, the session cache, and the synchronous path that can replace it.

Deny by Default: Two Roles and an Allowlist

PARTIAL STUB

Not yet written. Planned: exactly two roles, admin and regular user; the user-playbook allowlist; guest sessions.

Who Owns an Execution

PARTIAL STUB

Not yet written. Planned: a regular user may read or cancel only executions they started; how ownership is recorded.

Granting Roles and Verified Email

PARTIAL STUB

Not yet written. Planned: role grants by playbook and verified-email role inheritance: in flight at the time of writing, labelled until a release carries them.

Case Study: Standing Up the Platform

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan for this chapter are in docs/BOOK-PLAN.md (Part X and §2.8).

Standing up the distributed platform from nothing, as noetl/ops commits it.

Planned sections:

  • 35.1 NoETL Provisions NoETL — the fresh-stack playbook: a NoETL playbook, run on the local runtime, that provisions a GKE cluster and deploys the stack.
  • 35.2 Images: Cloud Build and the Release Pipeline — Cloud Build definitions next to the release pipeline of Ch. 28, and which one produces what prod runs.
  • 35.3 Worker Pools and KEDA — the ScaledObjects per pool, on bus lag and CPU.
  • 35.4 Secrets and the EHDB Substrate — CSI-mounted bootstrap secrets and the EHDB platform playbook.
  • 35.5 What the Recipe Declares vs What Runs — which parts of the recipe are current, which are stale, and why committed is not live.

NoETL Provisions NoETL

PARTIAL STUB

Not yet written. Planned: the fresh-stack playbook: a NoETL playbook, run on the local runtime, that provisions a GKE cluster and deploys the stack.

Images: Cloud Build and the Release Pipeline

PARTIAL STUB

Not yet written. Planned: Cloud Build definitions next to the release pipeline of Ch. 28, and which one produces what prod runs.

Worker Pools and KEDA

PARTIAL STUB

Not yet written. Planned: the ScaledObjects per pool, on bus lag and CPU.

Secrets and the EHDB Substrate

PARTIAL STUB

Not yet written. Planned: CSI-mounted bootstrap secrets and the EHDB platform playbook.

What the Recipe Declares vs What Runs

PARTIAL STUB

Not yet written. Planned: which parts of the recipe are current, which are stale, and why committed is not live.

Data Lineage on NoETL

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan are in docs/BOOK-PLAN.md (§2.9 and Part XI).

Where did this output come from? What NoETL records for every run (execution lineage), what is built but off by default, and what the author must declare (data lineage).

Planned sections:

  • 36.1 What the Event Log Records About a Run — written.
  • 36.2 References That Name Their Producer (PARTIAL) — result-store references as provenance: the server's noetl://execution/… form, the worker-stamped canonical URI and its staged server consumption (off by default).
  • 36.3 Declared Lineage: the Registry (PARTIAL) — the noetl.registry of models, datasets, evals and releases, with author-declared lineage parents and registry:// URNs; built, and off by default.
  • 36.4 Recording Dataset Lineage Yourself (REAL) — what NoETL does not track (datasets, columns, external code versions), and how a playbook can record it today; no lineage standard is emitted.

What the Event Log Records About a Run

REAL

Lineage answers one question: where did this output come from? On NoETL, part of the answer is recorded for every run with no extra work. The rest you have to declare. This section covers the part you get for free, and is exact about its edges. Facts are server v3.161.2.

Every event names its run and its playbook

An execution's events are rows in noetl.event. Each row is written with these columns (src/db/queries/event.rs:40-45):

event_id, execution_id, catalog_id, parent_event_id, parent_execution_id,
event_type, node_id, node_name, node_type, status,
context, meta, result, worker_id, attempt, created_at,
prev_event_id, error

Three of them make lineage possible:

  • catalog_id points at one row of noetl.catalog, which holds a playbook's path, its version and its full content, unique per (path, version) (db/ddl/postgres/schema_ddl.sql:42-53). From any event you can recover the exact playbook text that ran, not just its name.
  • parent_execution_id links a child execution to the run that started it (7.1). A pipeline built from sub-playbooks is a tree you can walk upward from any node.
  • node_name is the step. With event_type and result, it says which step produced which value, and when.

The log is append-only and never purged (3.2). So the record is still there when someone asks months later.

Asking the questions

QuestionWhere the answer is
Which playbook, at which version, produced this run?the event's catalog_id → noetl.catalog (path, version, content)
With what inputs?the execution's workload, read from its start event (context->'workload')
Which step produced this value, and when?the event's node_name, event_type, result, created_at
Which run started this one?parent_execution_id
Where did a large result go?its reference, which names the execution that produced it (below)

GET /api/executions/{id} returns most of this in one call: catalog_id, path, parent_execution_id, workload, and the events with type, step, status, time, result and error (src/services/execution.rs:28-50).

The API returns a window, not the whole log

That endpoint loads at most the 2,000 most recent events of an execution (MAX_EVENTS_RETURNED, src/services/execution.rs:694). It was capped after a large run's full log exhausted the server's memory. For a long run, the earliest steps are not in the response. Read them from the log itself. The API also leaves out worker_id, attempt, context and meta, which the rows have.

Large results keep their producer's name

A result over 100 KiB does not stay in the event. It moves to the result store, and the event holds a reference instead (5.3). The reference is an address that names its producer:

  • the server's reference, noetl://execution/<eid>/result/<name>/<id>, which is what is resolved today;
  • a canonical form the worker also stamps, noetl://<tenant>/<project>/results/<eid>/<step>/<frame>/<row>/<attempt>, which the server does not consume yet. Accepting it is behind NOETL_RESULT_URI_ACCEPT, off by default (src/config/app.rs:442-470).

So a large output found anywhere can be traced back to the execution that wrote it, and with the canonical form, to the step.

What the log does not record

The record covers what NoETL ran. It does not cover the data your steps touched outside it:

  • Datasets. If a postgres step reads orders and writes daily_revenue, nothing records "this step read orders" as a structured fact. The SQL is part of the step's configuration, but NoETL does not parse it into dataset names. There is no dataset- or column-level lineage.
  • Lineage standards. No lineage emitter (OpenLineage or any other) exists in the server, worker, tools, CLI or gateway. The book searched each at its newest tag on 2026-11-19.
  • The code behind a command. A shell step that runs python3 -m scoring.run records the command, not the version of scoring. Pin it yourself (Chapter 28).
  • What a re-run would do. Replay folds the recorded events, so it reproduces NoETL's decisions exactly. Running the playbook again calls the tools again, against today's data and services.

The honest summary

NoETL gives you execution lineage for free: which playbook version ran, with what inputs, which step produced what, and which run started which. Data lineage, meaning which datasets flowed into which, is yours to declare. The next sections show the places to declare it.

Check your understanding

References That Name Their Producer

PARTIAL STUB

Not yet written. Planned: result-store references as provenance: the server's noetl://execution/… form, the worker-stamped canonical URI and its staged server consumption (off by default).

Declared Lineage: the Registry

PARTIAL STUB

Not yet written. Planned: the noetl.registry of models, datasets, evals and releases, with author-declared lineage parents and registry:// URNs; built, and off by default.

Recording Dataset Lineage Yourself

REAL STUB

Not yet written. Planned: what NoETL does not track (datasets, columns, external code versions), and how a playbook can record it today; no lineage standard is emitted.

Data Governance on NoETL

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan are in docs/BOOK-PLAN.md (§2.9 and Part XI).

Who may run and read what, what can be audited and reproduced, how secrets and personal data are kept out of the record, and the gaps, stated first.

Planned sections:

  • 37.1 Access Control (PARTIAL) — deny-by-default at the gateway with two roles and a playbook allowlist; execution ownership; role grants and verified-email inheritance in flight.
  • 37.2 Audit and Reproducibility (PARTIAL) — the event log and catalog versions as an audit trail; replay vs re-run; the secret-audit table that has no writer.
  • 37.3 Secrets and Personal Data (PARTIAL) — credentials by reference; the shape-matching result scrubber; no PII classifier.
  • 37.4 Retention and the Right to Erasure (PARTIAL) — an append-only, never-purged event log against deletion requests: keep personal data out of results and events by design.
  • 37.5 Policy in Playbooks (PARTIAL) — what is enforced at registration (inline-secret scan, tool-kind gates) and what is not (no policy-as-code engine).

Access Control

PARTIAL STUB

Not yet written. Planned: deny-by-default at the gateway with two roles and a playbook allowlist; execution ownership; role grants and verified-email inheritance in flight.

Audit and Reproducibility

PARTIAL STUB

Not yet written. Planned: the event log and catalog versions as an audit trail; replay vs re-run; the secret-audit table that has no writer.

Secrets and Personal Data

PARTIAL STUB

Not yet written. Planned: credentials by reference; the shape-matching result scrubber; no PII classifier.

Retention and the Right to Erasure

PARTIAL STUB

Not yet written. Planned: an append-only, never-purged event log against deletion requests: keep personal data out of results and events by design.

Policy in Playbooks

PARTIAL STUB

Not yet written. Planned: what is enforced at registration (inline-secret scan, tool-kind gates) and what is not (no policy-as-code engine).

NoETL and Data Mesh

PARTIAL STUB

Not yet written. Goals, sources and the quiz plan are in docs/BOOK-PLAN.md (§2.9 and Part XI).

The four data-mesh principles against what NoETL has. NoETL is not a data-mesh platform; this chapter says which parts it can serve.

Planned sections:

  • 38.1 Domain Ownership (PARTIAL) — path prefixes and labels as a convention; playbook metadata has no owner or domain field.
  • 38.2 Data as a Product (PARTIAL) — a playbook as a product interface (gateway allowlist, MCP exposure); no data contracts, SLOs or product registry.
  • 38.3 The Self-Serve Platform (REAL) — one grammar from a laptop to a cluster: the local runtime, kind, the distributed runtime.
  • 38.4 Federated Governance (PARTIAL) — the distributed catalog and cross-instance execution (Part V, behind flags) and what NoETL does not claim.

Domain Ownership

PARTIAL STUB

Not yet written. Planned: path prefixes and labels as a convention; playbook metadata has no owner or domain field.

Data as a Product

PARTIAL STUB

Not yet written. Planned: a playbook as a product interface (gateway allowlist, MCP exposure); no data contracts, SLOs or product registry.

The Self-Serve Platform

REAL STUB

Not yet written. Planned: one grammar from a laptop to a cluster: the local runtime, kind, the distributed runtime.

Federated Governance

PARTIAL STUB

Not yet written. Planned: the distributed catalog and cross-instance execution (Part V, behind flags) and what NoETL does not claim.

Appendix A: DSL Reference

REAL

Generated

Generated from noetl/server v3.161.2 (commit 983e36e3ec4c, 2026-11-12), file orchestrate-core/schema/playbook.schema.json. The server's own tests fail if these files drift from the code that defines the grammar, so this page is as current as the pin.

Every key of a NoETL playbook (https://noetl.ai/schema/v2/playbook.schema.json), as the grammar defines it. Chapters 4–6 teach these keys; the Taught in column links to the chapter.

NoETL playbook grammar (noetl.io/v2), generated from the Rust authoring types in noetl-orchestrate-core 0.1.0. Permissive like the parser (unknown keys are not rejected); tool.kind is closed to the kinds this server accepts. Semantic rules (a start step, unique step names, existing next targets) are enforced by the server's validator, not by this schema.

Top-level keys

KeyTypeRequiredDescriptionTaught in
apiVersionstringyesAPI version (noetl.io/v2).Ch. 4.1
keychainarray of KeychainDef | nullKeychain definitions for credentials and tokens.Ch. 4.4
kindstringyesResource kind (Playbook).Ch. 4.1
metadataMetadatayesMetadata (name, path, labels).Ch. 4.1
varsobject | nullTop-level variables (canonical format).Ch. 4.2
workbookarray of WorkbookTask | nullReusable tasks.Ch. 4.5
workflowarray of StepyesWorkflow steps.Ch. 4.3
workloadanyGlobal workflow variables.Ch. 4.2

Types

Each type below is a $defs entry of the schema. Types are listed alphabetically.

CanonicalNextTarget

Legacy target for transition (deprecated, use NextArc).

Taught in Ch. 6.1.

KeyTypeRequiredDefaultDescriptionTaught in
argsobject | nullArguments to pass to target step.Ch. 6.1
stepstringyesTarget step name.Ch. 6.1
whenstring | nullTransition guard expression (Jinja2).Ch. 6.2

CursorClaim

The claim block of a mode: cursor loop — a SQL tool that atomically leases a frame of work rows and returns them (its RETURNING columns become the per-row iter.<iterator> object).

Taught in Ch. 6.3.

KeyTypeRequiredDefaultDescriptionTaught in
authstring | nullCredential alias for the claim tool.Ch. 6.3
claimstringyesThe claim SQL (atomic lease, e.g. ... FOR UPDATE SKIP LOCKED ... RETURNING ...).Ch. 6.3
kindstring"postgres"Tool kind running the claim (default postgres).Ch. 6.3

EvalCondition

Eval condition for per-task flow control. Evaluated after each tool execution.

Taught in Ch. 6.5.

KeyTypeRequiredDefaultDescriptionTaught in
attemptsinteger | nullRetry attempts (for do: retry).Ch. 6.5
backoffstring | nullRetry backoff strategy: linear or exponential.Ch. 6.5
delaynumber | nullRetry delay in seconds.Ch. 6.5
dostringyesAction to take: continue, retry, break, jump, failCh. 6.5
exprstring | nullJinja2 expression to evaluate. Access outcome object: outcome.status, outcome.error, outcome.resultCh. 6.5
set_varsobject | nullVariables to set (step-scoped).Ch. 6.5
targetstring | nullTarget step (for do: jump).Ch. 6.5

EvalElse

Else clause for eval conditions.

Taught in Ch. 6.5.

KeyTypeRequiredDefaultDescriptionTaught in
dostringyesAction to take.Ch. 6.5
set_varsobject | nullVariables to set.Ch. 6.5

EvalEntry

Eval entry - can be a condition or an else clause.

Taught in Ch. 6.5.

One of:

  • EvalCondition: Conditional eval with expr.
  • object: Else clause (no condition).

FrameSpec

Frame sizing / leasing policy for a mode: cursor loop.

Taught in Ch. 6.3.

KeyTypeRequiredDefaultDescriptionTaught in
heartbeat_secondsnumber | nullCh. 6.3
lease_secondsnumber | nullCh. 6.3
max_bytesinteger | nullCh. 6.3
max_rowsinteger | nullMax rows claimed per frame (the claim SQL's LIMIT { { __frame_max_rows } }).Ch. 6.3
max_secondsnumber | nullCh. 6.3
processstring | nullrow (default) binds iter.<name> to one row; frame is reserved.Ch. 6.3
row_concurrencyinteger | nullRows of one frame to dispatch concurrently (1 = sequential within frame).Ch. 6.3

KeychainDef

Keychain entry for credential/token definitions.

Taught in Ch. 4.4.

KeyTypeRequiredDefaultDescriptionTaught in
allowed_regionsarray of string[]Secrets Wallet Phase 6c — extra regions (besides the entry's own region) from which resolution is allowed when residency is strict or advisory. Empty by default.Ch. 4.4
authstring | nullCredential alias used to authenticate to provider (e.g. a service account). On a provider that authenticates by ambient identity (GCP Workload Identity), this is unused.Ch. 4.4
auto_renewbooleanfalseAuto-renew flag.Ch. 4.4
credentialstring | nullCredential reference.Ch. 4.4
mapmap of string | nullOutput-key → secret-reference map. Each value is a secret-path template (rendered against the workload at resolution time); the resolved entry is the object { <key>: <secret-value>, ... } — the "auth object as a map" shape. Absent for single-value entries.Ch. 4.4
namestringyesKeychain entry name.Ch. 4.4
no_broker_fallbackbooleanfalseSecrets Wallet Phase 6e — opt-out for the cross-region broker fallback. When true, a strict-mode residency denial bubbles up as ResidencyViolation even if a broker is configured for the entry's region — used for credentials whose policy says "this data physically cannot leave its home region, full stop." Default false (broker fallback honoured when registered).Ch. 4.4
providerstring | nullSecret-source backend that resolves this entry: gcp (Google Secret Manager), aws, azure, vault, k8s. When set, the server-side keychain resolver fetches the value(s) from this provider on a cache miss (Secrets Wallet Phase 3b). None means the entry is supplied by other means (pre-registered credential, minted token).Ch. 4.4
regionstring | nullSecrets Wallet Phase 6a — home region of this secret (e.g. us-east-1, europe-west4). When set, the resolver passes it to the chosen crate::secrets::SecretProvider: AWS uses it as the regional endpoint host; Azure / Vault use it for vault / cluster routing; GCP uses it as part of the resource id. None falls back to the server's NOETL_SERVER_REGION env. Per agents/rules/safety.md, the region is a routing hint, not a secret — public-safe.Ch. 4.4
residencyResidency"none"Secrets Wallet Phase 6c — residency policy. Controls whether a server in a different region than this entry's region is allowed to resolve it. See crate::secrets::residency::Residency.Ch. 4.4
scopestring | nullScope type.Ch. 4.4
token_typestring | nullToken type.Ch. 4.4

Loop

Step-level loop configuration (canonical format).

Taught in Ch. 6.3.

KeyTypeRequiredDefaultDescriptionTaught in
cursorCursorClaim | nullClaim block for mode: cursor loops.Ch. 6.3
instring | nullJinja expression for collection to iterate over. Required for sequential / parallel; absent for cursor (which claims work).Ch. 6.3
iteratorstringyesVariable name for each item.Ch. 6.3
specLoopSpec | nullLoop spec with mode (canonical format).Ch. 6.3

LoopMode

Loop execution mode.

Taught in Ch. 6.3.

One of:

  • "sequential" | "parallel"
  • "cursor": Claim-based work-distribution loop (noetl/ai-meta#100). Instead of a fixed in: collection, the orchestrator repeatedly runs the loop.cursor.claim SQL to lease a frame of work rows, fans out the step body per claimed row, then re-claims — until the claim returns zero rows (drained). Honors the Rust execution model: the claim runs as a normal postgres tool command on a worker; no long-lived worker.

LoopSpec

Loop runtime specification (canonical format).

Taught in Ch. 6.3.

KeyTypeRequiredDefaultDescriptionTaught in
frameFrameSpec | nullFrame sizing/leasing policy (cursor mode only).Ch. 6.3
max_in_flightinteger | nullMaximum concurrent iterations in parallel mode / frames in cursor mode.Ch. 6.3
modeLoopMode"sequential"Execution mode: sequential, parallel, or cursor.Ch. 6.3

Metadata

Playbook metadata.

Taught in Ch. 4.1.

KeyTypeRequiredDefaultDescriptionTaught in
descriptionstring | nullDescription.Ch. 4.1
labelsmap of string | nullLabels for filtering.Ch. 4.1
namestringyesPlaybook name (required).Ch. 4.1
pathstring | nullResource path.Ch. 4.1

NextArc

Arc specification for v10 next router format. Canonical format: next.arcs[].when for conditional routing (Petri-net arcs).

Taught in Ch. 6.1.

KeyTypeRequiredDefaultDescriptionTaught in
setobject | nullArc-level variable mutations to apply to execution context before dispatching the downstream step. Mirrors Python's set: on arcs. Scope-prefixed keys (ctx.x, iter.x, step.x) are stripped to the bare key; bare keys and unknown-scope dotted keys are written as-is. Values are Jinja2 templates rendered against the producing step's completion context before being applied.Ch. 6.1
stepstringyesTarget step name.Ch. 6.1
whenstring | nullTransition guard expression (Jinja2). Evaluated by server after step completion.Ch. 6.2

NextRouter

Canonical v10 next router format with spec and arcs.

Taught in Ch. 6.1.

KeyTypeRequiredDefaultDescriptionTaught in
arcsarray of NextArc[]List of arcs (outgoing transitions).Ch. 6.1
specNextRouterSpec | nullRouter specification (mode: exclusive/inclusive).Ch. 6.1

NextRouterSpec

Next router spec for v10 format.

Taught in Ch. 6.1.

KeyTypeRequiredDefaultDescriptionTaught in
modestring | nullRouting mode: exclusive (first match) or inclusive (all matches).Ch. 6.1

NextSpec

Next step specification - supports multiple formats for compatibility.

Taught in Ch. 6.1.

One of:

  • array of CanonicalNextTarget: List of step targets with optional when (legacy canonical): a sequence of { step, when?, args? } maps.
  • array of string: List of bare step names.
  • string: Single step name.
  • NextRouter: Canonical v10 router format: { spec: { mode: ... }, arcs: \[...\] } — a map. Declared last so a sequence never deserializes into it positionally (see the type-level note above).

PipelineItem

One item in a pipeline. Untagged so serde tries each variant in declaration order and picks the first that decodes.

Taught in Ch. 5.2.

One of:

  • ToolSpec: Flat shape: { name: "label", kind: "python", code: "...", ... }. The pipeline-item label lives in the name field; the rest of the fields are an inline ToolSpec. Stored via ToolSpec.extra (the #\[serde(flatten)\] HashMap catch-all), so no schema change is needed on ToolSpec itself.
  • map of ToolSpec: Nested shape: { "label": { kind: "python", code: "...", ... } }. Single-key map — the key is the label, the value is the spec.

Residency

Residency policy for a KeychainDef — part of the playbook model, so it lives in the core with the rest of the types (noetl/ai-meta#108). The server's secrets::residency module re-exports this enum and holds the region-check logic (which needs server-only deps); the enum itself is pure data.

Taught in Ch. 4.4.

One of:

  • "none": No check; resolution proceeds regardless of server region. Back-compat default for entries without an explicit policy.
  • "advisory": Check but proceed on mismatch — observability without enforcement. Used during the migration window before flipping to strict.
  • "strict": Fail-closed on mismatch; resolution short-circuits before any provider call (the server maps this to an AppError::ResidencyViolation).

Step

Workflow step with canonical format control flow.

Taught in Ch. 4.3.

KeyTypeRequiredDefaultDescriptionTaught in
argsobject | nullInput arguments for this step.Ch. 5.3
descstring | nullStep description.Ch. 4.3
loopLoop | nullLoop configuration with spec.mode.Ch. 6.3
nextNextSpec | nullNext step(s) with optional when conditions for routing.Ch. 6.1
setobject | nullStep-level set: mutations — template expressions rendered against the producing step's completion context, then applied via scope-prefix stripping (ctx.x → x) exactly like arc-level set:. Mirrors Python's step-level set: in noetl/core/dsl/engine/executor/transitions.py.Ch. 4.2
specStepSpec | nullStep behavior configuration.Ch. 6.5
stepstringyesStep name (unique identifier).Ch. 4.3
toolToolDefinitionyesTool configuration - single tool or pipeline.Ch. 5
varsobject | nullVariables to extract from step result.Ch. 4.2
whenstring | nullTransition enable guard (canonical format). Jinja2 expression evaluated by server before step runs.Ch. 6.2

StepSpec

Step-level behavior configuration.

Taught in Ch. 6.5.

KeyTypeRequiredDefaultDescriptionTaught in
next_modestring | nullNext evaluation mode: exclusive (first match) or inclusive (all matches).Ch. 6.1
on_errorstring | nullError handling: fail, continue, or retry.Ch. 6.5
timeoutstring | nullStep timeout (e.g., "30s", "5m").Ch. 6.5

ToolDefinition

Tool definition - can be single tool or pipeline.

Taught in Ch. 5.2.

One of:

  • ToolSpec: Single tool (shorthand).
  • array of PipelineItem: Pipeline - list of labeled tasks.

ToolKind

Supported tool kinds.

Taught in Ch. 5.1.

One of:

  • "http" | "postgres" | "duckdb" | "ducklake" | "python" | "workbook" | "playbook" | "playbooks" | "secrets" | "iterator" | "container" | "script" | "snowflake" | "transfer" | "snowflake_transfer" | "gcs" | "gateway" | "nats" | "shell" | "artifact" | "noop" | "task_sequence" | "rhai"
  • "subscription": Bounded-drain message subscription poll (NATS / Pub/Sub / Kafka). noetl/ai-meta#90 Phase 1 — dispatched generically by the worker through the noetl-tools registry; the server only needs to accept the kind so playbook validation passes.
  • "wasm": Compiled WASM plug-in (noetl/ai-meta#105). The step's tool carries plugin: { path, version, entry? } and an optional input (the server canonicalises it to args, which becomes the plug-in's input bytes as JSON). path is a string, version an integer, entry the guest export to call (default run). The server only accepts the kind; the worker's wasm-plugin dispatcher loads the module from the catalog, runs it and flushes its capability intents.

ToolSpec

Tool specification with tool.kind pattern. All execution-specific fields live under tool.

Taught in Ch. 5.1.

KeyTypeRequiredDefaultDescriptionTaught in
argsanyDefault arguments / inputs passed to the tool runtime.Ch. 5.3
authanyAuthentication configuration.Ch. 4.4
codestring | nullPython code (for python tool).Ch. 5.1
commandanyCommand for the tool runtime.Ch. 5.1
connectionstring | nullConnection string or credential reference.Ch. 5.1
evalarray of EvalEntry | nullTool-level flow control (canonical format). Evaluated after tool execution.Ch. 6.5
headersmap of string | nullHTTP headers.Ch. 5.1
kindToolKindyesTool type. Authored, so flag-gated kinds are refused while their flag is off (ToolKindGates).Ch. 5.1
libsanyLibraries/dependencies.Ch. 5.1
methodstring | nullHTTP method (for http tool).Ch. 5.1
output_selectanyOutput selection strategy (for result externalization).Ch. 5.1
paramsanyTool params. A raw Value, for the same reason command above is one.Ch. 5.1
querystring | nullQuery/SQL (for database tools).Ch. 5.1
urlstring | nullURL (for http tool).Ch. 5.1

WorkbookTask

Reusable task definition in workbook.

Taught in Ch. 4.5.

KeyTypeRequiredDefaultDescriptionTaught in
namestringyesTask name.Ch. 4.5
sinkanyOptional sink configuration.Ch. 4.5
toolToolSpecyesTool configuration.Ch. 4.5

Check your understanding

Appendix B: Tool Kinds Reference

REAL

Generated

Generated from noetl/server v3.161.2 (commit 983e36e3ec4c, 2026-11-12), files orchestrate-core/schema/dsl-manifest.json, orchestrate-core/schema/resource-model.json. The server's own tests fail if these files drift from the code that defines the grammar, so this page is as current as the pin.

Every tool.kind the server's parser accepts, whether it is on by default, how it executes on a worker, how long it holds a worker slot, and its default timeout. Chapter 5 teaches tools.

Parser accepts by default means the server accepts the kind in a playbook with no flag set; whether a given worker can execute it is a separate question (see the note below). An empty profile cell means the resource model has not profiled that kind.

The Accepted locally column is not from the server: it is the local runtime's kind list at NoETL CLI v6.4.1 (the Tool enum in noetl/cli executor/src/playbook.rs plus the noop pass-through in src/playbook_runner.rs (NOOP_KINDS); any other kind is refused before the first step runs (reject_unsupported_kinds)). Chapter 8 covers the local runtime.

Kinds the parser accepts. Which kinds a live worker can execute is reported by workers (RFC dsl-knowledge-base Phase 3) and is not known to this process.

Summary

KindParser accepts by defaultGateAccepted locallyLocal CI evidenceExecution (worker)Holds a slotDefault timeout
agentnoNOETL_TOOL_KIND_AGENTyesin-process loop; every model call is a remote HTTP request; mcp_servers / agents entries are answered inside the loopthe whole loop, including every model call and every awaited playbook-bound child300 s (DEFAULT)
artifactyesno
containeryesnoremote Kubernetes Job; returns at once with a pending callbackno: the slot is freed after the Job is created (the callback pattern)none (DEFAULT)
duckdbyesyesin-process (spawn_blocking)whole querynone (DEFAULT)
ducklakeyesno
gatewayyesno
gcsyesno
httpyesyesin-process (reqwest)whole request30 s (DEFAULT)
iteratoryesno
mcpnoNOETL_TOOL_KIND_MCPyesremote JSON-RPC over HTTPwhole call60 s (DEFAULT), NOETL_MCP_REQUEST_TIMEOUT_SECONDS
natsyesno
noopyesyesexamples/ch04/step-order (runs)in-processbriefly; it still pays the per-step orchestration cost
playbookyesyesremote: POST /api/execute starts a separate child execution on whatever pool its steps targetonly for the start request by default (async: returns {status, execution_id}); with return_result: true or return_step the parent's slot is held, polling every 2 s, until the child finishes30 s (DEFAULT)
playbooksyesno
postgresyesnoexamples/ch08/postgres-refused (refused)in-process (deadpool-postgres, a pool per connection string)whole querynone (DEFAULT)
pythonyesnoexamples/ch08/python-refused (refused)subprocesswhole runnone (DEFAULT)
rhaiyesyesexamples/ch04/anatomy (runs)in-process (spawn_blocking)whole scriptnone (DEFAULT)
scriptyesnoremote Kubernetes Job, polled inline every 2 suntil the Job finishes600 s (DEFAULT)
secretsyesno
shellyesyesexamples/ch01/hello (runs, cmds:)subprocesswhole runnone (DEFAULT)
snowflakeyesnoremote RESTwhole statement60 s (DEFAULT)
snowflake_transferyesno
subscriptionyesnoin-process bounded drain (nats / pubsub / kafka / timer)one bounded drain1000 ms (DEFAULT)
task_sequenceyesnoin-process; runs its sub-tasks in order through a fresh default registry (so no worker mcp override and no agent)all sub-tasksnone (DEFAULT)
transferyesnoin-process (snowflake / postgres / http / duckdb)whole transfernone (DEFAULT)
wasmyesnoin-process (wasmtime); one module runs at a time per worker process (the dispatcher sits behind a mutex)whole invocation, plus any wait for the per-process wasm lock30000 ms (DEFAULT), NOETL_WASM_TIMEOUT_MS
workbookyesnoexamples/ch08/workbook-refused (refused)

Kinds the local runtime accepts that the server's parser does not: auth, provider, sink.

Profiled: the kinds whose execution was read in the worker and tools code. Also accepted by the parser and not profiled here: artifact, gateway, gcs, iterator, nats, playbooks, secrets, snowflake_transfer, workbook (see the tool-kind manifest); nothing is measured for them.

  • slot rule (DEFAULT): Every command holds one worker slot from claim until its tool returns, including case evaluation and its lifecycle event emits; a slot is released early only on a failed or refused claim. Waiting inside a tool (an awaited sub-playbook, a polled Kubernetes Job, an LLM call) keeps the slot. Source: noetl/worker@d1c9584 src/worker.rs:748-754, 848-897 (permit moved into the spawned task)
  • no global timeout (DEFAULT): The worker sets no wall-clock timeout per command. A step is bounded only by its own tool's timeout; kinds listed with timeout none can hold a slot indefinitely unless the step sets one. Source: noetl/[email protected] (the version noetl/worker pins) src/registry.rs:241-259
  • retry config inert (DEFAULT): ToolConfig.retry (max_retries 3, 500 ms initial, x2, 10 s max) is parsed but no executor applies it; do not budget for automatic tool retries. Source: noetl/[email protected] (the version noetl/worker pins) src/registry.rs:36-68

Kinds

kind-agent

kind: agent

  • Gated: off unless the server sets NOETL_TOOL_KIND_AGENT and the worker sets NOETL_WORKER_AGENT_TOOL.
  • Availability: Needs the server gate AND a worker started with NOETL_WORKER_AGENT_TOOL=true (noetl/worker#398, noetl-tools 4.5.0); otherwise the worker fails the command as an unknown tool. The shared pool refuses framework: claude-code. A playbook-bound tools: entry (playbook: <path>) is refused before the first model call unless the worker also sets NOETL_WORKER_AGENT_PLAYBOOK_TOOLS=true (noetl/worker v6.14.0); see the manifest's worker_runtime.agent.
  • Execution: in-process loop; every model call is a remote HTTP request; mcp_servers / agents entries are answered inside the loop
  • Holds slot: the whole loop, including every model call and every awaited playbook-bound child
  • Durability: the hosted loop lives in one command: if its worker dies the step restarts from turn 1 and children that already ran run again
  • Timeout (DEFAULT): 300 s. model HTTP client timeout per request (ToolConfig.timeout default) Source: noetl/[email protected] (the version noetl/worker pins) src/tools/agent.rs:79-85
  • Limit: label: DEFAULT; source: noetl/[email protected] (the version noetl/worker pins) src/tools/agent.rs:429-433; value: 8; what: max_turns
  • Limit: label: DEFAULT; source: noetl/[email protected] (the version noetl/worker pins) src/tools/agent.rs:464; value: 4096; what: max_tokens per model call
  • Limit: label: DEFAULT; meaning: clamped 1-600; source: noetl/[email protected] (the version noetl/worker pins) src/tools/agent.rs:697-700; unit: s; value: 60; what: mcp_servers[].timeout
  • Limit: env: NOETL_AGENT_MAX_TOOL_CALLS; label: DEFAULT; source: noetl/worker@d1c9584 src/executor/agent_host.rs:50, 94-96; unit: tool calls per agent step (hosted loop); value: 32
  • Limit: env: NOETL_AGENT_TOOL_TIMEOUT_SECS; label: DEFAULT; source: noetl/worker@d1c9584 src/executor/agent_host.rs:51, 97; unit: s per playbook-bound child; value: 180
  • NOT_YET_MEASURED: a hosted LLM (OpenAI / Anthropic) call inside a real playbook step: **** (, ; source: )
  • MEASURED: candidate small language model, unoptimised local serving, 2 generations per turn: p50 9.2 s / p95 13.1 s per turn (local, ; source: noetl/travel wiki Travel-SLM-Journey)
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-artifact

kind: artifact

kind-container

kind: container

  • Execution: remote Kubernetes Job; returns at once with a pending callback
  • Holds slot: no: the slot is freed after the Job is created (the callback pattern)
  • Timeout (DEFAULT): none. the Job's timeout_seconds; none by default Source: noetl/[email protected] (the version noetl/worker pins) src/tools/container.rs:12-21, 164

kind-duckdb

kind: duckdb

  • Execution: in-process (spawn_blocking)
  • Holds slot: whole query
  • Memory class: runs inside the worker process: a large query spends the pod's memory limit
  • Aliases: ducklake
  • Timeout (DEFAULT): none. none Source: noetl/[email protected] (the version noetl/worker pins) src/tools/duckdb.rs:360
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-ducklake

kind: ducklake

kind-gateway

kind: gateway

kind-gcs

kind: gcs

kind-http

kind: http

  • Execution: in-process (reqwest)
  • Holds slot: whole request
  • Memory class: the response body is held in memory
  • Timeout (DEFAULT): 30 s. client default; per-request timeout_seconds overrides it Source: noetl/[email protected] (the version noetl/worker pins) src/tools/http.rs:81, 167-168
  • Limit: label: DEFAULT; meaning: none: the body is read in full; source: noetl/[email protected] (the version noetl/worker pins) src/tools/http.rs:249-259; value: none; what: response body cap
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-iterator

kind: iterator

kind-mcp

kind: mcp

  • Gated: off unless the server sets NOETL_TOOL_KIND_MCP.
  • Availability: Runs on any noetl/worker: noetl-tools McpTool, wrapped by the worker's WorkerMcpTool for auth headers. Only the server gate is needed.
  • Execution: remote JSON-RPC over HTTP
  • Holds slot: whole call
  • Timeout (DEFAULT): 60 s, env NOETL_MCP_REQUEST_TIMEOUT_SECONDS. used when the step sets no timeout; clamped to NOETL_WORKER_COMMAND_TIMEOUT_SECONDS (default 180 s, read only here) Source: noetl/[email protected] (the version noetl/worker pins) src/tools/mcp.rs:78-82, 782-810
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-nats

kind: nats

kind-noop

kind: noop

  • Execution: in-process
  • Holds slot: briefly; it still pays the per-step orchestration cost
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-playbook

kind: playbook

  • Availability: Runs on any noetl/worker (noetl-tools PlaybookTool). Fields: path or catalog_id, version (integer), payload/args, return_step, return_result. With NOETL_CATALOG_PINNING on, path may be a catalog reference (a/b@3, a/b@latest, a/b@sha256:..., sha256:..., a source URI) and the child resolves inside the root's pin; see the manifest's catalog_features.
  • Execution: remote: POST /api/execute starts a separate child execution on whatever pool its steps target
  • Holds slot: only for the start request by default (async: returns {status, execution_id}); with return_result: true or return_step the parent's slot is held, polling every 2 s, until the child finishes
  • Deadlock note: an awaited child needs a free slot on its own pool while the parent holds one; if both target the same small pool, enough concurrent awaiting parents can occupy every slot
  • Timeout (DEFAULT): 30 s. start request; the await wait is the step's timeout, else 180 s (return_result) / 300 s (return_step) Source: noetl/[email protected] (the version noetl/worker pins) src/tools/playbook.rs:42-69, 237-242, 402-405, 433-488
  • MEASURED: orchestration cost of one kind: playbook hop, regardless of the work inside it: ~9 s (prod, 2026-08-24; source: noetl/travel wiki playbook-itinerary-planner (#286); noetl/ai-meta wiki Sessions-Log 2026-08-24)
  • MEASURED: child-playbook hop vs the same work inline (Firestore read: 369 ms of work took 11.4 s as a child; Places: 663 ms of work took 1.5 s inline): ~10-15 s per hop (prod, 2026-08; source: noetl/travel wiki playbook-itinerary-planner#latency)
  • MEASURED: paired A/B: provider children inlined into the planner as python (4 places turns each): median 34.7 s -> 19.4 s (-44%) (prod, 2026-06-29; source: noetl/ai-meta wiki Sessions-Log 2026-06-29)
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-playbooks

kind: playbooks

kind-postgres

kind: postgres

  • Execution: in-process (deadpool-postgres, a pool per connection string)
  • Holds slot: whole query
  • Timeout (DEFAULT): none. none set by the tool Source: noetl/[email protected] (the version noetl/worker pins) src/tools/postgres.rs:202-224

kind-python

kind: python

  • Execution: subprocess
  • Holds slot: whole run
  • Memory class: the subprocess shares the worker pod's memory limit; stdout is collected whole
  • Timeout (DEFAULT): none. none unless the step sets timeout_seconds Source: noetl/[email protected] (the version noetl/worker pins) src/tools/python.rs:637, 675-700
  • Limit: label: DEFAULT; source: noetl/[email protected] (the version noetl/worker pins) src/tools/python.rs:23; unit: s; value: 30; what: remote script-source loader
  • MEASURED: test/simple_python playbook end to end on idle kind: 0.66 s warm / 1.20 s cold (kind, 2026-05; source: noetl/ai-meta handoffs/archive/2026-05-23-gke-provision-validation/round-01-prompt.md)
  • MEASURED: provider dispatch moved from a kind: playbook child to inline python (HotelBeds hotels): 9.3 s -> 3.0 s (prod, 2026-08-24; source: noetl/travel wiki playbook-itinerary-planner (#286); noetl/ai-meta wiki Sessions-Log 2026-08-24)

kind-rhai

kind: rhai

  • Execution: in-process (spawn_blocking)
  • Holds slot: whole script
  • Timeout (DEFAULT): none. none, and no operation limits are set Source: noetl/[email protected] (the version noetl/worker pins) src/tools/rhai.rs:46, 76-81
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-script

kind: script

  • Execution: remote Kubernetes Job, polled inline every 2 s
  • Holds slot: until the Job finishes
  • Timeout (DEFAULT): 600 s. job.timeout default, also the Job's activeDeadlineSeconds Source: noetl/[email protected] (the version noetl/worker pins) src/tools/script.rs:110-121, 565-611

kind-secrets

kind: secrets

kind-shell

kind: shell

  • Execution: subprocess
  • Holds slot: whole run
  • Timeout (DEFAULT): none. none unless the step sets timeout_seconds Source: noetl/[email protected] (the version noetl/worker pins) src/tools/shell.rs:156-163
  • Local runtime: accepted by the parser (Chapter 8 covers what it does there).

kind-snowflake

kind: snowflake

  • Execution: remote REST
  • Holds slot: whole statement
  • Timeout (DEFAULT): 60 s. statement timeout sent in the request body; the HTTP client sets none Source: noetl/[email protected] (the version noetl/worker pins) src/tools/snowflake.rs:182-185, 435

kind-snowflake_transfer

kind: snowflake_transfer

kind-subscription

kind: subscription

  • Execution: in-process bounded drain (nats / pubsub / kafka / timer)
  • Holds slot: one bounded drain
  • Timeout (DEFAULT): 1000 ms. timeout_ms default, cap 5000; batch default 100, cap 1000 Source: noetl/[email protected] (the version noetl/worker pins) src/tools/source/mod.rs:59-86

kind-task_sequence

kind: task_sequence

  • Execution: in-process; runs its sub-tasks in order through a fresh default registry (so no worker mcp override and no agent)
  • Holds slot: all sub-tasks
  • Timeout (DEFAULT): none. per sub-task Source: noetl/[email protected] (the version noetl/worker pins) src/tools/task_sequence.rs:213-218
  • Limit: env: NOETL_TASK_SEQUENCE_MAX_ITERATIONS; label: DEFAULT; source: noetl/[email protected] (the version noetl/worker pins) src/tools/task_sequence.rs:253-257; unit: iterations; value: 1000000

kind-transfer

kind: transfer

  • Execution: in-process (snowflake / postgres / http / duckdb)
  • Holds slot: whole transfer
  • Timeout (DEFAULT): none. HTTP client sets none; chunk_size default 1000 rows Source: noetl/[email protected] (the version noetl/worker pins) src/tools/transfer.rs:262-264, 308

kind-wasm

kind: wasm

  • Availability: Runs on a noetl/worker built with its wasm-plugin cargo feature (on by default and in the shipped image), which routes it to the plug-in host instead of the tool registry. Step: plugin: { path: <string>, version: <integer>, entry: <export, default run> } plus optional input (sent to the plug-in as args). The module is loaded from the catalog. Since noetl/worker v6.13.0 every call runs under fuel, wall-clock and memory limits that are ON by default; see the manifest's worker_runtime.wasm_limits.
  • Execution: in-process (wasmtime); one module runs at a time per worker process (the dispatcher sits behind a mutex)
  • Holds slot: whole invocation, plus any wait for the per-process wasm lock
  • Timeout (DEFAULT): 30000 ms, env NOETL_WASM_TIMEOUT_MS Source: noetl/worker@d1c9584 src/plugin.rs:44, 132-137
  • Limit: env: NOETL_WASM_FUEL; label: DEFAULT; source: noetl/worker@d1c9584 src/plugin.rs:41, 131; unit: fuel units; value: 10000000000
  • Limit: env: NOETL_WASM_MAX_MEMORY_MB; label: DEFAULT; source: noetl/worker@d1c9584 src/plugin.rs:47, 138-143; unit: MiB linear memory; value: 1024
  • MEASURED: first dispatch of a ~1.6 MB module on a fresh pod (Cranelift compile ~99%, fetch ~1%); later hops hit the digest cache, and the drive pool pre-compiles at boot behind /readyz: ~1.5 s once (kind (fresh system-pool pod), 2026-06; source: noetl/worker wiki deployment-specification (boot warmup))

kind-workbook

kind: workbook

Same kind, different fields

A kind both runtimes accept can still take different fields. At these versions shell reads command: on a worker and cmds: locally, and each ignores or rejects the other's field (Ch. 5.1). A tool list (task_sequence) cannot be parsed locally at all (Ch. 5.2).

Check your understanding

Appendix C: Feature Flags and Environment Variables

REAL

Generated

Generated from noetl/server v3.161.2 (commit 983e36e3ec4c, 2026-11-12), files orchestrate-core/schema/dsl-manifest.json, orchestrate-core/schema/resource-model.json. The server's own tests fail if these files drift from the code that defines the grammar, so this page is as current as the pin.

The flags and environment variables the DSL artifacts name: the gates on tool kinds and DSL features, and the limits a worker reads, followed by the runtime flags the chapters cite. It is not every environment variable the server and worker read.

Gates

every catalog flag is OFF by default (each is strict "true", read once per process); with a flag off the server behaves as if the feature did not exist

VariableRead byWhat it enablesDefaultRequires
NOETL_AGENT_CALLBACK_ORIGINSserverallowed callback origins for metadata.expose.agent
NOETL_AGENT_ENDPOINTserverserves metadata.expose.agent: GET /api/agents, GET /api/agents/cards/{path}, POST /api/agents/send, GET /api/agents/tasks/{id}off
NOETL_CATALOG_CASservercatalog: content_addressing: digest on register, dedup, /api/catalog/{resolve,blob,sources,pin}off
NOETL_CATALOG_DISCOVERYservercatalog: discovery: POST /api/catalog/peer/resolve (signed, trusted peers only), POST /api/catalog/locate (internal token); imports under peer//offNOETL_CATALOG_CAS, NOETL_INSTANCE_REGISTRY, NOETL_CATALOG_PEER_KEY_FILE
NOETL_CATALOG_HOT_RELOADserverserves metadata.catalog.hot_reload: an explicit @latest sub-playbook reference inside this root's pinned execution treeoffNOETL_CATALOG_PINNING, NOETL_CATALOG_CAS
NOETL_CATALOG_PINNINGservercatalog: execution_pinning: POST /api/execute version (a positive integer or "latest") and digest (sha256:, wins over version) are honoured, and path may be a reference form. A kind: playbook step sends version as an integer only, so it asks for @latest or a digest through its path. A child of a pinned execution with no version resolves to the root's pinned version. With the flag off, version/digest are ignored and the path resolves to its latest versionoffNOETL_CATALOG_CAS
NOETL_CATALOG_REMOTE_CALLSservercatalog: remote_execution: inside a pinned tree a remote reference resolves to what the ROOT first got for it, in both modes, even if the owner registers a new version mid-run; a child of an imported playbook resolves bare names on its home instance (peer//). With the flag off remote: delegate is refused by name and nothing else changesoffNOETL_CATALOG_PINNING, NOETL_CATALOG_CAS
NOETL_CATALOG_URI_FETCHservercatalog: uri_fetch: locate fetches a reference's own source URI; fail closed, nothing is fetched without an allowlistoffNOETL_CATALOG_DISCOVERY, NOETL_CATALOG_URI_ALLOW
NOETL_MCP_SERVERserverserves metadata.expose.mcp: POST /api/mcp (one MCP tool per exposed playbook)off
NOETL_TOOL_KIND_AGENTserverenables kind: agentoff
NOETL_TOOL_KIND_MCPserverenables kind: mcpoff
NOETL_WORKER_AGENT_TOOLworkerlets a worker run kind: agentoff

Limits

VariableDefaultUnitNoteSource
NOETL_AGENT_MAX_TOOL_CALLS32 (DEFAULT)tool calls per agent steppositive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budgetnoetl/worker@d1c9584 src/executor/agent_host.rs:50
NOETL_AGENT_TOOL_TIMEOUT_SECS180 (DEFAULT)s per playbook-bound childnoetl/worker@d1c9584 src/executor/agent_host.rs:51
NOETL_COMMAND_CONTEXT_MAX_BYTES524288 (DEFAULT)bytesa command context above it is offloaded as a context_refnoetl/server src/config/app.rs:242-246
NOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS120 (DEFAULT)sextra retry window for event emits during a server outage; the slot stays heldnoetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140
NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES102400 (DEFAULT)bytesa step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetchnoetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865
NOETL_RECONCILE_MAX_NOOPS225 (DEFAULT)consecutive no-progress polls at an 8 s tick (~30 min)how long a stuck execution is re-driven before the server stopsnoetl/server src/config/app.rs:702-726
NOETL_WASM_FUEL10000000000 (DEFAULT)fuel units per invocation0 / off / none / unlimited removes the limit; an unparseable value keeps the default; a trip increments noetl_worker_plugin_limit_trips_total{limit}noetl/worker@d1c9584 src/plugin.rs:41
NOETL_WASM_MAX_MEMORY_MB1024 (DEFAULT)MiB linear memorynoetl/worker@d1c9584 src/plugin.rs:47
NOETL_WASM_TIMEOUT_MS30000 (DEFAULT)ms wall clock per invocation10 ms deadline granularitynoetl/worker@d1c9584 src/plugin.rs:44
NOETL_WORKER_DRAIN_TIMEOUT_SECS150 (DEFAULT)son SIGTERM a worker finishes in-flight commands within this budgetnoetl/worker@d1c9584 src/worker.rs:1139
WORKER_MAX_CONCURRENT4 (DEFAULT)slots per worker processnoetl/worker@d1c9584 src/config.rs:115-118

Agent budgets

VariableDefaultScope
NOETL_AGENT_MAX_TOOL_CALLS32tool calls per agent step
NOETL_AGENT_TOOL_TIMEOUT_SECS180seconds per playbook-bound child

Runtime flags the chapters cite

Variables the server, worker, gateway or CLI read that the DSL artifacts do not publish, listed because a chapter names them. Each was checked against the source at the release shown; a deployment may override any default. Built from tools/flags-cited.json; CI fails if a chapter names a variable that is in neither this table nor the ones above.

VariableRead byDefaultWhat it doesSourceCited in
GATEWAY_AUTH_BYPASSgatewayfalseaccept any session token (only exactly true or 1 enables it); reported by noetl_gateway_auth_bypass_enabledgateway v3.22.1 src/auth/middleware.rs:13-1830.0
GATEWAY_SESSION_VALIDATE_VIA_PLAYBOOKgatewaytruevalidate an uncached session by running the auth playbookgateway v3.22.1 src/auth/mod.rs:174-18110.1
NOETL_ALLOW_INSECURE_DEFAULT_KEYserverfalsestart with a random per-process key when no encryption key is set; data is unreadable after a restartserver v3.161.2 src/main.rs:1139-117131.0
NOETL_AUTHZ_SYNCgatewayfalsethe same synchronous path for authorization checksgateway v3.22.1 src/auth/mod.rs:231-23510.1
NOETL_AUTH_SYNCgatewayfalsevalidate sessions through the server's synchronous auth path instead of a playbook (a code comment says prod runs it on)gateway v3.22.1 src/auth/mod.rs:205-209, 22410.1
NOETL_CATALOG_LOGserveroffshadow: also record each registration in the EHDB catalog tierserver v3.161.2 src/handlers/catalog_log.rs:26-27, src/services/catalog.rs:1633.4
NOETL_CATALOG_MODELno reader at catalog 473b2d5not implementednamed in the catalog design as the later shadow read-path gate (value shadow). No Rust file at that commit reads itnoetl/catalog 473b2d5 design/catalog-model.md plan table (P4); grep of crates for the name found the design spec only16.0
NOETL_CATALOG_PEERSserveremptycomma-separated control-plane URLs, optionally with #audience, to which this instance advertisesserver v3.165.5 src/services/catalog_peer.rs:66, 104-117, 231-24117.2, 17.4
NOETL_CATALOG_PEER_KEY_FILEserverunsetpath to the instance key used to sign catalog peer requests; discovery stays off without itserver v3.165.5 src/services/catalog_peer.rs:67, 116-117, 198-21317.4
NOETL_CATALOG_READ_SOURCEserverpostgreswhere the catalog's latest version resolves from: postgres, verify, or tierserver v3.161.2 src/handlers/catalog_read.rs:3-13, 373.4
NOETL_CATALOG_REMOTE_MODEserverimportdefault remote-reference mode when a step does not set remote; invalid values log and fall back to importserver v3.165.5 src/services/catalog_remote.rs:72, 82-101, 118-13717.2, 17.4
NOETL_CATALOG_REMOTE_PUSHserverfalse (only strict true enables it)mount the caller's delegated wait route and let an owner hold a signed execution-status request for up to 10 secondsserver v3.165.5 src/services/catalog_remote.rs:919-931, 1148-1165, 1215-122517.0, 17.2, 17.6
NOETL_CATALOG_REMOTE_SERVEserverfalse (only strict true enables it)enable the owner-side signed peer execute and execution routes when pinning and discovery are readyserver v3.165.5 src/services/catalog_remote.rs:73-74, 107-145, 1203-123217.2, 17.3, 17.4
NOETL_CATALOG_REMOTE_SERVE_ALLOWserverempty (refuse every peer execute)comma-separated path globs the owner is allowed to execute for peersserver v3.165.5 src/services/catalog_remote.rs:74, 139-155, 1025-1035, 1226-123017.2, 17.4
NOETL_CATALOG_SELF_URLserverNOETL_PUBLIC_SERVER_URL, otherwise unsetpublic server URL placed in this instance's peer advertisementserver v3.165.5 src/services/catalog_peer.rs:68, 118-12317.4
NOETL_CHAIN_ADVANCEserveroff (same allow-list)advance each execution's chain head as events arriveserver v3.161.2 src/chain_advance.rs:4713.7
NOETL_CHAIN_POPULATEserver (ehdb-l0)off (allow-list: 1/true/yes/on)populate the chain store from the event logehdb v0.15.1 crates/ehdb-l0/src/chain_populator.rs:7113.7
NOETL_CHAIN_SOURCEserveroff (anything but chain)chain: read execution history from the chain store (needs the other two gates)server v3.161.2 src/db/queries/event_chain.rs:218-26213.7
NOETL_COMMAND_BUSserver, workernone (required)the command bus; only the EHDB bus is accepted, NATS is refusedserver v3.161.2 src/command_bus.rs:47-90; worker v6.15.0 src/command_bus.rs:85-11510.3, 13.1
NOETL_COMMAND_BUS_ACK_WAIT_SECSworker (writer)30seconds before an unacked command is redeliveredworker v6.15.0 src/command_bus.rs:19110.3
NOETL_COMMAND_BUS_HOSTworkerfalserun this worker process as the command-bus writer (the cmdbus-writer)worker v6.15.0 src/command_bus.rs:178 (env_bool), src/worker.rs:159-20410.3, 13.4
NOETL_DISABLE_METRICSserverfalseremove the unauthenticated /metrics routeserver v3.161.2 src/config/app.rs:38-40, src/main.rs:100-10430.0
NOETL_DSL_KBserverfalsemount the DSL knowledge-base routesserver v3.161.2 src/main.rs:10644.0, 26.2
NOETL_EHDB_ELECTIONworker (writer)offrun the shard writer election (Kubernetes Lease ehdb-shard-<shard>)worker v6.15.0 src/ehdb/lease_store.rs:162-16613.5
NOETL_EHDB_ELECTION_LEASE_SECSworker (writer)15lease durationworker v6.15.0 src/ehdb/election.rs:95; ehdb v0.15.1 crates/ehdb-reference/src/election.rs:5313.5
NOETL_EHDB_ELECTION_RENEW_SECSworker (writer)5lease renew intervalworker v6.15.0 src/ehdb/election.rs; ehdb v0.15.1 crates/ehdb-reference/src/election.rs:5513.5
NOETL_EHDB_FENCINGworker (writer)offepoch fence mode: off, shadow or enforceworker v6.15.0 src/ehdb/election.rs:312; ehdb v0.15.1 crates/ehdb-core/src/fence.rs:50-6213.5
NOETL_EHDB_FLOOR_EXACTserveroffconfirm the prune-floor holder with an exact read, so a bloom false positive cannot pin the floorserver v3.161.2 src/services/event_archive.rs:2059, 2428-244013.3
NOETL_EHDB_SEAL_MAX_AGE_MSworkerunset (off)seal the active part once it is this oldworker v6.15.0 src/ehdb/eventlog_backend.rs:246-25613.2
NOETL_EHDB_SEAL_MAX_AGE_SECSserverunset (off)seal the server store's active part once it is this old (checked every NOETL_EHDB_SEAL_TICK_SECS, 60)server v3.161.2 src/handlers/ehdb_embedded.rs:734, 91613.2
NOETL_EHDB_TAIL_CLEANUPserveronclean up replicated tail objects; false keeps every tail objectserver v3.161.2 src/handlers/ehdb_embedded.rs:100413.6
NOETL_EHDB_TAIL_REPLICATIONserveroffcopy the unsealed tail off the node on a timer (B3; tick default 15 s)server v3.161.2 src/handlers/ehdb_embedded.rs:1015-103313.6
NOETL_EHGRAPH_CONFIGserverunsetpath to the ehgraph TOML. Required once the embedded graph is armedserver v3.161.2 src/ehgraph_embedded.rs:8115.5
NOETL_EHGRAPH_EMBEDDEDserverfalseopen the embedded ehgraph noetl-cluster graph and mount it under /ehgraph/noetl-clusterserver v3.161.2 src/ehgraph_embedded.rs:77, Cargo.toml:233-23515.0, 15.1, 15.2, 15.3, 15.5
NOETL_EHGRAPH_HOST_ORDINALserverderived from HOSTNAME when unsetthis pod's StatefulSet ordinal. Only 0 may write the embedded graphserver v3.161.2 src/ehgraph_embedded.rs:85, 139-14315.5
NOETL_EHGRAPH_HOST_REPLICASserverunset (unset refuses)how many server replicas run this configuration. Must be 1 or the embedded graph refuses to openserver v3.161.2 src/ehgraph_embedded.rs:83, 170-17415.5
NOETL_EHGRAPH_TOPOLOGY_NAMESPACEservertopologynamespace the instance-registry projection writesserver v3.161.2 src/instances/graph.rs:44-4515.5
NOETL_EHGRAPH_TOPOLOGY_TOKEN_FILEserverunsetfile holding the bearer token the topology writer uses. The writer does not start without a readable, non-empty fileserver v3.161.2 src/instances/graph.rs:43, 227-23315.5
NOETL_EHGRAPH_TOPOLOGY_WRITERserveroff (must be exactly true)project the instance registry into the embedded graph; also needs a token file with a write grantserver v3.161.2 src/instances/graph.rs:28-33, 4215.1, 15.5
NOETL_ENCRYPTION_KEYservernone (required)master key for the credential and keychain stores' KEK; the server refuses to start without it (also _FILE)server v3.161.2 src/main.rs:1119-116331.0
NOETL_EVENT_BUS_HOSTworkerfalsealso host the event bus (SSE feed, KV, WAL fan-out)worker v6.15.0 src/event_bus.rs:6, 20310.3, 13.4
NOETL_EVENT_FEED_ADDRgatewaynone (required)EHDB events feed the gateway streams to clients over SSEgateway v3.22.1 src/main.rs:181-197, src/event_feed.rs:910.1
NOETL_EVENT_INGEST_PUBLISH_ONLYserverfalsepublish ingested events to the EHDB events feed (the gateway's SSE source); off, the feed receives nothingserver v3.161.2 src/config/app.rs:118-125, src/handlers/event_write.rs:304-31810.1, 13.4
NOETL_EXECUTION_AFFINITYserverfalseroute each execution's events to the replica that owns it. The embedded ehgraph refuses to open when this is trueserver v3.161.2 src/config/app.rs:569-574; src/ehgraph_embedded.rs:165-16815.5
NOETL_EXECUTION_WAITserver, worker (playbook tool)falsemount and use the execution completion long-poll instead of sleeping before each status pollserver v3.165.5 src/config/app.rs:198-206, src/main.rs:428-440; tools v4.7.3 src/tools/playbook.rs:265-27117.2
NOETL_FEED_FILTER_SUBJECTworkernone (required)the pool this worker claims for, e.g. noetl.commands.shared.>; the worker refuses to start without itworker v6.15.0 src/config.rs:40-46, src/worker.rs:233-24410.3
NOETL_GCP_KMS_KEYservernonethe Cloud KMS key, required when NOETL_KMS_PROVIDER=gcp-kmsserver v3.161.2 src/crypto/mod.rs:6231.0
NOETL_INSTANCE_REGISTRYserverfalse (only exact true enables it)mount the signed instance registry and operator listing and expose its state to catalog discoveryserver v3.165.5 src/instances/mod.rs:34-38, 73-81, 682-70417.0, 17.1
NOETL_INSTANCE_TRUSTserverallowlistinstance admission mode; only open accepts every valid signer, otherwise the trusted-id allowlist appliesserver v3.165.5 src/instances/gate.rs:16-20, 32-5917.0
NOETL_INSTANCE_TRUSTED_IDSserverempty (admit nobody in allowlist mode)comma-separated instance ids admitted by the default trust modeserver v3.165.5 src/instances/gate.rs:16-20, 40-5517.0, 17.1, 17.4
NOETL_INTERNAL_API_TOKENserver, worker, gateway, catalogunsetbearer for internal routes; the gateway's push ingress is refused without it; catalog 473b2d5 returns 503 on a write when it is unset or blankserver v3.161.2 src/auth_gate.rs:47; gateway v3.22.1 src/main.rs:419-434; noetl/catalog 473b2d5 crates/catalog-api/src/lib.rs:41-68, src/main.rs:16-2110.1, 16.0, 16.4, 31.0
NOETL_INTERNAL_AUTH_MODEservershadowbearer gate on internal and credential routes: shadow counts, only enforce rejectsserver v3.161.2 src/auth_gate.rs:25-9331.0
NOETL_KEYCHAIN_ENV_VARSworkeremptyallow-list of environment variables copied into every command's secretsworker v6.15.0 src/executor/command.rs:55-6331.0
NOETL_KEYCHAIN_STRICTworkerfalsefail the command when a referenced keychain alias does not resolve, instead of rendering it emptyworker v6.15.0 src/executor/keychain_namespace.rs:33-514.4
NOETL_KMS_PROVIDERserverlocalwhere the KEK lives: local, or gcp-kms (Cloud KMS); any other value fails start-upserver v3.161.2 src/crypto/mod.rs:33-6131.0
NOETL_KV_ADDRgatewaynone (required)EHDB KV address for sessions, the request store and execution ownersgateway v3.22.1 src/main.rs:132-16110.1
NOETL_LOCAL_DIRCLI~/.noetl/localroot of the local runtime's event bufferCLI v6.4.1 src/local_buffer.rs:111.3, 8.4
NOETL_MCP_REQUEST_TIMEOUT_SECONDSworker (mcp tool)60MCP request timeout when the step sets nonetools v4.6.0 src/tools/mcp.rs:7826.5, 21.2
NOETL_MCP_URLworker (mcp tool), CLIunsetfallback MCP endpoint after NOETL_MCP__ENDPOINTtools v4.6.0 src/tools/mcp.rs:28; CLI v6.4.1 executor/src/playbook.rs:5998.2
NOETL_NONCONVERGENCE_SWEEP_ENABLEDserverfalsefail an execution whose newest event has not moved for a grace period while nothing can move itserver v3.161.2 src/config/app.rs:680-70010.3
NOETL_ORCHESTRATE_PLUGIN_DRIVEservertruerun each drive pass as the __orchestrate__ WASM command on the system pool; false drives in processserver v3.161.2 src/config/app.rs:70-8710.2
NOETL_ORPHAN_SWEEP_ENABLEDserverfalsefail (playbook.failed) a RUNNING execution whose outstanding claim belongs to a dead workerserver v3.161.2 src/config/app.rs:600-62710.3
NOETL_PLAYBOOK_AWAIT_CHILD_RESULTworker (playbook tool)truekill-switch: false reverts an awaited child's result to the legacy status payloadtools v4.6.0 src/tools/playbook.rs:51-537.1
NOETL_PLAYBOOK_AWAIT_PARKserver, worker (playbook tool)falselet an awaited local child park its parent step and free the worker slot; delegated calls are not eligibleserver v3.165.5 src/config/app.rs:208-218, src/services/await_park.rs:14-29; tools v4.7.3 src/tools/playbook.rs:257-26217.2
NOETL_RESULT_URI_ACCEPTserverfalseaccept and validate the worker-stamped canonical result URI (shadow; not yet resolved by)server v3.161.2 src/config/app.rs:442-47036.1
NOETL_SEALED_CREDENTIALSworkerofffetch auth: credentials through the sealed endpoint (needs WORKER_ID); otherwise plaintextworker v6.15.0 src/executor/auth_alias.rs:425-46031.0
NOETL_SECRET_AUDIT_REQUIREDserverfalseparsed, but has no effect at this release: nothing constructs the audit serviceserver v3.161.2 src/services/secret_audit.rs:216-22231.0
NOETL_SERVER_REGIONserverempty (legacy mode)the server's region for secret residency; empty means no residency checksserver v3.161.2 src/secrets/mod.rs:96-10831.0
NOETL_SHARD_COUNTserverunset (treated as 1)total server shard count. The embedded ehgraph refuses to open when it is greater than 1server v3.161.2 src/config/app.rs:177-185; src/ehgraph_embedded.rs:159-16315.5
NOETL_TASK_SEQUENCE_MAX_ITERATIONSworker (task_sequence tool)1000000cap on iterations inside one tool listtools v4.6.0 src/tools/task_sequence.rs:252-2575.2
NOETL_TLS_CERTservernoneserver certificate; with NOETL_TLS_KEY turns on HTTPS (one without the other fails start-up)server v3.161.2 src/tls.rs:4731.0
NOETL_TLS_CLIENT_CAservernoneCA for client certificates; set with the cert and key, turns on mTLSserver v3.161.2 src/tls.rs:4931.0
NOETL_TLS_CLIENT_CERTworkernoneworker client certificate for mTLS to the serverworker v6.15.0 src/client/tls.rs:4131.0
NOETL_TLS_CLIENT_KEYworkernoneworker client key for mTLSworker v6.15.0 src/client/tls.rs:4231.0
NOETL_TLS_KEYservernoneserver private key for HTTPSserver v3.161.2 src/tls.rs:4831.0
NOETL_WORKER_DRAIN_TIMEOUT_SECSworker150 (20 on a writer host)how long a SIGTERM'd worker waits for in-flight commands before exiting; 0 abandons them at onceworker v6.15.0 src/worker.rs:1139-116221.3, 29.0
WORKER_IDworkernonethis worker's identity; required for sealed credential deliveryworker v6.15.0 src/config.rs:6531.0
WORKER_METRICS_BINDworker0.0.0.0:9090address of the worker's /metrics, health and EHDB query routesworker v6.15.0 src/config.rs:124-13430.0

Appendix D: The Resource Model, Annotated

REAL

Generated

Generated from noetl/server v3.161.2 (commit 983e36e3ec4c, 2026-11-12), file orchestrate-core/schema/resource-model.json. The server's own tests fail if these files drift from the code that defines the grammar, so this page is as current as the pin.

The NoETL resource model: what a playbook costs in time, worker slots, memory, fuel and tool calls, with every figure labelled. The same file is published at noetl.ai/dsl/resource-model.json. Chapter 21 explains how to use it.

Model version 1, figures as of 2026-11-11. Purpose: Plan a playbook's time, slots, fuel, memory and tool calls before running it, then measure the run and refine.

Read this first

  • Latency on NoETL is dominated by orchestration per step, not by the work a step does. Count steps and sub-playbook hops before estimating anything else.
  • Measurements are dated and environment-specific. A figure from kind does not transfer to prod, and an older figure may predate a fix.
  • Live values beat this file: a running server answers /api/dsl/version; a running worker's limits are its env; actual cost is in the events and metrics listed under metrics.

Labels

Explained in 21.1 Labels.

LabelMeaning
DEFAULTa code default (env var + value); a deployment may override it
DEPLOYEDread off the production cluster on as_of; configuration, not code
GUIDANCEa planning rule derived from the figures; not a measurement
MEASUREDobserved on a cluster or harness; read environment/date/source before reusing it
NOT_YET_MEASUREDa real question with no number; do not invent one
TARGETa goal or budget; not a measurement

Limits

Explained in 21.3 Limits.

LabelWhatValueSourceNoteCostCostsDeployedEnvGatesParallelUnit
DEFAULT10000000000noetl/worker@d1c9584 src/plugin.rs:410 / off / none / unlimited removes the limit; an unparseable value keeps the default; a trip increments noetl_worker_plugin_limit_trips_total{limit}NOETL_WASM_FUELfuel units per invocation
DEFAULT30000noetl/worker@d1c9584 src/plugin.rs:4410 ms deadline granularityNOETL_WASM_TIMEOUT_MSms wall clock per invocation
DEFAULT1024noetl/worker@d1c9584 src/plugin.rs:47NOETL_WASM_MAX_MEMORY_MBMiB linear memory
DEFAULT32noetl/worker@d1c9584 src/executor/agent_host.rs:50positive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budgetNOETL_AGENT_MAX_TOOL_CALLStool calls per agent step
DEFAULT180noetl/worker@d1c9584 src/executor/agent_host.rs:51NOETL_AGENT_TOOL_TIMEOUT_SECSs per playbook-bound child
DEFAULT4noetl/worker@d1c9584 src/config.rs:115-118WORKER_MAX_CONCURRENTslots per worker process
DEFAULT102400noetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865a step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetchNOETL_EVENT_RESULT_CONTEXT_MAX_BYTESbytes
DEFAULT524288noetl/server src/config/app.rs:242-246a command context above it is offloaded as a context_refNOETL_COMMAND_CONTEXT_MAX_BYTESbytes
DEFAULTrequest body limit on /api/execute and /api/events2097152noetl/server src/main.rs:640-645 (the axum default; no explicit layer)bytes
DEFAULTGET /api/executions/{id} events returned2000noetl/server src/services/execution.rs:694most recent events
DEFAULT120noetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140extra retry window for event emits during a server outage; the slot stays heldNOETL_EVENT_EMIT_OUTAGE_BUDGET_SECSs
DEFAULT150noetl/worker@d1c9584 src/worker.rs:1139on SIGTERM a worker finishes in-flight commands within this budgetNOETL_WORKER_DRAIN_TIMEOUT_SECSs
DEFAULTcatalog URI fetch (source: references)off; the allowlist is empty by default, which fetches nothing (fail closed, HTTP 403)label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:218-221; unit: s; value: 15; what: http(s) fetch timeout, redirects disabled, label: DEFAULT; source: noetl/server src/services/catalog_sources.rs:46-47; value: 10 s / 15 s; what: db:// connect / query timeout; the connection is opened for one read, label: DEFAULT; source: noetl/server src/services/catalog_sources.rs:49-50, 312, 320; value: worst case 64,000 records scanned; what: ehdb:// read: linear scan, 16 records per page, at most 4000 pages, 60 s per page, label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:76; unit: bytes; value: 1048576; what: fetched body cap (UTF-8 only), label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:591-593, 863-867; value: none: every locate fetches again; the imported body is deduplicated by digest; what: fetch cache, label: DEFAULT; source: noetl/server src/services/catalog_peer.rs:896-951; value: none; what: retries, label: NOT_YET_MEASURED; value: none; what: latency of a URI fetchlabel: DEPLOYED; source: prod cluster read, as_of; value: off on prod (no catalog CAS / pinning / discovery / URI flags in the server env)NOETL_CATALOG_URI_FETCH, NOETL_CATALOG_URI_ALLOW
DEFAULTversion pinning and hot reloadoff. With pinning on, a root execution records a catalog watermark before its first event and every bare-path lookup in its tree resolves at or below it; hot_reload only applies to paths the ROOT lists (at most 64 globs) and referenced explicitly as @latestnoetl/server orchestrate-core/src/catalog.rs:338-353, 406-416, 505-529; src/handlers/execute.rs:687-699pinning adds no fetch: resolution is a bounded catalog lookup. Without pinning, /api/execute reads the latest catalog row on every request (no cache)label: DEPLOYED; source: prod cluster read, as_of; value: off on prodNOETL_CATALOG_PINNING, NOETL_CATALOG_HOT_RELOAD
DEFAULTloops and back-edges (goto)No server cap on iterations, steps, back-edge repeats or sub-playbook depth. A back-edge re-dispatches its target until the arc's when: guard goes false; the playbook's own guard is the only bound.noetl/server orchestrate-core/src/orchestrator.rs:150-198, 1119-1240, 1783-1820; src/playbook.rs:778-780every iteration and every back-edge pass is a full step: it pays the per-step orchestration cost below and holds a slotloop.spec.mode: parallel dispatches every item at once. loop.spec.max_in_flight is parsed but has no reader, so it does not throttle anything
DEFAULT225noetl/server src/config/app.rs:702-726how long a stuck execution is re-driven before the server stopsNOETL_RECONCILE_MAX_NOOPSconsecutive no-progress polls at an 8 s tick (~30 min)

Concurrency

Explained in 21.4 The slot and pool model and 10.4.

autoscaling

deployed

  • label: DEPLOYED
  • note: ops/ci/manifests also declares a system-pool ScaledObject (3-10); it is not on the cluster, so the system pool does not scale
  • source: prod cluster read, as_of
scaled_objects
  • cooldown_s: 30; max: 20; min: 2; polling_interval_s: 10; rule: replicas ~ ceil(lag / 2); target: noetl-worker-rust; target_value: 2; trigger: metrics-api: ehdb_feed_subject_lag{subject="commands.shared.shard.0"} from the command-bus writer

measured

LabelWhatValueEnvironmentDateSource
MEASUREDuser pool under 200 real executions (200/200 completed)replicas 2 -> 4 -> 8 -> 16 -> 20 -> 2prod2026-07-31noetl/ai-meta wiki Home (#210)
NOT_YET_MEASUREDtime for the user pool to ramp under load on the EHDB triggernone
MEASUREDGKE Autopilot node provisioning when a scale-up needs a new node~60-90 sprodnoetl/ai-meta playbooks/load-test/README.md

measured

LabelWhatValueEnvironmentDateSourceNote
MEASUREDcommand.issued -> command.claimed, pool not saturatedp50 138.5 / p95 156.4 / p99 181.0 ms (n=60)prod2026-07-30noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy)
MEASUREDsame, with 90 commands offered in 1.2 s against 8 slots (2 replicas x 4)p50 2123 / p99 3735 msprod2026-07-30noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy)this measures the pool queue, not the bus
MEASUREDPOST /api/execute submit latency by client concurrency (server v3.100.4, 2 reps)c=1 p50 120-150 ms; c=2 p50 140-150 ms; c>=4 bimodal with errors and 30 s timeoutsprod2026-09-03noetl/ai-meta wiki Umbrella-Request-Latencyp95 at c=1 rests on single samples
NOT_YET_MEASUREDsustained executions per second the platform can completenone

pools

LabelSourceCapacity_slotsCpuMemoryPoolReplicasSlots_per_replica
DEPLOYEDprod cluster read, as_of8 at min, 80 at max250m request / 2 limit256Mi request / 768Mi limitworker-rust-pool (user pool, Deployment noetl-worker-rust)2 (KEDA 2-20)4
DEPLOYEDprod cluster read, as_of4750m request / 2 limit3Gi / 3Giworker-system-pool (Deployments noetl-worker-system-pool + -shard1)1 + 1, fixed (no autoscaler)2

routing

  • label: DEFAULT
  • source: noetl/worker@d1c9584 src/worker.rs:233-244
  • text: A worker claims only its pool's subject (commands..>); a step reaches a pool through the pool its command is published to. Orchestration of system/* drives runs on the system pool.

slot_model

  • label: DEFAULT
  • source: noetl/worker@d1c9584 src/worker.rs:313, 748-754
  • text: A worker process has WORKER_MAX_CONCURRENT slots (a semaphore). A slot is acquired before the worker pulls a command and released when that command's tool returns. A pool's capacity is replicas x slots; commands beyond it queue on the command bus.

Heuristics

Explained in 21.5 Estimating.

LabelSourceRule
GUIDANCEEstimate wall clock as steps x per_step_overhead + sum(step work) + hops x hop_overhead, where hops are kind: playbook children. On prod today use ~4.5 s per step and ~9-15 s per hop (orchestration_overhead.measured), and re-measure: the overhead, not the work, decides the total.
GUIDANCEPrefer an inline python step to a kind: playbook child when the child only wraps one call: each hop measured ~9-15 s of orchestration on prod, and inlining cut a planner turn by 44%.
GUIDANCECount slots, not steps, for concurrency: a parallel loop dispatches every item at once and max_in_flight does not throttle it, so N items need N free slots on the target pool or the rest queue. The prod user pool has 8 slots at minimum and 80 at maximum; the system pool has 4.
GUIDANCEAn awaited child (return_result / return_step) or a hosted agent's playbook tool holds the parent's slot while the child needs another. Budget two slots per awaiting parent and avoid sending both to a small pool.
GUIDANCEBound every loop and back-edge with a when: guard on an explicit counter: the server enforces no iteration cap, and each pass is a full step.
GUIDANCESet timeout_seconds on python, shell, postgres, duckdb and rhai steps that call anything slow: those kinds have no default timeout and the worker has no per-command one.
GUIDANCEFor kind: wasm, plan inside the defaults (30 s, 10e9 fuel, 1024 MiB) and expect one module at a time per worker process: concurrent wasm steps on one pod serialize. Read fuel actually spent from the worker's debug log; no metric reports it.
GUIDANCEFor kind: agent, the tool-call budget (32) and child timeout (180 s) bound a hosted loop: worst case is about 32 x 180 s = 96 min of one held slot. Size max_turns and the tool list so the expected path uses a few calls, and read agent.final for the real count.
GUIDANCEKeep step results under 100 KiB when a downstream step reads them: larger results are spilled to the result store and every read becomes a fetch.
GUIDANCEChoose a pool by where the work must run (credentials, network, memory) first; then check its slot capacity against the plan's peak parallelism. Bursts above capacity on the user pool trigger KEDA scale-up, which can add node provisioning time (~60-90 s) on Autopilot.
TARGETnoetl/server orchestrate-core dsl-manifest worker_runtime.agent.playbook_tools.not_durableOrchestrator-driven resume of a hosted agent loop after a worker dies (today the step restarts from turn 1).

Metrics

Explained in 21.5 Check the estimate.

  • events_note: agent.* events come only from the hosted loop (NOETL_WORKER_AGENT_PLAYBOOK_TOOLS=true). Token usage is in call.done result data, not on agent.* events.
  • server_prometheus_source: noetl/server src/metrics.rs, served at GET /metrics
  • worker_prometheus_source: noetl/worker@d1c9584 src/metrics.rs, served on WORKER_METRICS_BIND, else 0.0.0.0:$PORT, else 0.0.0.0:9090

apis

  • returns: started_at, completed_at and up to 2000 most recent events with created_at; no duration field (subtract); route: GET /api/executions/{id}
  • returns: progress step counts only, no times; route: GET /api/executions/{id}/status

events

  • fields: result.context: status, duration_ms, error, exit_code, child_execution_id; an agent step's result data carries usage {input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens}, turns, model, stop_reason; source: noetl/worker@d1c9584 src/executor/command.rs:1097-1110; noetl/[email protected] (the version noetl/worker pins) src/result.rs:62-135, src/tools/agent.rs:838-851; type: call.done
  • fields: created_at on each event: the difference is the step's wall clock including slot wait after claim; source: noetl/worker@d1c9584 src/executor/command.rs:545-557, 1352-1361; type: command.started / command.completed / command.failed
  • fields: turn, outcome (tool_calls | final), tool_calls [{id, name}]; source: noetl/worker@d1c9584 src/executor/agent_host.rs:226-254; type: agent.turn
  • fields: turn, tool_use_id, tool, binding, playbook, child_execution_id, is_error, duration_ms, input and result previews (2 KiB); source: noetl/worker@d1c9584 src/executor/agent_host.rs:307-321; type: agent.tool_call
  • fields: turns, tool_calls, child_execution_ids, duration_ms; or refused: tool_call_budget; source: noetl/worker@d1c9584 src/executor/agent_host.rs:231-240, 259-262; type: agent.final

not_available

  • no per-execution or per-step duration histogram on the server
  • no metric for wasm fuel consumed (debug log only)
  • no metric for token usage (call.done result data only)
  • no per-tool memory metric

server_prometheus

  • labels: event_type; name: noetl_event_ingest_duration_seconds; type: histogram
  • labels: phase; meaning: where inside event ingest the time goes; name: noetl_event_ingest_phase_seconds; type: histogram
  • name: noetl_orchestrate_in_flight_executions / noetl_orchestrate_oldest_seconds; type: gauge
  • labels: entry, outcome; name: noetl_execute_outcomes_total; type: counter

worker_prometheus

  • labels: tool_kind; meaning: full dispatch per command: tool + case evaluation + lifecycle emits; buckets 0.01-120 s; name: noetl_worker_dispatch_duration_seconds; type: histogram
  • meaning: slots in use on this worker; name: noetl_worker_concurrent_dispatches; type: gauge
  • labels: phase (park | outcome); meaning: claim latency split; name: noetl_worker_command_pickup_phase_seconds; type: histogram
  • labels: event_type; name: noetl_worker_event_emit_duration_seconds; type: histogram
  • labels: phase (fetch | compile); meaning: wasm cold start; name: noetl_worker_plugin_load_seconds; type: histogram
  • labels: limit (fuel | timeout | memory); name: noetl_worker_plugin_limit_trips_total; type: counter
  • meaning: cost of spilling an over-budget result; name: noetl_worker_result_store_put_duration_seconds; type: histogram
  • labels: version; meaning: which worker build answered; absence of a newer metric means that build predates it; name: noetl_worker_build_info; type: gauge

Not yet measured

Explained in 21.6 What is not yet measured.

  • per-step latency of http, duckdb, postgres and mcp steps on prod
  • latency of a hosted LLM call inside a real playbook step
  • sustained executions per second on prod
  • worker slot occupancy over time
  • user-pool KEDA ramp time on the EHDB trigger, and scale-down time on prod
  • catalog URI fetch latency
  • unsaturated prod command-bus latency after 2026-07-30

Orchestration overhead

Explained in 21.5 Estimating and Chapter 22.

  • caveat: Per-step cost varies with load and with the server build: several of these figures predate later dispatch fixes. Measure on the target cluster at the target load before committing to a budget.
  • summary: Each step pays a fixed orchestration cost (command dispatch, claim, and three lifecycle event emits) on top of its work; each kind: playbook hop pays a whole child execution's worth.

measured

LabelWhatValueEnvironmentDateSource
MEASUREDfixed cost per step in the travel itinerary planner; events spaced a near-uniform 0.8-1.2 s apart~4.5 s per stepprod2026-08noetl/travel wiki playbook-itinerary-planner#latency
MEASUREDshare of a planner turn that is orchestration (63 events, ~15-17 s of work in a ~76-107 s turn)~82%prod2026-08noetl/travel wiki playbook-itinerary-planner#latency
MEASURED10-hop probe playbook: share of a turn in two command-dispatch gaps per hop (~510 ms p50 each)79%prod2026-08-18noetl/ai-meta wiki Sessions-Log 2026-08-18
MEASUREDserver event ingest per emit: command.started / command.completed vs call.done (three emits per hop)~336 ms / ~1021 ms on prod, ~40 ms on kindprod and kindnoetl/server src/metrics.rs (doc comment on noetl_event_ingest_phase_seconds)
MEASUREDprod smoke turns through the gateway: travel planner turn / ranch concierge turn17.0-21.2 s / 6.4-7.0 sprod2026-11-04noetl/ai-meta wiki Sessions-Log 2026-11-04
MEASUREDfirst drive of a fresh system-pool pod after a roll (state builder replays the feed)drives stall ~7-10 minprod2026-11-03noetl/ai-meta wiki Sessions-Log 2026-11-03 (early)
MEASUREDcommand-bus writer restart (lease election)failover window 21 s; plan for a 20-60 s write outageprod2026-11-04noetl/worker wiki cmdbus-writer-tier-service

Step kinds

Explained in 21.2 Per-step-kind costs.

Per-kind execution, slot and timeout profiles are in Appendix B.

Appendix E: Status Ledger — REAL vs TARGET by Chapter

REAL

Every page of this book, its badge, and what its claims were checked against. Use it to judge how current a page is: a page verified against an older release may have drifted, and the badge says whether the subject is shipped (REAL), partly shipped (PARTIAL) or designed only (TARGET). How to Read This Book defines the badges.

Ledger

Generated by tools/gen-ledger.py from src/SUMMARY.md and each page's own badge, so it cannot disagree with the pages. Verified against names the releases or commits the page's claims were checked at (tools/ledger.json). CI fails if a written page has no entry, or if this table is stale.

98 pages written, 85 not yet written (of 183 in SUMMARY.md).

PageBadgeStatusVerified againstLanded
The NoETL Book—written—2026-11-13 (#1)
Foreword—not written
IntroductionREALwrittenclaims linked to Ch. 1–11; no version-specific numbers2026-11-14 (#10)
How to Read This Book: Status Badges, Quizzes and TracesREALwrittenresource model labels, server v3.161.22026-11-13 (#65)
Getting StartedREALwrittenCLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml)2026-11-14 (#11)
    InstallationREALwrittenCLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml)2026-11-14 (#11)
    Hello, PlaybookREALwrittenCLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml)2026-11-14 (#11)
    Running It Locally with the CLIREALwrittenCLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml)2026-11-14 (#11)
Project: Fetch, Transform, Store — Your First Real PlaybookREALwrittenCLI v6.4.1 (run in CI); data pinned at server 983e36e2026-11-13 (#12)
What NoETL IsREALwrittenserver v3.161.2 (983e36e), worker v6.15.02026-11-15 (#64)
    Declarative OrchestrationREALwrittenserver v3.161.2 orchestrate-core (WorkflowOrchestrator)2026-11-15 (#64)
    Event Sourcing: The Log Is the TruthREALwrittenserver v3.161.2 (983e36e)2026-11-15 (#64)
    Ephemeral Blueprints and Stateless WorkersREALwrittenworker v6.15.02026-11-15 (#64)
    Two Catalogs: Internal Objects vs Business DataPARTIALwrittenserver v3.161.2: catalog in Postgres by default; EHDB-only is the target (PARTIAL)2026-11-15 (#64)
Anatomy of a PlaybookREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#58)
    apiVersion, kind, metadataREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#58)
    workload, vars and TemplatingREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#58)
    workflow: StepsREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#58)
    keychain: Credentials by ReferenceREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#58)
    workbook: Reusable TasksREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#58)
ToolsREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model2026-11-13 (#59)
    The Tool KindsREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model2026-11-13 (#59)
    The Ordered Tool List: One Command, One SlotREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model2026-11-13 (#59)
    Results, References and Size LimitsREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model2026-11-13 (#59)
Control FlowREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#60)
    next, Arcs and RoutersREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#60)
    when GuardsREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#60)
    loop: — Sequential, Parallel, CursorREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#60)
    Back-Edges: Loops as GotoREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#60)
    Errors, Timeouts and Retries — What Is EnforcedPARTIALwrittenserver v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.12026-11-13 (#60)
Composition: Sub-PlaybooksREALwrittentools v4.6.0 src/tools/playbook.rs; resource model @ server v3.161.2; ai-meta PR #556 (open)2026-11-14 (#17)
    kind: playbook and Child ExecutionsREALwrittentools v4.6.0 src/tools/playbook.rs; resource model @ server v3.161.2; ai-meta PR #556 (open)2026-11-14 (#17)
    What a Hop CostsREALwrittentools v4.6.0 src/tools/playbook.rs; resource model @ server v3.161.2; ai-meta PR #556 (open)2026-11-14 (#17)
The Local Runtime: noetl runREALwrittenCLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table2026-11-14 (#18)
    One Process, One InterpreterREALwrittenCLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table2026-11-14 (#18)
    Local Tool Kinds and Their LimitsREALwrittenCLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table2026-11-14 (#18)
    Iterating Without loop: — Arcs, SQL and RhaiREALwrittenCLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table2026-11-14 (#18)
    The Local Event Buffer and noetl pushREALwrittenCLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table2026-11-14 (#18)
The Daemon: noetl subscribe and noetl serveREALwrittenCLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/2026-11-14 (#19)
    Subscriptions: NATS, Pub/Sub, KafkaREALwrittenCLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/2026-11-14 (#19)
    Spooling and the Event TrailREALwrittenCLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/2026-11-14 (#19)
    Dispatching to a ServerREALwrittenCLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/2026-11-14 (#19)
The Distributed RuntimeREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, gateway v3.22.12026-11-15 (#77)
    Gateway: The GatekeeperREALwrittengateway v3.22.1; server v3.161.2 (should_publish)2026-11-15 (#77), #81, #83
    Server: The Orchestrate-Core DriveREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, gateway v3.22.12026-11-15 (#77)
    The Command Bus and Worker PoolsREALwrittenserver v3.161.2 (983e36e), worker v6.15.0, gateway v3.22.12026-11-15 (#77)
    Slots, Pools and KEDA AutoscalingREALwrittenworker v6.15.0; resource model DEPLOYED as of 2026-11-11 (server v3.161.2)2026-11-15 (#77)
    Following One Execution End to EndREALnot written
Choosing a Runtime, and When Not to Use NoETLREALwrittenCh. 3–9 (as cited per cell); resource model @ server v3.161.22026-11-14 (#20)
    What NoETL Is Good AtREALnot written
    When a Program Is BetterREALwrittenresource model at server v3.161.2; ai-meta wiki Sessions-Log 2026-11-14/15/16; book measurement 2026-11-19 (CLI 6.4.1, n=10, unchanged). Cause and shipment: noetl/tools v4.7.2 (2026-11-28, tools#123) and noetl/cli v6.4.3 Cargo.lock (noetl-tools 4.7.2); newest CLI checked 2026-12-01 is v6.4.5 (lock: noetl-tools 4.7.3). Re-measure on CLI >= 6.4.3 is NOT_YET_MEASURED.2026-11-19 (#106); rhai-cause note 2026-12-01 (#102)
    When an Existing Tool Is BetterREALnot written
    NoETL and AI AgentsPARTIALnot written
    NoETL and MCP ServersPARTIALnot written
    NoETL and MicroservicesREALnot written
    A Decision GuideREALnot written
Project: Taking Your Playbook DistributedREALnot written
EHDB: The Event Horizon DatabaseREALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
    Why NATS Was ReplacedREALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
    The Append Log: Parts, Segments, ManifestREALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
    Bloom Filters and the Prune FloorREALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
    Two Buses: Commands and EventsREALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
    Writer Election and FencingREALwrittenehdb v0.15.1, worker v6.15.0; prod fence mode from the dated wiki read 2026-11-16 (writer worker 6.11.9)2026-11-15 (#83); REAL 2026-11-16
    Durability: Tail Replication and the Unsealed TailPARTIALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
    The Chain StorePARTIALwrittenehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record2026-11-15 (#83)
EHDB as the State SubstrateTARGETnot written
    Embedded State: One EHDB per ShardPARTIALnot written
    The Execution-Partitioned Event Store (RFC #355)TARGETnot written
    What Retiring Reconcile and Re-Drive BuysTARGETnot written
ehgraph: A Graph Database for TopologyPARTIALwrittenehgraph f200516 (2026-11-10); server v3.161.2 Cargo.toml:250 (no release tag; NOETL_EHGRAPH_EMBEDDED default off)2026-12-01
    Three Stores, Three JobsREALwrittenserver v3.161.2 (Cargo.toml:248-250, src/db/queries/event.rs, src/ehgraph_embedded.rs, src/instances/graph.rs); ehgraph f200516 README; ai-meta RFC interstate-runtime-bus §5; ai-meta wiki Sessions-Log 2026-11-222026-11-26
    The Model: a Labeled Property Graph with HistoryPARTIALwrittenehgraph f200516 docs/wiki/Cypher.md, Architecture.md, Getting-Started.md, API-and-MCP.md; crates/ehgraph/src/config.rs; crates/ehgraph/src/lib.rs:188; crates/ehgraph-api/src/dispatch.rs:1272-12782026-12-01
    Querying: openCypher, Query API v2 and BoltPARTIALwrittenehgraph f200516 docs/wiki/Cypher.md, crates/ehgraph-cypher/src/exec.rs, crates/ehgraph-server/src/lib.rs; tck-results.json recounted; server v3.161.2 (no Bolt code; src/ehgraph_embedded.rs:90)2026-11-26
    TransactionsPARTIALwrittenehgraph f200516 docs/wiki/Transactions.md; crates/ehgraph-api/src/tx.rs:40-44; crates/ehgraph-api/src/dispatch.rs:965. Python driver 6×15=90 recounted from Transactions.md, not re-run2026-12-01
    ehgraph Inside the ServerPARTIALwrittenserver v3.161.2 src/ehgraph_embedded.rs, src/instances/graph.rs, Cargo.toml:241-250; ehgraph f200516 Embedding.md (names older pin 760f572), crates/ehgraph/src/config.rs EmbeddedConfig, crates/ehgraph-store/src/format.rs:492026-12-01
    Operations: Backup, Compaction and BudgetsPARTIALwrittenehgraph f200516 docs/wiki/Operations.md; crates/ehgraph/src/config.rs:145,207; crates/ehgraph/src/budgets.rs; crates/ehgraph-backup/src/lib.rs:5,119,132-136; crates/ehgraph-backup/src/gcs.rs:7,45. Roadmap.md and Architecture.md backup text are stale against that code. resident_bytes.rs summary not re-run2026-12-01
    Where It Is Heading: a Read Model for Runtime TopologyTARGETwrittenai-meta RFCs interstate-runtime-bus.md (draft 2026-11-16), firecracker-cells-worker-pool.md, distributed-playbook-catalog.md; ehgraph f200516 Roadmap.md and ensure_primary; server v3.161.2 src/instances/graph.rs. RFC #586 'written on prod' kept beside the 2026-11-22 graph_written=0 reading2026-12-01
The CatalogPARTIALwrittennoetl/catalog 473b2d5 README, Cargo.toml, docs/wiki/Home.md, design/catalog-model.md, catalog-api router; no git tags2026-12-01 (Ch. 16 outline)
    Two CatalogsPARTIALwrittennoetl/catalog 473b2d5 README; noetl_types.rs seed; catalog-extract credential comment; design spec sections 1.1, 2.10, 4.1, 12; attribute.rs and store.rs lang fold2026-12-01 (Ch. 16 outline)
    The ModelPARTIALnot written
    Four DatasetsPARTIALwrittencatalog-store datasets.rs and AC3 tests at 473b2d5; ehdb v0.4.5 (688924f) lib.rs, registry.rs, engine.rs:1445 and :1454; ehdb v0.15.1 registry.rs still defines d7_catalog2026-12-01 (Ch. 16 outline)
    The HTTP APIPARTIALnot written
    Ingest and a New TypePARTIALnot written
    What the EHDB Pin RequiresPARTIALnot written
    Not in These Sources—not written
Cross-Instance Execution: "Run It on B"PARTIALwrittenserver v3.165.5, tools v4.7.3, worker v6.19.2, CLI v6.4.5; first-release commits; noetl/ops as-built record 7695b1b; kind result reported 2026-11-11pending (#27)
    Instance Identity and the Peer RegistryPARTIALnot written
    remote: import vs remote: delegatePARTIALwrittenserver v3.165.5 src/services/catalog_remote.rs, catalog_peer.rs, catalog_cas.rs and src/handlers/execute.rs; tools v4.7.3 src/tools/playbook.rs; worker v6.19.2pending (#27)
    Pins Across InstancesPARTIALwrittenserver v3.165.5 src/services/catalog_remote.rs and catalog_cas.rs; noetl/ops kind test at 7695b1bpending (#27)
    Flags and the Fail-Closed AllowlistPARTIALnot written
    Which Runtimes Can Call Another InstancePARTIALnot written
    What Is Still TARGETTARGETnot written
MCP and AgentsREALnot written
    kind: mcp: Calling MCP ServersREALnot written
    kind: agent: Agent StepsREALnot written
    A Playbook as an MCP ServerREALnot written
    A Playbook as an AgentREALnot written
    The Interop Matrix Across RuntimesPARTIALnot written
Project: Expose a Playbook as an MCP Tool and Call It from an AgentREALnot written
Coroutines and Structured ConcurrencyTARGETnot written
    Concurrency Today: Fan-Out, Fan-In and Its GapsREALnot written
    Leaf Units and OwnershipTARGETnot written
    spawn, join, selectTARGETnot written
    Cancellation and SlotsTARGETnot written
    Flags and the Staged RolloutTARGETnot written
The Resource ModelREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
    Labels: MEASURED, DEPLOYED, DEFAULT, GUIDANCE, TARGETREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
    Per-Step-Kind CostsREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
    Limits: WASM Fuel, Agent Caps, Context SizesREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
    The Slot and Pool ModelREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
    Estimating a Playbook Before You Run ItREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
    What Is Not Yet MeasuredREALwrittenresource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.02026-11-15 (#79)
Orchestration OverheadPARTIALnot written
    Where a Step's Time GoesREALnot written
    Postgres vs EHDB on the Hot PathREALnot written
    The Ranked FixesPARTIALnot written
    Measuring HonestlyREALnot written
WASM at the EdgePARTIALnot written
    Purity: What Can CompilePARTIALnot written
    From Playbook to Module: The Compiler StagesPARTIALnot written
    A Playbook in a Cloudflare WorkerREALnot written
    Parity and LimitsPARTIALnot written
Project: Ship a Pure Playbook to the EdgePARTIALnot written
Agent and Bot Fleets on NoETLPARTIALnot written
    The Shared-VM BaselinePARTIALnot written
    Isolation and Scoped CredentialsPARTIALnot written
    Cost and ConcurrencyPARTIALnot written
    The Architecture to WinPARTIALnot written
Case Study: A Quantum Compilation Pipeline on the Local RuntimeREALnot written
    The Pipeline and Its Honest DefaultsREALnot written
    Validate Before You RunREALwrittennoetl/quantum 9208fa2; server v3.161.2 src/handlers/dsl.rs, src/services/catalog.rs (schema_drift also at v3.165.1); public endpoint read 2026-11-17 (server 3.165.1)2026-11-17 (#99)
    Long-Running Compute: Budgets and DeadlinesREALnot written
    Shell as the Escape HatchREALwrittennoetl/quantum 9208fa2 playbooks (11/14/10 shell steps) and docs/tutorial/01-environment.md. noetl/cli v5.3.2 (5ff491e, published 2026-10-17) src/playbook_runner.rs. noetl/noetl tag pypi-v5.3.2 packaging/pypi Cargo.lock resolves crate noetl 5.3.2; root pyproject.toml is not a distribution. Playbook wall clock NOT_YET_MEASURED.2026-12-01 (#97)
Deployment ModesREALwrittennoetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08)2026-11-15
    Local kind FirstREALwrittennoetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08)2026-11-15
    Production on GKEREALwrittennoetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08)2026-11-15
    Deploy by DigestREALwrittennoetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08)2026-11-15
Releases and Version PinningREALwrittensemantic-release.yml, release.yml, .releaserc.json on main of server, worker, tools, cli, gateway (read 2026-11-15); run logs; commit-analyzer default rules2026-11-15
Rollout and Rollback DisciplineREALwrittenai-meta playbooks 516, 517 at 0e835fd; noetl/e2e prod_regression_validate.py; dated record (ai-meta#202, #203, #504, #511, #517, #523; wiki Sessions-Log 2026-09-30)2026-11-15
Observability and AlertingREALwrittenserver v3.161.2, worker v6.15.0, gateway v3.22.1, CLI v6.4.1; noetl/ops 3f63656; dated record ai-meta#4712026-11-15
Credentials and SecretsREALwrittenserver v3.161.2, worker v6.15.0; noetl/ops 6c55cbe manifests; dated record (ai-meta wiki Umbrella-Secrets-Wallet, 2026-08-28)2026-11-15
Representation Drift: Keeping What You Know TrueREALnot written
Case Study: The Travel PlaybooksREALnot written
    From Screen to Playbook to FirestoreREALnot written
    The Profile Flow: Read, Save, Read BackREALwrittennoetl/travel cd210d7 playbooks/profile.yaml; server v3.161.2 orchestrate-core (state.rs, orchestrator.rs, commands.rs); tools v4.6.0 python.rs; gateway v3.22.1 authorization.rs2026-11-17 (#99)
    Provider Calls: Inline or Child PlaybookREALnot written
    The Itinerary Planner: State Across TurnsREALnot written
    Regression-Testing a Playbook FamilyREALwrittennoetl/travel cd210d7 qa/regression (suite.yaml, qa_report.py, vanishing-case.yaml, hotel-cards-smoke.yaml). CLI v5.3.2 src/playbook_runner.rs Tool::Unsupported. CLI v6.4.1 refusal is Ch. 8.2, not re-run here. suggest_pois stays unverified (33.2).2026-12-01 (#95)
Case Study: Authentication and AuthorizationPARTIALnot written
    Sign-In Is a PlaybookPARTIALnot written
    Deny by Default: Two Roles and an AllowlistPARTIALnot written
    Who Owns an ExecutionPARTIALnot written
    Granting Roles and Verified EmailPARTIALnot written
Case Study: Standing Up the PlatformPARTIALnot written
    NoETL Provisions NoETLPARTIALnot written
    Images: Cloud Build and the Release PipelinePARTIALnot written
    Worker Pools and KEDAPARTIALnot written
    Secrets and the EHDB SubstratePARTIALnot written
    What the Recipe Declares vs What RunsPARTIALnot written
Data Lineage on NoETLPARTIALnot written
    What the Event Log Records About a RunREALwrittenserver v3.161.2 src/db/queries/event.rs, src/services/execution.rs, db/ddl/postgres/schema_ddl.sql, src/config/app.rs; emitter search at newest tags 2026-11-192026-11-19 (#106)
    References That Name Their ProducerPARTIALnot written
    Declared Lineage: the RegistryPARTIALnot written
    Recording Dataset Lineage YourselfREALnot written
Data Governance on NoETLPARTIALnot written
    Access ControlPARTIALnot written
    Audit and ReproducibilityPARTIALnot written
    Secrets and Personal DataPARTIALnot written
    Retention and the Right to ErasurePARTIALnot written
    Policy in PlaybooksPARTIALnot written
NoETL and Data MeshPARTIALnot written
    Domain OwnershipPARTIALnot written
    Data as a ProductPARTIALnot written
    The Self-Serve PlatformREALnot written
    Federated GovernancePARTIALnot written
Appendix A: DSL ReferenceREALwrittengenerated, server v3.161.2 (983e36e)2026-11-13 (#57, #62)
Appendix B: Tool Kinds ReferenceREALwrittengenerated, server v3.161.2 (983e36e); local: CLI v6.4.12026-11-13 (#57, #63)
Appendix C: Feature Flags and Environment VariablesREALwrittengenerated, server v3.161.2 (983e36e)2026-11-13 (#57), 2026-11-15 (#81: cited runtime flags)
Appendix D: The Resource Model, AnnotatedREALwrittengenerated, server v3.161.2 (983e36e)2026-11-13 (#57), 2026-11-15 (#80: Ch. 21 links)
Appendix E: Status Ledger — REAL vs TARGET by ChapterREALwrittengenerated from the pages2026-11-13 (#47)
Appendix F: Myths and CorrectionsREALwrittenper row2026-11-13 (#61)
Appendix G: GlossaryREALwrittenterms as defined in their chapters2026-11-13 (#50)
Appendix H: Contributing to This BookREALwrittenbook CI tooling2026-11-13 (#56)

Versions the examples are tested against

Every example in this book is run in CI by tools/run-examples.sh against one pinned NoETL CLI release. The version is the single line in examples/NOETL_CLI_VERSION; the CI job log prints it (noetl --version).

ComponentVersionWhere it is pinned
NoETL CLI (noetl run, local runtime)6.4.1 (released 2026-11-15)examples/NOETL_CLI_VERSION
mdBook0.4.40.github/workflows/book.yml
mdbook-linkcheck0.7.7.github/workflows/book.yml
mdbook-quiz0.3.12.github/workflows/book.yml
mdbook-admonish1.20.0.github/workflows/book.yml

Check your understanding

Appendix F: Myths and Corrections

REAL

Each row is a belief about NoETL that is wrong, or was true once, and the fact that replaces it. Every Truth was checked at the source named, and the Checked by column says how: a CI example (re-run on every pull request, so the row breaks if the behaviour changes), or a reading of the code at that release. Rows are grouped by the chapter that teaches the truth.

Found a myth that is not here? Open an issue; Appendix H explains how a correction gets into the book.

MythTruthSourceChecked byChapter
A sub-playbook call is about as cheap as a function call.Each hop is a whole child execution: MEASURED ~9–15 s of orchestration on prod (2026-08); inlining provider children cut a planner turn 44%.resource model step_kinds (playbook), server v3.161.2resource-model readCh. 7.2
brew tap noetl/tap && brew install noetl installs NoETL.With current Homebrew (7.0.11) it fails on an untrusted tap; brew trust noetl/tap is needed first.book install-paths workflow run 43568552091 (2026-11-14, macos-latest)CI run (weekly)Ch. 1.1
pip install noetl gives the current CLI.As of 2026-11-14 PyPI's newest is 5.3.2 (uploaded 2026-10-17); the CLI was at 6.4.0 (6.4.1 since 2026-11-15).PyPI JSON API; install-paths run 43568552091CI run (weekly)Ch. 1.1
The local event trail records every run of every step.It records one step.exit per step, at its first run; a back-edge loop's later passes are missing (as are they from executed_steps).CLI v6.4.1 (ExecutionContext::set_step_result, src/playbook_runner.rs)run of examples/ch02/fetch-transform-store with --event-bufferCh. 2
The internal catalog is already stored in EHDB.At v3.161.2 /api/catalog/* reads and writes Postgres noetl.catalog; the EHDB catalog log is a shadow write and an EHDB read path is staged (NOETL_CATALOG_READ_SOURCE, default postgres). EHDB-only is the target.server v3.161.2 src/db/queries/catalog.rs, src/handlers/catalog_log.rs, src/handlers/catalog_read.rscode readCh. 3.4
Fixing a playbook removes a secret it once contained.The event log is append-only and never purged; what reached it stays. Registration refuses recognisable secrets for that reason.server v3.161.2 src/services/secret_material.rscode readCh. 3.2
The step list goes under steps:.There is no steps: key; workflow is the step list. A playbook with steps: fails: missing field `workflow` .server v3.161.2 playbook.schema.json (required: workflow); CLI v6.4.1examples/ch04/no-steps-key (CI)Ch. 4
Registering a playbook validates it.Registration checks tool kinds and inline secrets only; the validator (start step, unique names, next targets) runs when an execution starts.server v3.161.2 src/handlers/dsl.rs:227, src/services/catalog.rs registration_checkscode readCh. 4
Use step vars: to pass a value to the next step.Only the local runtime reads step vars:. On a server nothing reads step or top-level vars:; use set:.server v3.161.2 (no reader of Step.vars); CLI v6.4.1examples/ch04/variables-local (CI, local side)Ch. 4.2
The local runtime renders templates like the server does.Locally it is token substitution: exactly {{ name }}, four filters, unknown names left in place. The server uses minijinja, where undefined renders empty.CLI v6.4.1 executor/src/template.rs; server v3.161.2 orchestrate-core/src/template.rsexamples/ch04/templating (CI)Ch. 4.2
There is no default database connection.It is a convention, not enforced: a postgres step with no auth connects to localhost:5432 as postgres.tools v4.6.0 src/tools/postgres.rs build_connection_string; worker v6.15.0 src/executor/auth_alias.rscode readCh. 4.4
Each tool in a tool: list is dispatched separately, so a list spreads work across workers.A tool list is ONE task_sequence command on one worker in one slot; its sub-tasks run sequentially inside it.server v3.161.2 orchestrate-core/src/commands.rs build_tool_from_definition; tools v4.6.0 task_sequence.rscode readCh. 5.2
NoETL dropped Python, so kind: python is gone.The Python platform was retired (noetl/noetl 25bef859); kind: python is a worker kind (a python3 subprocess). Only the local runtime lacks it.tools v4.6.0 src/tools/python.rs; CLI v6.4.1examples/ch08/python-refused (CI)Ch. 5.1
A shell step works the same on both runtimes.Workers read command:; the local runtime reads cmds: and silently ignores command: (the step runs nothing, the run ends ok).tools v4.6.0 ShellConfig; CLI v6.4.1 Tool::Shellexamples/ch05/shell-command-local (CI)Ch. 5.1
next: [{step: a}, {step: b}] runs both.A list of targets is exclusive by default: only a runs. next: [a, b] (names) fans out.server v3.161.2 orchestrate-core/src/evaluator.rsexamples/ch06/next-targets (CI, same on local)Ch. 6.1
loop.spec.max_in_flight throttles a parallel loop.It is parsed and nothing reads it; parallel mode dispatches every item at once.server v3.161.2 (orchestrator.rs dispatch_count; no reader of max_in_flight); resource modelcode readCh. 6.3
spec.on_error: retry / retry: / tool.eval retries a failed step.None is applied. Only spec.policy.rules inside a tool list retries.server v3.161.2, worker v6.15.0, tools v4.6.0 (no readers); tools task_sequence.rscode readCh. 6.5
spec.timeout limits a step.No reader; the worker sets no command timeout. Only a tool's own timeout applies.server v3.161.2 StepSpec; resource model no_global_timeoutcode readCh. 6.5
The server caps loop iterations / back-edge re-runs.No cap exists; the playbook's when is the only bound. The only iteration cap is inside one tool list.server v3.161.2, worker v6.15.0, tools v4.6.0 (grep for limits)code readCh. 6.4
If no arc matches, the execution just ends.A step that has arcs, none taken, is not an ending: the execution stalls with no terminal event (sweep off by default).server v3.161.2 check_completion; src/handlers/nonconvergence_sweep.rscode readCh. 6.0
The local runtime routes like the server.Locally next: name and next: [names] are ignored, a false step when ends the branch, and an undefined name in a guard is truthy.CLI v6.4.1examples/ch06/next-names-ignored-local, when-skip-local, when-undefined-local (CI)Ch. 6.1, 6.2
The local runtime can run postgres steps.It refuses kind: postgres (and python) before any step runs: "Run it on a cluster instead".CLI v6.4.1 reject_unsupported_kinds (src/playbook_runner.rs)examples/ch08/postgres-refused (CI)Ch. 8
Worker autoscaling (KEDA) reads NATS consumer lag.NATS was removed. The deployed trigger is ehdb_feed_subject_lag{subject="commands.shared.shard.0"} from the command-bus writer, replicas ≈ ceil(lag / 2), 2–20 replicas.server v3.161.2 resource model concurrency.autoscaling.deployed (DEPLOYED, as of 2026-11-11)resource-model readCh. 10.4
ehgraph stores its graphs in EHDB.It does not: EHDB is a design reference for its change-log format only, and no ehgraph crate depends on EHDB.noetl/ehgraph f200516 README ("never stores graph data in an EHDB dataset"), Cargo.toml (no ehdb dependency)code readCh. 15
The local runtime runs a loop: step once per item.It parses loop: and runs the step once; the run ends ok with no warning.CLI v6.4.1: Step.loop_config (executor/src/playbook.rs) has no readerexamples/ch08/loop-runs-once (CI)Ch. 8.3
The gateway is stateless.It keeps sessions, the request store and execution owners in EHDB KV (NOETL_KV_ADDR, required), and open SSE connections and callbacks in memory. It keeps no business data.gateway v3.22.1 src/main.rs:132-161code readCh. 10.1
The gateway checks sessions itself.By default it starts an auth playbook through POST /api/execute (GATEWAY_SESSION_VALIDATE_VIA_PLAYBOOK, default true); the sync paths are off by default.gateway v3.22.1 src/auth/mod.rs:177-181, :366code readCh. 10.1
The server runs the orchestrator.By default each drive pass after the first commands is a __orchestrate__ WASM command on the system pool (NOETL_ORCHESTRATE_PLUGIN_DRIVE, default true). The server builds only the first commands.server v3.161.2 src/config/app.rs:70-87, src/handlers/execute.rs:1568-1650code readCh. 10.2
Each step can choose its worker pool.The pool is chosen once per execution: request override, else system/ / subscription/ path prefix, else shared. There is no step-level pool field.server v3.161.2 src/handlers/execute.rs:1976-1983code readCh. 10.3
If a worker crashes mid-step, the step is retried elsewhere.The bus is acked at claim, so it does not redeliver; the execution stays RUNNING. The orphan and non-convergence sweeps that would fail it are off by default, and neither re-runs the step.worker v6.15.0 src/worker.rs:821-833; server v3.161.2 src/config/app.rs:600-700code readCh. 10.3
The system pool autoscales (the ops repo declares a 3–10 ScaledObject).That ScaledObject is not on the cluster; the system pool ran 1 + 1 fixed replicas, 2 slots each.server v3.161.2 resource model concurrency (DEPLOYED, as of 2026-11-11)resource-model readCh. 10.4
A postgres, duckdb or rhai step times out by default.None of them sets a timeout, and the worker has no per-command one; such a step can hold its slot indefinitely unless it sets timeout_seconds.resource model step_kinds (DEFAULT, tools v4.6.0 src/tools/postgres.rs:202-224, duckdb.rs:360, rhai.rs:46)resource-model readCh. 21.2
A resource-model figure describes the release you are running.Each is labelled and dated: MEASURED figures describe the build they were taken on (the per-step ~4.5 s is from 2026-08 and predates dispatch fixes), and DEPLOYED ones one cluster on as_of. The server's tests check only that the file matches its generator.server v3.161.2 resource model orchestration_overhead.caveat; tests/dsl_artifacts.rs:46code readCh. 21
A worker slot is held until the external work a step started is done.A step that parks on an external callback (e.g. kind: container) frees its slot once it hands off; the resource model's own slot_rule omits this case.worker v6.15.0 src/executor/command.rs:1326-1333; resource model step_kinds (container)code readCh. 21.4
The chain store cannot serve reads yet.It serves on prod behind three default-off gates, armed 2026-09-30, re-armed 2026-10-06, still armed 2026-10-09 per the public record; the comparator that checks it (ai-meta#360) is the open part.server v3.161.2 src/db/queries/event_chain.rs:218-262; ai-meta wiki Sessions-Logcode read + dated recordCh. 13.7
EHDB's bus is replicated, so losing the writer's disk loses nothing.The command and event buses use the local-filesystem substrate only: sealed parts and tail are single-copy on one volume. Off-box replicas and tail replication exist for the server's store.worker v6.15.0 src/command_bus.rs:286; server v3.161.2 src/handlers/ehdb_embedded.rs:1015-1033code readCh. 13.6
Group commit trades durability for speed.The caller must sync before acknowledging any record in a batch, so a record is still durable before its writer confirms it; only the cost per record changes.ehdb v0.15.1 crates/ehdb-l0/src/part.rs:33-50code readCh. 13.2
A code comment says what a cluster runs.Worker v6.15.0 notes that EHDB fence enforce "was not armed" (history: a late election). Prod read on 2026-11-16 showed enforce armed on both buses, on writer worker 6.11.9.worker v6.15.0 src/worker.rs:133-147; ai-meta wiki Umbrella-EHDB-Primary-Serve (2026-11-16)dated recordCh. 13.5
NoETL exports distributed traces.No span leaves the process: there is no OpenTelemetry dependency at these releases. The trace is the event log, keyed by execution_id; a caller's W3C trace object is stored and inherited as data.server v3.161.2 Cargo.toml, src/handlers/execute.rs:50-56, 476-483code readCh. 30
An alert policy attached to a channel will reach someone.An unverified email channel accepts every setting and delivers nothing, and the API does not expose verification. Only a test page proves delivery (done 2026-08-19).noetl/ops 3f63656 ci/monitoring/README.mddated recordCh. 30
semantic-release reads only the merge subject.It analyses every commit since the last tag; a "Merge pull request" subject counts for nothing. perf: and reverts also release a patch.server semantic-release.yml run log, 2026-11-08; @semantic-release/commit-analyzer lib/default-release-rules.jsrun logCh. 28
Cargo.toml holds a crate's released version.On server, worker and tools it is a floor below the tag (2026-11-15: server 3.112.3 vs v3.163.1); builds stamp the tag's version in, and *_build_info reports it.server release.yml verify-version; ci/stamp-version.shcode readCh. 28
A production manifest says which image runs.The worker and system-pool manifests are shape-only, with no image: field; images are set by digest, and the committed files are known to omit live settings (ai-meta#267).noetl/ops 6c55cbe ci/manifests/noetl/worker-rust-deployment-prod.yaml:134-142code read + dated recordCh. 27.2
A pod that reports ready is ready to serve.A fresh system-pool pod reports ready in ~8 s, then no-ops every drive for ~7–10 min while it replays the feed; roll the system pools one at a time.ai-meta#504, #166 (2026-11-03)dated recordCh. 29
NoETL's secrets wallet audits every secret read.The noetl.secret_audit table and its read endpoint exist, but at server v3.161.2 nothing writes to it; sealed delivery, mTLS and residency also ship off, and the credential-route gate defaults to shadow.server v3.161.2 src/services/secret_audit.rs, src/auth_gate.rs:25-93code readCh. 31
A policy rule on a step makes that step optional.Policy rules are verified as applied only for sub-tasks of an ordered tool list; on a single tool the server renders the whole config before output exists. A real playbook relies on the single-tool form; whether it is applied there is unverified (book#95).tools v4.6.0 task_sequence.rs; server v3.161.2 orchestrate-core/src/commands.rs build_tool_commandcode read33.2
A server that receives x-noetl-schema-digest will tell you when your schema pin is stale.The code adds schema_drift, but on 2026-11-17 the public endpoint returned none for a mismatched header; compare digests on the client.server v3.161.2 / v3.165.1 src/handlers/dsl.rs validate_response; public endpoint, two probescode read + probe26.2
NoETL is the right tool for any computation, as long as it is written as a playbook.NoETL charges per step: ~217 ms p50 of orchestration per step on prod (2026-11-15), ~3 ms per local shell step and ~259 ms per local rhai step (CLI 6.4.1, 2026-11-19, n=10). CLI v6.4.3 (2026-11-29) takes noetl-tools 4.7.2; that release's notes say a rhai step stops costing ~250 ms. A re-measure on CLI ≥ 6.4.3 is pending, so the 6.4.1 numbers stay. A one-pass computation, a hot loop or a millisecond-latency call belongs in a program, often inside one step.ai-meta wiki Sessions-Log 2026-11-15; book measurement 2026-11-19; noetl/tools v4.7.2 and noetl/cli v6.4.3 release notesdated record + measurement11.2
NoETL tracks data lineage.It records execution lineage (playbook version, inputs, steps, results, parent runs). It does not record which datasets or columns a step read or wrote, and emits no lineage standard (none found in server, worker, tools, CLI or gateway on 2026-11-19).server v3.161.2 src/db/queries/event.rs; source searchcode read36.1
ehgraph serves NoETL's cluster topology on production.It is embedded with its topology writer switched on, but nothing in the server reads it, and on 2026-11-22 the write counter read 0 since the pod's start three days earlier: embedded, wired, idle.server v3.161.2 (no reads of graph.*); ai-meta wiki Sessions-Log 2026-11-22code read + dated record15.1
ehgraph passes 84% of the openCypher TCK.84.1% of in-model scenarios; 58.8% of all 3,896 (TCK 2024.3, 2026-11-10). 391 of the 434 failures create a node without a label, which ehgraph's one-label model does not allow.ehgraph f200516 docs/wiki/tck-results.json (recounted)recount15.3
ehgraph has no object-store backup, and it does not compact its log.At f200516 a gs:// prefix is Google Cloud Storage, and compaction is in the code, off by default. Roadmap.md and Architecture.md still describe a directory-only backup and an untrimmed log.ehgraph f200516 crates/ehgraph-backup/src/lib.rs:119, crates/ehgraph/src/config.rs:207; docs/wiki/Roadmap.md, docs/wiki/Architecture.mdcode read15.6
ehgraph can run as a read replica.role = replica and role = standby are refused at open. Stage 1 (a follower that tails graph_version) is not built.ehgraph f200516 crates/ehgraph/src/lib.rs:188, crates/ehgraph-api/src/dispatch.rs:1272-1278; docs/wiki/Roadmap.mdcode read15.7
RFC #586 means the instance graph is being written on production.The projection code exists and the writer can be switched on. On 2026-11-22 graph_written read 0 since the pod start of 2026-11-19.ai-meta docs/rfc/interstate-runtime-bus.md §0 and §5.1; ai-meta wiki Sessions-Log 2026-11-22dated record15.7

Not yet added: the edge-compilation myth (planned for Ch. 23), which needs its source verified first.

Check your understanding

Appendix G: Glossary

REAL

Each term links to the section that defines it. The glossary grows with the book: every chapter that introduces a term adds it here in the same pull request (#50). Chapters not written yet have not added their terms.

TermMeaningDefined in
active partThe EHDB file being appended to; its records are the unsealed tail until it seals13.2
arcOne outgoing transition in next, optionally guarded by when6.1
back-edgeAn arc to a step that has already run; forms a loop bounded only by its when6.4
bloom filterA per-part summary that can say a key is definitely absent (no false negatives) or maybe present13.3
blueprintWhat a playbook is: control flow and policy, with no resident state between invocations3.3
business catalogDomain data read by a playbook step from an external store. The noetl/catalog repository says it does not hold that data16.1
business dataDomain data in your own stores, touched only by playbook steps3.4
catalog datasetOne of c1–c4, the four EHDB logs noetl/catalog appends to, beside ehdb's d7_catalog16.3
catalog repositorynoetl/catalog at git 473b2d5: internal-object model and API over EHDB, workspace 0.1.0, no release tag, pinned to ehdb v0.4.516
chain storeEach execution's events linked by prev_event_id, read by following links13.7
change-log compactionFolding shipped, sealed ehgraph parts into a snapshot after a backup. Off by default. A compacted manifest is on-disk format 215.6
child executionThe separate execution a kind: playbook step starts, linked by parent_execution_id7.1
claimA worker taking a command: the bus hands it out, and the server's claim endpoint (command.claimed) makes it exclusive10.3
cmdbus-writerThe worker binary in host mode, run as a StatefulSet: it hosts the EHDB command bus (and usually the event bus)10.3
command busThe durable log of commands per pool and shard, with a claim coordinator; EHDB, not NATS10.3
contextA named CLI configuration (noetl context) that can pin a runtime and serverCh. 8
drive passOne run of the orchestrator: playbook + folded state in, next commands out; by default a __orchestrate__ command on the system pool10.2
EHDBNoETL's append-only storage engine; the command and event buses and the server's event-log tierCh. 13
ehgraphThe ecosystem's labeled-property graph database for topology. One primary per domain. It stores nothing in EHDBCh. 15
epoch fenceRefuses durable writes from a writer whose election epoch is stale (off, shadow, enforce)13.5
event bufferA local run's recorded events, $NOETL_LOCAL_DIR/<id>/events.feather; shipped with noetl push8.4
event logAn execution's append-only record of everything that happened; state is folded from it3.2
exclusive / inclusiveRouting modes: first matching arc vs every matching arc (default exclusive)6.1
expectAn ehgraph conditional commit: the write applies only while the named element versions, and the graph version if given, still hold15.4
gated kindA kind refused unless a server flag turns it on (agent, mcp)5.1
gatewayThe client-facing gatekeeper: authenticates, authorizes, proxies to the server and streams results back10.1
graph versionThe monotonic per-namespace head of an ehgraph change log. One committing batch is one version15.2
hopOne kind: playbook call; costs a whole child executionCh. 7
internal catalogNoETL's own objects (playbooks, …) behind /api/catalog/*3.4
keychain aliasThe name a playbook uses for a credential; resolved by the worker at run time4.4
labelA sub-task's name in a tool list; later items read its result as {{ <label>.field }}5.2
labeled property graphehgraph's model: nodes and directed edges, each with one type and a property map, plus the history of changes15.2
local runtimeThe CLI's in-process interpreter (noetl run -r local); a separate implementation from the serverCh. 8
manifestThe versioned list of an EHDB store's sealed parts and its retention point13.2
node labelIn ehgraph, a node's single type. A different term from a playbook tool-list label15.2
orchestration passThe server's evaluation of arcs, triggered by a completion eventCh. 6
orchestratororchestrate-core's engine: playbook + events in, next commands out; runs as WASM on a worker by default3.1
playbookA YAML document (kind: Playbook, apiVersion: noetl.io/v2) describing a workflow of stepsCh. 4
policy rulesspec.policy.rules on a tool-list sub-task: continue, retry, jump, break, fail6.5
poolA set of workers claiming one subject family, commands.<pool>.>; chosen per execution (shared, system, subscription)10.3
prune floorThe lowest sequence retention must keep, set by the oldest execution not safe to prune13.3
read modelA picture projected from a record kept elsewhere. The designs call ehgraph never authoritative15.7
read replicaAn ehgraph follower that would tail the change log and serve reads. Stage 1, and refused at open today15.7
resource modelnoetl.ai/dsl/resource-model.json: NoETL's labelled, dated figures for time, slots, limits and fuelCh. 21
resource-model labelMEASURED, DEPLOYED, DEFAULT, GUIDANCE, TARGET or NOT_YET_MEASURED: what kind of number a figure is21.1
result storeWhere a step result above 100 KiB is spilled; the event then carries a reference5.3
reverse indexA second row kind inside a catalog dataset, keyed by a U+0001 sentinel, so a reverse query adds no dataset16.3
sealClosing the active part into an immutable part (8 MiB, 1024 records, or an optional age)13.2
session graphAn ehgraph scope loaded once into memory and pinned at a graph version until refresh, close, or expiry15.2
set:Server-side step mutations, persisted as a ctx.updated event4.2
slotA worker's unit of concurrency; a command holds one from claim until its tool returnsCh. 5
soft deactivationWhat ehgraph DELETE and graph.deactivate do: the element stays, inactive, with its history and versions15.2
spoolStore-and-forward buffer (local_disk in the daemon) that keeps messages while the downstream is down9.2
startThe step every server execution begins with; the validator requires it4.3
stepOne named entry of workflow: runs one tool, then routes with next4.3
step runOne execution of a step; a step re-run by a back-edge counts once per run when estimating21.5
step.skippedThe event recorded for a target not taken, or a step whose guard was false6.2
subscriptionA kind: Subscription document: a message source plus the playbook to run per message9.1
task_sequenceThe single command a tool: list becomes; runs its sub-tasks in order on one worker5.2
templateA {{ … }} expression in a string; minijinja on the server, token substitution locally4.2
tool / kindWhat a step runs; kind names the tool (http, python, …)Ch. 5
unsealed tailRecords in the active part, on the local disk only until it seals13.6
workbookNamed, reusable tool definitions a step references with kind: workbook4.5
workloadA playbook's inputs, read as {{ workload.<key> }}, overridable per run4.2

Check your understanding

Appendix H: Contributing to This Book

REAL

This appendix is for people and AI agents who want to write part of this book. It describes how the book is made as of 2026-11-13: the tools named here are installed in CI and run on every pull request.

The full workflow, including the copy-paste brief for an AI agent, is in CONTRIBUTING.md. The house rules for prose, callouts and quizzes are on the wiki Style Guide. This page summarises both and shows what each building block looks like.

H.1 How a page gets written

The book is spec-driven. Three files decide what gets written:

FileDecides
specs/001-noetl-book/spec.mdEvery chapter's acceptance criteria, plus the book-wide checklist (CH-ALL)
.specify/memory/constitution.mdThe non-negotiable rules: honest badges, verify before REAL, one issue per PR, checks are gates
docs/ROADMAP.mdThe order chapters are written in, and each chapter's badge

Every chapter has one GitHub issue. Contributors claim it, work on one branch, and open one PR that says Closes #N. The issue records status (Todo → In progress → In review → Done), and the wiki Assignments page mirrors it.

The rule that matters most: a claim is REAL only after someone has checked it against the code at a named release, and the PR says where. Memory, older docs and other chapters do not count as checking.

H.2 Status callouts

Pages carry one badge (see How to Read This Book). Inside a page, three callouts mark claims whose status differs from the page's, or that correct a common belief. They render like this:

Myth

"The local runtime runs loop: steps once per item." It does not. At CLI v6.4.1 it parses loop: and runs the step once, and the run still ends ok. The example examples/ch08/loop-runs-once checks this in CI.

Not built yet (TARGET)

A TARGET subject: designed in an RFC, not built. The callout names the RFC and says what exists today instead.

Partial

Merged and released, but off by default or proven only on a test cluster. The callout names the flag and its default.

Every myth also gets a row in Appendix F.

H.3 Examples

Every playbook the book shows is a file under examples/, one directory per example:

examples/<chapter>/<name>/
  playbook.yaml        the example
  RUNTIME              local | daemon | distributed
  expected.json        the expected run outcome          ┐
  expected.txt         or the expected final result      ├ one of these
  expected-error.txt   or the error the run must fail on ┘

CI runs each local example with the pinned NoETL CLI (noetl run <playbook> -r local --json) and diffs the result against the expected file. daemon and distributed examples are listed and skipped. A chapter includes its example from the file, so the page and the tested playbook cannot drift apart. The pinned version is in Appendix E.

H.4 Quizzes

Each section ends with a short quiz, written as a TOML file in quizzes/ and embedded with a #quiz directive that names the file (the exact syntax is on the Style Guide; writing it here would embed a quiz). Three rules matter:

  1. Distractors are real misconceptions: things older docs said, things an agent asserted confidently, or things a reader would carry over from another orchestrator. A wrong answer should teach.
  2. Every question explains itself in its context field, citing the source when the answer is a fact about the code.
  3. No telemetry. Answers stay in the reader's browser.

A malformed quiz (bad TOML, or a question without an answer) fails the build.

H.5 Traces

Not built yet (TARGET)

The trace visualizer (mdbook-noetl-trace, issue #7) is planned for phase P3 and does not exist yet. Until it does, pages show state changes as a table of events and the state after each one.

H.6 The checks

A PR can merge only when all of these pass, in CI and locally:

CheckCommandFails on
Buildmdbook builda missing chapter file, a bad quiz, a preprocessor error
Links(part of mdbook build)any broken internal link; external links are checked weekly
Examplestools/run-examples.shan example whose output differs from its expected file

Each check was shown to fail on a deliberately broken input before it was trusted to pass. The README lists the pinned tool versions and how to install them.

Quiz