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 subscribeandnoetl 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
| Part | You will learn |
|---|---|
| I Getting Started | install the CLI, run a playbook, build a small real pipeline |
| II The Model | what NoETL is; every key of a playbook; tools; control flow; sub-playbooks |
| III The Three Runtimes | local, daemon and distributed, and how to choose |
| IV EHDB | the storage engine under the event log and the command bus |
| V Distribution | the distributed catalog and cross-instance execution |
| VI Interop & Concurrency | MCP and agents; the planned coroutine model |
| VII Resources & Performance | what a playbook costs, where the time goes, WASM at the edge |
| VIII Applied | larger systems built on NoETL |
| IX Operations | deploying, 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:
| Badge | Meaning |
|---|---|
| REAL | Shipped and released. Shipped flags are on by default or enabled in a documented deployment. You can run the examples. |
| PARTIAL | Some 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. |
| TARGET | Designed, usually in an RFC, but not built. These pages describe intent and are rewritten when the code lands. |
| STUB | The 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):
| Label | Meaning |
|---|---|
| MEASURED | observed on a cluster or harness; read environment/date/source before reusing it |
| DEPLOYED | read off the production cluster on as_of; configuration, not code |
| DEFAULT | a code default (env var + value); a deployment may override it |
| GUIDANCE | a planning rule derived from the figures; not a measurement |
| TARGET | a goal or budget; not a measurement |
| NOT_YET_MEASURED | a 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.
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.
- 1.1 Installation: three ways to install the CLI, and which version each one gives you today.
- 1.2 Hello, Playbook: the smallest valid playbook, and one with an input.
- 1.3 Running It Locally:
noetl run, reading its output, and the local event trail.
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:
| Channel | Command | Version installed | Example ran |
|---|---|---|---|
| APT (Ubuntu 24.04) | see below | 6.4.0 (package 6.4.0-1) | yes |
| PyPI | pip install noetl | 5.3.2 | yes |
| Homebrew (macOS) | brew tap noetl/tap, brew trust noetl/tap, brew install noetl | 6.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.
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/v2andkind: Playbooksay what the document is. They are the only accepted values.metadata.namenames it.workflowis the list of steps. Each step has a name (step) and atool. Here the tool isrhai, 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 atstart, 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
workloadholds the playbook's inputs, with defaults. A template reads them:{{ workload.who }}.nextsends control fromstarttodonewhenstartfinishes.- The first step runs a shell command. Locally the commands go
under
cmds:. On a cluster the shell tool's field iscommand: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):
- the
-r/--runtimeflag:local,distributedorauto; - otherwise, the active context's runtime, if it sets one
(
noetl context); - 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.)
| Field | Meaning |
|---|---|
status | ok if the run finished |
executed_steps | the steps that ran, in the order they first ran |
step_results | each step's result, as text |
final_result | the 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).
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:
- fetch two JSON documents over HTTP;
- store each response in a DuckDB table;
- loop back to fetch the next one, and stop after two;
- transform the table into a summary and write it to a CSV file;
- 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 optionalwhenguard; - an event is a record of something that happened, and the sequence of events is the execution's history.
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
| Choice | Why |
|---|---|
| Data from a pinned commit | Deterministic input, so the result can be checked automatically |
CREATE OR REPLACE in start | Re-running the playbook does not fail or duplicate rows |
| Parameters, not string pasting | HTTP 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 exactly | The != guard is safe only because the counter steps by 1 from 0 |
| Transform in SQL inside one step | One 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) topickand change the guard. Re-check the termination argument. - Add a column to the report: the number of
tool_kindsin 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:
- 3.1 Declarative orchestration: you say what should happen, and the engine decides when.
- 3.2 Event sourcing: the log is the truth.
- 3.3 Ephemeral blueprints and stateless workers: nothing stays resident between invocations.
- 3.4 Two catalogs: NoETL's own objects versus your business data.
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
whenguards (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
workflowdoes 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).
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:
| Event | Records |
|---|---|
playbook.started | the execution began |
step.enter | a step was entered (dispatched) |
command.issued | a command for a step was put on the command bus |
command.claimed, command.started | a worker took it and began |
call.done | the tool call returned |
command.completed, command.failed | the command's outcome, with its result or error |
step.exit, step.skipped | a step finished, or was not taken (6.2) |
ctx.updated | set: values were persisted |
playbook.completed, playbook.failed | the 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:
- claim one command from the command bus;
- run that command's tool, the step's single tool or a whole tool list (5.2);
- emit the outcome as events;
- 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 catalog | Business data | |
|---|---|---|
| What | NoETL's own objects: playbooks, and other catalog kinds such as subscriptions | Your domain data: customers, orders, bookings, documents |
| Who reads it | the NoETL server, through /api/catalog/* | playbook steps only, through tools such as postgres, http, mcp |
| Where it lives | the 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 tablenoetl.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=shadowalso 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_SOURCEcan bepostgres(the default),verify(compare both, serve Postgres) ortier(serve EHDB). The code calls the cutover "a flag flip, and … an owner decision" (src/handlers/catalog_read.rs).
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.
| Key | Required | What it holds | Section |
|---|---|---|---|
apiVersion | yes | The grammar version. Must be noetl.io/v2. | 4.1 |
kind | yes | The document type. Must be Playbook. | 4.1 |
metadata | yes | name (required), path, description, labels, and opt-in extensions | 4.1 |
workload | Inputs: values the steps read as {{ workload.<key> }} | 4.2 | |
vars | Top-level variables | 4.2 | |
workflow | yes | The list of steps | 4.3 |
keychain | How credential aliases are sourced | 4.4 | |
workbook | Named, reusable tool definitions | 4.5 |
"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.
-
The schema (
playbook.schema.json) checks shape: required keys, value types, and whichtool.kindvalues exist. It is deliberately permissive in one way: unknown keys are not rejected. A misspelt optional key, such asworklaod:, is silently ignored rather than reported. -
The validator in the server checks meaning. At v3.161.2,
validate_playbook(src/playbook/parser.rs:164) requires:apiVersionis exactlynoetl.io/v2, andkindis exactlyPlaybook;- a step named
startexists; - step names are unique;
- every
nexttarget names a step that exists; whenandloop.inexpressions are non-empty, and contain no stray{outside a{{ … }}(this is the whole check; the expression itself is not parsed until it runs);- a
loophas a non-emptyiterator, plusin:(or, formode: cursor, acursorblock); - 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 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
| Key | Required | Meaning |
|---|---|---|
name | yes | The playbook's name. Appears in every run result as playbook_name. |
path | Its address in the catalog, such as book/ch04/anatomy. Other playbooks call it by this path. | |
description | Free text. | |
labels | A 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:
| Key | What it does | Server flag (default off) | Chapter |
|---|---|---|---|
metadata.expose.mcp | Publishes the playbook as one MCP tool at POST /api/mcp | NOETL_MCP_SERVER | 18 |
metadata.expose.agent | Publishes it as an agent with a card at /api/agents/* | NOETL_AGENT_ENDPOINT | 18 |
metadata.catalog.hot_reload | Lets named sub-playbooks resolve @latest inside a pinned run | NOETL_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.
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:
| Name | What 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, _total | inside a loop body (6.3) |
keychain.<alias>.<field> | a credential, rendered only on the worker (4.4) |
execution_id, path, version | the 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,trimanddefault. - 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:
| Mechanism | Server (v3.161.2) | Local (CLI v6.4.1) |
|---|---|---|
top-level vars: | parsed; nothing reads it | not loaded |
step vars: (extract from the result) | parsed; nothing reads it | works: 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.
"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).
| Key | Required | What it is | Covered in |
|---|---|---|---|
step | yes | The step's name. It must be unique within the playbook; next targets refer to it. | here |
tool | yes (server) | What the step runs: one tool, or an ordered list of tools | Chapter 5 |
desc | A description | here | |
next | Where control goes after the step: one name, a list, or a router of arcs with when guards | 6.1 | |
when | An enable guard: an expression checked before the step runs | 6.2 | |
loop | Run the step once per item of a collection | 6.3 | |
spec | Step behaviour: next_mode, timeout, on_error | 6.5 | |
args | Input arguments for the step | 5.3 | |
vars | Values to extract from the step's result into variables | 5.3 | |
set | Variable mutations applied when the step completes | 5.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
nextmust 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.
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>. toolis 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.
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,vaultork8s;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.
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:
- It looks up the entry whose
namematches the step'stool.name. A step withoutnameis an error (tool.kind=workbook requires a 'name' field), and so is an unknown name. That error lists the names that do exist. - It replaces the step's tool with the entry's tool, so the step
above runs
kind: http. - It merges the step's
argsover the entry'sargs, key by key, and the step's value wins.input:is accepted as another name forargs. If either side is not a map, the step'sargsreplace 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.
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:
- 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; workersrc/worker.rs.) - 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). - 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 kind | Server flag | Also needs |
|---|---|---|
agent | NOETL_TOOL_KIND_AGENT | a worker started with NOETL_WORKER_AGENT_TOOL=true |
mcp | NOETL_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:
| Group | Kinds |
|---|---|
| Run code | python, shell, rhai, wasm, noop |
| Query and move data | postgres, duckdb, ducklake, snowflake, snowflake_transfer, transfer, gcs, artifact |
| Call out | http, gateway |
| Run on Kubernetes | script (a Job the worker polls), container (a Job that calls back) |
| Compose | playbook, playbooks, iterator, workbook, task_sequence |
| Messaging and secrets | nats, 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:
| Kind | Runs as | Holds the slot | Default timeout |
|---|---|---|---|
python | a subprocess on the worker | for the whole run | none unless the step sets one |
shell | a subprocess | for the whole run | none unless set |
http | in-process (reqwest) | for the whole request | 30 s |
postgres | in-process, one pool per connection string | for the whole query | none |
duckdb | in-process | for the whole query | none; a large query uses the worker pod's memory |
rhai | in-process | for the whole script | none, and no operation limits |
playbook | a separate child execution (Chapter 7) | only for the start request, unless the parent waits for the result | 30 s for the start request |
container | a Kubernetes Job | no: the slot is freed once the Job is created | none by default |
noop | in-process | briefly, but it still pays the per-step orchestration cost | — |
python is a worker kind, not a retired one
"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) | |
|---|---|---|
| Field | command: (one string) | cmds: (a string or a list) |
| Written with the other runtime's field | cmds: alone fails: command is a required field of ShellConfig | command: 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 tokind:(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.
"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:(orinput:), rendered against everything so far, before the sub-task runs;set:, rendered after it runs, with its result available asoutput, 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.
| Setting | Default | Label |
|---|---|---|
NOETL_TASK_SEQUENCE_MAX_ITERATIONS (worker env) | 1,000,000 sub-task executions per step | DEFAULT (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
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:
| Write | To 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.
| What | Limit | Setting | Above the limit |
|---|---|---|---|
| A step result in an event | 100 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 context | 512 KiB (524,288 bytes) | NOETL_COMMAND_CONTEXT_MAX_BYTES (server) | offloaded as a __context_ref__ |
A request body to /api/execute or /api/events | 2 MiB (2,097,152 bytes) | none: the HTTP framework's default | the 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:
- The execution starts by dispatching the step named
start. - When a step finishes, the worker reports it with a completion event. That event triggers an orchestration pass.
- In each pass the orchestrator evaluates the
nextarcs of the completed steps, applies theirwhenguards, and dispatches the targets that are taken. A target that is not taken is recorded with astep.skippedevent. - 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.
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
- 6.1
next: the four forms and the two modes - 6.2
when: guards on arcs and on steps - 6.3
loop: one step, many items - 6.4 Back-edges: loops made of arcs
- 6.5 Errors, timeouts, retries: what is applied and what is only parsed
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):
| # | Form | Example | Taken on the server |
|---|---|---|---|
| 1 | one step name | next: report | always |
| 2 | a list of names | next: [a, b] | all of them, in parallel |
| 3 | a list of targets {step, when?, args?} | next: [{step: a, when: …}, {step: b}] | by mode, exclusive by default |
| 4 | a router {spec: {mode}, arcs: [{step, when?, set?}]} | see below | by 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, whosewhenis true or absent. Later targets are not evaluated at all; they are recorded as skipped.inclusive: take every target whosewhenis 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.
"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 samectx./iter./step.prefix-stripping as step-levelset:(4.2). It affects the context of the step it dispatches. Unlike a step's ownset:, it is not written to the event log as actx.updatedevent.
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, soexecuted_stepsis["start","a"];examples/ch06/next-router-inclusive: an inclusive router runs both, soexecuted_stepsis["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=""ch06-01"" data-quiz-questions="{"questions":[{"context":"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","id":"120d7a7d-513e-4c63-8989-9105531e3686","type":"MultipleChoice","answer":{"answer":"Only `a`."},"prompt":{"distractors":["`a` and `b`, in parallel.","`a`, then `b`.","Neither: targets need `when`."],"prompt":"On a server, which steps run after `next: [{step: a}, {step: b}]`?"}},{"context":"`NextMode` defaults to Exclusive, and any string other than `inclusive`\n(including a typo) parses as exclusive (orchestrate-core `evaluator.rs`).\n","id":"352b820e-b4bd-4d60-ac18-948a02cf9026","type":"MultipleChoice","answer":{"answer":"exclusive, unless the step's `spec.next_mode` says otherwise"},"prompt":{"distractors":["inclusive","parallel","It is a validation error."],"prompt":"A router omits `spec.mode`. Which mode applies?"}},{"context":"Locally only target lists and routers are implemented. CI asserts this\n(`examples/ch06/next-names-ignored-local`).\n","id":"2d031a66-6c9d-442e-8e8d-8c0c2befe8ef","type":"MultipleChoice","answer":{"answer":"Nothing: the bare-name forms are ignored locally and the run ends `ok`."},"prompt":{"distractors":["`a` and `b`.","`a` only.","The run fails to parse."],"prompt":"On the local runtime (CLI v6.4.1), a step has `next: [a, b]`. What runs after it?"}}]}" 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.
| Where | Evaluated | If false |
|---|---|---|
on an arc (next target or router arc) | when the step it leaves has completed, in the next orchestration pass | that arc is not taken |
on a step (step.when) | when the step is about to be dispatched by an arc | the 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):
- records a
step.skippedevent for the step; - follows the skipped step's own
next, taking only the first matching arc, and checks the guard of that step in turn; - 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.
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 ofbwhenais true, as Python'sanddoes, 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"
}
}
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"
}
}
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:
loop:on a step runs that step once per item of a collection (this section).- 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
| Key | Meaning |
|---|---|
loop.in | A template that evaluates to a list. Required for sequential and parallel. |
loop.iterator | The name each item gets. Must not be empty. |
loop.spec.mode | sequential (the default), parallel, or cursor |
loop.spec.max_in_flight | Parsed, 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:
sequentialdispatches 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.paralleldispatches 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.
"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=""ch06-03"" data-quiz-questions="{"questions":[{"context":"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","id":"623e6c5d-c981-49c2-8942-de68d1737040","type":"MultipleChoice","answer":{"answer":"400"},"prompt":{"distractors":["10","1","As many as there are free slots."],"prompt":"A parallel loop over 400 items sets `max_in_flight: 10`. How many iteration\ncommands does the server dispatch in the first pass?\n"}},{"context":"Results are appended in arrival order, which \"may not match dispatch index in\nparallel mode\" (`state.rs`). Return an index or key from each iteration if\norder matters.\n","id":"9e6dbfb4-10c1-49e1-9ebb-eda84344db2a","type":"MultipleChoice","answer":{"answer":"The order the iterations completed."},"prompt":{"distractors":["The order of the `in:` collection.","Sorted by item value.","Random, reshuffled on each read."],"prompt":"In what order are a parallel loop's results in its aggregated list?"}},{"context":"The server binds the item both under `iter.` and at the top level, with\n`_index` and `_total`. There is no `loop.*` namespace.\n","id":"1c466bf2-1891-480f-8fd1-e0928364a79a","type":"MultipleChoice","answer":{"answer":"`{{ iter.city }}` (or plain `{{ city }}`)"},"prompt":{"distractors":["`{{ loop.item }}`","`{{ loop.city }}`","`{{ item }}`"],"prompt":"How does a loop body refer to the current item when `iterator: city`?"}}]}" 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):
targethas already finished;targetcan reachsrcthrough the workflow, so there is a cycle;srcfinished aftertarget, 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
"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.
| Key | In the grammar | Applied? |
|---|---|---|
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 names | no: 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 list | yes | yes: inside task_sequence only |
a tool's own timeout_seconds | per kind | yes, for the kinds that read it |
"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 }
doiscontinue,retry,jump(withto: <label>),breakorfail. An unknown or missingdomeanscontinue.retrydefaults to 3attempts,backoff: noneand adelayof 1.0 s.backoffmay also belinearorexponential.- A rule's
whenseesoutput(status,data,error) and the attempt number_attempt. - When no rule matches, an error means
failand success meanscontinue.
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:
| Kind | Default timeout |
|---|---|
http | 30 s; per-request timeout_seconds overrides it |
mcp | 60 s (NOETL_MCP_REQUEST_TIMEOUT_SECONDS) |
script | 600 s, also the Job's deadline |
agent | 300 s per model request |
python, shell | none unless the step sets timeout_seconds |
postgres, duckdb, rhai, transfer | none |
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
nextarcs: 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>.
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:
| Field | Meaning |
|---|---|
path | the child's catalog path (and optionally version, digest) |
args | the child's inputs, sent as the payload of its execute request (payload: is accepted too) |
return_result | true: wait for the child and use its result as this step's result |
result_step | with return_result: which child step's result to return. Unset: the latest call.done result |
return_step | legacy: wait, and return the child's status payload instead of its data |
timeout | seconds: the start request (default 30), and also the wait (default 180 with return_result, 300 with return_step) |
poll_interval | seconds 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 returns | as soon as the child starts, with {status, execution_id} | when the child finishes, with its result |
| The parent's slot is held | only for the start request | for 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.
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:
| Figure | What | When | Source |
|---|---|---|---|
| ~9 s | orchestration cost of one hop, regardless of the work inside it | 2026-08-24 | noetl/travel wiki, itinerary planner (#286) |
| ~10–15 s per hop | the 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 inline | 2026-08 | noetl/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 steps | 2026-06-29 | noetl/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.
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):
-r/--runtime, if it islocalordistributed. The valueauto, which is also the default, means "not set".- Otherwise, the active context's
runtime, unless that isautoor unset. Contexts are managed withnoetl context. - 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,shellandplaybooksteps 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
- 8.1 One process, one interpreter
- 8.2 Local tool kinds and their limits
- 8.3 Iterating without
loop: - 8.4 The local event buffer and
noetl push
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 atstart, 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.
| Area | Server (v3.161.2) | Local (CLI v6.4.1) | Shown in |
|---|---|---|---|
| First step | start | first in the list | examples/ch04/step-order |
| Templates | minijinja; undefined → empty | exact {{ name }} tokens, 4 filters; unknown left in place | examples/ch04/templating |
| Passing values | step set: | step vars: | examples/ch04/variables-local |
| A step's result | {{ step.field }} | {{ step.result }} (text) | 5.3 |
next: name, next: [a, b] | taken | ignored | examples/ch06/next-names-ignored-local |
False step when | skip, follow its next | skip, branch ends | examples/ch06/when-skip-local |
| Undefined name in a guard | false | true | examples/ch06/when-undefined-local |
| Conditions | full Jinja | ==, !=, in, truthy | 6.2 |
loop: | iterates | runs once | examples/ch08/loop-runs-once |
Tool list (task_sequence) | one command | parse error | examples/ch05/pipeline-refused-local |
shell field | command: | cmds: (command: ignored) | examples/ch05/shell-command-local |
case: blocks | refused | still run | 4.3 |
| Event trail | every pass | each step once | Ch. 2 |
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
"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
| Kind | Locally |
|---|---|
rhai | Runs 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. |
shell | Runs cmds: (a string or a list). command: is ignored, and the step then runs nothing (5.1). |
http | method, url, headers, params, body. The result is {status, body}. credential: <alias> reads the local credential store (noetl credential set). |
duckdb | db: (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. |
playbook | Runs 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. |
mcp | Calls 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. |
agent | Runs a model call loop. Credentials come from the local store. |
sink | Writes 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, provider | Local-only. auth obtains a provider access token (provider, scopes); provider runs cloud-provider operations through the same tool a worker would use. |
noop | Does 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
"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
| Need | Use |
|---|---|
| A per-item side effect (an HTTP call per item) | a back-edge |
| Transform or aggregate a collection | set-based SQL |
| A small in-memory computation | Rhai |
| The same playbook must also run on a server | write 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 holdsevents.feather(Apache Arrow Feather V2) andmetadata.json(status, event count, start and end times). - The events are
playbook.started, onestep.exitper step, andplaybook.completedorplaybook.failed. A step that ran several times appears once (Chapter 2). noetl buffer catprints the events as JSON lines.noetl buffer appendlets ashellstep 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.
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 servepublishes 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).
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
- 9.1 Subscriptions: the spec, the sources, one run per message
- 9.2 Spooling and the event trail
- 9.3 Dispatching to a server, and
noetl serve
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 |
|---|---|
nats | a NATS JetStream pull consumer (url, stream, consumer, credentials) |
pubsub | a Google Pub/Sub subscription |
kafka | a Kafka topic |
timer | a 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
everyafter 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
payloadplustick(counting from 1),scheduled_atandfired_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 withexpose.mcp; - agents:
/api/agents/*, for playbooks withexpose.agent, with callbacks to origins allowed by--callback-origin.
Defaults and limits (CLI v6.4.1 noetl serve --help):
| Option | Default |
|---|---|
--listen | 127.0.0.1:8765. Any non-loopback address needs --token-file |
--max-concurrent | 4 playbooks at once; more are refused with 503 |
--task-db | none: 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
| Part | Runs | Owns | Never does |
|---|---|---|---|
| Gateway | noetl-gateway | sessions, request ids, the client's SSE stream | run tools or touch your data |
| Server | noetl-server | the event log, the catalog, command records, the first commands | run tools (it has no tool runtime) |
| Command bus | the worker binary in host mode (cmdbus-writer) | the durable command log and who claimed what | decide what runs |
| Workers | noetl-worker, one Deployment per pool | nothing between commands | read or write noetl.* directly; they call the server's API |
Sections
- 10.1 Gateway: the gatekeeper, and the state it does keep.
- 10.2 Server: what happens on
POST /api/execute, and where the drive runs. - 10.3 The command bus and worker pools: subjects, claims, pools, and what happens when a worker dies.
- 10.4 Slots, pools and KEDA: capacity and autoscaling, with the deployed numbers.
- 10.5 Following one execution: the event log of one run, step by step.
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
| Route | What it is | Auth |
|---|---|---|
/api/auth/* (login, validate, check-access, logout, providers) | sign-in and session checks | public |
/noetl/{*path} (GET, POST, PUT, DELETE, PATCH) | the proxy: forwarded to the server's /api/{path} | session |
/graphql | a GraphQL front for the same calls | session |
/noetl/mcp/*, /noetl/agents/* | MCP and agent proxies (Chapter 18) | session |
GET /events | the client's live result stream (SSE) | session |
/ingress/{listener} | push ingress for webhooks; refused unless NOETL_INTERNAL_API_TOKEN is set | token |
(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:
- checks that the session may use that route and owns the execution it
names (
src/proxy.rs:214-257); - rewrites
uid/user_uidin the body to the verified session's user, so a client cannot act as someone else (src/proxy.rs:286-311); - forwards the body,
Content-Type,Acceptandx-*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
"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
"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).
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:
- resolves the playbook from the catalog and parses it, and merges the request's workload into the playbook's;
- writes the first event,
playbook_started(execute.rs:948-1018); - builds the first commands itself, in process, with
orchestrate-core's
CommandBuilder(generate_initial_commands,execute.rs:1667-1876); - for each command, writes a
command.issuedevent and anoetl.commandrow, 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:
| In | Out |
|---|---|
the playbook, and the WorkflowState folded from the execution's events | the 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
"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.
- 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:
| # | Event | Written by | Where |
|---|---|---|---|
| 1 | playbook_started | server | execute.rs:1006 |
| 2 | command.issued (step start) | server | execute.rs:1286 |
| 3 | command.claimed | server, in the claim handler | events.rs:1177 |
| 4 | command.started | worker | worker src/executor/command.rs:547 |
| 5 | call.done | worker | command.rs:1099 |
| 6 | command.completed | worker | command.rs:3679-3689 |
| 7 | playbook.completed | server, applying the drive's result | events.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
"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):
- the request's pool override (
execution_pool, or thex-noetl-poolheader), if given; - otherwise from the playbook's catalog path:
system/…→system,subscription/…→subscription; - otherwise
shared.
"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
- 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, workersrc/command_bus.rs:191). - 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, serversrc/handlers/events.rs:929-1134). This writescommand.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
"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:
| Sweep | Flag (default) | What it does |
|---|---|---|
| orphan sweep | NOETL_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 sweep | NOETL_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.doneand 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
| Pool | Replicas | Slots each | Capacity | CPU / memory (request / limit) | Label |
|---|---|---|---|---|---|
worker-rust-pool, the user pool (shared) | 2, KEDA 2-20 | 4 | 8 at min, 80 at max | 250m / 2; 256Mi / 768Mi | DEPLOYED |
worker-system-pool (two Deployments) | 1 + 1, fixed | 2 | 4 | 750m / 2; 3Gi / 3Gi | DEPLOYED |
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
"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):
| Setting | Value |
|---|---|
| target | noetl-worker-rust (the user pool) |
| trigger | metrics-api: ehdb_feed_subject_lag{subject="commands.shared.shard.0"} from the command-bus writer |
| target value | 2 |
| min / max replicas | 2 / 20 |
| polling interval / cooldown | 10 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).
"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
| What | Value | Label |
|---|---|---|
| user pool under 200 real executions (200/200 completed) | replicas 2 → 4 → 8 → 16 → 20 → 2 | MEASURED, prod, 2026-07-31 |
| a new GKE Autopilot node when a scale-up needs one | ~60-90 s | MEASURED, prod |
command.issued → command.claimed, pool not saturated | p50 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 slots | p50 2123 / p99 3735 ms | MEASURED, prod, 2026-07-30 |
| time for the user pool to ramp under load on the EHDB trigger | no number | NOT_YET_MEASURED |
| sustained executions per second | no number | NOT_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 where | in the CLI process | in a long-running CLI process | on a NoETL server's worker pools |
| Started by | you, once | each message, timer tick or HTTP call | POST /api/execute, the gateway, another playbook |
| Tool kinds | 11 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 lists | parse error (5.2) | parse error | one task_sequence command (5.2) |
| Passing values | step vars: | step vars: | step set: (4.2) |
| Concurrency | none: 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) |
| Durability | none. 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) |
| Credentials | the local store, noetl credential (4.4) | a --credential file for the source; the local store for steps | the keychain, resolved on the worker (4.4) |
| Fixed cost per step | small: in-process, no bus | the same as local per run | ~4.5 s per step on prod in 2026-08 (MEASURED, resource model); hops ~9–15 s (7.2) |
| Needs | the CLI | the CLI (and a message source, unless timer) | a server, a bus and worker pools (Chapter 10) |
| Refuses or ignores | non-local kinds (refused); loop:, bare-name next, set: (ignored) (8.1) | the same as local | case: blocks; gated kinds and features unless their flags are on (4.1) |
"~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
- Does it need
python,postgresor another cluster-only kind, or realloop:fan-out? Then distributed, or the daemon with--dispatch server. - Is it triggered by messages, a schedule or HTTP calls, on one machine? The daemon.
- Is it a one-off, a CI check or a fast edit-and-run loop, using local kinds? Local.
- 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.
| Where | Cost | Label and source |
|---|---|---|
| Local runtime: starting the CLI | ~166 ms per run | MEASURED 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 ms | same run: (p50 of a 21-step chain − p50 of a 1-step run) ÷ 20 |
Local runtime: a trivial rhai step | ~259 ms | same run and method |
| Distributed, kind, idle | 32–36 ms p50 of orchestration per step | MEASURED, kind benchmark harness, 2026-11-14, server 3.161.2 / worker 6.15.0, two reps (ai-meta wiki Sessions-Log) |
| Distributed, production | 217 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.
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):
| Shape | p50 |
|---|---|
A Python 3.12 script: for i in range(1000000): s += i | 93 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.
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: mcpto 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
| Store | Runs in | Holds |
|---|---|---|
| command bus | the cmdbus-writer (worker binary, host mode) | every command, per pool and shard (10.3) |
| event bus | the same process, its own engine | every noetl.event on its way to the materializers and the gateway |
| embedded event-log tier | the server | the server's own EHDB store, with retention and archive |
| chain store | the server | each execution's events linked by prev_event_id (13.7) |
Sections
- 13.1 Why NATS was replaced
- 13.2 The append log: parts, sealing, the manifest
- 13.3 Bloom filters and the prune floor
- 13.4 Two buses
- 13.5 Writer election and fencing
- 13.6 Durability PARTIAL
- 13.7 The chain store PARTIAL
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.
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
| Date | What happened | Record |
|---|---|---|
| 2026-07-15 | The decision: "EHDB takes over from NATS" | ai-meta docs/rfc/ehdb-nats-takeover-plan.md |
| 2026-07-26, 07-27 | Two 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-27 | The 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-01 | NATS 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).
The transport analysis written the same day,
docs/rfc/nats-vs-ehdb-transport-boundary.md (2026-07-15),
recommended partial replacement: keep NATS as the command bus, and
warned about push latency, redelivery and the autoscaler's lag signal.
The takeover plan decided to replace it anyway. The concerns it raised
are the ones the rest of this chapter covers: 13.2
for latency, 10.3
for redelivery, and 10.4 for the lag signal.
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):
| Trigger | Default |
|---|---|
| size | 8 MiB (DEFAULT_SEAL_MAX_BYTES, src/engine.rs:67) |
| record count | 1024 (DEFAULT_SEAL_MAX_RECORDS, engine.rs:65) |
| age | off 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:
| Posture | What it does | Used for |
|---|---|---|
EveryAppend | fsync after every append; durable before the append returns | the default for the source-of-truth event log |
| group commit | appends do not fsync alone; the caller syncs a batch, and must do so before acknowledging any record in it | the bus writers: N records that arrive together share one fsync (ai-meta#205) |
Buffered | fsync every N records | derived 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:
| Fix | Switch | Default | On prod |
|---|---|---|---|
| floor-exact: confirm the floor holder with an exact read before trusting a bloom | NOETL_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 SplitMix64 | EHDB_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") |
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 bus | Event bus | |
|---|---|---|
| Carries | commands, per pool and shard: commands.<pool>.shard.<n> | every noetl.event |
| Written by | the server, at each command.issued | the server, as it ingests events |
| Read by | workers, which compete for claims | three durable materializer groups (noetl_materializer, noetl_result_materializer, noetl_state_materializer) and the gateway's SSE feed |
| Switch | NOETL_COMMAND_BUS_HOST | NOETL_EVENT_BUS_HOST |
| Also hosts | the lag metric KEDA reads | the 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).
| Setting | Default | Variable |
|---|---|---|
| enabled | off | NOETL_EHDB_ELECTION |
| lease duration | 15 s | NOETL_EHDB_ELECTION_LEASE_SECS |
| renew interval | 5 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=enforceandNOETL_EHDB_ELECTION=true, in every retained revision back to 2026-10-21 (the true start is earlier and not recorded); ehdb_engine_fence_activereads 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.
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):
| Setting | Default | Variable |
|---|---|---|
| tail replication | off | NOETL_EHDB_TAIL_REPLICATION |
| tick | 15 s | |
clean up replicated tail objects (false keeps them all) | on | NOETL_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 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):
| Gate | Off when |
|---|---|
NOETL_CHAIN_POPULATE | unset (an allow-list: 1, true, yes, on) |
NOETL_CHAIN_ADVANCE | unset (same) |
NOETL_CHAIN_SOURCE=chain | any 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
| Date | Event | Record |
|---|---|---|
| 2026-09-28 | the 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 event | Sessions-Log, 2026-09-28 |
| 2026-09-29 | both halves of the root problem fixed (a coverage record plus head hydration) | Sessions-Log, "the chain-store root problem, both halves" |
| 2026-09-30 | ramp 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-06 | gates disarmed at 18:36Z and re-armed at 19:23Z on evidence | Sessions-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.
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-clustermount, 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.
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
| Store | Holds | Authoritative? |
|---|---|---|
| Postgres | the event log (noetl.event), the catalog (noetl.catalog), credentials, commands | yes: 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) |
| EHDB | the command bus and the event bus (13.4); a mirror of the event log; the chain store | not 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) |
| ehgraph | topology graphs: which instances exist, which pools they are in, which playbooks they can run, who knows whom | never. 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
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 store | What a query sees |
|---|---|
| A namespace | The graph. The request chooses it (namespace, /db/{namespace}, or Bolt database=). A query does not name the namespace |
A node's type, exactly one | Its label. (n:AccessPoint) matches type = "AccessPoint". A node with no type, or with a second type, is refused (15.3) |
An edge's type | The relationship type. Edges are directed |
props: string, int, float, bool, timestamp, list, or map | Properties. A timestamp is stored as a timestamp and reads back as {"$timestamp": "<rfc3339>"}. Timestamps compare with each other |
Caller-chosen string id | The 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 committedts_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
| Interface | Where | Notes |
|---|---|---|
MCP tool graph.cypher | POST /mcp, tools/call | what a kind: mcp playbook step uses |
| HTTP | POST /v1/cypher | the same body and result envelope |
| Neo4j Query API v2 shape | POST /db/{namespace}/query/v2, transactions under …/query/v2/tx | the plain-JSON shape Neo4j's own HTTP API uses |
| Bolt 5.0, falling back to 4.4 | [bolt] listen = "…" in the standalone server's config | official 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.
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,shortestPathandallShortestPaths. - Variable-length paths:
*,*m..nand 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,RETURNwithDISTINCT,ORDER BY,SKIP,LIMIT; aggregation;UNION;CASE; list comprehensions; pattern predicates and comprehensions;EXISTS { pattern }. - Writes:
CREATE,MERGE(withON CREATE SETandON 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) andREMOVE n:Labelare refused. So is a node with no label (CREATE ()). DELETEdeactivates. Deleted elements are soft-deactivated, and their history and versions are kept (exec.rs:80-81).MATCHsees active elements unless the request asks for inactive ones.idis the element id, not a property.id(n)returns ehgraph's string id, not Neo4j's integer.- Idempotent writes report idempotently.
MERGE … SETwith unchanged values writes nothing and creates no new version, andproperties_setcounts 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:
| Scenarios | Pass | Fail | Out of model | Pass rate, all | Pass rate, in-model |
|---|---|---|---|---|---|
| 3,896 | 2,292 | 434 | 1,170 | 58.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.
"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).
| Kind | Where | What it guarantees |
|---|---|---|
Conditional commit (expect) | graph.upsert, graph.deactivate by ids, graph.cypher, graph.tx.commit, Query API commit, Bolt BEGIN with tx_metadata.expect | Applies 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 write | graph.cypher, POST /db/{ns}/query/v2, Bolt RUN outside BEGIN | One serializable graph version for every upsert and deactivation in the statement. A lost race re-runs on the new head |
| Multi-statement transaction | graph.tx.begin / run / commit / rollback, Query API /tx, Bolt BEGIN / RUN / COMMIT / ROLLBACK | Snapshot 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):
| Request | Effect |
|---|---|
POST /db/{ns}/query/v2/tx | Open. 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}/commit | Commit. 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.
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 recorded | When | A later commit conflicts if it… |
|---|---|---|
| Element ids | Any lookup, found or not, and every element written | Changed that element |
| Labels | A 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 x | An expansion from x | Created, 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.
| ehgraph | HTTP | Neo4j code on Bolt and the Query API | What the client does |
|---|---|---|---|
VERSION_CONFLICT "serialization conflict: …" | 409 | Neo.TransientError.Transaction.Outdated | Re-run the whole transaction. execute_write does this |
VERSION_CONFLICT "expectation failed: …" | 409 | Neo.ClientError.Schema.ConstraintValidationFailed | Re-read the versions in expect, then retry |
NOT_FOUND "transaction … not found" | 404 | Neo.ClientError.Transaction.TransactionNotFound | Stop. 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).
| Switch | Default | What it arms |
|---|---|---|
NOETL_EHGRAPH_EMBEDDED | off (must be exactly true) | Open the embedded graph and mount it |
NOETL_EHGRAPH_CONFIG | unset | Path to the ehgraph TOML (instance, data_dir, backup_prefix, budgets, grants). It holds bearer tokens |
NOETL_EHGRAPH_HOST_REPLICAS | unset, and unset refuses | Must be 1. There is no default |
NOETL_EHGRAPH_HOST_ORDINAL | derived from HOSTNAME | Optional StatefulSet pod index. Only 0 may write |
NOETL_EHGRAPH_TOPOLOGY_WRITER | off (must be exactly true) | Project the instance registry into the graph |
NOETL_EHGRAPH_TOPOLOGY_TOKEN_FILE | unset | A file holding a bearer token. The writer does not start without a readable, non-empty file |
NOETL_EHGRAPH_TOPOLOGY_NAMESPACE | topology | The 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_REPLICASis set, and set to1.NOETL_SHARD_COUNT > 1refuses, and so doesNOETL_EXECUTION_AFFINITY=true.- The pod ordinal (
NOETL_EHGRAPH_HOST_ORDINAL, otherwise the trailing-NofHOSTNAME) must be0. 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.
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):
| Element | Id | Type |
|---|---|---|
| Node | control:<server id> | control_plane |
| Node | instance:<instance id> | noetl_instance |
| Node | pool:<name> | pool |
| Node | playbook:<path or glob> | playbook |
| Edge | instance → control | registered_with |
| Edge | instance → pool | in_pool |
| Edge | instance → playbook | can_run |
| Edge | instance → instance | knows, from known_peers, and only toward a peer that is live |
| Edge | instance → instance | delegated_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.
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):
| Prefix | Target |
|---|---|
A filesystem path, such as /var/backups/ehgraph/ehgraph-network | A 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):
- Immutable objects are put-if-absent: sealed parts, snapshots,
instance.json, and schema files. On GCS that is an upload withifGenerationMatch=0(crates/ehgraph-backup/src/gcs.rs:7). A retry does not rewrite an object that already landed. - Per namespace, the manifest is written after the parts it names, and the head after the manifest.
checkpoint.jsonis 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.
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):
| Memory | Bound | On overflow |
|---|---|---|
| Materialized graph, every namespace, always resident | resident_graph_bytes | A 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_bytes | Ended sessions are evicted first, then the open fails with MEMORY_BUDGET_EXCEEDED. An active session is not dropped |
| Idempotency keys | idempotency_max_keys | The 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.
§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_byedges), so a topology query could answer where a playbook lives. - §11, requirement 1, the TARGET column:
ehgraph held_bynodes, 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
- 16.1 Two catalogs PARTIAL
- 16.2 The model PARTIAL STUB
- 16.3 Four datasets PARTIAL
- 16.4 The HTTP API PARTIAL STUB
- 16.5 Ingest and a new type PARTIAL STUB
- 16.6 What the EHDB pin requires PARTIAL STUB
- 16.7 Not in these sources STUB
Several representations at 473b2d5 describe an older tree than the one they sit in.
docs/wiki/Home.mdlists onlycatalog-modelas landed. The workspaceCargo.tomllists five crates.- That wiki page says the
Datasetimpl count is 0 until a later phase. 16.3 shows the store test expects 4, and the model test expects 0 only insidecatalog-model. - The README says the model lands behind flags. The only
NOETL_variable the API binary reads isNOETL_INTERNAL_API_TOKEN(crates/catalog-api/src/lib.rs:41,src/main.rs:16-21). Unset or blank, writes return 503. The process also readsCATALOG_STORE_ROOT(default./catalog-store) andCATALOG_BIND(default127.0.0.1:8091) (main.rs:8-9). Those two are notNOETL_names. - The design spec's plan names
NOETL_CATALOG_MODEL=shadowas the gate for a later read path. A search of the tree at473b2d5finds that name only indesign/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/ingestand 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 repository | Business catalog — not this repository | |
|---|---|---|
| What it holds | NoETL's own objects | Domain data: hotels, flights, trips, items, orders, translations |
| Storage, as this repo states it | EHDB only. No external datastore | External Postgres, a third-party API, an object store |
| Interface | /api/catalog/* | A playbook step, under that playbook's policy |
| Who owns it | The platform | The 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
At 473b2d5 the repository says both of the following.
- The README, the wiki scope table, design spec §2.10, and
noetl_types.rsincludecredentialwithcatalogued: true. The seed test requires that flag. - Design spec §1.1, §4.1 and §12 say
credentialis deliberately not catalogued, because the CLI diverts credentials elsewhere.catalog-extractrecords aRequiresedge whose target type iscredentialand 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 inresource_type.rsbuildsResourceType::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) ascrates/catalog-modeldefines them at git473b2d5. Thecredentialdisagreement 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:
| Constant | Dataset id | Forward key | What a forward read returns |
|---|---|---|---|
c1 | c1_catalog_entity | path | The versions of that path |
c2 | c2_catalog_relation | from_path | Edges leaving that path |
c3 | c3_catalog_attribute | path | Attributes on that path |
c4 | c4_catalog_type | name | That 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.rsimplementsDatasetford7_catalog. The file header calls it the playbook, tool and resource registry, oneCatalogOpper register or deregister, folded by taking the last op for a path.crates/ehdb-l0/src/lib.rsexports dataset ids D1 through D10.- The same
lib.rsheader 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:
| Dataset | Constant | Synthetic key |
|---|---|---|
c1 | TYPE_KEY_PREFIX | \u{1}type/<kind> |
c2 | EDGE_TO_KEY_PREFIX | \u{1}to/<path> |
c3 | REVERSE_KEY_PREFIX | \u{1}attr/<name> |
c4 | TYPE_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
routerincrates/catalog-api/src/lib.rsat git473b2d5: 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 omitsDELETE,/restore,/ingestand/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-extractandcatalog-ingestat git473b2d5: 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 aResourceTyperow, 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 sharinglocal_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, andkind: wasm.None of those topics appear in the
noetl/catalogREADME,docs/wiki, ordesign/catalog-model.mdat git473b2d5. 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
| Piece | First release | Status |
|---|---|---|
| Instance identity (ML-DSA-87) and signed register / discover | server v3.156.0 | Released. On prod the registry is on and admits nobody |
remote: import and remote: delegate on kind: playbook | server v3.161.0, noetl-tools v4.6.0, worker v6.15.0 | Released, every flag off by default, not set on prod |
| The pin across instances (caller and owner) | server v3.161.0 | Released with the flags above |
| A cached import never outranks the owner in a new tree | server v3.161.0 (fix 8c25af52) | Released with the flags above |
Local runtime and noetl serve refuse a remote reference by name | cli v6.4.0 | Released, on (no flag) |
Held wait for a delegated call (NOETL_CATALOG_REMOTE_PUSH) | server v3.163.0, noetl-tools v4.7.0 | Released, 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.
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:
- Delegate: A calls
noetl://<B>/xc/targettwice while B registers v2 in between, and both calls run v1 on B's workers under one pin on B. - Import: the same calls run on A as
peer/<B>/xc/target, and the leaf resolves on its home instance. - Fresh roots see the new versions.
- The negatives: outside B's allowlist gives 403, a bad mode gives
422 (the script accepts 400 or 422), and
delegatewhereNOETL_CATALOG_REMOTE_CALLSis 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: importvsremote: 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
serverefuse 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.
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 idni-+ 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/discoverandGET /api/runtime/instances. All of it is innoetl/serversrc/instances/since v3.156.0. On prod the registry is on (NOETL_INSTANCE_REGISTRY=true) and admits nobody: trust defaults to an allowlist andNOETL_INSTANCE_TRUSTED_IDSis not set in the as-built manifest. Facts stay on server v3.165.5 and thenoetl/opsas-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.
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
import | delegate | |
|---|---|---|
| Who resolves | B (signed catalog.resolve), once per root and reference | B (signed catalog.resolve), once per root and reference |
| What A stores | B's body, under peer/<B>/<path> | A row in noetl.catalog_remote_call; no body is needed |
| Who runs it | A's workers, as a normal child of the step | B's workers, as an execution on B |
| Where its events go | A's event log | B's event log only. The kind test asserts 0 of B's events in A |
| Its children | Resolve 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 result | The usual child poll on A | It polls A's /api/catalog/remote/calls/{call_id}, which A proxies from B |
| If B is down | A cached import can stand in, once, when the tree has no answer yet (17.3) | No fallback. The call fails |
| Needs on B | Discovery and trust of A | Also 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'scatalog.executeonly 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. WithNOETL_CATALOG_REMOTE_SERVEset 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.executiononly for an execution whosecatalog_remote_execrow names the asking instance. Any other instance gets 404. detail_pathcannot 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: delegatewithdedup, 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_resultawait, and frees its slot, only for a fresh local child (fresh_localinexecute.rs). A delegated call is never parked, even withNOETL_PLAYBOOK_AWAIT_PARKon, so A's worker slot is held for the whole of B's run. - The step has its own deadline.
timeoutis DEFAULT 180 s withreturn_result: trueand 300 s otherwise. If it passes, A's step fails with a timeout. B's run is not told and keeps going (17.6).
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:
- B's catalog ids mean nothing on A. They come from B's database. Comparing one with A's watermark compares two unrelated counters.
- An import lands after the root started. When A imports B's body
mid-run, the new row on A gets a
catalog_idabove 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.
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:
- 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").
- Otherwise ask B (a signed
catalog.resolve), import, and pin. - 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.
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.
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_CASandNOETL_CATALOG_PINNING(prerequisites),NOETL_CATALOG_DISCOVERYwithNOETL_CATALOG_PEER_KEY_FILE,NOETL_CATALOG_PEERSandNOETL_CATALOG_SELF_URL(the peer key and registration),NOETL_INSTANCE_TRUSTED_IDSon both sides (trust is mutual), thenNOETL_CATALOG_REMOTE_CALLSandNOETL_CATALOG_REMOTE_MODEon the caller andNOETL_CATALOG_REMOTE_SERVEandNOETL_CATALOG_REMOTE_SERVE_ALLOWon the owner. The allowlist is path globs and fails closed: with none, every peer execute is refused, and apeer/…path is never served onward. Flags are strict"true". Facts fromnoetl/serversrc/services/catalog_remote.rsat 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) andnoetl serverefuse anoetl://<instance>/…orpeer/<instance>/…path by name when the step runs (refuse_remote_referenceinnoetl/clisrc/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/serverv3.165.5: B pushing completion to A (a held long-poll, not a push, exists behindNOETL_CATALOG_REMOTE_PUSHsince 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: delegateis not batchable (422) and takes nodedup; 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:
- 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.
- Figures are dated and local. A number from kind does not transfer to prod, and an old number may predate a fix.
- 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
| Section | Answers | Chapter section |
|---|---|---|
labels | what kind of number each figure is | 21.1 |
step_kinds | what each tool kind holds and how long it may run | 21.2 |
limits | the caps a worker enforces, with their environment variables | 21.3 |
concurrency | pools, slots, autoscaling, queueing | 21.4 |
heuristics, orchestration_overhead | how to turn the figures into an estimate | 21.5 |
not_yet_measured | the questions with no number yet | 21.6 |
metrics | where a real run's cost is recorded | 21.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):
| Label | Means | Before you reuse it |
|---|---|---|
| MEASURED | observed on a cluster or harness | read its environment, date and source; it describes that build under that load |
| DEPLOYED | read off the production cluster on as_of | it is configuration, not code: it changes without a release |
| DEFAULT | a code default (env var + value) | a deployment may override it; check the environment |
| GUIDANCE | a planning rule derived from the figures | it is arithmetic, not a measurement |
| TARGET | a goal or budget | nobody has achieved it yet |
| NOT_YET_MEASURED | a real question with no number | do not invent one (21.6) |
Three numbers about the same thing
The user pool's slots show how labels differ:
| Figure | Label | What it tells you |
|---|---|---|
WORKER_MAX_CONCURRENT = 4 slots per worker | DEFAULT | what a worker does if nobody sets the variable |
| user pool: 2 replicas, KEDA 2–20, 8 slots at min, 80 at max | DEPLOYED (2026-11-11) | what one cluster ran on one day |
command.issued → command.claimed p50 2123 ms with 90 commands against 8 slots | MEASURED (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 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.
| Kind | Runs | Holds the slot | Default timeout |
|---|---|---|---|
python | subprocess | whole run | none unless the step sets timeout_seconds |
shell | subprocess | whole run | none unless the step sets timeout_seconds |
http | in process | whole request | 30 s client default; timeout_seconds overrides. The body is read in full, no cap |
postgres | in process, a pool per connection string | whole query | none set by the tool |
duckdb | in process | whole query, in the worker's memory | none |
rhai | in process | whole script | none, and no operation limits |
wasm | in process, one module at a time per worker | invocation plus any wait for the wasm lock | 30 s (21.3) |
mcp | remote JSON-RPC | whole call | NOETL_MCP_REQUEST_TIMEOUT_SECONDS, clamped to 180 s |
agent | in-process loop of remote model calls | the whole loop | bounded by tool-call and child limits |
playbook | a separate child execution | only for the start request; with return_result / return_step the whole child, polling every 2 s | 30 s to start; the await is the step's timeout, else 180 s / 300 s |
script | Kubernetes Job, polled every 2 s | until the Job finishes | 600 s |
container | Kubernetes Job | no: freed once the Job is created; a callback ends the step | none by default |
snowflake | remote REST | whole statement | 60 s statement timeout |
task_sequence | in process, sub-tasks in order | all sub-tasks | per sub-task |
noop | in process | briefly | it 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.0src/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.retryis 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:
| Kind | Figure | Label |
|---|---|---|
python | 0.66 s warm / 1.20 s cold for a simple playbook end to end | MEASURED, idle kind, 2026-05 |
python | 9.3 s → 3.0 s when a provider call moved from a kind: playbook child to inline python | MEASURED, prod, 2026-08-24 |
playbook | ~9 s of orchestration per hop, regardless of the work inside | MEASURED, prod, 2026-08-24 |
playbook | median 34.7 s → 19.4 s (−44%) when provider children were inlined | MEASURED, prod, 2026-06-29 (paired A/B) |
wasm | ~1.5 s once, first dispatch of a ~1.6 MB module on a fresh pod | MEASURED, kind, 2026-06 |
agent | a hosted LLM call inside a real step | NOT_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)
| Limit | Default | Variable |
|---|---|---|
| fuel per invocation | 10,000,000,000 ✓ | NOETL_WASM_FUEL (0, off, none or unlimited removes it) |
| wall clock per invocation | 30 s ✓ (10 ms granularity) | NOETL_WASM_TIMEOUT_MS |
| linear memory | 1024 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)
| Limit | Default | Variable |
|---|---|---|
| tool calls per agent step | 32 ✓ | NOETL_AGENT_MAX_TOOL_CALLS |
| time per playbook-bound child | 180 s ✓ | NOETL_AGENT_TOOL_TIMEOUT_SECS |
| turns | 8 | step max_turns |
| tokens per model call | 4096 | step 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
| Limit | Default | What happens past it |
|---|---|---|
step result in an event (NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES) | 100 KiB | spilled to the result store; a downstream read becomes a fetch (5.3) |
command context (NOETL_COMMAND_CONTEXT_MAX_BYTES) | 512 KiB | offloaded as a __context_ref__ |
request body on /api/execute and /api/events | 2 MiB | refused (the axum default; no explicit layer) |
events returned by GET /api/executions/{id} | the 2000 most recent | older ones are not in the response |
Waiting and draining
| Limit | Default | Variable |
|---|---|---|
| extra retry window for event emits while the server is down (the slot stays held) | 120 s | NOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS |
| finishing in-flight commands on SIGTERM | 150 s | NOETL_WORKER_DRAIN_TIMEOUT_SECS |
| slots per worker | 4 ✓ | WORKER_MAX_CONCURRENT (21.4) |
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, andmax_in_flightdoes 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: playbookstep withreturn_resultorreturn_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:
slot_rulemisses 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 owncall.doneand returns, "freeing the slot while an external system works" (workersrc/executor/command.rs:1326-1333).- The model contradicts itself. Its own
containerentry 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:
| Step | Runs |
|---|---|
start | 1 |
pick, fetch, load, advance | 2 each = 8 |
report, check | 1 each = 2 |
| total | 11 |
There are no sub-playbooks, so hops = 0.
| Term | Value | Label |
|---|---|---|
| orchestration: 11 × ~4.5 s | ~50 s | GUIDANCE from a MEASURED figure (prod, 2026-08) |
| work: 2 small HTTP fetches, 5 small DuckDB queries, 2 rhai one-liners | not known | NOT_YET_MEASURED on prod for http and duckdb |
| hops | 0 | |
| estimate | ~50 s + the work | GUIDANCE |
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 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
fetchan 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
reportinto 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}returnsstarted_at,completed_atand up to the 2000 most recent events, each withcreated_at. There is no duration field: subtract.- Each step's
call.donecarriesresult.context.duration_ms, the tool's own time. command.started→command.completedtimestamps 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:
- 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
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 borrowing | Why it is wrong |
|---|---|
"The bus adds ~140 ms": the p50 138.5 ms issued → claimed figure | it 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 figure | that 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_verdictcomes from the same functions catalog registration calls: identity, tool kinds and inline secrets.execute_verdictadds the playbook parser, which registration does not run. The parser checks thestartstep, unique step names,nexttargets 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).
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: acceptdoes 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:
| Playbook | Steps | Tool kind |
|---|---|---|
vqcc_pipeline.yaml | 11 | shell |
vqcc_optimize.yaml | 14 | shell |
vqcc_portfolio.yaml | 10 | shell |
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.
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.tomlon tagpypi-v5.3.2. - If the local runtime cannot run the kind you want, put that program
in
kind: shelland say so in the playbook header. A skippedpythonstep 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
- 27.1 Local kind first: the EHDB-only topology on kind, and the guard that keeps a kind command off production.
- 27.2 Production on GKE: what the manifests declare, and why they are not a picture of what runs.
- 27.3 Deploy by digest: the patch, the dry-run, the rollback row, and the outage that made it the rule.
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 port | Service |
|---|---|
| 8082 | NoETL server API |
| 38090 | gateway API |
| 54321 | Postgres |
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
action | Does |
|---|---|
plan | renders every object and server-side dry-runs it; changes nothing |
converge | reconciles the topology, then verifies it |
status | reports what is deployed and checks the EHDB-only invariants |
verify | the functional proof on an already-converged cluster |
teardown | removes 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).
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
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
| Workload | Kind | Replicas | Note |
|---|---|---|---|
noetl-server-rust-embedded | StatefulSet | 1, must stay 1 | a second replica is a second snowflake generator with the same machine id, so duplicate event_ids (server-rust-embedded-sts-prod.yaml) |
noetl-server-rust | Deployment | 0 | retired; held at 0 for the same reason |
noetl-worker-rust | Deployment | 2 | the user pool (shared), autoscaled by KEDA |
noetl-worker-system-pool, -shard1 | Deployments | 1 each | the system pool, not autoscaled |
noetl-cmdbus-writer | StatefulSet | 1 | both buses (10.3) |
| gateway | Deployment | captured 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
"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
- Record the rollback first. Read the digest each workload runs
now and write it down.
noetl/opskeeps 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". - Dry-run against the server, and diff the whole object. Render
the patch with
--dry-run=serverand compare it with the live object. Proceed only if the diff is exactly the change you meant.playbooks/517-floor-exact/roll2.shmechanizes this: it "refuses unless the diff is exactly the one intended change". - 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 makesset imagea silent no-op (playbooks/210-t5-readiness/ROLLBACK.md). - Verify from the process, by the
versionon its*_build_infoseries, not from the Deployment spec. - Rollback is the same command with the recorded digest.
Why not apply the manifest
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
- A PR merges to
main. By convention it is a merge commit, though the repositories' settings also allow squash. semantic-releaseruns on the push (semantic-release.yml, semantic-release 24.2.3, presetconventionalcommits). It reads every commit since the last tag and picks a version, or none.- If it picks one, it tags it and dispatches
release.ymlwith that version. It has to dispatch explicitly: a tag pushed with the workflow's own token does not trigger other workflows. release.ymlbuilds 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:
| Commit | Releases |
|---|---|
feat!: …, or BREAKING CHANGE: in the body | major |
feat: … | minor |
fix: …, perf: …, a revert | patch |
chore:, docs:, test:, refactor:, anything else | nothing |
"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
"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:
| Pin | What 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/e2esuite (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.
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
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:
| Date | What | Why |
|---|---|---|
| 2026-07-26 | bus cutover held at canary, rolled back | flipping would have stranded about half the shared commands (ai-meta#202) |
| 2026-07-27 | full bus flip rolled back; a third round succeeded the same day | ~10% of commands were never claimed (ai-meta#203) |
| 2026-09-30 | chain-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-03 | system pools back to the previous worker | every 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:
- 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.
- Release B, 2026-11-07: writers set
EHDB_BLOOM_SCHEME=2, one store at a time. Rollback is to unset it.
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
| Restart | Cost | Source |
|---|---|---|
cmdbus-writer | ~21 s failover (15 s lease), the cost of the election | 516 README, 2026-11-04 |
cmdbus-writer, side effect | one gateway execution-owner record is lost; that turn completes but cannot be polled, so a smoke may fail once and pass on retry | ai-meta#523, open |
| system pool | ~7–10 min of no-op drives | ai-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:
| Read | What 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}/status | status 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.
"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:
| Service | Where | Unauthenticated? | Off switch |
|---|---|---|---|
| server | its HTTP port, /metrics | yes, 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) |
| worker | WORKER_METRICS_BIND, default 0.0.0.0:9090 (src/config.rs:124-134), next to /healthz and /readyz | yes (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).
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:
| Series | Served by | Tells 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_total | worker (src/metrics.rs:1147-1156) | whether a pool is claiming work |
noetl_worker_materializer_skipped_total | worker (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".
"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
0sduration where the file intended 1800 s. - That
0scame from the apply script: a policy with nodurationkey is applied as0s(pol.get('duration', '0s')), so a stable count paged at once and kept paging. Every policy at3f63656now setsdurationexplicitly. - 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).
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=truestarts 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(withNOETL_GCP_KMS_KEY) moves the KEK into Cloud KMS. The default islocal(src/crypto/mod.rs:33-61).- Every secret variable can be given as a file:
<VAR>_FILEis read into the environment at the top ofmain(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:
| Protection | Default | To turn it on |
|---|---|---|
| bearer gate on the credential routes | shadow: 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 server | off; 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 |
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:
- 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 bycommands.rs:370-378). The dispatched command carries the template, not the value. - 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 intocommand.issued. The guard shipped on 2026-07-08 in worker v5.70.3 (commit2031a8b4). - 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](workersrc/scrub.rs:25-51, applied atcommand.rs:2068).
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:
| Secret | Why it cannot be in the wallet |
|---|---|
NOETL_ENCRYPTION_KEY | it decrypts the wallet |
POSTGRES_PASSWORD | the wallet is a Postgres table |
NOETL_INTERNAL_API_TOKEN | it 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
- Secret audit. The
noetl.secret_audittable 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_REQUIREDis parsed and has no effect. - Residency. Region tags, a residency policy and a cross-region
broker exist, but with
NOETL_SERVER_REGIONunset 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_docreplaces the whole document, so saving "personal info" would delete saved trips. The save passesmerge: 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_profilereads 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.
- A save wins the arc set, so
load_profileis recorded as skipped. save_profilethen routes toload_profile, and that arc is ignored.- 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.
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
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 throughinput:, 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.
| Verdict | When verdict() returns it |
|---|---|
pass | a reason was not set, at least one assertion was recorded, and every assertion has ok |
fail | an assertion failed |
blocked | the case called block, because a precondition was absent |
error | the 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.
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: pythonplaybook 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,
adminand 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,
adminand 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.registryof models, datasets, evals and releases, with author-declaredlineageparents andregistry://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_idpoints at one row ofnoetl.catalog, which holds a playbook'spath, itsversionand its fullcontent, 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_idlinks 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_nameis the step. Withevent_typeandresult, 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
| Question | Where 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).
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 behindNOETL_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
postgresstep readsordersand writesdaily_revenue, nothing records "this step readorders" 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
shellstep that runspython3 -m scoring.runrecords the command, not the version ofscoring. 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.
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.registryof models, datasets, evals and releases, with author-declaredlineageparents andregistry://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 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.kindis closed to the kinds this server accepts. Semantic rules (astartstep, unique step names, existingnexttargets) are enforced by the server's validator, not by this schema.
Top-level keys
| Key | Type | Required | Description | Taught in |
|---|---|---|---|---|
apiVersion | string | yes | API version (noetl.io/v2). | Ch. 4.1 |
keychain | array of KeychainDef | null | Keychain definitions for credentials and tokens. | Ch. 4.4 | |
kind | string | yes | Resource kind (Playbook). | Ch. 4.1 |
metadata | Metadata | yes | Metadata (name, path, labels). | Ch. 4.1 |
vars | object | null | Top-level variables (canonical format). | Ch. 4.2 | |
workbook | array of WorkbookTask | null | Reusable tasks. | Ch. 4.5 | |
workflow | array of Step | yes | Workflow steps. | Ch. 4.3 |
workload | any | Global 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
args | object | null | Arguments to pass to target step. | Ch. 6.1 | ||
step | string | yes | Target step name. | Ch. 6.1 | |
when | string | null | Transition 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
auth | string | null | Credential alias for the claim tool. | Ch. 6.3 | ||
claim | string | yes | The claim SQL (atomic lease, e.g. ... FOR UPDATE SKIP LOCKED ... RETURNING ...). | Ch. 6.3 | |
kind | string | "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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
attempts | integer | null | Retry attempts (for do: retry). | Ch. 6.5 | ||
backoff | string | null | Retry backoff strategy: linear or exponential. | Ch. 6.5 | ||
delay | number | null | Retry delay in seconds. | Ch. 6.5 | ||
do | string | yes | Action to take: continue, retry, break, jump, fail | Ch. 6.5 | |
expr | string | null | Jinja2 expression to evaluate. Access outcome object: outcome.status, outcome.error, outcome.result | Ch. 6.5 | ||
set_vars | object | null | Variables to set (step-scoped). | Ch. 6.5 | ||
target | string | null | Target step (for do: jump). | Ch. 6.5 |
EvalElse
Else clause for eval conditions.
Taught in Ch. 6.5.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
do | string | yes | Action to take. | Ch. 6.5 | |
set_vars | object | null | Variables 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
heartbeat_seconds | number | null | Ch. 6.3 | |||
lease_seconds | number | null | Ch. 6.3 | |||
max_bytes | integer | null | Ch. 6.3 | |||
max_rows | integer | null | Max rows claimed per frame (the claim SQL's LIMIT { { __frame_max_rows } }). | Ch. 6.3 | ||
max_seconds | number | null | Ch. 6.3 | |||
process | string | null | row (default) binds iter.<name> to one row; frame is reserved. | Ch. 6.3 | ||
row_concurrency | integer | null | Rows 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
allowed_regions | array 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 | |
auth | string | null | Credential 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_renew | boolean | false | Auto-renew flag. | Ch. 4.4 | |
credential | string | null | Credential reference. | Ch. 4.4 | ||
map | map of string | null | Output-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 | ||
name | string | yes | Keychain entry name. | Ch. 4.4 | |
no_broker_fallback | boolean | false | Secrets 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 | |
provider | string | null | Secret-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 | ||
region | string | null | Secrets 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 | ||
residency | Residency | "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 | |
scope | string | null | Scope type. | Ch. 4.4 | ||
token_type | string | null | Token type. | Ch. 4.4 |
Loop
Step-level loop configuration (canonical format).
Taught in Ch. 6.3.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
cursor | CursorClaim | null | Claim block for mode: cursor loops. | Ch. 6.3 | ||
in | string | null | Jinja expression for collection to iterate over. Required for sequential / parallel; absent for cursor (which claims work). | Ch. 6.3 | ||
iterator | string | yes | Variable name for each item. | Ch. 6.3 | |
spec | LoopSpec | null | Loop 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 theloop.cursor.claimSQL 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
frame | FrameSpec | null | Frame sizing/leasing policy (cursor mode only). | Ch. 6.3 | ||
max_in_flight | integer | null | Maximum concurrent iterations in parallel mode / frames in cursor mode. | Ch. 6.3 | ||
mode | LoopMode | "sequential" | Execution mode: sequential, parallel, or cursor. | Ch. 6.3 |
Metadata
Playbook metadata.
Taught in Ch. 4.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
description | string | null | Description. | Ch. 4.1 | ||
labels | map of string | null | Labels for filtering. | Ch. 4.1 | ||
name | string | yes | Playbook name (required). | Ch. 4.1 | |
path | string | null | Resource 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
set | object | null | Arc-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 | ||
step | string | yes | Target step name. | Ch. 6.1 | |
when | string | null | Transition 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
arcs | array of NextArc | [] | List of arcs (outgoing transitions). | Ch. 6.1 | |
spec | NextRouterSpec | null | Router specification (mode: exclusive/inclusive). | Ch. 6.1 |
NextRouterSpec
Next router spec for v10 format.
Taught in Ch. 6.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
mode | string | null | Routing 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 thenamefield; the rest of the fields are an inlineToolSpec. Stored viaToolSpec.extra(the#\[serde(flatten)\] HashMapcatch-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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
args | object | null | Input arguments for this step. | Ch. 5.3 | ||
desc | string | null | Step description. | Ch. 4.3 | ||
loop | Loop | null | Loop configuration with spec.mode. | Ch. 6.3 | ||
next | NextSpec | null | Next step(s) with optional when conditions for routing. | Ch. 6.1 | ||
set | object | null | Step-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 | ||
spec | StepSpec | null | Step behavior configuration. | Ch. 6.5 | ||
step | string | yes | Step name (unique identifier). | Ch. 4.3 | |
tool | ToolDefinition | yes | Tool configuration - single tool or pipeline. | Ch. 5 | |
vars | object | null | Variables to extract from step result. | Ch. 4.2 | ||
when | string | null | Transition 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
next_mode | string | null | Next evaluation mode: exclusive (first match) or inclusive (all matches). | Ch. 6.1 | ||
on_error | string | null | Error handling: fail, continue, or retry. | Ch. 6.5 | ||
timeout | string | null | Step 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 optionalinput(the server canonicalises it toargs, which becomes the plug-in's input bytes as JSON).pathis a string,versionan integer,entrythe guest export to call (defaultrun). The server only accepts the kind; the worker'swasm-plugindispatcher 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.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
args | any | Default arguments / inputs passed to the tool runtime. | Ch. 5.3 | ||
auth | any | Authentication configuration. | Ch. 4.4 | ||
code | string | null | Python code (for python tool). | Ch. 5.1 | ||
command | any | Command for the tool runtime. | Ch. 5.1 | ||
connection | string | null | Connection string or credential reference. | Ch. 5.1 | ||
eval | array of EvalEntry | null | Tool-level flow control (canonical format). Evaluated after tool execution. | Ch. 6.5 | ||
headers | map of string | null | HTTP headers. | Ch. 5.1 | ||
kind | ToolKind | yes | Tool type. Authored, so flag-gated kinds are refused while their flag is off (ToolKindGates). | Ch. 5.1 | |
libs | any | Libraries/dependencies. | Ch. 5.1 | ||
method | string | null | HTTP method (for http tool). | Ch. 5.1 | ||
output_select | any | Output selection strategy (for result externalization). | Ch. 5.1 | ||
params | any | Tool params. A raw Value, for the same reason command above is one. | Ch. 5.1 | ||
query | string | null | Query/SQL (for database tools). | Ch. 5.1 | ||
url | string | null | URL (for http tool). | Ch. 5.1 |
WorkbookTask
Reusable task definition in workbook.
Taught in Ch. 4.5.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
name | string | yes | Task name. | Ch. 4.5 | |
sink | any | Optional sink configuration. | Ch. 4.5 | ||
tool | ToolSpec | yes | Tool configuration. | Ch. 4.5 |
Check your understanding
Appendix B: Tool Kinds Reference
REAL
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
| Kind | Parser accepts by default | Gate | Accepted locally | Local CI evidence | Execution (worker) | Holds a slot | Default timeout |
|---|---|---|---|---|---|---|---|
agent | no | NOETL_TOOL_KIND_AGENT | yes | in-process loop; every model call is a remote HTTP request; mcp_servers / agents entries are answered inside the loop | the whole loop, including every model call and every awaited playbook-bound child | 300 s (DEFAULT) | |
artifact | yes | no | |||||
container | yes | no | remote Kubernetes Job; returns at once with a pending callback | no: the slot is freed after the Job is created (the callback pattern) | none (DEFAULT) | ||
duckdb | yes | yes | in-process (spawn_blocking) | whole query | none (DEFAULT) | ||
ducklake | yes | no | |||||
gateway | yes | no | |||||
gcs | yes | no | |||||
http | yes | yes | in-process (reqwest) | whole request | 30 s (DEFAULT) | ||
iterator | yes | no | |||||
mcp | no | NOETL_TOOL_KIND_MCP | yes | remote JSON-RPC over HTTP | whole call | 60 s (DEFAULT), NOETL_MCP_REQUEST_TIMEOUT_SECONDS | |
nats | yes | no | |||||
noop | yes | yes | examples/ch04/step-order (runs) | in-process | briefly; it still pays the per-step orchestration cost | ||
playbook | yes | yes | remote: POST /api/execute starts a separate child execution on whatever pool its steps target | 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 | 30 s (DEFAULT) | ||
playbooks | yes | no | |||||
postgres | yes | no | examples/ch08/postgres-refused (refused) | in-process (deadpool-postgres, a pool per connection string) | whole query | none (DEFAULT) | |
python | yes | no | examples/ch08/python-refused (refused) | subprocess | whole run | none (DEFAULT) | |
rhai | yes | yes | examples/ch04/anatomy (runs) | in-process (spawn_blocking) | whole script | none (DEFAULT) | |
script | yes | no | remote Kubernetes Job, polled inline every 2 s | until the Job finishes | 600 s (DEFAULT) | ||
secrets | yes | no | |||||
shell | yes | yes | examples/ch01/hello (runs, cmds:) | subprocess | whole run | none (DEFAULT) | |
snowflake | yes | no | remote REST | whole statement | 60 s (DEFAULT) | ||
snowflake_transfer | yes | no | |||||
subscription | yes | no | in-process bounded drain (nats / pubsub / kafka / timer) | one bounded drain | 1000 ms (DEFAULT) | ||
task_sequence | yes | no | in-process; runs its sub-tasks in order through a fresh default registry (so no worker mcp override and no agent) | all sub-tasks | none (DEFAULT) | ||
transfer | yes | no | in-process (snowflake / postgres / http / duckdb) | whole transfer | none (DEFAULT) | ||
wasm | yes | no | in-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 lock | 30000 ms (DEFAULT), NOETL_WASM_TIMEOUT_MS | ||
workbook | yes | no | examples/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_AGENTand the worker setsNOETL_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-boundtools: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:
pathorcatalog_id,version(integer),payload/args,return_step,return_result. With NOETL_CATALOG_PINNING on,pathmay 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-plugincargo 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 optionalinput(sent to the plug-in asargs). 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_MSSource: 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 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
| Variable | Read by | What it enables | Default | Requires |
|---|---|---|---|---|
NOETL_AGENT_CALLBACK_ORIGINS | server | allowed callback origins for metadata.expose.agent | ||
NOETL_AGENT_ENDPOINT | server | serves metadata.expose.agent: GET /api/agents, GET /api/agents/cards/{path}, POST /api/agents/send, GET /api/agents/tasks/{id} | off | |
NOETL_CATALOG_CAS | server | catalog: content_addressing: digest on register, dedup, /api/catalog/{resolve,blob,sources,pin} | off | |
NOETL_CATALOG_DISCOVERY | server | catalog: discovery: POST /api/catalog/peer/resolve (signed, trusted peers only), POST /api/catalog/locate (internal token); imports under peer/ | off | NOETL_CATALOG_CAS, NOETL_INSTANCE_REGISTRY, NOETL_CATALOG_PEER_KEY_FILE |
NOETL_CATALOG_HOT_RELOAD | server | serves metadata.catalog.hot_reload: an explicit @latest sub-playbook reference inside this root's pinned execution tree | off | NOETL_CATALOG_PINNING, NOETL_CATALOG_CAS |
NOETL_CATALOG_PINNING | server | catalog: 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 version | off | NOETL_CATALOG_CAS |
NOETL_CATALOG_REMOTE_CALLS | server | catalog: 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/remote: delegate is refused by name and nothing else changes | off | NOETL_CATALOG_PINNING, NOETL_CATALOG_CAS |
NOETL_CATALOG_URI_FETCH | server | catalog: uri_fetch: locate fetches a reference's own source URI; fail closed, nothing is fetched without an allowlist | off | NOETL_CATALOG_DISCOVERY, NOETL_CATALOG_URI_ALLOW |
NOETL_MCP_SERVER | server | serves metadata.expose.mcp: POST /api/mcp (one MCP tool per exposed playbook) | off | |
NOETL_TOOL_KIND_AGENT | server | enables kind: agent | off | |
NOETL_TOOL_KIND_MCP | server | enables kind: mcp | off | |
NOETL_WORKER_AGENT_TOOL | worker | lets a worker run kind: agent | off |
Limits
| Variable | Default | Unit | Note | Source |
|---|---|---|---|---|
NOETL_AGENT_MAX_TOOL_CALLS | 32 (DEFAULT) | tool calls per agent step | positive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budget | noetl/worker@d1c9584 src/executor/agent_host.rs:50 |
NOETL_AGENT_TOOL_TIMEOUT_SECS | 180 (DEFAULT) | s per playbook-bound child | noetl/worker@d1c9584 src/executor/agent_host.rs:51 | |
NOETL_COMMAND_CONTEXT_MAX_BYTES | 524288 (DEFAULT) | bytes | a command context above it is offloaded as a context_ref | noetl/server src/config/app.rs:242-246 |
NOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS | 120 (DEFAULT) | s | extra retry window for event emits during a server outage; the slot stays held | noetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140 |
NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES | 102400 (DEFAULT) | bytes | a step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetch | noetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865 |
NOETL_RECONCILE_MAX_NOOPS | 225 (DEFAULT) | consecutive no-progress polls at an 8 s tick (~30 min) | how long a stuck execution is re-driven before the server stops | noetl/server src/config/app.rs:702-726 |
NOETL_WASM_FUEL | 10000000000 (DEFAULT) | fuel units per invocation | 0 / 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_MB | 1024 (DEFAULT) | MiB linear memory | noetl/worker@d1c9584 src/plugin.rs:47 | |
NOETL_WASM_TIMEOUT_MS | 30000 (DEFAULT) | ms wall clock per invocation | 10 ms deadline granularity | noetl/worker@d1c9584 src/plugin.rs:44 |
NOETL_WORKER_DRAIN_TIMEOUT_SECS | 150 (DEFAULT) | s | on SIGTERM a worker finishes in-flight commands within this budget | noetl/worker@d1c9584 src/worker.rs:1139 |
WORKER_MAX_CONCURRENT | 4 (DEFAULT) | slots per worker process | noetl/worker@d1c9584 src/config.rs:115-118 |
Agent budgets
| Variable | Default | Scope |
|---|---|---|
NOETL_AGENT_MAX_TOOL_CALLS | 32 | tool calls per agent step |
NOETL_AGENT_TOOL_TIMEOUT_SECS | 180 | seconds 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.
| Variable | Read by | Default | What it does | Source | Cited in |
|---|---|---|---|---|---|
GATEWAY_AUTH_BYPASS | gateway | false | accept any session token (only exactly true or 1 enables it); reported by noetl_gateway_auth_bypass_enabled | gateway v3.22.1 src/auth/middleware.rs:13-18 | 30.0 |
GATEWAY_SESSION_VALIDATE_VIA_PLAYBOOK | gateway | true | validate an uncached session by running the auth playbook | gateway v3.22.1 src/auth/mod.rs:174-181 | 10.1 |
NOETL_ALLOW_INSECURE_DEFAULT_KEY | server | false | start with a random per-process key when no encryption key is set; data is unreadable after a restart | server v3.161.2 src/main.rs:1139-1171 | 31.0 |
NOETL_AUTHZ_SYNC | gateway | false | the same synchronous path for authorization checks | gateway v3.22.1 src/auth/mod.rs:231-235 | 10.1 |
NOETL_AUTH_SYNC | gateway | false | validate 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, 224 | 10.1 |
NOETL_CATALOG_LOG | server | off | shadow: also record each registration in the EHDB catalog tier | server v3.161.2 src/handlers/catalog_log.rs:26-27, src/services/catalog.rs:163 | 3.4 |
NOETL_CATALOG_MODEL | no reader at catalog 473b2d5 | not implemented | named in the catalog design as the later shadow read-path gate (value shadow). No Rust file at that commit reads it | noetl/catalog 473b2d5 design/catalog-model.md plan table (P4); grep of crates for the name found the design spec only | 16.0 |
NOETL_CATALOG_PEERS | server | empty | comma-separated control-plane URLs, optionally with #audience, to which this instance advertises | server v3.165.5 src/services/catalog_peer.rs:66, 104-117, 231-241 | 17.2, 17.4 |
NOETL_CATALOG_PEER_KEY_FILE | server | unset | path to the instance key used to sign catalog peer requests; discovery stays off without it | server v3.165.5 src/services/catalog_peer.rs:67, 116-117, 198-213 | 17.4 |
NOETL_CATALOG_READ_SOURCE | server | postgres | where the catalog's latest version resolves from: postgres, verify, or tier | server v3.161.2 src/handlers/catalog_read.rs:3-13, 37 | 3.4 |
NOETL_CATALOG_REMOTE_MODE | server | import | default remote-reference mode when a step does not set remote; invalid values log and fall back to import | server v3.165.5 src/services/catalog_remote.rs:72, 82-101, 118-137 | 17.2, 17.4 |
NOETL_CATALOG_REMOTE_PUSH | server | false (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 seconds | server v3.165.5 src/services/catalog_remote.rs:919-931, 1148-1165, 1215-1225 | 17.0, 17.2, 17.6 |
NOETL_CATALOG_REMOTE_SERVE | server | false (only strict true enables it) | enable the owner-side signed peer execute and execution routes when pinning and discovery are ready | server v3.165.5 src/services/catalog_remote.rs:73-74, 107-145, 1203-1232 | 17.2, 17.3, 17.4 |
NOETL_CATALOG_REMOTE_SERVE_ALLOW | server | empty (refuse every peer execute) | comma-separated path globs the owner is allowed to execute for peers | server v3.165.5 src/services/catalog_remote.rs:74, 139-155, 1025-1035, 1226-1230 | 17.2, 17.4 |
NOETL_CATALOG_SELF_URL | server | NOETL_PUBLIC_SERVER_URL, otherwise unset | public server URL placed in this instance's peer advertisement | server v3.165.5 src/services/catalog_peer.rs:68, 118-123 | 17.4 |
NOETL_CHAIN_ADVANCE | server | off (same allow-list) | advance each execution's chain head as events arrive | server v3.161.2 src/chain_advance.rs:47 | 13.7 |
NOETL_CHAIN_POPULATE | server (ehdb-l0) | off (allow-list: 1/true/yes/on) | populate the chain store from the event log | ehdb v0.15.1 crates/ehdb-l0/src/chain_populator.rs:71 | 13.7 |
NOETL_CHAIN_SOURCE | server | off (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-262 | 13.7 |
NOETL_COMMAND_BUS | server, worker | none (required) | the command bus; only the EHDB bus is accepted, NATS is refused | server v3.161.2 src/command_bus.rs:47-90; worker v6.15.0 src/command_bus.rs:85-115 | 10.3, 13.1 |
NOETL_COMMAND_BUS_ACK_WAIT_SECS | worker (writer) | 30 | seconds before an unacked command is redelivered | worker v6.15.0 src/command_bus.rs:191 | 10.3 |
NOETL_COMMAND_BUS_HOST | worker | false | run 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-204 | 10.3, 13.4 |
NOETL_DISABLE_METRICS | server | false | remove the unauthenticated /metrics route | server v3.161.2 src/config/app.rs:38-40, src/main.rs:100-104 | 30.0 |
NOETL_DSL_KB | server | false | mount the DSL knowledge-base routes | server v3.161.2 src/main.rs:1064 | 4.0, 26.2 |
NOETL_EHDB_ELECTION | worker (writer) | off | run the shard writer election (Kubernetes Lease ehdb-shard-<shard>) | worker v6.15.0 src/ehdb/lease_store.rs:162-166 | 13.5 |
NOETL_EHDB_ELECTION_LEASE_SECS | worker (writer) | 15 | lease duration | worker v6.15.0 src/ehdb/election.rs:95; ehdb v0.15.1 crates/ehdb-reference/src/election.rs:53 | 13.5 |
NOETL_EHDB_ELECTION_RENEW_SECS | worker (writer) | 5 | lease renew interval | worker v6.15.0 src/ehdb/election.rs; ehdb v0.15.1 crates/ehdb-reference/src/election.rs:55 | 13.5 |
NOETL_EHDB_FENCING | worker (writer) | off | epoch fence mode: off, shadow or enforce | worker v6.15.0 src/ehdb/election.rs:312; ehdb v0.15.1 crates/ehdb-core/src/fence.rs:50-62 | 13.5 |
NOETL_EHDB_FLOOR_EXACT | server | off | confirm the prune-floor holder with an exact read, so a bloom false positive cannot pin the floor | server v3.161.2 src/services/event_archive.rs:2059, 2428-2440 | 13.3 |
NOETL_EHDB_SEAL_MAX_AGE_MS | worker | unset (off) | seal the active part once it is this old | worker v6.15.0 src/ehdb/eventlog_backend.rs:246-256 | 13.2 |
NOETL_EHDB_SEAL_MAX_AGE_SECS | server | unset (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, 916 | 13.2 |
NOETL_EHDB_TAIL_CLEANUP | server | on | clean up replicated tail objects; false keeps every tail object | server v3.161.2 src/handlers/ehdb_embedded.rs:1004 | 13.6 |
NOETL_EHDB_TAIL_REPLICATION | server | off | copy the unsealed tail off the node on a timer (B3; tick default 15 s) | server v3.161.2 src/handlers/ehdb_embedded.rs:1015-1033 | 13.6 |
NOETL_EHGRAPH_CONFIG | server | unset | path to the ehgraph TOML. Required once the embedded graph is armed | server v3.161.2 src/ehgraph_embedded.rs:81 | 15.5 |
NOETL_EHGRAPH_EMBEDDED | server | false | open the embedded ehgraph noetl-cluster graph and mount it under /ehgraph/noetl-cluster | server v3.161.2 src/ehgraph_embedded.rs:77, Cargo.toml:233-235 | 15.0, 15.1, 15.2, 15.3, 15.5 |
NOETL_EHGRAPH_HOST_ORDINAL | server | derived from HOSTNAME when unset | this pod's StatefulSet ordinal. Only 0 may write the embedded graph | server v3.161.2 src/ehgraph_embedded.rs:85, 139-143 | 15.5 |
NOETL_EHGRAPH_HOST_REPLICAS | server | unset (unset refuses) | how many server replicas run this configuration. Must be 1 or the embedded graph refuses to open | server v3.161.2 src/ehgraph_embedded.rs:83, 170-174 | 15.5 |
NOETL_EHGRAPH_TOPOLOGY_NAMESPACE | server | topology | namespace the instance-registry projection writes | server v3.161.2 src/instances/graph.rs:44-45 | 15.5 |
NOETL_EHGRAPH_TOPOLOGY_TOKEN_FILE | server | unset | file holding the bearer token the topology writer uses. The writer does not start without a readable, non-empty file | server v3.161.2 src/instances/graph.rs:43, 227-233 | 15.5 |
NOETL_EHGRAPH_TOPOLOGY_WRITER | server | off (must be exactly true) | project the instance registry into the embedded graph; also needs a token file with a write grant | server v3.161.2 src/instances/graph.rs:28-33, 42 | 15.1, 15.5 |
NOETL_ENCRYPTION_KEY | server | none (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-1163 | 31.0 |
NOETL_EVENT_BUS_HOST | worker | false | also host the event bus (SSE feed, KV, WAL fan-out) | worker v6.15.0 src/event_bus.rs:6, 203 | 10.3, 13.4 |
NOETL_EVENT_FEED_ADDR | gateway | none (required) | EHDB events feed the gateway streams to clients over SSE | gateway v3.22.1 src/main.rs:181-197, src/event_feed.rs:9 | 10.1 |
NOETL_EVENT_INGEST_PUBLISH_ONLY | server | false | publish ingested events to the EHDB events feed (the gateway's SSE source); off, the feed receives nothing | server v3.161.2 src/config/app.rs:118-125, src/handlers/event_write.rs:304-318 | 10.1, 13.4 |
NOETL_EXECUTION_AFFINITY | server | false | route each execution's events to the replica that owns it. The embedded ehgraph refuses to open when this is true | server v3.161.2 src/config/app.rs:569-574; src/ehgraph_embedded.rs:165-168 | 15.5 |
NOETL_EXECUTION_WAIT | server, worker (playbook tool) | false | mount and use the execution completion long-poll instead of sleeping before each status poll | server v3.165.5 src/config/app.rs:198-206, src/main.rs:428-440; tools v4.7.3 src/tools/playbook.rs:265-271 | 17.2 |
NOETL_FEED_FILTER_SUBJECT | worker | none (required) | the pool this worker claims for, e.g. noetl.commands.shared.>; the worker refuses to start without it | worker v6.15.0 src/config.rs:40-46, src/worker.rs:233-244 | 10.3 |
NOETL_GCP_KMS_KEY | server | none | the Cloud KMS key, required when NOETL_KMS_PROVIDER=gcp-kms | server v3.161.2 src/crypto/mod.rs:62 | 31.0 |
NOETL_INSTANCE_REGISTRY | server | false (only exact true enables it) | mount the signed instance registry and operator listing and expose its state to catalog discovery | server v3.165.5 src/instances/mod.rs:34-38, 73-81, 682-704 | 17.0, 17.1 |
NOETL_INSTANCE_TRUST | server | allowlist | instance admission mode; only open accepts every valid signer, otherwise the trusted-id allowlist applies | server v3.165.5 src/instances/gate.rs:16-20, 32-59 | 17.0 |
NOETL_INSTANCE_TRUSTED_IDS | server | empty (admit nobody in allowlist mode) | comma-separated instance ids admitted by the default trust mode | server v3.165.5 src/instances/gate.rs:16-20, 40-55 | 17.0, 17.1, 17.4 |
NOETL_INTERNAL_API_TOKEN | server, worker, gateway, catalog | unset | bearer for internal routes; the gateway's push ingress is refused without it; catalog 473b2d5 returns 503 on a write when it is unset or blank | server 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-21 | 10.1, 16.0, 16.4, 31.0 |
NOETL_INTERNAL_AUTH_MODE | server | shadow | bearer gate on internal and credential routes: shadow counts, only enforce rejects | server v3.161.2 src/auth_gate.rs:25-93 | 31.0 |
NOETL_KEYCHAIN_ENV_VARS | worker | empty | allow-list of environment variables copied into every command's secrets | worker v6.15.0 src/executor/command.rs:55-63 | 31.0 |
NOETL_KEYCHAIN_STRICT | worker | false | fail the command when a referenced keychain alias does not resolve, instead of rendering it empty | worker v6.15.0 src/executor/keychain_namespace.rs:33-51 | 4.4 |
NOETL_KMS_PROVIDER | server | local | where the KEK lives: local, or gcp-kms (Cloud KMS); any other value fails start-up | server v3.161.2 src/crypto/mod.rs:33-61 | 31.0 |
NOETL_KV_ADDR | gateway | none (required) | EHDB KV address for sessions, the request store and execution owners | gateway v3.22.1 src/main.rs:132-161 | 10.1 |
NOETL_LOCAL_DIR | CLI | ~/.noetl/local | root of the local runtime's event buffer | CLI v6.4.1 src/local_buffer.rs:11 | 1.3, 8.4 |
NOETL_MCP_REQUEST_TIMEOUT_SECONDS | worker (mcp tool) | 60 | MCP request timeout when the step sets none | tools v4.6.0 src/tools/mcp.rs:782 | 6.5, 21.2 |
NOETL_MCP_URL | worker (mcp tool), CLI | unset | fallback MCP endpoint after NOETL_MCP_ | tools v4.6.0 src/tools/mcp.rs:28; CLI v6.4.1 executor/src/playbook.rs:599 | 8.2 |
NOETL_NONCONVERGENCE_SWEEP_ENABLED | server | false | fail an execution whose newest event has not moved for a grace period while nothing can move it | server v3.161.2 src/config/app.rs:680-700 | 10.3 |
NOETL_ORCHESTRATE_PLUGIN_DRIVE | server | true | run each drive pass as the __orchestrate__ WASM command on the system pool; false drives in process | server v3.161.2 src/config/app.rs:70-87 | 10.2 |
NOETL_ORPHAN_SWEEP_ENABLED | server | false | fail (playbook.failed) a RUNNING execution whose outstanding claim belongs to a dead worker | server v3.161.2 src/config/app.rs:600-627 | 10.3 |
NOETL_PLAYBOOK_AWAIT_CHILD_RESULT | worker (playbook tool) | true | kill-switch: false reverts an awaited child's result to the legacy status payload | tools v4.6.0 src/tools/playbook.rs:51-53 | 7.1 |
NOETL_PLAYBOOK_AWAIT_PARK | server, worker (playbook tool) | false | let an awaited local child park its parent step and free the worker slot; delegated calls are not eligible | server 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-262 | 17.2 |
NOETL_RESULT_URI_ACCEPT | server | false | accept and validate the worker-stamped canonical result URI (shadow; not yet resolved by) | server v3.161.2 src/config/app.rs:442-470 | 36.1 |
NOETL_SEALED_CREDENTIALS | worker | off | fetch auth: credentials through the sealed endpoint (needs WORKER_ID); otherwise plaintext | worker v6.15.0 src/executor/auth_alias.rs:425-460 | 31.0 |
NOETL_SECRET_AUDIT_REQUIRED | server | false | parsed, but has no effect at this release: nothing constructs the audit service | server v3.161.2 src/services/secret_audit.rs:216-222 | 31.0 |
NOETL_SERVER_REGION | server | empty (legacy mode) | the server's region for secret residency; empty means no residency checks | server v3.161.2 src/secrets/mod.rs:96-108 | 31.0 |
NOETL_SHARD_COUNT | server | unset (treated as 1) | total server shard count. The embedded ehgraph refuses to open when it is greater than 1 | server v3.161.2 src/config/app.rs:177-185; src/ehgraph_embedded.rs:159-163 | 15.5 |
NOETL_TASK_SEQUENCE_MAX_ITERATIONS | worker (task_sequence tool) | 1000000 | cap on iterations inside one tool list | tools v4.6.0 src/tools/task_sequence.rs:252-257 | 5.2 |
NOETL_TLS_CERT | server | none | server certificate; with NOETL_TLS_KEY turns on HTTPS (one without the other fails start-up) | server v3.161.2 src/tls.rs:47 | 31.0 |
NOETL_TLS_CLIENT_CA | server | none | CA for client certificates; set with the cert and key, turns on mTLS | server v3.161.2 src/tls.rs:49 | 31.0 |
NOETL_TLS_CLIENT_CERT | worker | none | worker client certificate for mTLS to the server | worker v6.15.0 src/client/tls.rs:41 | 31.0 |
NOETL_TLS_CLIENT_KEY | worker | none | worker client key for mTLS | worker v6.15.0 src/client/tls.rs:42 | 31.0 |
NOETL_TLS_KEY | server | none | server private key for HTTPS | server v3.161.2 src/tls.rs:48 | 31.0 |
NOETL_WORKER_DRAIN_TIMEOUT_SECS | worker | 150 (20 on a writer host) | how long a SIGTERM'd worker waits for in-flight commands before exiting; 0 abandons them at once | worker v6.15.0 src/worker.rs:1139-1162 | 21.3, 29.0 |
WORKER_ID | worker | none | this worker's identity; required for sealed credential delivery | worker v6.15.0 src/config.rs:65 | 31.0 |
WORKER_METRICS_BIND | worker | 0.0.0.0:9090 | address of the worker's /metrics, health and EHDB query routes | worker v6.15.0 src/config.rs:124-134 | 30.0 |
Appendix D: The Resource Model, Annotated
REAL
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.
- 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.
| Label | Meaning |
|---|---|
| DEFAULT | a code default (env var + value); a deployment may override it |
| DEPLOYED | read off the production cluster on as_of; configuration, not code |
| GUIDANCE | a planning rule derived from the figures; not a measurement |
| MEASURED | observed on a cluster or harness; read environment/date/source before reusing it |
| NOT_YET_MEASURED | a real question with no number; do not invent one |
| TARGET | a goal or budget; not a measurement |
Limits
Explained in 21.3 Limits.
| Label | What | Value | Source | Note | Cost | Costs | Deployed | Env | Gates | Parallel | Unit |
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEFAULT | 10000000000 | noetl/worker@d1c9584 src/plugin.rs:41 | 0 / off / none / unlimited removes the limit; an unparseable value keeps the default; a trip increments noetl_worker_plugin_limit_trips_total{limit} | NOETL_WASM_FUEL | fuel units per invocation | ||||||
| DEFAULT | 30000 | noetl/worker@d1c9584 src/plugin.rs:44 | 10 ms deadline granularity | NOETL_WASM_TIMEOUT_MS | ms wall clock per invocation | ||||||
| DEFAULT | 1024 | noetl/worker@d1c9584 src/plugin.rs:47 | NOETL_WASM_MAX_MEMORY_MB | MiB linear memory | |||||||
| DEFAULT | 32 | noetl/worker@d1c9584 src/executor/agent_host.rs:50 | positive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budget | NOETL_AGENT_MAX_TOOL_CALLS | tool calls per agent step | ||||||
| DEFAULT | 180 | noetl/worker@d1c9584 src/executor/agent_host.rs:51 | NOETL_AGENT_TOOL_TIMEOUT_SECS | s per playbook-bound child | |||||||
| DEFAULT | 4 | noetl/worker@d1c9584 src/config.rs:115-118 | WORKER_MAX_CONCURRENT | slots per worker process | |||||||
| DEFAULT | 102400 | noetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865 | a step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetch | NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES | bytes | ||||||
| DEFAULT | 524288 | noetl/server src/config/app.rs:242-246 | a command context above it is offloaded as a context_ref | NOETL_COMMAND_CONTEXT_MAX_BYTES | bytes | ||||||
| DEFAULT | request body limit on /api/execute and /api/events | 2097152 | noetl/server src/main.rs:640-645 (the axum default; no explicit layer) | bytes | |||||||
| DEFAULT | GET /api/executions/{id} events returned | 2000 | noetl/server src/services/execution.rs:694 | most recent events | |||||||
| DEFAULT | 120 | noetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140 | extra retry window for event emits during a server outage; the slot stays held | NOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS | s | ||||||
| DEFAULT | 150 | noetl/worker@d1c9584 src/worker.rs:1139 | on SIGTERM a worker finishes in-flight commands within this budget | NOETL_WORKER_DRAIN_TIMEOUT_SECS | s | ||||||
| DEFAULT | catalog 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 fetch | label: 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 | ||||||
| DEFAULT | version pinning and hot reload | off. 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 @latest | noetl/server orchestrate-core/src/catalog.rs:338-353, 406-416, 505-529; src/handlers/execute.rs:687-699 | pinning 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 prod | NOETL_CATALOG_PINNING, NOETL_CATALOG_HOT_RELOAD | |||||
| DEFAULT | loops 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-780 | every iteration and every back-edge pass is a full step: it pays the per-step orchestration cost below and holds a slot | loop.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 | ||||||
| DEFAULT | 225 | noetl/server src/config/app.rs:702-726 | how long a stuck execution is re-driven before the server stops | NOETL_RECONCILE_MAX_NOOPS | consecutive 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
| Label | What | Value | Environment | Date | Source |
|---|---|---|---|---|---|
| MEASURED | user pool under 200 real executions (200/200 completed) | replicas 2 -> 4 -> 8 -> 16 -> 20 -> 2 | prod | 2026-07-31 | noetl/ai-meta wiki Home (#210) |
| NOT_YET_MEASURED | time for the user pool to ramp under load on the EHDB trigger | none | |||
| MEASURED | GKE Autopilot node provisioning when a scale-up needs a new node | ~60-90 s | prod | noetl/ai-meta playbooks/load-test/README.md |
measured
| Label | What | Value | Environment | Date | Source | Note |
|---|---|---|---|---|---|---|
| MEASURED | command.issued -> command.claimed, pool not saturated | p50 138.5 / p95 156.4 / p99 181.0 ms (n=60) | prod | 2026-07-30 | noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy) | |
| MEASURED | same, with 90 commands offered in 1.2 s against 8 slots (2 replicas x 4) | p50 2123 / p99 3735 ms | prod | 2026-07-30 | noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy) | this measures the pool queue, not the bus |
| MEASURED | POST /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 timeouts | prod | 2026-09-03 | noetl/ai-meta wiki Umbrella-Request-Latency | p95 at c=1 rests on single samples |
| NOT_YET_MEASURED | sustained executions per second the platform can complete | none |
pools
| Label | Source | Capacity_slots | Cpu | Memory | Pool | Replicas | Slots_per_replica |
|---|---|---|---|---|---|---|---|
| DEPLOYED | prod cluster read, as_of | 8 at min, 80 at max | 250m request / 2 limit | 256Mi request / 768Mi limit | worker-rust-pool (user pool, Deployment noetl-worker-rust) | 2 (KEDA 2-20) | 4 |
| DEPLOYED | prod cluster read, as_of | 4 | 750m request / 2 limit | 3Gi / 3Gi | worker-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.
| Label | Source | Rule |
|---|---|---|
| GUIDANCE | Estimate 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. | |
| 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%. | |
| GUIDANCE | Count 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. | |
| GUIDANCE | An 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. | |
| GUIDANCE | Bound 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. | |
| GUIDANCE | Set 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. | |
| GUIDANCE | For 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. | |
| GUIDANCE | For 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. | |
| GUIDANCE | Keep 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. | |
| GUIDANCE | Choose 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. | |
| TARGET | noetl/server orchestrate-core dsl-manifest worker_runtime.agent.playbook_tools.not_durable | Orchestrator-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
| Label | What | Value | Environment | Date | Source |
|---|---|---|---|---|---|
| MEASURED | fixed cost per step in the travel itinerary planner; events spaced a near-uniform 0.8-1.2 s apart | ~4.5 s per step | prod | 2026-08 | noetl/travel wiki playbook-itinerary-planner#latency |
| MEASURED | share of a planner turn that is orchestration (63 events, ~15-17 s of work in a ~76-107 s turn) | ~82% | prod | 2026-08 | noetl/travel wiki playbook-itinerary-planner#latency |
| MEASURED | 10-hop probe playbook: share of a turn in two command-dispatch gaps per hop (~510 ms p50 each) | 79% | prod | 2026-08-18 | noetl/ai-meta wiki Sessions-Log 2026-08-18 |
| MEASURED | server event ingest per emit: command.started / command.completed vs call.done (three emits per hop) | ~336 ms / ~1021 ms on prod, ~40 ms on kind | prod and kind | noetl/server src/metrics.rs (doc comment on noetl_event_ingest_phase_seconds) | |
| MEASURED | prod smoke turns through the gateway: travel planner turn / ranch concierge turn | 17.0-21.2 s / 6.4-7.0 s | prod | 2026-11-04 | noetl/ai-meta wiki Sessions-Log 2026-11-04 |
| MEASURED | first drive of a fresh system-pool pod after a roll (state builder replays the feed) | drives stall ~7-10 min | prod | 2026-11-03 | noetl/ai-meta wiki Sessions-Log 2026-11-03 (early) |
| MEASURED | command-bus writer restart (lease election) | failover window 21 s; plan for a 20-60 s write outage | prod | 2026-11-04 | noetl/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).
| Page | Badge | Status | Verified against | Landed |
|---|---|---|---|---|
| The NoETL Book | — | written | — | 2026-11-13 (#1) |
| Foreword | — | not written | ||
| Introduction | REAL | written | claims linked to Ch. 1–11; no version-specific numbers | 2026-11-14 (#10) |
| How to Read This Book: Status Badges, Quizzes and Traces | REAL | written | resource model labels, server v3.161.2 | 2026-11-13 (#65) |
| Getting Started | REAL | written | CLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml) | 2026-11-14 (#11) |
| Installation | REAL | written | CLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml) | 2026-11-14 (#11) |
| Hello, Playbook | REAL | written | CLI v6.4.1; install channels on clean runners 2026-11-14 (install-paths.yml) | 2026-11-14 (#11) |
| Running It Locally with the CLI | REAL | written | CLI 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 Playbook | REAL | written | CLI v6.4.1 (run in CI); data pinned at server 983e36e | 2026-11-13 (#12) |
| What NoETL Is | REAL | written | server v3.161.2 (983e36e), worker v6.15.0 | 2026-11-15 (#64) |
| Declarative Orchestration | REAL | written | server v3.161.2 orchestrate-core (WorkflowOrchestrator) | 2026-11-15 (#64) |
| Event Sourcing: The Log Is the Truth | REAL | written | server v3.161.2 (983e36e) | 2026-11-15 (#64) |
| Ephemeral Blueprints and Stateless Workers | REAL | written | worker v6.15.0 | 2026-11-15 (#64) |
| Two Catalogs: Internal Objects vs Business Data | PARTIAL | written | server v3.161.2: catalog in Postgres by default; EHDB-only is the target (PARTIAL) | 2026-11-15 (#64) |
| Anatomy of a Playbook | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#58) |
apiVersion, kind, metadata | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#58) |
workload, vars and Templating | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#58) |
workflow: Steps | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#58) |
keychain: Credentials by Reference | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#58) |
workbook: Reusable Tasks | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#58) |
| Tools | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model | 2026-11-13 (#59) |
| The Tool Kinds | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model | 2026-11-13 (#59) |
| The Ordered Tool List: One Command, One Slot | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model | 2026-11-13 (#59) |
| Results, References and Size Limits | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1; resource model | 2026-11-13 (#59) |
| Control Flow | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#60) |
next, Arcs and Routers | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#60) |
when Guards | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#60) |
loop: — Sequential, Parallel, Cursor | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#60) |
| Back-Edges: Loops as Goto | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#60) |
| Errors, Timeouts and Retries — What Is Enforced | PARTIAL | written | server v3.161.2 (983e36e), worker v6.15.0, tools v4.6.0, CLI v6.4.1 | 2026-11-13 (#60) |
| Composition: Sub-Playbooks | REAL | written | tools 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 Executions | REAL | written | tools 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 Costs | REAL | written | tools 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 run | REAL | written | CLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table | 2026-11-14 (#18) |
| One Process, One Interpreter | REAL | written | CLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table | 2026-11-14 (#18) |
| Local Tool Kinds and Their Limits | REAL | written | CLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table | 2026-11-14 (#18) |
Iterating Without loop: — Arcs, SQL and Rhai | REAL | written | CLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table | 2026-11-14 (#18) |
The Local Event Buffer and noetl push | REAL | written | CLI v6.4.1 (source + CI examples); server v3.161.2 for the comparison table | 2026-11-14 (#18) |
The Daemon: noetl subscribe and noetl serve | REAL | written | CLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/ | 2026-11-14 (#19) |
| Subscriptions: NATS, Pub/Sub, Kafka | REAL | written | CLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/ | 2026-11-14 (#19) |
| Spooling and the Event Trail | REAL | written | CLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/ | 2026-11-14 (#19) |
| Dispatching to a Server | REAL | written | CLI v6.4.1 (src/subscribe/, noetl serve --help, a timer run); tools v4.6.0 source/ | 2026-11-14 (#19) |
| The Distributed Runtime | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, gateway v3.22.1 | 2026-11-15 (#77) |
| Gateway: The Gatekeeper | REAL | written | gateway v3.22.1; server v3.161.2 (should_publish) | 2026-11-15 (#77), #81, #83 |
| Server: The Orchestrate-Core Drive | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, gateway v3.22.1 | 2026-11-15 (#77) |
| The Command Bus and Worker Pools | REAL | written | server v3.161.2 (983e36e), worker v6.15.0, gateway v3.22.1 | 2026-11-15 (#77) |
| Slots, Pools and KEDA Autoscaling | REAL | written | worker v6.15.0; resource model DEPLOYED as of 2026-11-11 (server v3.161.2) | 2026-11-15 (#77) |
| Following One Execution End to End | REAL | not written | ||
| Choosing a Runtime, and When Not to Use NoETL | REAL | written | Ch. 3–9 (as cited per cell); resource model @ server v3.161.2 | 2026-11-14 (#20) |
| What NoETL Is Good At | REAL | not written | ||
| When a Program Is Better | REAL | written | resource 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 Better | REAL | not written | ||
| NoETL and AI Agents | PARTIAL | not written | ||
| NoETL and MCP Servers | PARTIAL | not written | ||
| NoETL and Microservices | REAL | not written | ||
| A Decision Guide | REAL | not written | ||
| Project: Taking Your Playbook Distributed | REAL | not written | ||
| EHDB: The Event Horizon Database | REAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| Why NATS Was Replaced | REAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| The Append Log: Parts, Segments, Manifest | REAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| Bloom Filters and the Prune Floor | REAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| Two Buses: Commands and Events | REAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| Writer Election and Fencing | REAL | written | ehdb 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 Tail | PARTIAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| The Chain Store | PARTIAL | written | ehdb v0.15.1, server v3.161.2, worker v6.15.0; deployment facts from the dated ai-meta wiki record | 2026-11-15 (#83) |
| EHDB as the State Substrate | TARGET | not written | ||
| Embedded State: One EHDB per Shard | PARTIAL | not written | ||
| The Execution-Partitioned Event Store (RFC #355) | TARGET | not written | ||
| What Retiring Reconcile and Re-Drive Buys | TARGET | not written | ||
| ehgraph: A Graph Database for Topology | PARTIAL | written | ehgraph 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 Jobs | REAL | written | server 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-22 | 2026-11-26 |
| The Model: a Labeled Property Graph with History | PARTIAL | written | ehgraph 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-1278 | 2026-12-01 |
| Querying: openCypher, Query API v2 and Bolt | PARTIAL | written | ehgraph 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 |
| Transactions | PARTIAL | written | ehgraph 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-run | 2026-12-01 |
| ehgraph Inside the Server | PARTIAL | written | server 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:49 | 2026-12-01 |
| Operations: Backup, Compaction and Budgets | PARTIAL | written | ehgraph 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-run | 2026-12-01 |
| Where It Is Heading: a Read Model for Runtime Topology | TARGET | written | ai-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 reading | 2026-12-01 |
| The Catalog | PARTIAL | written | noetl/catalog 473b2d5 README, Cargo.toml, docs/wiki/Home.md, design/catalog-model.md, catalog-api router; no git tags | 2026-12-01 (Ch. 16 outline) |
| Two Catalogs | PARTIAL | written | noetl/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 fold | 2026-12-01 (Ch. 16 outline) |
| The Model | PARTIAL | not written | ||
| Four Datasets | PARTIAL | written | catalog-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_catalog | 2026-12-01 (Ch. 16 outline) |
| The HTTP API | PARTIAL | not written | ||
| Ingest and a New Type | PARTIAL | not written | ||
| What the EHDB Pin Requires | PARTIAL | not written | ||
| Not in These Sources | — | not written | ||
| Cross-Instance Execution: "Run It on B" | PARTIAL | written | server 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-11 | pending (#27) |
| Instance Identity and the Peer Registry | PARTIAL | not written | ||
remote: import vs remote: delegate | PARTIAL | written | server 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.2 | pending (#27) |
| Pins Across Instances | PARTIAL | written | server v3.165.5 src/services/catalog_remote.rs and catalog_cas.rs; noetl/ops kind test at 7695b1b | pending (#27) |
| Flags and the Fail-Closed Allowlist | PARTIAL | not written | ||
| Which Runtimes Can Call Another Instance | PARTIAL | not written | ||
| What Is Still TARGET | TARGET | not written | ||
| MCP and Agents | REAL | not written | ||
kind: mcp: Calling MCP Servers | REAL | not written | ||
kind: agent: Agent Steps | REAL | not written | ||
| A Playbook as an MCP Server | REAL | not written | ||
| A Playbook as an Agent | REAL | not written | ||
| The Interop Matrix Across Runtimes | PARTIAL | not written | ||
| Project: Expose a Playbook as an MCP Tool and Call It from an Agent | REAL | not written | ||
| Coroutines and Structured Concurrency | TARGET | not written | ||
| Concurrency Today: Fan-Out, Fan-In and Its Gaps | REAL | not written | ||
| Leaf Units and Ownership | TARGET | not written | ||
spawn, join, select | TARGET | not written | ||
| Cancellation and Slots | TARGET | not written | ||
| Flags and the Staged Rollout | TARGET | not written | ||
| The Resource Model | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| Labels: MEASURED, DEPLOYED, DEFAULT, GUIDANCE, TARGET | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| Per-Step-Kind Costs | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| Limits: WASM Fuel, Agent Caps, Context Sizes | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| The Slot and Pool Model | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| Estimating a Playbook Before You Run It | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| What Is Not Yet Measured | REAL | written | resource model at server v3.161.2 (as_of 2026-11-11); code checks worker v6.15.0, tools v4.6.0 | 2026-11-15 (#79) |
| Orchestration Overhead | PARTIAL | not written | ||
| Where a Step's Time Goes | REAL | not written | ||
| Postgres vs EHDB on the Hot Path | REAL | not written | ||
| The Ranked Fixes | PARTIAL | not written | ||
| Measuring Honestly | REAL | not written | ||
| WASM at the Edge | PARTIAL | not written | ||
| Purity: What Can Compile | PARTIAL | not written | ||
| From Playbook to Module: The Compiler Stages | PARTIAL | not written | ||
| A Playbook in a Cloudflare Worker | REAL | not written | ||
| Parity and Limits | PARTIAL | not written | ||
| Project: Ship a Pure Playbook to the Edge | PARTIAL | not written | ||
| Agent and Bot Fleets on NoETL | PARTIAL | not written | ||
| The Shared-VM Baseline | PARTIAL | not written | ||
| Isolation and Scoped Credentials | PARTIAL | not written | ||
| Cost and Concurrency | PARTIAL | not written | ||
| The Architecture to Win | PARTIAL | not written | ||
| Case Study: A Quantum Compilation Pipeline on the Local Runtime | REAL | not written | ||
| The Pipeline and Its Honest Defaults | REAL | not written | ||
| Validate Before You Run | REAL | written | noetl/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 Deadlines | REAL | not written | ||
| Shell as the Escape Hatch | REAL | written | noetl/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 Modes | REAL | written | noetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08) | 2026-11-15 |
| Local kind First | REAL | written | noetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08) | 2026-11-15 |
| Production on GKE | REAL | written | noetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08) | 2026-11-15 |
| Deploy by Digest | REAL | written | noetl/ops 6c55cbe; ai-meta playbooks 0e835fd; dated record (ai-meta#267, #323, wiki Sessions-Log 2026-09-08) | 2026-11-15 |
| Releases and Version Pinning | REAL | written | semantic-release.yml, release.yml, .releaserc.json on main of server, worker, tools, cli, gateway (read 2026-11-15); run logs; commit-analyzer default rules | 2026-11-15 |
| Rollout and Rollback Discipline | REAL | written | ai-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 Alerting | REAL | written | server v3.161.2, worker v6.15.0, gateway v3.22.1, CLI v6.4.1; noetl/ops 3f63656; dated record ai-meta#471 | 2026-11-15 |
| Credentials and Secrets | REAL | written | server 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 True | REAL | not written | ||
| Case Study: The Travel Playbooks | REAL | not written | ||
| From Screen to Playbook to Firestore | REAL | not written | ||
| The Profile Flow: Read, Save, Read Back | REAL | written | noetl/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.rs | 2026-11-17 (#99) |
| Provider Calls: Inline or Child Playbook | REAL | not written | ||
| The Itinerary Planner: State Across Turns | REAL | not written | ||
| Regression-Testing a Playbook Family | REAL | written | noetl/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 Authorization | PARTIAL | not written | ||
| Sign-In Is a Playbook | PARTIAL | not written | ||
| Deny by Default: Two Roles and an Allowlist | PARTIAL | not written | ||
| Who Owns an Execution | PARTIAL | not written | ||
| Granting Roles and Verified Email | PARTIAL | not written | ||
| Case Study: Standing Up the Platform | PARTIAL | not written | ||
| NoETL Provisions NoETL | PARTIAL | not written | ||
| Images: Cloud Build and the Release Pipeline | PARTIAL | not written | ||
| Worker Pools and KEDA | PARTIAL | not written | ||
| Secrets and the EHDB Substrate | PARTIAL | not written | ||
| What the Recipe Declares vs What Runs | PARTIAL | not written | ||
| Data Lineage on NoETL | PARTIAL | not written | ||
| What the Event Log Records About a Run | REAL | written | server 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-19 | 2026-11-19 (#106) |
| References That Name Their Producer | PARTIAL | not written | ||
| Declared Lineage: the Registry | PARTIAL | not written | ||
| Recording Dataset Lineage Yourself | REAL | not written | ||
| Data Governance on NoETL | PARTIAL | not written | ||
| Access Control | PARTIAL | not written | ||
| Audit and Reproducibility | PARTIAL | not written | ||
| Secrets and Personal Data | PARTIAL | not written | ||
| Retention and the Right to Erasure | PARTIAL | not written | ||
| Policy in Playbooks | PARTIAL | not written | ||
| NoETL and Data Mesh | PARTIAL | not written | ||
| Domain Ownership | PARTIAL | not written | ||
| Data as a Product | PARTIAL | not written | ||
| The Self-Serve Platform | REAL | not written | ||
| Federated Governance | PARTIAL | not written | ||
| Appendix A: DSL Reference | REAL | written | generated, server v3.161.2 (983e36e) | 2026-11-13 (#57, #62) |
| Appendix B: Tool Kinds Reference | REAL | written | generated, server v3.161.2 (983e36e); local: CLI v6.4.1 | 2026-11-13 (#57, #63) |
| Appendix C: Feature Flags and Environment Variables | REAL | written | generated, server v3.161.2 (983e36e) | 2026-11-13 (#57), 2026-11-15 (#81: cited runtime flags) |
| Appendix D: The Resource Model, Annotated | REAL | written | generated, server v3.161.2 (983e36e) | 2026-11-13 (#57), 2026-11-15 (#80: Ch. 21 links) |
| Appendix E: Status Ledger — REAL vs TARGET by Chapter | REAL | written | generated from the pages | 2026-11-13 (#47) |
| Appendix F: Myths and Corrections | REAL | written | per row | 2026-11-13 (#61) |
| Appendix G: Glossary | REAL | written | terms as defined in their chapters | 2026-11-13 (#50) |
| Appendix H: Contributing to This Book | REAL | written | book CI tooling | 2026-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).
| Component | Version | Where it is pinned |
|---|---|---|
NoETL CLI (noetl run, local runtime) | 6.4.1 (released 2026-11-15) | examples/NOETL_CLI_VERSION |
| mdBook | 0.4.40 | .github/workflows/book.yml |
| mdbook-linkcheck | 0.7.7 | .github/workflows/book.yml |
| mdbook-quiz | 0.3.12 | .github/workflows/book.yml |
| mdbook-admonish | 1.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.
| Myth | Truth | Source | Checked by | Chapter |
|---|---|---|---|---|
| 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.2 | resource-model read | Ch. 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 43568552091 | CI 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-buffer | Ch. 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.rs | code read | Ch. 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.rs | code read | Ch. 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.1 | examples/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_checks | code read | Ch. 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.1 | examples/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.rs | examples/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.rs | code read | Ch. 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.rs | code read | Ch. 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.1 | examples/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::Shell | examples/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.rs | examples/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 model | code read | Ch. 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.rs | code read | Ch. 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_timeout | code read | Ch. 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 read | Ch. 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.rs | code read | Ch. 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.1 | examples/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 read | Ch. 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 read | Ch. 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 reader | examples/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-161 | code read | Ch. 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, :366 | code read | Ch. 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-1650 | code read | Ch. 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-1983 | code read | Ch. 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-700 | code read | Ch. 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 read | Ch. 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 read | Ch. 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:46 | code read | Ch. 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 read | Ch. 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-Log | code read + dated record | Ch. 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-1033 | code read | Ch. 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-50 | code read | Ch. 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 record | Ch. 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-483 | code read | Ch. 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.md | dated record | Ch. 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.js | run log | Ch. 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.sh | code read | Ch. 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-142 | code read + dated record | Ch. 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 record | Ch. 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-93 | code read | Ch. 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_command | code read | 33.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 probes | code read + probe | 26.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 notes | dated record + measurement | 11.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 search | code read | 36.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-22 | code read + dated record | 15.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) | recount | 15.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.md | code read | 15.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.md | code read | 15.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-22 | dated record | 15.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.
| Term | Meaning | Defined in |
|---|---|---|
| active part | The EHDB file being appended to; its records are the unsealed tail until it seals | 13.2 |
| arc | One outgoing transition in next, optionally guarded by when | 6.1 |
| back-edge | An arc to a step that has already run; forms a loop bounded only by its when | 6.4 |
| bloom filter | A per-part summary that can say a key is definitely absent (no false negatives) or maybe present | 13.3 |
| blueprint | What a playbook is: control flow and policy, with no resident state between invocations | 3.3 |
| business catalog | Domain data read by a playbook step from an external store. The noetl/catalog repository says it does not hold that data | 16.1 |
| business data | Domain data in your own stores, touched only by playbook steps | 3.4 |
| catalog dataset | One of c1–c4, the four EHDB logs noetl/catalog appends to, beside ehdb's d7_catalog | 16.3 |
| catalog repository | noetl/catalog at git 473b2d5: internal-object model and API over EHDB, workspace 0.1.0, no release tag, pinned to ehdb v0.4.5 | 16 |
| chain store | Each execution's events linked by prev_event_id, read by following links | 13.7 |
| change-log compaction | Folding shipped, sealed ehgraph parts into a snapshot after a backup. Off by default. A compacted manifest is on-disk format 2 | 15.6 |
| child execution | The separate execution a kind: playbook step starts, linked by parent_execution_id | 7.1 |
| claim | A worker taking a command: the bus hands it out, and the server's claim endpoint (command.claimed) makes it exclusive | 10.3 |
cmdbus-writer | The worker binary in host mode, run as a StatefulSet: it hosts the EHDB command bus (and usually the event bus) | 10.3 |
| command bus | The durable log of commands per pool and shard, with a claim coordinator; EHDB, not NATS | 10.3 |
| context | A named CLI configuration (noetl context) that can pin a runtime and server | Ch. 8 |
| drive pass | One run of the orchestrator: playbook + folded state in, next commands out; by default a __orchestrate__ command on the system pool | 10.2 |
| EHDB | NoETL's append-only storage engine; the command and event buses and the server's event-log tier | Ch. 13 |
| ehgraph | The ecosystem's labeled-property graph database for topology. One primary per domain. It stores nothing in EHDB | Ch. 15 |
| epoch fence | Refuses durable writes from a writer whose election epoch is stale (off, shadow, enforce) | 13.5 |
| event buffer | A local run's recorded events, $NOETL_LOCAL_DIR/<id>/events.feather; shipped with noetl push | 8.4 |
| event log | An execution's append-only record of everything that happened; state is folded from it | 3.2 |
| exclusive / inclusive | Routing modes: first matching arc vs every matching arc (default exclusive) | 6.1 |
expect | An ehgraph conditional commit: the write applies only while the named element versions, and the graph version if given, still hold | 15.4 |
| gated kind | A kind refused unless a server flag turns it on (agent, mcp) | 5.1 |
| gateway | The client-facing gatekeeper: authenticates, authorizes, proxies to the server and streams results back | 10.1 |
| graph version | The monotonic per-namespace head of an ehgraph change log. One committing batch is one version | 15.2 |
| hop | One kind: playbook call; costs a whole child execution | Ch. 7 |
| internal catalog | NoETL's own objects (playbooks, …) behind /api/catalog/* | 3.4 |
| keychain alias | The name a playbook uses for a credential; resolved by the worker at run time | 4.4 |
| label | A sub-task's name in a tool list; later items read its result as {{ <label>.field }} | 5.2 |
| labeled property graph | ehgraph's model: nodes and directed edges, each with one type and a property map, plus the history of changes | 15.2 |
| local runtime | The CLI's in-process interpreter (noetl run -r local); a separate implementation from the server | Ch. 8 |
| manifest | The versioned list of an EHDB store's sealed parts and its retention point | 13.2 |
| node label | In ehgraph, a node's single type. A different term from a playbook tool-list label | 15.2 |
| orchestration pass | The server's evaluation of arcs, triggered by a completion event | Ch. 6 |
| orchestrator | orchestrate-core's engine: playbook + events in, next commands out; runs as WASM on a worker by default | 3.1 |
| playbook | A YAML document (kind: Playbook, apiVersion: noetl.io/v2) describing a workflow of steps | Ch. 4 |
| policy rules | spec.policy.rules on a tool-list sub-task: continue, retry, jump, break, fail | 6.5 |
| pool | A set of workers claiming one subject family, commands.<pool>.>; chosen per execution (shared, system, subscription) | 10.3 |
| prune floor | The lowest sequence retention must keep, set by the oldest execution not safe to prune | 13.3 |
| read model | A picture projected from a record kept elsewhere. The designs call ehgraph never authoritative | 15.7 |
| read replica | An ehgraph follower that would tail the change log and serve reads. Stage 1, and refused at open today | 15.7 |
| resource model | noetl.ai/dsl/resource-model.json: NoETL's labelled, dated figures for time, slots, limits and fuel | Ch. 21 |
| resource-model label | MEASURED, DEPLOYED, DEFAULT, GUIDANCE, TARGET or NOT_YET_MEASURED: what kind of number a figure is | 21.1 |
| result store | Where a step result above 100 KiB is spilled; the event then carries a reference | 5.3 |
| reverse index | A second row kind inside a catalog dataset, keyed by a U+0001 sentinel, so a reverse query adds no dataset | 16.3 |
| seal | Closing the active part into an immutable part (8 MiB, 1024 records, or an optional age) | 13.2 |
| session graph | An ehgraph scope loaded once into memory and pinned at a graph version until refresh, close, or expiry | 15.2 |
set: | Server-side step mutations, persisted as a ctx.updated event | 4.2 |
| slot | A worker's unit of concurrency; a command holds one from claim until its tool returns | Ch. 5 |
| soft deactivation | What ehgraph DELETE and graph.deactivate do: the element stays, inactive, with its history and versions | 15.2 |
| spool | Store-and-forward buffer (local_disk in the daemon) that keeps messages while the downstream is down | 9.2 |
start | The step every server execution begins with; the validator requires it | 4.3 |
| step | One named entry of workflow: runs one tool, then routes with next | 4.3 |
| step run | One execution of a step; a step re-run by a back-edge counts once per run when estimating | 21.5 |
step.skipped | The event recorded for a target not taken, or a step whose guard was false | 6.2 |
| subscription | A kind: Subscription document: a message source plus the playbook to run per message | 9.1 |
task_sequence | The single command a tool: list becomes; runs its sub-tasks in order on one worker | 5.2 |
| template | A {{ … }} expression in a string; minijinja on the server, token substitution locally | 4.2 |
| tool / kind | What a step runs; kind names the tool (http, python, …) | Ch. 5 |
| unsealed tail | Records in the active part, on the local disk only until it seals | 13.6 |
| workbook | Named, reusable tool definitions a step references with kind: workbook | 4.5 |
| workload | A playbook's inputs, read as {{ workload.<key> }}, overridable per run | 4.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:
| File | Decides |
|---|---|
specs/001-noetl-book/spec.md | Every chapter's acceptance criteria, plus the book-wide checklist (CH-ALL) |
.specify/memory/constitution.md | The non-negotiable rules: honest badges, verify before REAL, one issue per PR, checks are gates |
docs/ROADMAP.md | The 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:
"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.
A TARGET subject: designed in an RFC, not built. The callout names the RFC and says what exists today instead.
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:
- 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.
- Every question explains itself in its
contextfield, citing the source when the answer is a fact about the code. - 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
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:
| Check | Command | Fails on |
|---|---|---|
| Build | mdbook build | a missing chapter file, a bad quiz, a preprocessor error |
| Links | (part of mdbook build) | any broken internal link; external links are checked weekly |
| Examples | tools/run-examples.sh | an 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.