Skip to content

Run log and manifest ​

Two JSON views of a project: the run log says what a run did; the manifest says what the project defines, without running anything.

The run log ​

Every run, demo and test writes .waygraph/runs/<runId>.jsonl, one event per line, and prints waygraph: run log <file> when it ends. runLog: false in the config turns it off; runLog: "<folder>" moves it.

EventCarries
run:startthe run's id and what it plays (label: the flow or chain; under waygraph test --flows, the flow's export name; none for a test that calls flow.run itself)
run:memthe mem each part of the run was seeded with, by key name (what --replay <runId> seeds again, a per-run value made new), and the flow's meta (title, description, labels, ticket, owner) when it has one
step:startthe Block, its kind (nav, page, method, effect, api), where it starts; parent for a step inside a fast-forward unit, cleanup: true for a .finally step or an undo, given: true for a precondition (map({ given })), pane for a step in a flow with panes (Split view)
interrupta layout's interrupt showed up and was handled: { layout, name, index? } (Layouts)
step:readwhat the page showed after the step: { checkpoint, read, missing, notes, readBlocks } (What a page shows)
step:callan HTTP call the step made, by the page (fetch/XHR) or by an API Block: { index, source, method, url, route, status, ms, size, failed, external?, cacheable?, pane?, body }. route has its ids folded (/posts/:id); external marks another origin than the app's; body is the call's artifact
step:statea step changed a state (sets): { index, key, value } (States)
step:endwhere it landed, how long it took, the page's address (url)
step:errorthe failure; for a failed check, check: { trait, block, wants, saw, url, heading }
run:artifacta saved video (at the place its flow's video says), screenshot or call (kind: "call": <runId>/calls/<step>-<n>.json, the request and the response, with authorization, cookies and fields named like a password or token masked); a Block's screenshot (screenshot: true) also names its step (index, block) and the page (checkpoint)
compare:diffa compared run (--compare): after its step-th step (block), where the two sides differed (diffs: what landed, the outcome, a read field key, with both values) and the two steps in the log (indexes)
run:endok, the result or the error

Each run has its own id, even when several run at once in one process (parallel traverse workers). In code:

ts
import { onRunEvent } from "waygraph";

onRunEvent((event) => {
  if (event.type === "step:error") console.log(event.check?.saw);
});

WAYGRAPH_JSON=1 waygraph run <flow> prints one JSON report instead, with the same runId.

The manifest ​

sh
npx waygraph manifest [project] [--out manifest.json]
ListsWith
every Blockkind, description, route from → to, requires, file and source (the lines that define it), its map group; a Nav or Page Block's url (a url built from mem as a pattern: /requests/:id); checks: its precondition and verify Traits as data (name, wants, selector; "dynamic" when a function builds them); selectors: the selector entries its definition reads (LoginSel.submit with its string, file and line); for: the accounts it's given, when it says
every selector entryselectors: each entry of the project's selector files (_sel.ts, *.sel.ts): its name, its selector (or the code that builds one), file and line. Read from the source, so LoginSel.x reached through another variable isn't linked to its Block
every page's addressespageUrls: by Checkpoint, its Navs' urls and the Trait.url its Blocks verify
the site mapsiteTree: its sites, the folders of their paths no page has, each page's path (paths) and each page's and folder's parent (parents)
every layoutlayouts: its name, file, the pages it covers, its links (the Block, where it leads or "parent", its selector, its for), its actions and its Read Block (Layouts)
every accountaccounts: the names of the project's accounts (src/accounts/)
a flow's panespanes (each pane's name, as, device, with) and stepPanes (the pane each step plays in) (Split view)
the projectits name, folder, waygraph version, and baseUrl when one is set
its configconfig: the waygraph.config.* file and what it resolves to (after .env), as JSON: a function shows as (function name)
every flowits useCase (from src/flows/<page>/<outcome>.flow.ts), its steps in order, its settings, its source lines
every Checkpointits tag
every page's read (and layout's)the Checkpoints it reads and the shape of its fields: "catalog.items": [{ "name": "string", "price": "number" }]; its source lines

It's read from the Blocks themselves (the same scan graph, check, auto and the runner use), so it can't go stale. Blocks from installed map packages are included, with the package name as their map. In code: buildManifest(projectDir). Waygraph Studio (waygraph studio) draws it, with the runs.

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed