# LOAD/ folder format reference

A `LOAD/` folder describes a load test for `capacitylab-load`: a `README.md` manifest, one
Arazzo 1.0.1 document with an `x-capacitylab-load` block, and optional data files. This page is
the complete contract for format `load-folder/1`. Everything here is enforced offline by
`capacitylab-load check`.

```bash
bun install -g git+https://trylle.com/oleglugov09-ship-it/capacitylab-load.git   # needs Bun
capacitylab-load init ./LOAD --app shop.example.com   # starter README.md + scenario.arazzo.yaml
capacitylab-load check ./LOAD                          # validate; no network, no secrets needed
capacitylab-load compile ./LOAD --target https://shop.example.com --rps 10 --duration 30s
CAPACITYLAB_KEY=cl_... capacitylab-load run ./LOAD --target https://shop.example.com --smoke --cloud --secrets-file ../.load.env
```

`check` prints `OK` and a summary, or one line per problem: `[code] /LOAD/<file><JSON Pointer>: message`.
After the summary it may print warnings about requests a cache would answer (8.1); they do not fail it.
`compile` prints the generated execution spec without sending traffic. Always run `--smoke`
(one iteration of every workflow) before a real rate. `run` without `--cloud` starts k6 locally in
Docker or Podman; add `--cloud` to run on CapacityLab. If something here does not match what the
CLI does, report it with `capacitylab-load feedback "..."`.

## 1. Folder layout and limits

```text
LOAD/                      # any directory name works; reports always say /LOAD/
├── README.md              # required: YAML front matter manifest + free text
├── shop.arazzo.yaml       # required: the one Arazzo file named by the manifest
└── data/                  # optional: CSV/JSON tables and binary files, flat (no subfolders)
```

- Every file must be named by the manifest (README.md, the Arazzo file, each `data` entry);
  any other file is refused. Names starting with `.` (at any depth) and the `results/`
  directory are ignored, so `.gitkeep` or a local `.load.env` do not break the folder.
- YAML is parsed with the 1.2 core schema; duplicate keys and anchors/aliases are refused.
  JSON is valid YAML.

| Limit | Value |
|---|---|
| Files in the folder (ignored files excluded) | 32 |
| README text after the front matter | 65,536 characters |
| Arazzo document | 1,048,576 characters |
| `data` entries | 10 |
| One CSV/JSON file / all CSV+JSON files | 1 MiB / 4 MiB |
| All binary files (decoded) | 20 MiB |
| Rows / columns per table, bytes per cell | 10,000 / 32 / 1,024 (UTF-8) |
| Workflows (business operations) / distinct operations | 50 / 100 |
| Per step: parameters, replacements, success criteria, outputs | 50, 50, 20, 10 |

## 2. README.md front matter

The file must start with `---` on the first line and close the front matter with `---`
followed by a newline. Unknown keys are refused. The text after the front matter is free prose.

| Key | Required | Allowed values |
|---|---|---|
| `capacitylab` | yes | exactly `"load-folder/1"` |
| `application` | yes | 1-253 characters; a label shown by `check` (the target URL comes from `--target`) |
| `arazzo` | yes | a file directly inside the folder whose name ends `.arazzo.yaml` (`[A-Za-z0-9._-]`, at most 128 characters) |
| `openapi` | yes | `{kind: none}` (recommended), or `{kind: path, path: "../openapi.yaml"}`: a repository-relative path with at most one leading `../`. The CLI never reads it, and the file must not sit inside the folder |
| `data` | no (default `{}`) | map of data name (`[A-Za-z0-9_-]{1,64}`) to a reference, below |
| `secrets` | yes (may be `[]`) | unique names matching `^[A-Z][A-Z0-9_]{0,63}$` |

A data reference is either a string `"data/<file>.csv"` / `"data/<file>.json"` (a table; the
extension picks the format) or an object for a binary file:
`{path: "data/<file>", filename: "<multipart filename>", contentType: "<type>/<subtype>"}`.
`filename` is 1-255 bytes without `/`, `"`, `\` or control characters; `contentType` has no
parameters (`image/png`, not `text/plain; charset=utf-8`). Two entries cannot name the same path.
A declared data file may stay unused.

Every name in `secrets` must be supplied at run time, even if no step uses it. List exactly the
names of `x-capacitylab-load.secrets`.

## 3. The Arazzo subset

### 3.1 Document

| Key | Rule |
|---|---|
| `arazzo` | `1.0.x` or `1.1.x`; write `"1.0.1"` |
| `info` | `title` (required, at most 240 characters) and `version` (required string); `summary`, `description` optional |
| `sourceDescriptions` | 1-8 entries `{name, url, type}`: `name` matches `[A-Za-z0-9_-]+` and is unique; `url` is any string and is never fetched; `type` may only be `openapi` |
| `workflows` | 1-100 workflows |
| `components` | optional: only `parameters`, `inputs`, `successActions`, `failureActions`. Use a parameter as `{reference: $components.parameters.<name>}` (optionally with `value`), an input schema as `$ref: "#/components/inputs/<name>"` |
| `x-capacitylab-load` | required (section 4) |

Any other key on a known object is refused. `x-...` extension keys are ignored everywhere
except the root `x-capacitylab-load`.

**Several hosts.** Each `sourceDescriptions` name is a host. At run time every name gets an
origin with `--target <name>=<origin>`. An unnamed `--target <origin>` fills the first source;
every other source needs a named flag. An origin is `http(s)://host[:port]` without a path,
query or credentials; paths belong in `operationPath`. The cookie jar follows normal cookie
domain rules, so a cookie set by one host is not sent to another unless its `Domain` covers both.

### 3.2 Workflows and steps

| Workflow key | Rule |
|---|---|
| `workflowId` | required, `[A-Za-z0-9_-]{1,120}`; the key of `mix`, `units`, `inputs` |
| `summary` | display name, at most 80 characters (default: `workflowId`); unique across workflows |
| `inputs` | JSON Schema `{type: object, properties: {...}}`; see 3.8 |
| `parameters` | default parameters added to every step; a step parameter with the same `name` and `in` wins |
| `steps` | 1-1024 steps |

| Step key | Rule |
|---|---|
| `stepId` | required, `[A-Za-z0-9_-]{1,120}`, unique in its workflow; also names the operation (3.10) |
| `operationPath` | required. `operationId` is refused (no OpenAPI is loaded); a step `workflowId` is a structured workflow (3.11) |
| `description` | operation display name, at most 80 characters (default: `stepId`); unique across operations |
| `parameters` | 3.4 |
| `requestBody` | 3.5 |
| `successCriteria` | required: must contain the status condition (3.7) |
| `outputs` | 3.6 |
| `timeout` | optional request timeout in milliseconds, 1-3,600,000 |

**operationPath.** `{$sourceDescriptions.<source>.url}#/paths/<path>/<method>`. Write the path
as one JSON Pointer token: `/` becomes `~1`, `~` becomes `~0`. Method is lower case: `get`,
`post`, `put`, `patch`, `delete`, `head` (`options` and `trace` are refused). The path starts
with `/`, is normalized (no `//`, `.` or `..`) and has no `?` or `#`: put the query in parameters.
`{name}` segments are placeholders. Percent-encoding in the fragment is decoded first.

| Request | operationPath |
|---|---|
| `GET /` | `{$sourceDescriptions.target.url}#/paths/~1/get` |
| `POST /api/v1/items/{id}` | `{$sourceDescriptions.target.url}#/paths/~1api~1v1~1items~1{id}/post` |

### 3.3 Values

Every parameter value, replacement value and JSON payload leaf is one of:

- a literal: string, number or boolean (`null` is refused in parameters and form fields);
- a whole reference: `$inputs.<input>`, `$inputs.<input>#/<JSON Pointer>`,
  `$steps.<stepId>.outputs.<output>` or `$steps.<stepId>.outputs.<output>#/<JSON Pointer>`;
- an interpolated string: text with `{reference}` inside, for example
  `"Bearer {$steps.login.outputs.token}"` or `"user-{$inputs.n}@example.com"` (up to 64 parts).

A step reads only outputs of earlier steps of the same workflow that declare that output.
Objects and arrays are not values: declare structure in the payload and replace leaves.

### 3.4 Parameters

`{name, in, value}`. `in` is required and is one of:

| `in` | Behavior |
|---|---|
| `path` | fills placeholder `{name}`; every placeholder exactly once. A literal is a string or number forming one segment (no `/ \ ? #`, CR, LF, not `.` or `..`); the value is URL-encoded |
| `query` | adds `name=value` (URL-encoded). The value must be a string, number or boolean |
| `querystring` | the whole query string, for example `a=1&b=2`; cannot be combined with `query` parameters |
| `header` | sets a request header (name: HTTP token, at most 80 characters) |
| `cookie` | sends one cookie on this request, overriding a jar cookie of the same name; literal values use RFC 6265 cookie characters |

The same `name` + `in` twice is refused (header names ignore case). Header rules:

- Refused: `Host`, `Connection`, `Content-Length`, `Transfer-Encoding`, `Upgrade`; `Cookie`
  (use the cookie jar or `in: cookie`); `Content-Type` on a step with a `requestBody` (use
  `requestBody.contentType`).
- A header or cookie whose name contains `authorization`, `cookie`, `api-key`/`api_key`/`apikey`,
  `token`, `secret` or `password` (any case) cannot hold a literal: use a secret input or an
  earlier step's output.
- `traceparent`, `tracestate`, `baggage` and `x-capacitylab-load-run-id` are replaced by the
  runner. Without your own `User-Agent`, the runner sends `capacitylab-run/<run id>`.

### 3.5 Request bodies

`requestBody: {contentType, payload, replacements}`. GET and HEAD cannot have a body. The
declared body is at most 64 KiB.

| `contentType` | `payload` |
|---|---|
| `application/json` or `application/<x>+json` (parameters such as `; charset=utf-8` allowed); required for a JSON body | any JSON value; string leaves may be references or interpolations |
| exactly `application/x-www-form-urlencoded` | a list of `{name, value}` (at most 64) |
| exactly `multipart/form-data` (the runner adds the boundary) | a list of `{name, value}` and `{name, file: <binary data name>}`; at most 64 parts, 5 files, 20 MiB of files |
| any other type (`text/plain`, `application/xml`, ...) | a string |

`replacements` (at most 50) set one existing value each: `{target, value}`. `target` is a JSON
Pointer into the payload that must already exist (`/items/0/id`). For forms the only targets are
`/<index>/value` and `/<index>/file`. `targetSelectorType: jsonpath` is accepted when the path
resolves to one static location. Writing a reference directly as a payload leaf is equivalent
to a replacement. Values keep their type: a CSV cell is a string, a JSON-data number stays a number.

### 3.6 Outputs and chaining

`outputs: {<name>: <expression>}` with names `[A-Za-z0-9_-]{1,64}` and at most 10 per step:

| Expression | Value |
|---|---|
| `$response.body#/<JSON Pointer>` / `$response.body` | a value from / the whole JSON response body |
| `$response.header.<Name>` | a response header (name ignores case) |
| `$statusCode`, `$url`, `$method` | status code, request URL, method |
| `$request.path.<p>`, `$request.query.<q>`, `$request.header.<h>`, `$request.body#/<ptr>` | what this step sent (credential headers excluded; request body not readable in a workflow that uses secrets) |

Use it later as `$steps.<stepId>.outputs.<name>`, optionally with `#/<pointer>`. If the value
is missing (wrong pointer, non-JSON body), the step fails. Each output is at most 4,096 bytes and
an iteration keeps at most 65,536 bytes of outputs.

### 3.7 successCriteria

Each step needs a status condition written as `$statusCode == 200` or
`$statusCode == 200 || $statusCode == 201` (single spaces, three-digit codes). Those statuses
are the step's expected statuses: any other status fails the step, unless it is a declared
business refusal (4.2). Further criteria are `<selector> <operator> <literal>`, again with
single spaces:

- selector: `$statusCode`, `$response.body#/<pointer>`, `$response.header.<Name>` (or a request selector from 3.6);
- operator: `==`, `!=`, `<`, `<=`, `>`, `>=` (the last four need a number);
- literal: number, `true`, `false`, `null`, or a single-quoted string (`'it''s'`). Double quotes are refused.

`!= null` means "present", `== null` "absent". String equality ignores case; numeric strings
compare as numbers. Conditions with `&&`, `||` (outside the status condition), `!`,
parentheses, `$inputs`/`$steps` references or `type: jsonpath` make the workflow structured
(3.11); `type: regex` is refused.

### 3.8 Workflow inputs

Declare each input under the workflow's `inputs.properties` and give it a generator under
`x-capacitylab-load.inputs.<workflowId>.<input>` (4.1). Both directions are checked. Property
schemas may use only `type`, `title`, `description`, `format`, `default`, `examples`; anything
else (`required`, `enum`, `minLength`, nested schemas, `$ref`) makes the workflow structured,
and its values are then validated at run time. An input is produced once per iteration:
`$inputs.product#/product_id` and `$inputs.product#/category` read the same row.

### 3.9 Run-time behavior

- Rates count workflow iterations. One iteration runs the steps in order, once each, and stops
  at the first failure (unexpected status, failed criterion or response check, missing output
  or input value) or declared business refusal. The remaining steps are skipped.
- Cookies: `Set-Cookie` is stored in a per-VU cookie jar and sent on later requests of the same
  iteration. The jar is emptied between iterations.
- Redirects are never followed. A login that answers 302 needs `$statusCode == 302`; request the
  next page as its own step.
- Every request carries `x-capacitylab-load-run-id`, W3C `traceparent` and `baggage`.

### 3.10 One stepId = one operation

Steps are grouped into operations by `stepId` across all workflows. Steps that share an
operation must send the same request shape: same source, method and path, same `description`,
same status condition, same `checks`/`businessRefusals`/`limits`, and a body of the same
structure (only scalar leaf values may differ). Query/header values may differ. So a `login` step
repeated in several workflows is fine, while `stepId: list` for `GET /products` in one workflow
and `GET /orders` in another is refused. Rename one step, or map it with
`x-capacitylab-load.stepOperations: {<workflowId>: {<stepId>: <operationId>}}`. A workflow
cannot use one operation twice.

### 3.11 Structured workflows (advanced)

Prefer plain request lists. These features switch a workflow to the structured interpreter
(`check` marks it `[workflow]`): step `onSuccess`, `onFailure`, `dependsOn`, `workflowId` (a call;
parameters without `in` are its arguments); workflow `outputs`, `successActions`,
`failureActions`; compound or `type: jsonpath` criteria (with `context`); JSON selector objects
`{context, selector, type}`; constrained input schemas; `x-capacitylab-load.execution`.

- Actions `{name, type: end | goto | retry, stepId? | workflowId?, criteria?}`; `retry` has
  `retryAfter` (0-3600 s, default 0) and `retryLimit` (0-1000, default 1) and is not allowed on
  success. The first action whose criteria hold runs; a failed step without one fails the run.
- Only `mix` workflows are scheduled; the others are callable libraries without weight or unit.
- Budgets `execution.limits.<rootWorkflowId>` (defaults): `maxRequests` 10,000, `maxTransitions`
  10,000, `maxDepth` 16, `maxConcurrency` 8, `maxDurationSeconds` 300, `maxValueBytes` 65,536,
  `maxDataBytes` 1,048,576; per step `execution.steps.<wf>.<step>`: `maxVisits` (default 100),
  `beforeSeconds`, `afterSeconds`, `repetition`.

## 4. The x-capacitylab-load block

| Key | Required | Rule |
|---|---|---|
| `schema` | yes | `"capacitylab.workload-arazzo/1"` |
| `model` | yes | `{kind: open, nominalRate: <n>}`; `n` > 0 in steps of 0.001, at most 1,000,000 workflow iterations/s; the default `--rps`. Or a fixed population: `{kind: closed, users: <1-2500>, maxRate: <n>, think?: 2s \| 500ms \| 1s-5s, rampUp?: 30s}` (7.3) |
| `mix` | yes | `{<workflowId>: <integer 1-1000>}` for every workflow (structured: every root), nothing else |
| `objective` | yes | `{kind: none}`. `{kind: preset, ...}` is accepted and ignored by the CLI |
| `units` | yes | `{<workflowId>: {one: "order", many: "orders"}}` for every workflow in `mix`; each 1-40 characters |
| `correlation` | yes | exactly `{loadRunIdHeader: "x-capacitylab-load-run-id", profile: "capacitylab_target_telemetry", traceContext: "w3c"}` |
| `inputs` | no | `{<workflowId>: {<input>: <generator>}}` (4.1) |
| `secrets` | no (default `[]`) | exactly the set of secret names bound in `inputs` |
| `checks` | no | `{<workflowId>: {<stepId>: [<check>, ...]}}`, at most 50 per step (4.2) |
| `businessRefusals` | no | `{<workflowId>: {<stepId>: [<refusal>, ...]}}`, at most 10 per step (4.2) |
| `limits` | no | `{<workflowId>: {<stepId>: {maxResponseBytes: 1024-67108864}}}`: the largest JSON body the step parses for criteria and outputs; a larger body fails the step |
| `stepOperations` | no | `{<workflowId>: {<stepId>: <operationId>}}` (3.10) |
| `slo` | no | `{default?, workflows?: {<workflowId>: part}, aggregate?}`; part `{latency?: {percentile: p50 \| p90 \| p95 \| p99, maxMs: <int>}, errorRatio?: 0-1}`. Used only by `--stop-when slo` (aggregate, else default) |
| `stop` | no | when the run stops itself on an SLO breach (7.1) |
| `runs` | no | named run profiles: schedule, VUs, stop conditions and release gate of each run (7.2) |
| `setup`, `teardown` | no | a `workflowId` run once before the load (the load waits for it) and once after it (7.4) |
| `background` | no | `{<workflowId>: {rate: <n>}}`, at most 8: workflows outside `mix` at their own iterations/s for the whole run, reported apart (7.4) |
| `execution` | no | structured workflows only (3.11) |

Other keys are refused. Keys of `units`, `inputs`, `checks`, `businessRefusals`, `limits` and
`stepOperations` must name existing workflows and steps.

### 4.1 Input generators

| Generator | Produces per iteration |
|---|---|
| `{kind: row, data: <name>, order: random \| sequential}` | one row of a CSV/JSON data file. Read one column as `$inputs.<input>#/<column>` (the whole row cannot be sent). `random`: uniform, with repeats. `sequential`: file order, cycling, counted per workflow on each generator |
| `{kind: field, input: <row input>, pointer: /<column>}` | an alias for one column, read as `$inputs.<alias>` (strict Arazzo 1.0.1 has no `#` after `$inputs`). Declare the alias in `inputs.properties` too |
| `{kind: secret, name: <SECRET_NAME>}` | the secret value (section 6) |
| `{kind: uuid}` | a random UUID v4 |
| `{kind: iteration}` | the 0-based iteration number of this workflow (integer) |
| `{kind: random, min: <int>, max: <int>, pad: <1-20>}` | a uniform random integer in `[min, max]` (bounds ±10^15). With the optional `pad` it is a string of at least `pad` digits with leading zeros (`7` → `"007"`), and `min` must be ≥ 0 |
| `{kind: date, from: <days>, to: <days>, format: date \| datetime \| unix \| unix_ms}` | the current UTC time plus a uniform random whole number of days in `[from, to]` (±36,500; all fields optional: `from` defaults to 0, `to` to `from`). `date`: `2026-12-05` (default), `datetime`: `2026-12-05T14:03:27Z`, `unix`: seconds, `unix_ms`: milliseconds (integers) |
| `{kind: template, parts: [...]}` | 1-20 parts joined: literal strings and whole `$inputs.<x>` of `uuid`/`iteration`/`random`/`date` inputs; at most 256 characters |
| `{kind: pick, from: "$steps.<stepId>.outputs.<name>"}` | a random element of an array output; usable only in steps after `<stepId>` |
| `{kind: setup, from: "$steps.<stepId>.outputs.<name>", pick: true}` | an output of the setup workflow (7.4), the same in every iteration; with `pick: true` a random element of an array output |

An id from a list the previous step returned:

```yaml
      - stepId: list
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1products/get"
        successCriteria: [{condition: "$statusCode == 200"}]
        outputs: {items: "$response.body#/items"}
      - stepId: product
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1products~1{id}/get"
        parameters:
          - {name: id, in: path, value: "$inputs.picked#/id"}
        successCriteria: [{condition: "$statusCode == 200"}]
    inputs: {type: object, properties: {picked: {type: object}}}
# x-capacitylab-load.inputs.<workflowId>:
#   picked: {kind: pick, from: "$steps.list.outputs.items"}
```

### 4.2 Response checks and business refusals

A check fails the step when it does not hold: `{kind: json_pointer_equals, pointer, expected}`
(any JSON), `{kind: text_contains, expected}` (1-4096 characters), `{kind: body_bytes_equals,
expected}` (integer), `{kind: body_sha256_equals, expected: "sha256:<64 hex>"}`. HEAD has none.

A business refusal is an expected "no" from the application (sold out, limit reached):
`{id: sold_out, statuses: [409], match?: <check>}`. A matching response is counted as a refusal,
not an error, and ends the iteration with outcome `refused`. `id` matches `^[a-z][a-z0-9_]{0,39}$`
and is unique per step; statuses are 2xx or 4xx but not 401/403; a status that is also in the
status condition needs `match`.

## 5. Data files

**CSV**: RFC 4180, comma separated, header row first, at least one data row, `"` quoting with
`""` escapes, LF or CRLF, a UTF-8 BOM is dropped. Every row has as many cells as the header; a
blank line counts as a row and is refused (one final newline is fine). All values are strings.

**JSON**: an array of 1-10,000 flat objects whose values are strings or finite numbers (no
`null`, booleans, arrays or objects). Every object has exactly the keys of the first one. Use
JSON when the API needs numbers.

**Column names** match `^[a-z][a-z0-9_]{0,39}$` and must not look like a credential: a name
containing `authorization`, `cookie`, `api-key`/`api_key`/`apikey`, `token`, `secret` or
`password` is refused with `data_secret_like_column`.

**Generated data.** For values the generators do not cover (names, addresses, related ids, a
skewed mix), generate the table before the run with any script and read it with `row`. The
script runs on your machine, not on the generator; rerun it before each run (for example as a CI
step) to get fresh values. Keep within 10,000 rows and 1 MiB per file:

```sh
python3 - > LOAD/data/buyers.csv <<'PY'
import csv, random, sys
out = csv.writer(sys.stdout, lineterminator="\n")
out.writerow(["email", "city"])
for i in range(10_000):
    out.writerow([f"load-{i}@example.com", random.choice(["Berlin", "Paris", "Rome"])])
PY
```

Declare it in README `data` (`buyers: "data/buyers.csv"`) and bind
`{kind: row, data: buyers, order: sequential}`. Write a JSON array instead when the API needs
numbers.

**Binary files** are sent only as multipart file parts: `{name: photo, file: <data name>}`. To
vary the file per iteration, give a table a column whose cells are binary data names and use the
replacement `{target: "/<index>/file", value: "$inputs.<row>#/<column>"}`; `check` verifies that
every cell names a declared binary file.

## 6. Secrets

1. Name the secret in README `secrets` and in `x-capacitylab-load.secrets`.
2. Declare a workflow input (`password: {type: string}`) bound to `{kind: secret, name: SHOP_TEST_PASSWORD}`.
3. Place it whole: a header (`$inputs.password`), a header after a literal prefix
   (`"Bearer {$inputs.password}"`, no suffix), a cookie parameter, or a string leaf of a JSON body
   (`password: "$inputs.password"`). Refused: path, query, querystring, form-urlencoded and
   multipart bodies, text bodies, interpolation inside a JSON string, `#/pointer` into a secret.

Values are supplied only at `run` (`check` and `compile` need none):

- `--secrets-file <path>`: one `NAME=value` per line; blank lines and lines starting with `#`
  are ignored; spaces around name and value are trimmed; one pair of surrounding `"` or `'` is
  removed. No `export` prefix and no escape processing.
- otherwise the environment variable with the same name. The file wins; an empty value counts
  as missing, and the run stops before any request with `Missing required secrets: <names>`.
- Values never enter `execution-spec.json`. `--cloud` sends them to the CapacityLab API with the
  run request, and the service deletes them as soon as the generator has fetched the run. Local
  (Docker/Podman) runs pass them to k6 as environment variables.

**Test users.** A data column cannot hold passwords: the column-name rule in section 5 refuses
`password`, `user_password`, `access_token` and similar names. A secret is one value for the
whole run and a generator cannot choose a secret per row, so a pool of users with different
passwords is not supported as secrets. Supported pattern: logins (emails) in a CSV column plus
one shared password secret for all test users. A handful of accounts can be separate workflows,
each bound to its own secret. Do not rename a column to get around the rule: the passwords would
then sit in plain text in the repository and in every uploaded spec.

## 7. Load schedule

The rate flags count workflow iterations started per second across all workflows (not HTTP
requests). Each workflow gets `rate × weight / sum of weights`, rounded to 0.001/s; an ordinary
iteration sends one request per step.

