{
  "as_of": "2026-11-11",
  "concurrency": {
    "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",
        "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"
          }
        ],
        "source": "prod cluster read, as_of"
      },
      "measured": [
        {
          "date": "2026-07-31",
          "environment": "prod",
          "label": "MEASURED",
          "source": "noetl/ai-meta wiki Home (#210)",
          "value": "replicas 2 -> 4 -> 8 -> 16 -> 20 -> 2",
          "what": "user pool under 200 real executions (200/200 completed)"
        },
        {
          "label": "NOT_YET_MEASURED",
          "value": null,
          "what": "time for the user pool to ramp under load on the EHDB trigger"
        },
        {
          "environment": "prod",
          "label": "MEASURED",
          "source": "noetl/ai-meta playbooks/load-test/README.md",
          "value": "~60-90 s",
          "what": "GKE Autopilot node provisioning when a scale-up needs a new node"
        }
      ]
    },
    "measured": [
      {
        "date": "2026-07-30",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy)",
        "value": "p50 138.5 / p95 156.4 / p99 181.0 ms (n=60)",
        "what": "command.issued -> command.claimed, pool not saturated"
      },
      {
        "date": "2026-07-30",
        "environment": "prod",
        "label": "MEASURED",
        "note": "this measures the pool queue, not the bus",
        "source": "noetl/ai-meta wiki Sessions-Log 2026-07-30 (prod deploy)",
        "value": "p50 2123 / p99 3735 ms",
        "what": "same, with 90 commands offered in 1.2 s against 8 slots (2 replicas x 4)"
      },
      {
        "date": "2026-09-03",
        "environment": "prod",
        "label": "MEASURED",
        "note": "p95 at c=1 rests on single samples",
        "source": "noetl/ai-meta wiki Umbrella-Request-Latency",
        "value": "c=1 p50 120-150 ms; c=2 p50 140-150 ms; c>=4 bimodal with errors and 30 s timeouts",
        "what": "POST /api/execute submit latency by client concurrency (server v3.100.4, 2 reps)"
      },
      {
        "label": "NOT_YET_MEASURED",
        "value": null,
        "what": "sustained executions per second the platform can complete"
      }
    ],
    "pools": [
      {
        "capacity_slots": "8 at min, 80 at max",
        "cpu": "250m request / 2 limit",
        "label": "DEPLOYED",
        "memory": "256Mi request / 768Mi limit",
        "pool": "worker-rust-pool (user pool, Deployment noetl-worker-rust)",
        "replicas": "2 (KEDA 2-20)",
        "slots_per_replica": 4,
        "source": "prod cluster read, as_of"
      },
      {
        "capacity_slots": 4,
        "cpu": "750m request / 2 limit",
        "label": "DEPLOYED",
        "memory": "3Gi / 3Gi",
        "pool": "worker-system-pool (Deployments noetl-worker-system-pool + -shard1)",
        "replicas": "1 + 1, fixed (no autoscaler)",
        "slots_per_replica": 2,
        "source": "prod cluster read, as_of"
      }
    ],
    "routing": {
      "label": "DEFAULT",
      "source": "noetl/worker@d1c9584 src/worker.rs:233-244",
      "text": "A worker claims only its pool's subject (commands.<pool>.>); 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": [
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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%."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "GUIDANCE",
      "rule": "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."
    },
    {
      "label": "TARGET",
      "rule": "Orchestrator-driven resume of a hosted agent loop after a worker dies (today the step restarts from turn 1).",
      "source": "noetl/server orchestrate-core dsl-manifest worker_runtime.agent.playbook_tools.not_durable"
    }
  ],
  "labels": {
    "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": [
    {
      "env": "NOETL_WASM_FUEL",
      "label": "DEFAULT",
      "note": "0 / off / none / unlimited removes the limit; an unparseable value keeps the default; a trip increments noetl_worker_plugin_limit_trips_total{limit}",
      "source": "noetl/worker@d1c9584 src/plugin.rs:41",
      "unit": "fuel units per invocation",
      "value": 10000000000
    },
    {
      "env": "NOETL_WASM_TIMEOUT_MS",
      "label": "DEFAULT",
      "note": "10 ms deadline granularity",
      "source": "noetl/worker@d1c9584 src/plugin.rs:44",
      "unit": "ms wall clock per invocation",
      "value": 30000
    },
    {
      "env": "NOETL_WASM_MAX_MEMORY_MB",
      "label": "DEFAULT",
      "source": "noetl/worker@d1c9584 src/plugin.rs:47",
      "unit": "MiB linear memory",
      "value": 1024
    },
    {
      "env": "NOETL_AGENT_MAX_TOOL_CALLS",
      "label": "DEFAULT",
      "note": "positive integers only; the model cannot raise it; exceeding it ends the step with agent.final refused: tool_call_budget",
      "source": "noetl/worker@d1c9584 src/executor/agent_host.rs:50",
      "unit": "tool calls per agent step",
      "value": 32
    },
    {
      "env": "NOETL_AGENT_TOOL_TIMEOUT_SECS",
      "label": "DEFAULT",
      "source": "noetl/worker@d1c9584 src/executor/agent_host.rs:51",
      "unit": "s per playbook-bound child",
      "value": 180
    },
    {
      "env": "WORKER_MAX_CONCURRENT",
      "label": "DEFAULT",
      "source": "noetl/worker@d1c9584 src/config.rs:115-118",
      "unit": "slots per worker process",
      "value": 4
    },
    {
      "env": "NOETL_EVENT_RESULT_CONTEXT_MAX_BYTES",
      "label": "DEFAULT",
      "note": "a step result above it is spilled to the result store and replaced by a reference: a downstream read then costs a fetch",
      "source": "noetl/worker@d1c9584 src/executor/command.rs:1843, 1857-1865",
      "unit": "bytes",
      "value": 102400
    },
    {
      "env": "NOETL_COMMAND_CONTEXT_MAX_BYTES",
      "label": "DEFAULT",
      "note": "a command context above it is offloaded as a __context_ref__",
      "source": "noetl/server src/config/app.rs:242-246",
      "unit": "bytes",
      "value": 524288
    },
    {
      "label": "DEFAULT",
      "source": "noetl/server src/main.rs:640-645 (the axum default; no explicit layer)",
      "unit": "bytes",
      "value": 2097152,
      "what": "request body limit on /api/execute and /api/events"
    },
    {
      "label": "DEFAULT",
      "source": "noetl/server src/services/execution.rs:694",
      "unit": "most recent events",
      "value": 2000,
      "what": "GET /api/executions/{id} events returned"
    },
    {
      "env": "NOETL_EVENT_EMIT_OUTAGE_BUDGET_SECS",
      "label": "DEFAULT",
      "note": "extra retry window for event emits during a server outage; the slot stays held",
      "source": "noetl/worker@d1c9584 src/client/control_plane.rs:125, 133-140",
      "unit": "s",
      "value": 120
    },
    {
      "env": "NOETL_WORKER_DRAIN_TIMEOUT_SECS",
      "label": "DEFAULT",
      "note": "on SIGTERM a worker finishes in-flight commands within this budget",
      "source": "noetl/worker@d1c9584 src/worker.rs:1139",
      "unit": "s",
      "value": 150
    },
    {
      "costs": [
        {
          "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": null,
          "what": "latency of a URI fetch"
        }
      ],
      "deployed": {
        "label": "DEPLOYED",
        "source": "prod cluster read, as_of",
        "value": "off on prod (no catalog CAS / pinning / discovery / URI flags in the server env)"
      },
      "gates": [
        "NOETL_CATALOG_URI_FETCH",
        "NOETL_CATALOG_URI_ALLOW"
      ],
      "label": "DEFAULT",
      "value": "off; the allowlist is empty by default, which fetches nothing (fail closed, HTTP 403)",
      "what": "catalog URI fetch (source: references)"
    },
    {
      "cost": "pinning adds no fetch: resolution is a bounded catalog lookup. Without pinning, /api/execute reads the latest catalog row on every request (no cache)",
      "deployed": {
        "label": "DEPLOYED",
        "source": "prod cluster read, as_of",
        "value": "off on prod"
      },
      "gates": [
        "NOETL_CATALOG_PINNING",
        "NOETL_CATALOG_HOT_RELOAD"
      ],
      "label": "DEFAULT",
      "source": "noetl/server orchestrate-core/src/catalog.rs:338-353, 406-416, 505-529; src/handlers/execute.rs:687-699",
      "value": "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",
      "what": "version pinning and hot reload"
    },
    {
      "cost": "every iteration and every back-edge pass is a full step: it pays the per-step orchestration cost below and holds a slot",
      "label": "DEFAULT",
      "parallel": "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",
      "source": "noetl/server orchestrate-core/src/orchestrator.rs:150-198, 1119-1240, 1783-1820; src/playbook.rs:778-780",
      "value": "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.",
      "what": "loops and back-edges (goto)"
    },
    {
      "env": "NOETL_RECONCILE_MAX_NOOPS",
      "label": "DEFAULT",
      "note": "how long a stuck execution is re-driven before the server stops",
      "source": "noetl/server src/config/app.rs:702-726",
      "unit": "consecutive no-progress polls at an 8 s tick (~30 min)",
      "value": 225
    }
  ],
  "metrics": {
    "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/tools@v4.6.0 (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"
      }
    ],
    "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.",
    "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"
      }
    ],
    "server_prometheus_source": "noetl/server src/metrics.rs, served at GET /metrics",
    "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"
      }
    ],
    "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"
  },
  "model_version": 1,
  "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": {
    "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.",
    "measured": [
      {
        "date": "2026-08",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/travel wiki playbook-itinerary-planner#latency",
        "value": "~4.5 s per step",
        "what": "fixed cost per step in the travel itinerary planner; events spaced a near-uniform 0.8-1.2 s apart"
      },
      {
        "date": "2026-08",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/travel wiki playbook-itinerary-planner#latency",
        "value": "~82%",
        "what": "share of a planner turn that is orchestration (63 events, ~15-17 s of work in a ~76-107 s turn)"
      },
      {
        "date": "2026-08-18",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/ai-meta wiki Sessions-Log 2026-08-18",
        "value": "79%",
        "what": "10-hop probe playbook: share of a turn in two command-dispatch gaps per hop (~510 ms p50 each)"
      },
      {
        "environment": "prod and kind",
        "label": "MEASURED",
        "source": "noetl/server src/metrics.rs (doc comment on noetl_event_ingest_phase_seconds)",
        "value": "~336 ms / ~1021 ms on prod, ~40 ms on kind",
        "what": "server event ingest per emit: command.started / command.completed vs call.done (three emits per hop)"
      },
      {
        "date": "2026-11-04",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/ai-meta wiki Sessions-Log 2026-11-04",
        "value": "17.0-21.2 s / 6.4-7.0 s",
        "what": "prod smoke turns through the gateway: travel planner turn / ranch concierge turn"
      },
      {
        "date": "2026-11-03",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/ai-meta wiki Sessions-Log 2026-11-03 (early)",
        "value": "drives stall ~7-10 min",
        "what": "first drive of a fresh system-pool pod after a roll (state builder replays the feed)"
      },
      {
        "date": "2026-11-04",
        "environment": "prod",
        "label": "MEASURED",
        "source": "noetl/worker wiki cmdbus-writer-tier-service",
        "value": "failover window 21 s; plan for a 20-60 s write outage",
        "what": "command-bus writer restart (lease election)"
      }
    ],
    "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."
  },
  "purpose": "Plan a playbook's time, slots, fuel, memory and tool calls before running it, then measure the run and refine.",
  "read_first": [
    "Latency on NoETL is dominated by orchestration per step, not by the work a step does. Count steps and sub-playbook hops before estimating anything else.",
    "Measurements are dated and environment-specific. A figure from kind does not transfer to prod, and an older figure may predate a fix.",
    "Live values beat this file: a running server answers /api/dsl/version; a running worker's limits are its env; actual cost is in the events and metrics listed under metrics."
  ],
  "step_kinds": {
    "kinds": [
      {
        "execution": "subprocess",
        "holds_slot": "whole run",
        "kind": "python",
        "measured": [
          {
            "date": "2026-05",
            "environment": "kind",
            "label": "MEASURED",
            "source": "noetl/ai-meta handoffs/archive/2026-05-23-gke-provision-validation/round-01-prompt.md",
            "value": "0.66 s warm / 1.20 s cold",
            "what": "test/simple_python playbook end to end on idle kind"
          },
          {
            "date": "2026-08-24",
            "environment": "prod",
            "label": "MEASURED",
            "source": "noetl/travel wiki playbook-itinerary-planner (#286); noetl/ai-meta wiki Sessions-Log 2026-08-24",
            "value": "9.3 s -> 3.0 s",
            "what": "provider dispatch moved from a kind: playbook child to inline python (HotelBeds hotels)"
          }
        ],
        "memory_class": "the subprocess shares the worker pod's memory limit; stdout is collected whole",
        "other_limits": [
          {
            "label": "DEFAULT",
            "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/python.rs:23",
            "unit": "s",
            "value": 30,
            "what": "remote script-source loader"
          }
        ],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "none unless the step sets timeout_seconds",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/python.rs:637, 675-700",
          "value": null
        }
      },
      {
        "execution": "in-process (reqwest)",
        "holds_slot": "whole request",
        "kind": "http",
        "measured": [],
        "memory_class": "the response body is held in memory",
        "other_limits": [
          {
            "label": "DEFAULT",
            "meaning": "none: the body is read in full",
            "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/http.rs:249-259",
            "value": null,
            "what": "response body cap"
          }
        ],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "client default; per-request timeout_seconds overrides it",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/http.rs:81, 167-168",
          "unit": "s",
          "value": 30
        }
      },
      {
        "execution": "in-process (deadpool-postgres, a pool per connection string)",
        "holds_slot": "whole query",
        "kind": "postgres",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "none set by the tool",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/postgres.rs:202-224",
          "value": null
        }
      },
      {
        "aliases": [
          "ducklake"
        ],
        "execution": "in-process (spawn_blocking)",
        "holds_slot": "whole query",
        "kind": "duckdb",
        "measured": [],
        "memory_class": "runs inside the worker process: a large query spends the pod's memory limit",
        "timeout": {
          "label": "DEFAULT",
          "meaning": "none",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/duckdb.rs:360",
          "value": null
        }
      },
      {
        "execution": "in-process (spawn_blocking)",
        "holds_slot": "whole script",
        "kind": "rhai",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "none, and no operation limits are set",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/rhai.rs:46, 76-81",
          "value": null
        }
      },
      {
        "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",
        "kind": "wasm",
        "measured": [
          {
            "date": "2026-06",
            "environment": "kind (fresh system-pool pod)",
            "label": "MEASURED",
            "source": "noetl/worker wiki deployment-specification (boot warmup)",
            "value": "~1.5 s once",
            "what": "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"
          }
        ],
        "other_limits": [
          {
            "env": "NOETL_WASM_FUEL",
            "label": "DEFAULT",
            "source": "noetl/worker@d1c9584 src/plugin.rs:41, 131",
            "unit": "fuel units",
            "value": 10000000000
          },
          {
            "env": "NOETL_WASM_MAX_MEMORY_MB",
            "label": "DEFAULT",
            "source": "noetl/worker@d1c9584 src/plugin.rs:47, 138-143",
            "unit": "MiB linear memory",
            "value": 1024
          }
        ],
        "serialization_source": "noetl/worker@d1c9584 src/executor/command.rs:163, 2415",
        "timeout": {
          "env": "NOETL_WASM_TIMEOUT_MS",
          "label": "DEFAULT",
          "source": "noetl/worker@d1c9584 src/plugin.rs:44, 132-137",
          "unit": "ms",
          "value": 30000
        }
      },
      {
        "execution": "remote JSON-RPC over HTTP",
        "holds_slot": "whole call",
        "kind": "mcp",
        "measured": [],
        "timeout": {
          "env": "NOETL_MCP_REQUEST_TIMEOUT_SECONDS",
          "label": "DEFAULT",
          "meaning": "used when the step sets no timeout; clamped to NOETL_WORKER_COMMAND_TIMEOUT_SECONDS (default 180 s, read only here)",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/mcp.rs:78-82, 782-810",
          "unit": "s",
          "value": 60
        }
      },
      {
        "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",
        "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",
        "kind": "agent",
        "measured": [
          {
            "label": "NOT_YET_MEASURED",
            "value": null,
            "what": "a hosted LLM (OpenAI / Anthropic) call inside a real playbook step"
          },
          {
            "environment": "local",
            "label": "MEASURED",
            "source": "noetl/travel wiki Travel-SLM-Journey",
            "value": "p50 9.2 s / p95 13.1 s per turn",
            "what": "candidate small language model, unoptimised local serving, 2 generations per turn"
          }
        ],
        "other_limits": [
          {
            "label": "DEFAULT",
            "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/agent.rs:429-433",
            "value": 8,
            "what": "max_turns"
          },
          {
            "label": "DEFAULT",
            "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/agent.rs:464",
            "value": 4096,
            "what": "max_tokens per model call"
          },
          {
            "label": "DEFAULT",
            "meaning": "clamped 1-600",
            "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/agent.rs:697-700",
            "unit": "s",
            "value": 60,
            "what": "mcp_servers[].timeout"
          },
          {
            "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
          },
          {
            "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
          }
        ],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "model HTTP client timeout per request (ToolConfig.timeout default)",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/agent.rs:79-85",
          "unit": "s",
          "value": 300
        }
      },
      {
        "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",
        "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",
        "kind": "playbook",
        "measured": [
          {
            "date": "2026-08-24",
            "environment": "prod",
            "label": "MEASURED",
            "source": "noetl/travel wiki playbook-itinerary-planner (#286); noetl/ai-meta wiki Sessions-Log 2026-08-24",
            "value": "~9 s",
            "what": "orchestration cost of one kind: playbook hop, regardless of the work inside it"
          },
          {
            "date": "2026-08",
            "environment": "prod",
            "label": "MEASURED",
            "source": "noetl/travel wiki playbook-itinerary-planner#latency",
            "value": "~10-15 s per hop",
            "what": "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)"
          },
          {
            "date": "2026-06-29",
            "environment": "prod",
            "label": "MEASURED",
            "source": "noetl/ai-meta wiki Sessions-Log 2026-06-29",
            "value": "median 34.7 s -> 19.4 s (-44%)",
            "what": "paired A/B: provider children inlined into the planner as python (4 places turns each)"
          }
        ],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "start request; the await wait is the step's timeout, else 180 s (return_result) / 300 s (return_step)",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/playbook.rs:42-69, 237-242, 402-405, 433-488",
          "unit": "s",
          "value": 30
        }
      },
      {
        "execution": "remote Kubernetes Job, polled inline every 2 s",
        "holds_slot": "until the Job finishes",
        "kind": "script",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "job.timeout default, also the Job's activeDeadlineSeconds",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/script.rs:110-121, 565-611",
          "unit": "s",
          "value": 600
        }
      },
      {
        "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)",
        "kind": "container",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "the Job's timeout_seconds; none by default",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/container.rs:12-21, 164",
          "value": null
        }
      },
      {
        "execution": "remote REST",
        "holds_slot": "whole statement",
        "kind": "snowflake",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "statement timeout sent in the request body; the HTTP client sets none",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/snowflake.rs:182-185, 435",
          "unit": "s",
          "value": 60
        }
      },
      {
        "execution": "in-process bounded drain (nats / pubsub / kafka / timer)",
        "holds_slot": "one bounded drain",
        "kind": "subscription",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "timeout_ms default, cap 5000; batch default 100, cap 1000",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/source/mod.rs:59-86",
          "unit": "ms",
          "value": 1000
        }
      },
      {
        "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",
        "kind": "task_sequence",
        "measured": [],
        "other_limits": [
          {
            "env": "NOETL_TASK_SEQUENCE_MAX_ITERATIONS",
            "label": "DEFAULT",
            "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/task_sequence.rs:253-257",
            "unit": "iterations",
            "value": 1000000
          }
        ],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "per sub-task",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/task_sequence.rs:213-218",
          "value": null
        }
      },
      {
        "execution": "subprocess",
        "holds_slot": "whole run",
        "kind": "shell",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "none unless the step sets timeout_seconds",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/shell.rs:156-163",
          "value": null
        }
      },
      {
        "execution": "in-process (snowflake / postgres / http / duckdb)",
        "holds_slot": "whole transfer",
        "kind": "transfer",
        "measured": [],
        "timeout": {
          "label": "DEFAULT",
          "meaning": "HTTP client sets none; chunk_size default 1000 rows",
          "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/tools/transfer.rs:262-264, 308",
          "value": null
        }
      },
      {
        "execution": "in-process",
        "holds_slot": "briefly; it still pays the per-step orchestration cost",
        "kind": "noop",
        "measured": []
      }
    ],
    "kinds_note": "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.",
    "no_global_timeout": {
      "label": "DEFAULT",
      "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/registry.rs:241-259",
      "text": "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."
    },
    "retry_config_inert": {
      "label": "DEFAULT",
      "source": "noetl/tools@v4.6.0 (the version noetl/worker pins) src/registry.rs:36-68",
      "text": "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."
    },
    "slot_rule": {
      "label": "DEFAULT",
      "source": "noetl/worker@d1c9584 src/worker.rs:748-754, 848-897 (permit moved into the spawned task)",
      "text": "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."
    }
  }
}