| Flag | Meaning |
|---|---|
| `--rps <n>` | constant total rate, `n` > 0 (default `model.nominalRate`) |
| `--duration <d>` | constant-rate duration: an integer with optional `s`, `m`, `h` (`90`, `30s`, `2m`, `1h`); at least 1s; default `30s` |
| `--stages <r>:<d>,...` | multi-stage schedule; replaces `--rps`/`--duration`; `r` ≥ 0, decimals allowed |
| `--start-rps <n>` | rate at the start of the first stage (default: the first stage's target); used only with `--stages` |
| `--max-vus <n>` | total VU ceiling; default `min(2500, max(10, ceil(4 × peak rate)))`, never fewer than the number of workflows; the cloud accepts at most 2500 |
| `--smoke` | ignores rate flags: exactly one iteration of every workflow, 1 VU each |

Each stage ramps linearly from the previous target (for the first stage, from `--start-rps`) to
its own target over its duration. A hold is a stage that repeats the previous target. Staircase
with 10 s ramps and 60 s holds:

```bash
capacitylab-load run ./LOAD --target https://shop.example.com --cloud --stages 10:10s,10:60s,20:10s,20:60s
#  0-10s at 10/s (first stage starts at its own target), 10-70s at 10, 70-80s 10->20, 80-140s at 20
#  add --start-rps 0 to ramp 0->10 during the first 10 s
```

VUs are split by mix share (each workflow at least 1); each workflow pre-allocates
`min(its max, ceil(2 × its peak rate))`. A slow target needs more concurrent VUs; if the cloud
summary reports dropped iterations, raise `--max-vus`.

A run of two or more stages reports one row per stage (ramps and holds alike) and names the last
stage the target held. The rate flags belong to the open model; a closed model takes `--users`,
`--max-rate`, `--ramp-up` and `--duration` (7.3). How to read that and the summary fields: https://capacitylab.dev/docs/results.md;
refusal codes: https://capacitylab.dev/docs/api.md; how to plan a staircase:
https://capacitylab.dev/docs/find-capacity.md.

### 7.1 Stopping on an SLO breach

A capacity search should stop once the target is past its limit instead of pushing it further.
Declare stop conditions in the document; the run stops when **any** condition is broken:

```yaml
x-capacitylab-load:
  # ...
  stop:
    window: 20s                  # a stage is judged once it has run this long (5s-1h, default 20s)
    when:                        # 1-8 conditions
      - name: checkout           # shown in the report (default: the scope)
        p95: 800ms               # at most one of p50 | p90 | p95 | p99: 1ms-600s
        errors: 5%               # failed requests, between 0% and 100% (or 0.05)
        workflows: [checkout]    # only these workflows (default: all)
      - name: browsing without the product page
        p99: 2s
        workflows: [browse]
        exclude: {operations: [product]}   # operations = step ids (or stepOperations ids)
      - errors: 10%              # no scope: all requests
```

This block, added to the shop example (9.2), passes `check` and `compile`.

- **Scope.** A condition counts only the requests of its `workflows` and `operations` (both lists
  must match when both are given), minus `exclude`. Requests outside the scope never stop the run.
  `check` refuses unknown names, a scope that excludes everything, two percentiles in one
  condition and unknown keys, and prints the conditions it will apply.
- **When it is judged.** In a stepped run each stage is judged on its own requests, starting
  `window` seconds after the stage begins, so a few slow requests at the start of a fresh stage
  cannot stop the run. A constant-rate run is judged as one stage.
- **What happens.** k6 stops (exit code 99), the summary has `slo_stop` (`stage_id` and what was
  breached, e.g. `checkout: p95 1192 ms >= 800 ms`), the run pays only for the minutes it ran, and
  the report names the last stage that held the SLO. The CLI prints `Stopped by SLO at <stage>: …`.
- **From the command line.** `--stop-when "p95>800ms,errors>5%"` replaces the block for one run
  with a single condition over all requests; `--stop-when slo` uses `x-capacitylab-load.slo`
  (`aggregate`, else `default`); `--stop-when none` disables stopping; `--stop-window 30s` changes
  the window. `--smoke` never stops on an SLO.

### 7.2 Run profiles

Keep every run of the testing program in the document instead of on the command line, so it is
repeated exactly, reviewed with the code and used by CI. `run --profile <name>` runs one:

```yaml
x-capacitylab-load:
  # ...
  runs:                          # 1-16 profiles; names: letters, digits, _ and -
    search:                      # a staircase: stages (a string or a list) and start
      start: 5
      stages: [5:10s, 5:60s, 10:10s, 10:60s, 20:10s, 20:60s, 40:10s, 40:60s]
      maxVUs: 400
      stop:                      # replaces the document's stop block for this profile
        when:
          - p95: 800ms
            errors: 5%
    confirm: {rps: 15, duration: 20m}            # a constant rate: rps and duration
    soak: {rps: 15, duration: 3h, stop: none}    # none: no stop conditions
    release: {rps: 15, duration: 10m, gate: true, tags: [release]}   # the release gate (default 1 % / 20 %)
    strict: {rps: 15, duration: 10m, gate: {errors: 0%, p95: 10%}}
```

| Key | Rule |
|---|---|
| `rps`, `duration` | a constant rate in iterations/s and its duration (`30s`, `20m`, `3h` or seconds) |
| `stages`, `start` | a staircase as for `--stages` / `--start-rps`; not together with `rps` or `duration` |
| `maxVUs` | 1-2500, as `--max-vus` |
| `users`, `maxRate`, `rampUp` | a closed-model run (7.3): users, the rate ceiling and the ramp-up, with `duration`; not together with `rps`, `stages`, `start` or `maxVUs` |
| `stop` | a stop block as 7.1, or `none` |
| `gate` | `true` or `{errors?, p95?}` (`1%` or a ratio such as 0.01): the run fails the release gate (exit 3) as with `--gate`; defaults 1 % and 20 %. Cloud runs only: a local run of such a profile needs `--no-gate` |
| `tags` | up to 10 tags of the profile's cloud runs, each up to 64 letters, digits and `. _ : = / + -`; `--tag` adds more; `capacitylab-load runs --tag <t>` lists the series. A local run ignores them |

Flags on the command line override the profile:

- no schedule flag: the profile's schedule;
- `--rps` or `--duration` on a constant profile replace that field and keep the other
  (`--rps 5` keeps the profile's duration); on a staircase profile they make a constant run from the
  flags alone;
- `--stages` replaces the profile's schedule (its `start` too; add `--start-rps`);
- `--start-rps` alone changes a staircase profile's start; a constant profile refuses it;
- `--max-vus`, `--stop-when` / `--stop-window`, and `--gate-errors` / `--gate-p95` replace those
  fields; `--no-gate` runs a gated profile without its gate.

`check` validates the profiles and lists them. `--smoke` takes no profile. `status <run-id> --wait`
does not read `LOAD/`: give it the gate flags (the CLI prints them for a `--detach` run). Editing
`runs` or the README text does not change the scenario digest, so comparisons and the
run-to-run spread carry on. The CLI's `Next step:` says which profile to add or update after each run.

### 7.3 Closed model: a fixed population

The open model sends iterations at a set rate whatever the latency: that is how a public site
behaves, and it shows a slow target as queueing and errors. Some systems have a fixed population
instead: operators of an internal CRM, a pool of workers, a call centre. Each user starts the next
iteration only after the previous one and a pause, so a slower target means fewer iterations, not
more queued ones. Describe that with the closed model:

```yaml
x-capacitylab-load:
  model: {kind: closed, users: 40, maxRate: 20, think: 2s-5s, rampUp: 1m}
  runs:
    operators: {users: 40, duration: 20m}
```

| Key / flag | Rule |
|---|---|
| `users`, `--users` | concurrent users, 1-2500, at least one per workflow in `mix`; split by weight (each workflow at least one, the rest by the largest remainder); one VU each |
| `maxRate`, `--max-rate` | the ceiling of workflow iterations/s across all users, split by weight. The generator keeps a workflow within its share: by any moment of the run it has started at most `share × seconds` iterations, and each user starts at most one per `users / share` seconds (after a stall of the target, waiting users may restart at once, one each). The key's rate ceiling applies to it. The price does not depend on it: a run pays for its machine's minutes ([access.md](/docs/access.md#ceilings-and-price)) |
| `think` | a user's pause after each iteration: `2s`, `500ms`, or a uniform range `1s-5s`; at most 10 minutes; default none |
| `rampUp`, `--ramp-up` | time to start all users linearly; the whole run is one stage (no per-stage table) |
| `--duration` | the hold after the ramp-up, default `30s` |

`--rps`, `--stages`, `--start-rps` and `--max-vus` are refused for a closed model, and the closed
flags for an open one; `--smoke` works for both. Pick `maxRate` above the rate the users can reach
(`users / (pause + iteration time)`): when a run reaches its ceiling, the ceiling set the rate, not
the target, and the CLI's `Next step:` says to raise it.

### 7.4 Setup, teardown and background workflows

Some runs need data first (test products, a reset catalog) and a cleanup after, and some systems
have work going on beside the users (a reindex, an import). Describe them as ordinary workflows of
the document, outside `mix`:

```yaml
x-capacitylab-load:
  setup: seed                    # runs once; the load starts only after it succeeded
  teardown: cleanup              # runs once after the load
  background:
    reindex: {rate: 0.2}         # 0.2 iterations/s for the whole run, whatever the load does
  mix: {browse: 70, buy: 30}     # setup, teardown and background workflows have no weight
  inputs:
    browse:
      product: {kind: setup, from: "$steps.create.outputs.ids", pick: true}
    cleanup:
      ids: {kind: setup, from: "$steps.create.outputs.ids"}
```

| | Rule |
|---|---|
| Setup | runs once before any load iteration; the load waits for it. Its step outputs reach the load and teardown through `{kind: setup, from, pick?}` inputs (4.1): each output up to 4 KB, 64 KB in all. If a step fails, the run stops before the load: no load is sent, the run pays only for the minute it ran, teardown is skipped, the CLI exits 1 and the report names the step and its status; such a run never becomes a baseline. Smoke runs it too |
| Teardown | runs once after the load, with the setup outputs (not after a failed setup). A failure does not fail the run: the report warns that test data may be left |
| Background | each at its own `rate` for the whole run (one iteration in a smoke); its requests stay out of the load's numbers, the stop conditions, the verdict and the gate, and the report shows them apart. They do not change the price: a run pays for its machine's minutes |
| Limits | ordinary step lists only (not structured workflows, and not in a document that uses them); no `units` needed. Setup and teardown each finish within 45 s; their requests time out after 15 s unless the step sets `timeout` (3.2), and a step that would run past 45 s fails them. The run's machine and test window get 60 s for each on top of the duration, and each adds 1 iteration to the price. With a setup, each stage's stop conditions are judged 45 s later than without one (k6 counts from the test start, which setup precedes). Background VUs (2-100 each, for iterations of up to 30 s) come out of the run's 2,500 |

## 8. Common check errors

| Message (abridged) | Fix |
|---|---|
| `README.md#front-matter: /secrets Missing key` | add `secrets: []` |
| `The folder holds a file the README.md manifest does not name` | declare it under `data`, or move it out (dotfiles and `results/` are ignored) |
| `.../units/<workflowId>: Missing key` | add a unit for every workflow in `mix` |
| `step X of workflow A and step X of workflow B send operation X with different sources, methods or paths` | same `stepId` for different requests: rename, or use `stepOperations` (3.10) |
| `... under different names` / `... with different expected statuses` / `... request bodies of different structure` | make the shared steps identical, or rename |
| `Operation names must be unique` / `Business operation names must be unique` | two steps share a `description`, or two workflows a `summary` |
| `A step's success criteria include its status condition` | add `$statusCode == 200` exactly (spaces matter; `>=` is not a status condition) |
| `Business operation X needs a mix weight` / `Mix names an unknown business operation` | `mix` must list every workflow, and only those |
| `Input x has no binding` / `Input x is not declared in the workflow's inputs properties` | keep `inputs.properties` and `x-capacitylab-load.inputs` in sync |
| `secrets lists exactly the Account secret names the document places: ...` | set `x-capacitylab-load.secrets` to that list |
| `data_secret_like_column` | rename the column; put credentials in secrets (section 6) |
| `A secret-bearing header must use a secret reference, never a literal value` | use a secret input or a step output |
| `An operation declares no Cookie header ...` | remove the `Cookie` header; rely on the jar or `in: cookie` |
| `A secret is placed only in a header, cookie or JSON body string ...` / `... never in a text body, the path or the query` | move the secret (section 6); form logins cannot take secrets |
| `JSON operations require an application/json Content-Type` | set `requestBody.contentType` |
| `GET cannot declare a body` | use POST/PUT/PATCH, or send query parameters |
| `The placeholder {id} ... is not filled` | add `{name: id, in: path, value: ...}` |
| `Declare the query in query, not the path` | remove `?...` from `operationPath`; use `in: query` |
| `An operationId resolves only against the OpenAPI description` | use `operationPath` |
| `A row input reads one column` / `Data file X has no column Y` | read `$inputs.<row>#/<existing column>` |
| `reads $steps.X, which is this step or a step after it` / `declares no output` | read only earlier steps' declared outputs |
| `Expected no excess property` | unknown or misspelled key (in README `data` also an invalid data name) |
| compile: `Missing --target <name>=<url> for sourceDescriptions: api` | add one `--target <name>=<origin>` per source |
| compile: `Target URL must be an origin without a path` | pass `https://host` only |
| `.../stop/when/0/operations: Unknown operation "x"` | use a step id (or a `stepOperations` id) that exists |
| `Declare at most one latency percentile` / `This stop condition excludes every request` | one of p50/p90/p95/p99 per condition; narrow `exclude` |
| compile: `--stop-when slo needs x-capacitylab-load.slo.aggregate or slo.default …` | declare an SLO or use `--stop-when "p95>…"` |

### 8.1 Warnings: a cache would answer the run

A GET or HEAD request whose URL is the same in every iteration is often answered by a CDN or a
reverse proxy. The run then measures the cache, not the backend, and its "limit" is the cache's.
After the summary, `check` prints one line per GET/HEAD step that will run (workflows in `mix` and
the workflows they call or go to) when its URL (path, query or querystring values):

| Warning | Means | Fix |
|---|---|---|
| `the same request every iteration` | nothing in the request changes; a `secret` is the same in every iteration too | take a path or query value from an input that changes (4.1): `row`, `uuid`, `iteration`, `random` (`min` < `max`), `date` (a range of days or a time format), `pick` |
| `the same URL every iteration, only headers change` | only headers other than `Authorization` change; a cache keyed by the URL ignores them | the same |
| `at most N distinct URLs (from <data>)` | the URL is built only from `row` columns with fewer than 100 distinct values; `sequential` inputs move together | a column with more distinct values, more rows, or another changing input |

A changing `Authorization` header or cookie silences the warning: shared caches do not answer
such requests. A value from an earlier step's output or a call argument counts as changing.
`compile` and `run` print the same lines on stderr, except with `--smoke`. Warnings never change
the exit code: a home page or a health check may be meant to repeat. After a cloud run,
`cache_hits` shows which responses a cache actually answered, by its response headers
([results.md](/docs/results.md)).

## 9. Examples

Each folder below passed `capacitylab-load check ./LOAD` and, except 9.3,
`capacitylab-load compile ./LOAD --target https://shop.example.com --rps 10 --duration 30s`.
They keep their data small to stay readable, so `check` warns (8.1) about 9.1 (the same request)
and 9.2 (3 categories, 4 products); a real test needs more distinct values.

### 9.1 Minimal: one GET workflow

`LOAD/README.md`:

```markdown
---
capacitylab: "load-folder/1"
application: "shop.example.com"
arazzo: "scenario.arazzo.yaml"
openapi:
  kind: "none"
secrets: []
---

Open the home page.
```

`LOAD/scenario.arazzo.yaml`:

```yaml
arazzo: "1.0.1"
info: {title: "Home page", version: "1"}
sourceDescriptions:
  - {name: target, url: "./openapi.yaml", type: openapi}
workflows:
  - workflowId: home
    summary: "Open home page"
    steps:
      - stepId: home
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1/get"
        successCriteria:
          - condition: "$statusCode == 200"
x-capacitylab-load:
  schema: "capacitylab.workload-arazzo/1"
  model: {kind: open, nominalRate: 5}
  mix: {home: 1}
  objective: {kind: none}
  units:
    home: {one: visit, many: visits}
  correlation:
    loadRunIdHeader: "x-capacitylab-load-run-id"
    profile: "capacitylab_target_telemetry"
    traceContext: "w3c"
```

### 9.2 Shop: browse 70 / add to cart 20 / checkout 10

`LOAD/README.md`:

```markdown
---
capacitylab: "load-folder/1"
application: "shop.example.com"
arazzo: "shop.arazzo.yaml"
openapi:
  kind: "none"
data:
  products: "data/products.csv"
secrets:
  - SHOP_TEST_PASSWORD
---

Shop: 70% browse, 20% add to cart, 10% checkout. The test user's password is the
secret SHOP_TEST_PASSWORD, supplied at run time.
```

`LOAD/data/products.csv`:

```csv
product_id,category
p-1001,shoes
p-1002,shoes
p-2001,bags
p-3001,hats
```

`LOAD/shop.arazzo.yaml`:

```yaml
arazzo: "1.0.1"
info: {title: "Shop load", version: "1"}
sourceDescriptions:
  - {name: target, url: "./openapi.yaml", type: openapi}
workflows:
  - workflowId: browse
    summary: "Browse a category and open a product"
    inputs: {type: object, properties: {product: {type: object}}}
    steps:
      - stepId: list
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1products/get"
        parameters:
          - {name: category, in: query, value: "$inputs.product#/category"}
          - {name: page, in: query, value: "1"}
        successCriteria: [{condition: "$statusCode == 200"}]
      - stepId: product
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1products~1{productId}/get"
        parameters:
          - {name: productId, in: path, value: "$inputs.product#/product_id"}
        successCriteria: [{condition: "$statusCode == 200"}]

  - workflowId: add_to_cart
    summary: "Log in and add a product to the cart"
    inputs: {type: object, properties: {product: {type: object}, password: {type: string}}}
    steps:
      - stepId: login
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1auth~1login/post"
        requestBody:
          contentType: "application/json"
          payload: {email: "loadtest@shop.example.com", password: "$inputs.password"}
        successCriteria: [{condition: "$statusCode == 200"}]
        outputs: {token: "$response.body#/token"}
      - stepId: add
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1cart~1items/post"
        parameters:
          - {name: Authorization, in: header, value: "Bearer {$steps.login.outputs.token}"}
        requestBody:
          contentType: "application/json"
          payload: {productId: "$inputs.product#/product_id", quantity: 1}
        successCriteria: [{condition: "$statusCode == 200 || $statusCode == 201"}]
        outputs: {cartId: "$response.body#/cartId"}

  - workflowId: checkout
    summary: "Log in, add a product and place an order"
    inputs: {type: object, properties: {product: {type: object}, password: {type: string}}}
    steps:
      # login and add repeat add_to_cart's steps exactly: same stepId = same operation.
      - stepId: login
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1auth~1login/post"
        requestBody:
          contentType: "application/json"
          payload: {email: "loadtest@shop.example.com", password: "$inputs.password"}
        successCriteria: [{condition: "$statusCode == 200"}]
        outputs: {token: "$response.body#/token"}
      - stepId: add
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1cart~1items/post"
        parameters:
          - {name: Authorization, in: header, value: "Bearer {$steps.login.outputs.token}"}
        requestBody:
          contentType: "application/json"
          payload: {productId: "$inputs.product#/product_id", quantity: 1}
        successCriteria: [{condition: "$statusCode == 200 || $statusCode == 201"}]
        outputs: {cartId: "$response.body#/cartId"}
      - stepId: order
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1orders/post"
        parameters:
          - {name: Authorization, in: header, value: "Bearer {$steps.login.outputs.token}"}
        requestBody:
          contentType: "application/json"
          payload: {cartId: "$steps.add.outputs.cartId", paymentMethod: "test-card"}
        successCriteria:
          - condition: "$statusCode == 201"
          - condition: "$response.body#/status == 'confirmed'"

x-capacitylab-load:
  schema: "capacitylab.workload-arazzo/1"
  model: {kind: open, nominalRate: 10}
  mix: {browse: 70, add_to_cart: 20, checkout: 10}
  objective: {kind: none}
  units:
    browse: {one: "product view", many: "product views"}
    add_to_cart: {one: "cart addition", many: "cart additions"}
    checkout: {one: order, many: orders}
  inputs:
    browse:
      product: {kind: row, data: products, order: random}
    add_to_cart:
      product: {kind: row, data: products, order: random}
      password: {kind: secret, name: SHOP_TEST_PASSWORD}
    checkout:
      product: {kind: row, data: products, order: random}
      password: {kind: secret, name: SHOP_TEST_PASSWORD}
  secrets: [SHOP_TEST_PASSWORD]
  correlation:
    loadRunIdHeader: "x-capacitylab-load-run-id"
    profile: "capacitylab_target_telemetry"
    traceContext: "w3c"
```

```bash
echo 'SHOP_TEST_PASSWORD=<test user password>' > ../.load.env   # keep it out of git
capacitylab-load run ./LOAD --target https://shop.example.com --smoke --secrets-file ../.load.env --cloud
```

At `--rps 10` this starts 7 browse, 2 add-to-cart and 1 checkout iterations per second, about
21 HTTP requests per second.

### 9.3 Two hosts: auth and API

`LOAD/README.md`:

```markdown
---
capacitylab: "load-folder/1"
application: "shop.example.com"
arazzo: "api.arazzo.yaml"
openapi:
  kind: "none"
secrets:
  - TEST_USER_PASSWORD
---

Log in on the auth host, then read orders on the API host.
```

`LOAD/api.arazzo.yaml`:

```yaml
arazzo: "1.0.1"
info: {title: "Auth and API hosts", version: "1"}
sourceDescriptions:
  - {name: auth, url: "./auth-openapi.yaml", type: openapi}
  - {name: api, url: "./api-openapi.yaml", type: openapi}
workflows:
  - workflowId: orders
    summary: "Log in and list my orders"
    inputs: {type: object, properties: {password: {type: string}}}
    steps:
      - stepId: token
        operationPath: "{$sourceDescriptions.auth.url}#/paths/~1oauth~1token/post"
        requestBody:
          contentType: "application/json"
          payload: {username: "loadtest@shop.example.com", password: "$inputs.password"}
        successCriteria: [{condition: "$statusCode == 200"}]
        outputs: {accessToken: "$response.body#/access_token"}
      - stepId: my_orders
        operationPath: "{$sourceDescriptions.api.url}#/paths/~1v1~1orders/get"
        parameters:
          - {name: Authorization, in: header, value: "Bearer {$steps.token.outputs.accessToken}"}
          - {name: limit, in: query, value: "20"}
        successCriteria: [{condition: "$statusCode == 200"}]
x-capacitylab-load:
  schema: "capacitylab.workload-arazzo/1"
  model: {kind: open, nominalRate: 5}
  mix: {orders: 1}
  objective: {kind: none}
  units:
    orders: {one: "order list", many: "order lists"}
  inputs:
    orders:
      password: {kind: secret, name: TEST_USER_PASSWORD}
  secrets: [TEST_USER_PASSWORD]
  correlation:
    loadRunIdHeader: "x-capacitylab-load-run-id"
    profile: "capacitylab_target_telemetry"
    traceContext: "w3c"
```

```bash
capacitylab-load compile ./LOAD --target auth=https://auth.shop.example.com \
  --target api=https://api.shop.example.com --rps 10 --duration 30s
```

`--target https://shop.example.com` alone fails here with
`Missing --target <name>=<url> for sourceDescriptions: api`: the unnamed origin fills only the
first source (`auth`).

### 9.4 Multipart file upload

`LOAD/README.md`:

```markdown
---
capacitylab: "load-folder/1"
application: "shop.example.com"
arazzo: "upload.arazzo.yaml"
openapi:
  kind: "none"
data:
  avatar:
    path: "data/avatar.png"
    filename: "avatar.png"
    contentType: "image/png"
secrets: []
---

Upload a small image as multipart/form-data.
```

`LOAD/data/avatar.png`: any PNG file (binary, not shown).

`LOAD/upload.arazzo.yaml`:

```yaml
arazzo: "1.0.1"
info: {title: "Avatar upload", version: "1"}
sourceDescriptions:
  - {name: target, url: "./openapi.yaml", type: openapi}
workflows:
  - workflowId: upload
    summary: "Upload an avatar"
    steps:
      - stepId: upload
        operationPath: "{$sourceDescriptions.target.url}#/paths/~1api~1uploads/post"
        requestBody:
          contentType: "multipart/form-data"
          payload:
            - {name: title, value: "load test avatar"}
            - {name: file, file: avatar}
        successCriteria: [{condition: "$statusCode == 201"}]
x-capacitylab-load:
  schema: "capacitylab.workload-arazzo/1"
  model: {kind: open, nominalRate: 2}
  mix: {upload: 1}
  objective: {kind: none}
  units:
    upload: {one: upload, many: uploads}
  correlation:
    loadRunIdHeader: "x-capacitylab-load-run-id"
    profile: "capacitylab_target_telemetry"
    traceContext: "w3c"
```
